httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r757999 - in /httpd/httpd/trunk: modules/arch/unix/config5.m4 server/mpm/config.m4
Date Tue, 24 Mar 2009 20:23:42 GMT
Author: trawick
Date: Tue Mar 24 20:23:42 2009
New Revision: 757999

URL: http://svn.apache.org/viewvc?rev=757999&view=rev
Log:
Allow building httpd without a built-in MPM by specifying

  --with-mpm=shared

on configure.  When built thusly, an MPM should be loaded via LoadModule.

(Currently you need to build the MPM with apxs.)

Modified:
    httpd/httpd/trunk/modules/arch/unix/config5.m4
    httpd/httpd/trunk/server/mpm/config.m4

Modified: httpd/httpd/trunk/modules/arch/unix/config5.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/unix/config5.m4?rev=757999&r1=757998&r2=757999&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/unix/config5.m4 (original)
+++ httpd/httpd/trunk/modules/arch/unix/config5.m4 Tue Mar 24 20:23:42 2009
@@ -1,9 +1,9 @@
 
 APACHE_MODPATH_INIT(arch/unix)
 
-
 if test "$APACHE_MPM" = "simple" -o "$APACHE_MPM" = "worker" \
-   -o "$APACHE_MPM" = "event" -o "$APACHE_MPM" = "prefork" ; then
+   -o "$APACHE_MPM" = "event" -o "$APACHE_MPM" = "prefork" \
+   -o "$APACHE_MPM" = "shared"; then
   unixd_mods_enable=yes
 else
   unixd_mods_enable=no

Modified: httpd/httpd/trunk/server/mpm/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/config.m4?rev=757999&r1=757998&r2=757999&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/config.m4 (original)
+++ httpd/httpd/trunk/server/mpm/config.m4 Tue Mar 24 20:23:42 2009
@@ -1,7 +1,9 @@
 AC_MSG_CHECKING(which MPM to use)
 AC_ARG_WITH(mpm,
 APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use.
-                          MPM={simple|beos|event|worker|prefork|mpmt_os2|perchild|leader|threadpool|winnt}),[
+                          MPM={simple|beos|event|worker|prefork|mpmt_os2|perchild|leader|threadpool|winnt}
+                          Specify "shared" instead of an MPM name to load MPMs dynamically.
+),[
   APACHE_MPM=$withval
 ],[
   if test "x$APACHE_MPM" = "x"; then
@@ -11,16 +13,18 @@
 AC_MSG_RESULT($APACHE_MPM)
 
 apache_cv_mpm=$APACHE_MPM
-	
+
+dnl Note that a build with an explicitly loaded MPM must support threaded MPMs.
 ap_mpm_is_threaded ()
 {
-    if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm"
= "simple" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm"
= "winnt" -o "$apache_cv_mpm" = "threadpool" ; then
+    if test "$apache_cv_mpm" = "shared" -o "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm"
= "event" -o "$apache_cv_mpm" = "simple" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm"
= "leader" -o "$apache_cv_mpm" = "winnt" -o "$apache_cv_mpm" = "threadpool" ; then
         return 0
     else
         return 1
     fi
 }
 
+dnl No such check for a shared MPM.
 ap_mpm_is_experimental ()
 {
     if test "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm"
= "leader" -o "$apache_cv_mpm" = "threadpool" ; then
@@ -59,17 +63,26 @@
 
 APACHE_FAST_OUTPUT(server/mpm/Makefile)
 
-MPM_NAME=$apache_cv_mpm
-if ap_mpm_is_experimental; then
-  AC_MSG_WARN(You have selected an EXPERIMENTAL MPM.  Be warned!)
-  MPM_SUBDIR_NAME=experimental/$MPM_NAME
+if test "$apache_cv_mpm" = "shared"; then
+  MPM_NAME=""
+  MPM_SUBDIR_NAME=""
+  MPM_LIB=""
+  MPM_DIR=""
 else
-  MPM_SUBDIR_NAME=$MPM_NAME
+  MPM_NAME=$apache_cv_mpm
+  if ap_mpm_is_experimental; then
+    AC_MSG_WARN(You have selected an EXPERIMENTAL MPM.  Be warned!)
+    MPM_SUBDIR_NAME=experimental/$MPM_NAME
+  else
+    MPM_SUBDIR_NAME=$MPM_NAME
+  fi
+  MPM_DIR=server/mpm/$MPM_SUBDIR_NAME
+  MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
+
+  APACHE_SUBST(MPM_NAME)
+  APACHE_SUBST(MPM_SUBDIR_NAME)
+  MODLIST="$MODLIST mpm_${MPM_NAME}"
 fi
-MPM_DIR=server/mpm/$MPM_SUBDIR_NAME
-MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
 
 APACHE_SUBST(MPM_NAME)
 APACHE_SUBST(MPM_SUBDIR_NAME)
-MODLIST="$MODLIST mpm_${MPM_NAME}"
-



Mime
View raw message