Apache for Cygwin is currently broken because of no HAVE_*_SERIALIZED_ACCEPT #defines within src/include/ap_config.h, so here are a couple of Cygwin specific changes. Please commit changes to CVS. Here is what has been changed: * src/include/ap_config.h: added two #define statements to support serialized accept on Cygwin too. * src/helpers/install.sh: Martin added the last time to much concerning the ".exe" extension detection while "make install", which in fact then did not work. This will work and has no impact on other OS. * src/Configure: made a slight change to Cygwin specific LD_SHLIB definition. * htdocs/manual/cygwin.html: added a couple of extra information that should be usefull for anyone attempting to compile using shared DLLs. Stipe [EMAIL PROTECTED] ------------------------------------------------------------------- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de ------------------------------------------------------------------- wapme.net - wherever you are
diff -ur apache-1.3/htdocs/manual/cygwin.html apache-1.3-cygwin/htdocs/manual/cygwin.html --- apache-1.3/htdocs/manual/cygwin.html Wed Aug 22 18:20:25 2001 +++ apache-1.3-cygwin/htdocs/manual/cygwin.html Fri Sep 21 13:18:02 2001 @@ -216,6 +216,14 @@ <code>libhttpd.dll</code> and create the <code>libhttpd.a</code> import library which is required for linking <code>httpd.exe</code>.</p> +<p><strong>Note:</strong> After <code>make install</code> is performed you will + find the resulting core DLL module <code>libhttpd.dll</code> within + <code>/usr/local/apache/libexec</code>. This is due to the installation process. + Please move the file to Apache's <code>bin</code> directory, i.e. +<pre> + $ mv /usr/local/apache/libexec/libhttpd.dll /usr/local/apache/bin +</pre> + <li><strong>Shared DLL modules linked version</strong> <p>This method is currently <strong>ONLY</strong> supported using a patched version of <code>ld.exe</code>. Please see the @@ -257,7 +265,7 @@ $ gcc --shared -o <i>module</i>.dll <i>module</i>.lo <i>/path/to/libhttpd.dll</i> </pre> <p>The shared DLL module has to be placed in Apache's - <code>bin</code>directory, where <code>libhttpd.dll</code> also goes.</p> + <code>bin</code> directory, where <code>libhttpd.dll</code> also resides.</p> <li>Add configuration directives to <code>conf/httpd.conf</code> to load and activate shared DLL modules at runtime: @@ -275,13 +283,35 @@ to build.</p> <li><strong>Using apxs to create shared DLL modules</strong> -<p>To make the extending<code>httpd</code> with shared DLL modules +<p>To make the extending <code>httpd</code> with shared DLL modules easier, you can use <a href="programs/apxs.html"><code>apxs</code></a>. <p>Make sure you have configured <code>$CFG_LDFLAGS_SHLIB</code> within <code>apxs</code> to include the <code>--shared</code> directive and the path to the shared code DLL <code>libhttpd.dll</code>. + +<p>After performing <code>make install</code> you will probably have the + following lines within your <code>apxs</code>: +<pre> + # 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 + [...] +</pre> + Change these to reflect the new compile options needed for shared DLL + modules as follows: +<pre> + # 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(<i>/path/to/libhttpd.dll</i>); # substituted via +Makefile.tmpl + [...] +</pre> + <p>Now you should be able to create a shared DLL module from a <code>mod_foo.c</code> 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 */