You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2009/11/03 15:36:49 UTC
svn commit: r832434 - in /httpd/httpd/trunk: ./ server/mpm/
server/mpm/event/ server/mpm/mpmt_os2/ server/mpm/prefork/
server/mpm/simple/ server/mpm/winnt/ server/mpm/worker/
Author: trawick
Date: Tue Nov 3 14:36:48 2009
New Revision: 832434
URL: http://svn.apache.org/viewvc?rev=832434&view=rev
Log:
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.)
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/acinclude.m4
httpd/httpd/trunk/server/mpm/config.m4
httpd/httpd/trunk/server/mpm/event/Makefile.in
httpd/httpd/trunk/server/mpm/event/config3.m4
httpd/httpd/trunk/server/mpm/mpmt_os2/Makefile.in
httpd/httpd/trunk/server/mpm/mpmt_os2/config5.m4
httpd/httpd/trunk/server/mpm/prefork/Makefile.in
httpd/httpd/trunk/server/mpm/prefork/config3.m4
httpd/httpd/trunk/server/mpm/simple/Makefile.in
httpd/httpd/trunk/server/mpm/simple/config3.m4
httpd/httpd/trunk/server/mpm/winnt/Makefile.in
httpd/httpd/trunk/server/mpm/winnt/config3.m4
httpd/httpd/trunk/server/mpm/worker/Makefile.in
httpd/httpd/trunk/server/mpm/worker/config3.m4
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Tue Nov 3 14:36:48 2009
@@ -252,9 +252,10 @@
*) 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]
Modified: httpd/httpd/trunk/acinclude.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/acinclude.m4?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/acinclude.m4 (original)
+++ httpd/httpd/trunk/acinclude.m4 Tue Nov 3 14:36:48 2009
@@ -201,6 +201,59 @@
])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:
Modified: httpd/httpd/trunk/server/mpm/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/config.m4?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/config.m4 (original)
+++ httpd/httpd/trunk/server/mpm/config.m4 Tue Nov 3 14:36:48 2009
@@ -49,7 +49,11 @@
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 ()
Modified: httpd/httpd/trunk/server/mpm/event/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/Makefile.in?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/Makefile.in (original)
+++ httpd/httpd/trunk/server/mpm/event/Makefile.in Tue Nov 3 14:36:48 2009
@@ -1,5 +1 @@
-
-LTLIBRARY_NAME = libevent.la
-LTLIBRARY_SOURCES = event.c fdqueue.c pod.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
Modified: httpd/httpd/trunk/server/mpm/event/config3.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/config3.m4?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/config3.m4 (original)
+++ httpd/httpd/trunk/server/mpm/event/config3.m4 Tue Nov 3 14:36:48 2009
@@ -1,6 +1,5 @@
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
+])
Modified: httpd/httpd/trunk/server/mpm/mpmt_os2/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/mpmt_os2/Makefile.in?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/mpmt_os2/Makefile.in (original)
+++ httpd/httpd/trunk/server/mpm/mpmt_os2/Makefile.in Tue Nov 3 14:36:48 2009
@@ -1,5 +1 @@
-
-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
Modified: httpd/httpd/trunk/server/mpm/mpmt_os2/config5.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/mpmt_os2/config5.m4?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/mpmt_os2/config5.m4 (original)
+++ httpd/httpd/trunk/server/mpm/mpmt_os2/config5.m4 Tue Nov 3 14:36:48 2009
@@ -1,5 +1,3 @@
-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
+])
Modified: httpd/httpd/trunk/server/mpm/prefork/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/Makefile.in?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/Makefile.in (original)
+++ httpd/httpd/trunk/server/mpm/prefork/Makefile.in Tue Nov 3 14:36:48 2009
@@ -1,5 +1 @@
-
-LTLIBRARY_NAME = libprefork.la
-LTLIBRARY_SOURCES = prefork.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
Modified: httpd/httpd/trunk/server/mpm/prefork/config3.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/prefork/config3.m4?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/prefork/config3.m4 (original)
+++ httpd/httpd/trunk/server/mpm/prefork/config3.m4 Tue Nov 3 14:36:48 2009
@@ -1,3 +1 @@
-if ap_mpm_is_enabled "prefork"; then
- APACHE_FAST_OUTPUT(server/mpm/prefork/Makefile)
-fi
+APACHE_MPM_MODULE(prefork, $enable_mpm_prefork)
Modified: httpd/httpd/trunk/server/mpm/simple/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/Makefile.in?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/Makefile.in (original)
+++ httpd/httpd/trunk/server/mpm/simple/Makefile.in Tue Nov 3 14:36:48 2009
@@ -1,4 +1 @@
-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
Modified: httpd/httpd/trunk/server/mpm/simple/config3.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/config3.m4?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/config3.m4 (original)
+++ httpd/httpd/trunk/server/mpm/simple/config3.m4 Tue Nov 3 14:36:48 2009
@@ -1,3 +1,3 @@
-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)
Modified: httpd/httpd/trunk/server/mpm/winnt/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/Makefile.in?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/Makefile.in (original)
+++ httpd/httpd/trunk/server/mpm/winnt/Makefile.in Tue Nov 3 14:36:48 2009
@@ -1,5 +1 @@
-
-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
Modified: httpd/httpd/trunk/server/mpm/winnt/config3.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/config3.m4?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/config3.m4 (original)
+++ httpd/httpd/trunk/server/mpm/winnt/config3.m4 Tue Nov 3 14:36:48 2009
@@ -1,3 +1,2 @@
-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)
Modified: httpd/httpd/trunk/server/mpm/worker/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/Makefile.in?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/Makefile.in (original)
+++ httpd/httpd/trunk/server/mpm/worker/Makefile.in Tue Nov 3 14:36:48 2009
@@ -1,5 +1,2 @@
-LTLIBRARY_NAME = libworker.la
-LTLIBRARY_SOURCES = worker.c fdqueue.c pod.c
-
-include $(top_srcdir)/build/ltlib.mk
+include $(top_srcdir)/build/special.mk
Modified: httpd/httpd/trunk/server/mpm/worker/config3.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/config3.m4?rev=832434&r1=832433&r2=832434&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/worker/config3.m4 (original)
+++ httpd/httpd/trunk/server/mpm/worker/config3.m4 Tue Nov 3 14:36:48 2009
@@ -1,6 +1,5 @@
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
+])