*) 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]
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<<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 APACHE_MPM_ENABLED(name)
AC_DEFUN(APACHE_MPM_ENABLED,[
- ENABLED_MPMS="$ENABLED_MPMS $1 "
+ if ap_mpm_is_enabled $1; then
+ :
+ else
+ ENABLED_MPMS="$ENABLED_MPMS $1 "
+ fi
])dnl
ap_mpm_is_supported ()
-
-LTLIBRARY_NAME = libevent.la
-LTLIBRARY_SOURCES = event.c fdqueue.c pod.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
dnl ## XXX - Need a more thorough check of the proper flags to use
-if ap_mpm_is_enabled "event"; then
+APACHE_MPM_MODULE(event, $enable_mpm_event, event.lo fdqueue.lo pod.lo,[
AC_CHECK_FUNCS(pthread_kill)
- APACHE_FAST_OUTPUT(server/mpm/event/Makefile)
-fi
+])
-
-LTLIBRARY_NAME = libmpmt_os2.la
-LTLIBRARY_SOURCES = mpmt_os2.c mpmt_os2_child.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
-if ap_mpm_is_enabled "mpmt_os2"; then
- AC_CACHE_SAVE
- APACHE_FAST_OUTPUT(server/mpm/mpmt_os2/Makefile)
+APACHE_MPM_MODULE(mpmt_os2, $enable_mpm_mpmt_os2, mpmt_os2.lo mpmt_os2_child.lo,[
APR_ADDTO(CFLAGS,-Zmt)
-fi
+])
-
-LTLIBRARY_NAME = libprefork.la
-LTLIBRARY_SOURCES = prefork.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
-if ap_mpm_is_enabled "prefork"; then
- APACHE_FAST_OUTPUT(server/mpm/prefork/Makefile)
-fi
+APACHE_MPM_MODULE(prefork, $enable_mpm_prefork)
-LTLIBRARY_NAME = libsimple.la
-LTLIBRARY_SOURCES = simple_api.c simple_children.c simple_core.c simple_event.c simple_run.c simple_io.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
-if ap_mpm_is_enabled "simple"; then
- APACHE_FAST_OUTPUT(server/mpm/simple/Makefile)
-fi
+simple_objects="simple_api.lo simple_children.lo simple_core.lo \
+simple_event.lo simple_run.lo simple_io.lo"
+APACHE_MPM_MODULE(simple, $enable_mpm_simple, $simple_objects)
-
-LTLIBRARY_NAME = libwinnt.la
-LTLIBRARY_SOURCES = child.c mpm_winnt.c nt_eventlog.c service.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
-if ap_mpm_is_enabled "winnt"; then
- APACHE_FAST_OUTPUT(server/mpm/winnt/Makefile)
-fi
+winnt_objects="child.lo mpm_winnt.lo nt_eventlog.lo service.lo"
+APACHE_MPM_MODULE(winnt, $enable_mpm_winnt, $winnt_objects)
-LTLIBRARY_NAME = libworker.la
-LTLIBRARY_SOURCES = worker.c fdqueue.c pod.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
dnl ## XXX - Need a more thorough check of the proper flags to use
-if ap_mpm_is_enabled "worker"; then
+APACHE_MPM_MODULE(worker, $enable_mpm_worker, worker.lo fdqueue.lo pod.lo,[
AC_CHECK_FUNCS(pthread_kill)
- APACHE_FAST_OUTPUT(server/mpm/worker/Makefile)
-fi
+])