From: Jeff Trawick Date: Tue, 3 Nov 2009 14:36:48 +0000 (+0000) Subject: Change the configure-based MPM build mechanism to support building X-Git-Tag: 2.3.3~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4e7b85b2f4f6e169841ce74cab119e0c9bb2a77;p=thirdparty%2Fapache%2Fhttpd.git Change the configure-based MPM build mechanism to support building an MPM as a shared shared or dynamic module, primarily using the APACHE_MPM_MODULE() function. --enable-mpms-shared now builds/installs the MPMs as dynamic modules. (But no LoadModule directives are added.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832434 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 4fe5853d7e6..a886f3e0289 100644 --- a/CHANGES +++ b/CHANGES @@ -252,9 +252,10 @@ Changes with Apache 2.3.3 *) mod_proxy_ajp: Forward remote port information by default. [Rainer Jung] - *) Allow MPMs to be loaded dynamically, as with most other modules. This - required changes to the MPM interfaces. Removed: mpm.h, mpm_default.h - (as an installed header), APACHE_MPM_DIR, MPM_NAME, ap_threads_per_child, + *) Allow MPMs to be loaded dynamically, as with most other modules. Use + --enable-mpms-shared={list|"all"} to enable. This required changes to + the MPM interfaces. Removed: mpm.h, mpm_default.h (as an installed + header), APACHE_MPM_DIR, MPM_NAME, ap_threads_per_child, ap_max_daemons_limit, ap_my_generation, etc. ap_mpm_query() can't be called until after the register-hooks phase. [Jeff Trawick] diff --git a/acinclude.m4 b/acinclude.m4 index e9dcec84253..5caeecc0694 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -200,6 +200,59 @@ EOF fi ])dnl +dnl +dnl APACHE_MPM_MODULE(name[, shared[, objects[, config[, path]]]]) +dnl +dnl Provide information for building the MPM. (Enablement is handled using +dnl --with-mpm/--enable-mpms-shared.) +dnl +dnl name -- name of MPM, same as MPM directory name +dnl shared -- variable to check for value "shared" to indicate shared module build +dnl objects -- one or more .lo files to link into the MPM module (default: mpmname.lo) +dnl config -- configuration logic to run if the MPM is enabled +dnl path -- relative path to MPM (default: server/mpm/mpmname) +dnl +AC_DEFUN(APACHE_MPM_MODULE,[ + if ap_mpm_is_enabled $1; then + if test -z "$3"; then + objects="$1.lo" + else + objects="$3" + fi + + if test -z "$5"; then + mpmpath="server/mpm/$1" + else + mpmpath=$5 + fi + + APACHE_FAST_OUTPUT($mpmpath/Makefile) + + if test -z "$2"; then + libname="lib$1.la" + cat >$mpmpath/modules.mk<$mpmpath/modules.mk<