Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 91751 invoked by uid 500); 2 Oct 2001 18:29:53 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 91726 invoked from network); 2 Oct 2001 18:29:53 -0000 Date: Tue, 2 Oct 2001 11:29:58 -0700 From: Aaron Bannert To: dev@httpd.apache.org Subject: [PATCH] fix --enable-mods-shared=most for compiled-in modules Message-ID: <20011002112958.H4128@clove.org> References: <20011001165920.M25494@clove.org> <20011001174213.N25494@clove.org> <20011001181635.O25494@clove.org> <20011002042041.CB36446DFC@koj.rkbloom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011002042041.CB36446DFC@koj.rkbloom.net>; from rbb@covalent.net on Mon, Oct 01, 2001 at 09:20:41PM -0700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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