
trawick at apache
Nov 4, 2009, 3:35 PM
Post #1 of 1
(36 views)
Permalink
|
|
svn commit: r832907 - in /httpd/httpd/trunk/server/mpm: config.m4 config2.m4
|
|
Author: trawick Date: Wed Nov 4 23:35:30 2009 New Revision: 832907 URL: http://svn.apache.org/viewvc?rev=832907&view=rev Log: tweak MPM configure to avoid having to grep for MPM names in lists of MPMs of some type (threaded or share-able or enabled), as suggested by jorton rename some MPM-related variables Modified: httpd/httpd/trunk/server/mpm/config.m4 httpd/httpd/trunk/server/mpm/config2.m4 Modified: httpd/httpd/trunk/server/mpm/config.m4 URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/config.m4?rev=832907&r1=832906&r2=832907&view=diff ============================================================================== --- httpd/httpd/trunk/server/mpm/config.m4 (original) +++ httpd/httpd/trunk/server/mpm/config.m4 Wed Nov 4 23:35:30 2009 @@ -41,12 +41,14 @@ 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 " + eval "ap_supported_mpm_$1=shared" + ap_supported_shared_mpms="$ap_supported_shared_mpms $1 " + else + eval "ap_supported_mpm_$1=static" fi if test "$3" = "yes"; then - THREADED_MPMS="$THREADED_MPMS $1 " + eval "ap_threaded_mpm_$1=yes" fi ])dnl @@ -55,22 +57,25 @@ if ap_mpm_is_enabled $1; then : else - ENABLED_MPMS="$ENABLED_MPMS $1 " + eval "ap_enabled_mpm_$1=yes" + ap_enabled_mpms="$ap_enabled_mpms $1 " fi ])dnl ap_mpm_is_supported () { - if echo "$SUPPORTED_MPMS" | grep " $1 " >/dev/null; then - return 0 - else + eval "tmp=\$ap_supported_mpm_$1" + if test -z "$tmp"; then return 1 + else + return 0 fi } ap_mpm_supports_shared () { - if echo "$SHARED_MPMS" | grep " $1 " >/dev/null; then + eval "tmp=\$ap_supported_mpm_$1" + if test "$tmp" = "shared"; then return 0 else return 1 @@ -83,8 +88,9 @@ return 0 fi - for mpm in $ENABLED_MPMS; do - if echo "$THREADED_MPMS" | grep " $mpm " >/dev/null; then + for mpm in $ap_enabled_mpms; do + eval "tmp=\$ap_threaded_mpm_$mpm" + if test "$tmp" = "yes"; then return 0 fi done @@ -93,7 +99,8 @@ ap_mpm_is_enabled () { - if echo "$ENABLED_MPMS" | grep " $1 " >/dev/null; then + eval "tmp=\$ap_enabled_mpm_$1" + if test "$tmp" = "yes"; then return 0 else return 1 Modified: httpd/httpd/trunk/server/mpm/config2.m4 URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/config2.m4?rev=832907&r1=832906&r2=832907&view=diff ============================================================================== --- httpd/httpd/trunk/server/mpm/config2.m4 (original) +++ httpd/httpd/trunk/server/mpm/config2.m4 Wed Nov 4 23:35:30 2009 @@ -36,7 +36,7 @@ mpm_build=shared for i in $enableval; do if test "$i" = "all"; then - for j in $SHARED_MPMS; do + for j in $ap_supported_shared_mpms; do eval "enable_mpm_$j=shared" APACHE_MPM_ENABLED($j) done @@ -52,7 +52,7 @@ done ], [mpm_build=static]) -for i in $ENABLED_MPMS; do +for i in $ap_enabled_mpms; do if ap_mpm_is_supported $i; then : else @@ -76,6 +76,6 @@ MODLIST="$MODLIST mpm_${default_mpm}" fi -MPM_SUBDIRS=$ENABLED_MPMS +MPM_SUBDIRS=$ap_enabled_mpms APACHE_SUBST(MPM_SUBDIRS) APACHE_SUBST(MPM_LIB)
|