From: Jeff Trawick Date: Tue, 3 Nov 2009 23:51:20 +0000 (+0000) Subject: respect the MPM's indication passed on APACHE_MPM_SUPPORTED() of whether X-Git-Tag: 2.3.3~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=deb0819d23701491dac7868869b04e778f3dfae1;p=thirdparty%2Fapache%2Fhttpd.git respect the MPM's indication passed on APACHE_MPM_SUPPORTED() of whether 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 --- diff --git a/server/mpm/config.m4 b/server/mpm/config.m4 index 08541b0932b..27075a14f49 100644 --- a/server/mpm/config.m4 +++ b/server/mpm/config.m4 @@ -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 diff --git a/server/mpm/config2.m4 b/server/mpm/config2.m4 index 92f06acf251..5e155546907 100644 --- a/server/mpm/config2.m4 +++ b/server/mpm/config2.m4 @@ -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])