]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
respect the MPM's indication passed on APACHE_MPM_SUPPORTED() of whether
authorJeff Trawick <trawick@apache.org>
Tue, 3 Nov 2009 23:51:20 +0000 (23:51 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 3 Nov 2009 23:51:20 +0000 (23:51 +0000)
or not it can run as a shared library

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832621 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/config.m4
server/mpm/config2.m4

index 08541b0932b0a86ff586c29cb402266968208c53..27075a14f49ab81c146fc1801495553ee5511e3b 100644 (file)
@@ -42,6 +42,9 @@ esac
 dnl APACHE_MPM_SUPPORTED(name, supports-shared, is_threaded)
 AC_DEFUN(APACHE_MPM_SUPPORTED,[
     SUPPORTED_MPMS="$SUPPORTED_MPMS $1 "
+    if test "$2" = "yes"; then
+        SHARED_MPMS="$SHARED_MPMS $1 "
+    fi
     if test "$3" = "yes"; then
         THREADED_MPMS="$THREADED_MPMS $1 "
     fi
@@ -65,6 +68,15 @@ ap_mpm_is_supported ()
     fi
 }
 
+ap_mpm_supports_shared ()
+{
+    if echo "$SHARED_MPMS" | grep " $1 " >/dev/null; then
+        return 0
+    else
+        return 1
+    fi
+}
+
 ap_mpm_is_threaded ()
 {
     if test "$mpm_build" = "shared" -a ac_cv_define_APR_HAS_THREADS = "yes"; then
index 92f06acf2510e78d729b3ff29f150755235c6247..5e155546907d043d519cab2a545e5aaa079353ba 100644 (file)
@@ -36,14 +36,18 @@ APACHE_HELP_STRING(--enable-mpms-shared=MPM-LIST,Space-separated list of MPM mod
     mpm_build=shared
     for i in $enableval; do
         if test "$i" = "all"; then
-            for j in $SUPPORTED_MPMS; do
+            for j in $SHARED_MPMS; do
                 eval "enable_mpm_$j=shared"
                 APACHE_MPM_ENABLED($j)
             done
         else
             i=`echo $i | sed 's/-/_/g'`
-            eval "enable_mpm_$i=shared"
-            APACHE_MPM_ENABLED($i)
+            if ap_mpm_supports_shared $i; then
+                eval "enable_mpm_$i=shared"
+                APACHE_MPM_ENABLED($i)
+            else
+                AC_MSG_ERROR([MPM $i does not support dynamic loading.])
+            fi
         fi
     done
 ], [mpm_build=static])