You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by pq...@apache.org on 2005/03/08 23:40:35 UTC

svn commit: r156574 - in httpd/httpd/trunk: modules/generators/config5.m4 server/mpm/config.m4

Author: pquerna
Date: Tue Mar  8 14:40:33 2005
New Revision: 156574

URL: http://svn.apache.org/viewcvs?view=rev&rev=156574
Log:
Add ap_mpm_is_experimental and ap_mpm_is_threaded.  Use these instead of checking for specific MPMs.

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

Modified: httpd/httpd/trunk/modules/generators/config5.m4
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/generators/config5.m4?view=diff&r1=156573&r2=156574
==============================================================================
--- httpd/httpd/trunk/modules/generators/config5.m4 (original)
+++ httpd/httpd/trunk/modules/generators/config5.m4 Tue Mar  8 14:40:33 2005
@@ -11,7 +11,7 @@
 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)

Modified: httpd/httpd/trunk/server/mpm/config.m4
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/mpm/config.m4?view=diff&r1=156573&r2=156574
==============================================================================
--- httpd/httpd/trunk/server/mpm/config.m4 (original)
+++ httpd/httpd/trunk/server/mpm/config.m4 Tue Mar  8 14:40:33 2005
@@ -12,7 +12,25 @@
 
 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 @@
 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



Re: svn commit: r156574 - in httpd/httpd/trunk: modules/generators/config5.m4 server/mpm/config.m4

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Mar 08, 2005 at 10:40:35PM -0000, Paul Querna wrote:
...
> --- httpd/httpd/trunk/server/mpm/config.m4 (original)
> +++ httpd/httpd/trunk/server/mpm/config.m4 Tue Mar  8 14:40:33 2005
> @@ -12,7 +12,25 @@
>  
>  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 ()
> +{

I'm not sure sh functions are portable (at least the autoconf manual
claims they are not); this should probably be an m4 macro instead to be
on the safe side.

joe