httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject [PATCH] fix --enable-mods-shared=most for compiled-in modules
Date Tue, 02 Oct 2001 18:29:58 GMT
On Mon, Oct 01, 2001 at 09:20:41PM -0700, Ryan Bloom wrote:
> We should fix the configure script so that it automatically adds the LoadModule
> line, just like it did in 1.3.


This patch fixes the problem described in the STATUS file whereby modules
that are compiled-in by default would not be enabled as DSOs when the
--enable-mods-shared=most parameter was passed to configure.

A new enable state was invented: "static". This is specified as a param
to the APACHE_MODULE() macro to specify that a particular module shall
not be compiled as a DSO (unless specifically overridden by name). mod_so
and mod_http have been set to "static" in this patch.

This patch should not affect anyone who normally omits
--enable-mods-shared from their configure parameters.

I will follow up this patch in a few days with a patch to have configure
properly build the LoadModule directives for httpd.conf at install time
(as noted by Ryan above and in the STATUS diff below)...

-aaron


Index: STATUS
===================================================================
RCS file: /home/cvspublic/httpd-2.0/STATUS,v
retrieving revision 1.297
diff -u -r1.297 STATUS
--- STATUS	2001/09/28 17:53:02	1.297
+++ STATUS	2001/10/02 18:17:28
@@ -95,12 +95,9 @@
       to make it agree with the operation of the StartServers
       directive.
 
-    * configure --enable-mods-shared=most option has issues.  Example: 
-
-      ./configure --enable-mods-shared=most
-
-        This builds mod_headers as a DSO (good) but builds mod_mime
-        as a compiled-in module (bad).
+    * Fix the configure script to add a LoadModule directive to
+      the default httpd.conf for any module that was compiled
+      as a DSO.
 
     * revamp the input filter semantics, per discussions since
       February (and especially at the hackathon last
Index: acinclude.m4
===================================================================
RCS file: /home/cvspublic/httpd-2.0/acinclude.m4,v
retrieving revision 1.101
diff -u -r1.101 acinclude.m4
--- acinclude.m4	2001/09/30 07:57:14	1.101
+++ acinclude.m4	2001/10/02 18:17:29
@@ -199,6 +199,7 @@
 dnl   yes  -- enabled by default. user must explicitly disable.
 dnl   no   -- disabled under default, most, all. user must explicitly enable.
 dnl   most -- disabled by default. enabled explicitly or with most or all.
+dnl   static -- enabled as static by default, must be explicitly changed.
 dnl   ""   -- disabled under default, most. enabled explicitly or with all.
 dnl
 dnl basically: yes/no is a hard setting. "most" means follow the "most"
@@ -218,11 +219,16 @@
   else
     _apmod_error_fatal="yes"
   fi
-  if test "$enable_$1" = "most"; then
+  if test "$enable_$1" = "static"; then
+    enable_$1=yes
+  elif test "$enable_$1" = "yes"; then
+    enable_$1=$module_default
+    _apmod_extra_msg=" ($module_selection)"
+  elif test "$enable_$1" = "most"; then
     if test "$module_selection" = "most" -o "$module_selection" = "all"; then
       enable_$1=$module_default
       _apmod_extra_msg=" ($module_selection)"
-    else
+    elif test "$enable_$1" != "yes"; then
       enable_$1=no
     fi
   elif test "$enable_$1" = "maybe-all"; then
Index: modules/http/config2.m4
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/http/config2.m4,v
retrieving revision 1.1
diff -u -r1.1 config2.m4
--- modules/http/config2.m4	2001/04/18 20:56:04	1.1
+++ modules/http/config2.m4	2001/10/02 18:17:29
@@ -4,7 +4,8 @@
 
 http_objects="http_core.lo http_protocol.lo http_request.lo"
 
-APACHE_MODULE(http, HTTP protocol handling, $http_objects, , yes)
+dnl mod_http freaks out when built as a DSO
+APACHE_MODULE(http, HTTP protocol handling, $http_objects, , static)
 APACHE_MODULE(mime, mapping of file-extension to MIME, , , yes)
 
 APACHE_MODPATH_FINISH
Index: modules/mappers/config9.m4
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/mappers/config9.m4,v
retrieving revision 1.3
diff -u -r1.3 config9.m4
--- modules/mappers/config9.m4	2001/04/29 05:24:10	1.3
+++ modules/mappers/config9.m4	2001/10/02 18:17:29
@@ -23,7 +23,7 @@
 dnl ### it here. we need to shift *this* config.m4 to be "last" or we
 dnl ### need to find a different way to set up this default and module spec.
 if test "$sharedobjs" = "yes"; then
-    APACHE_MODULE(so, DSO capability, , , yes)
+    APACHE_MODULE(so, DSO capability, , , static)
 else
     APACHE_MODULE(so, DSO capability, , , no)
 fi

Mime
View raw message