Return-Path:
libhttpd.dll
and create the libhttpd.a
import
library which is required for linking httpd.exe
.
Note: After make install
is performed you will
+ find the resulting core DLL module libhttpd.dll
within
+ /usr/local/apache/libexec
. This is due to the installation process.
+ Please move the file to Apache's bin
directory, i.e.
+
+ $ mv /usr/local/apache/libexec/libhttpd.dll /usr/local/apache/bin ++
This method is currently ONLY supported using
a patched version of ld.exe
. Please see the
@@ -257,7 +265,7 @@
$ gcc --shared -o module.dll module.lo /path/to/libhttpd.dll
The shared DLL module has to be placed in Apache's
- bin
directory, where libhttpd.dll
also goes.
bin
directory, where libhttpd.dll
also resides.
conf/httpd.conf
to load
and activate shared DLL modules at runtime:
@@ -275,13 +283,35 @@
to build.
To make the extendinghttpd
with shared DLL modules
+
To make the extending httpd
with shared DLL modules
easier, you can use apxs
.
Make sure you have configured $CFG_LDFLAGS_SHLIB
within
apxs
to include the --shared
directive and
the path to the shared code DLL libhttpd.dll
.
+
+
After performing make install
you will probably have the
+ following lines within your apxs
:
+
+ # apxs + [...] + my $CFG_LD_SHLIB = q(dllwrap --export-all --output-def libhttpd.def --implib libhttpd.a --driver-name gcc); # substituted via Makefile.tmpl + my $CFG_LDFLAGS_SHLIB = q(-g); # substituted via Makefile.tmpl + my $CFG_LIBS_SHLIB = q(); # substituted via Makefile.tmpl + [...] ++ Change these to reflect the new compile options needed for shared DLL + modules as follows: +
+ # apxs + [...] + my $CFG_LD_SHLIB = q(gcc); # substituted via Makefile.tmpl + my $CFG_LDFLAGS_SHLIB = q(-g --shared); # substituted via Makefile.tmpl + my $CFG_LIBS_SHLIB = q(/path/to/libhttpd.dll); # substituted via Makefile.tmpl + [...] ++
Now you should be able to create a shared DLL module from a mod_foo.c
source file with:
diff -ur apache-1.3/src/Configure apache-1.3-cygwin/src/Configure
--- apache-1.3/src/Configure Sun Jul 15 10:04:35 2001
+++ apache-1.3-cygwin/src/Configure Tue Sep 18 00:28:06 2001
@@ -1394,7 +1394,8 @@
SHLIB_SUFFIX_DEPTH=0
DLL_IMPORT_LIB='lib$(TARGET).a'
DLL_IMPORT_DEF='lib$(TARGET).def'
- LD_SHLIB='dllwrap --export-all --output-def $(DLL_IMPORT_DEF) --implib $(DLL_IMPORT_LIB) --driver-name $(CC)'
+ LD_SHLIB='dllwrap --export-all --implib $(DLL_IMPORT_LIB) --driver-name $(CC)'
LD_SHCORE_LIBS='$(LIBS)'
LIBS_SHLIB='$(EXTRA_LIBS)'
SHARED_CORE_EP=''
diff -ur apache-1.3/src/helpers/install.sh apache-1.3-cygwin/src/helpers/install.sh
--- apache-1.3/src/helpers/install.sh Tue Jun 12 10:24:53 2001
+++ apache-1.3-cygwin/src/helpers/install.sh Fri Sep 21 12:54:06 2001
@@ -88,13 +88,10 @@
fi
# Check if we need to add an executable extension (such as ".exe")
-# on specific OS to src and dst
+# on specific OS to src and dst.
+# At least Cygwin requires this to ensure a clean "make install".
if [ -f "$src.exe" ]; then
- if [ -f "$src" ]; then
- : # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ]
- else
ext=".exe"
- fi
fi
src="$src$ext"
dst="$dst$ext"
diff -ur apache-1.3/src/include/ap_config.h apache-1.3-cygwin/src/include/ap_config.h
--- apache-1.3/src/include/ap_config.h Mon Sep 10 22:12:02 2001
+++ apache-1.3-cygwin/src/include/ap_config.h Fri Sep 21 13:20:31 2001
@@ -976,7 +976,8 @@
#define USE_MMAP_SCOREBOARD
#define USE_MMAP_FILES
#define HAVE_SYSLOG 1
-
+#define HAVE_FCNTL_SERIALIZED_ACCEPT
+#define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
#else
/* Unknown system - Edit these to match */
--------------23A95CC60102C7E85B360C3A--