]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add ap_mpm_is_experimental and ap_mpm_is_threaded. Use these instead of checking...
authorPaul Querna <pquerna@apache.org>
Tue, 8 Mar 2005 22:40:33 +0000 (22:40 +0000)
committerPaul Querna <pquerna@apache.org>
Tue, 8 Mar 2005 22:40:33 +0000 (22:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156574 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/config5.m4
server/mpm/config.m4

index c0a300f0221c9caec0d618f10787de97739f4e18..d4f6282194ff8f9e076dd913aaa72a6879e4e2bd 100644 (file)
@@ -11,7 +11,7 @@ APACHE_MODULE(info, server information, , , most)
 APACHE_MODULE(suexec, set uid and gid for spawned processes, , , no, [
               other_targets=suexec ] )
 
-if test "$apache_cv_mpm" != "prefork"; then
+if ap_mpm_is_threaded; then
 # if we are using a threaded MPM, we will get better performance with
 # mod_cgid, so make it the default.
     APACHE_MODULE(cgid, CGI scripts, , , yes)
index 17f562a9708ab8cd0e0c38852f0e449ebadd6dc1..f8b2022cdd976b9503114019d147f63d6e573406 100644 (file)
@@ -12,7 +12,25 @@ AC_MSG_RESULT($APACHE_MPM)
 
 apache_cv_mpm=$APACHE_MPM
        
-if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "threadpool" ; then
+ap_mpm_is_threaded ()
+{
+    if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "threadpool" ; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+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
+        return 0
+    else
+        return 1
+    fi
+}
+
+if ap_mpm_is_threaded; then
   APR_CHECK_APR_DEFINE(APR_HAS_THREADS)
 
   if test "x$ac_cv_define_APR_HAS_THREADS" = "xno"; then
@@ -26,7 +44,7 @@ fi
 APACHE_FAST_OUTPUT(server/mpm/Makefile)
 
 MPM_NAME=$apache_cv_mpm
-if test "$MPM_NAME" = "event" -o "$MPM_NAME" = "leader" -o "$MPM_NAME" = "threadpool" -o "$MPM_NAME" = "perchild"; then
+if ap_mpm_is_experimental; then
   AC_MSG_WARN(You have selected an EXPERIMENTAL MPM.  Be warned!)
   MPM_SUBDIR_NAME=experimental/$MPM_NAME
 else