summaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2009-11-03 15:36:48 +0100
committerJeff Trawick <trawick@apache.org>2009-11-03 15:36:48 +0100
commitd4e7b85b2f4f6e169841ce74cab119e0c9bb2a77 (patch)
tree3946ebbdc22b507c8c40eeb317b75685e19720a2 /acinclude.m4
parent--with-mpm and --enable-mpms-shared: (diff)
downloadapache2-d4e7b85b2f4f6e169841ce74cab119e0c9bb2a77.tar.xz
apache2-d4e7b85b2f4f6e169841ce74cab119e0c9bb2a77.zip
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
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m453
1 files changed, 53 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e9dcec8425..5caeecc069 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -201,6 +201,59 @@ EOF
])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<<EOF
+$libname: $objects
+ \$(MOD_LINK) $objects
+DISTCLEAN_TARGETS = modules.mk
+static = $libname
+shared =
+EOF
+ else
+ apache_need_shared=yes
+ libname="mod_mpm_$1.la"
+ shobjects=`echo $objects | sed 's/\.lo/.slo/g'`
+ cat >$mpmpath/modules.mk<<EOF
+$libname: $shobjects
+ \$(SH_LINK) -rpath \$(libexecdir) -module -avoid-version $objects
+DISTCLEAN_TARGETS = modules.mk
+static =
+shared = $libname
+EOF
+ fi
+ $4
+ fi
+])dnl
+
+dnl
dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
dnl
dnl default is one of: