]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make Apache check APR's configuration when determining the default MPM.
authorRyan Bloom <rbb@apache.org>
Tue, 3 Apr 2001 18:37:18 +0000 (18:37 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 3 Apr 2001 18:37:18 +0000 (18:37 +0000)
This way, if APR is built without threads, then Apache defaults to the
prefork MPM.

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

configure.in
server/mpm/config.m4
server/mpm/experimental/perchild/config5.m4 [moved from server/mpm/perchild/config.m4 with 87% similarity]
server/mpm/perchild/config5.m4 [new file with mode: 0644]
server/mpm/spmt_os2/config5.m4 [moved from server/mpm/spmt_os2/config.m4 with 100% similarity]
server/mpm/threaded/config5.m4 [moved from server/mpm/threaded/config.m4 with 86% similarity]

index a749ea0b3bc5de3121c7202a9e39aa40f8e5f28b..3ccb8393fc6ee9ad128533e2b64de9b0465d86d3 100644 (file)
@@ -21,6 +21,12 @@ sinclude(srclib/apr/build/libtool.m4)
 sinclude(hints.m4)
 sinclude(acinclude.m4)
 
+dnl ## Run configure for packages Apache uses
+APR_SUBDIR_CONFIG(srclib/apr, "$apache_apr_flags --disable-shared")
+APR_SUBDIR_CONFIG(srclib/apr-util, "--with-apr=../apr --disable-shared")
+APR_SUBDIR_CONFIG(srclib/pcre)
+. ./srclib/apr/APRVARS
+
 dnl Generate ./config.nice for reproducing runs of configure
 dnl
 APR_CONFIG_NICE(config.nice)
@@ -268,18 +274,6 @@ if test -d ./test; then
     APACHE_FAST_OUTPUT(test/Makefile)
 fi
 
-dnl ## Run configure for packages Apache uses
-dnl ## This has been placed at this location for a reason.  This allows
-dnl ## Apache to set some variable that APR needs (like whether to enable
-dnl ## or disable threads), while still allowing APR to run and generate
-dnl ## APRVARS before Apache generates it's Makefiles and the related files.
-dnl ## This allows APR to detect libraries like dl and tell Apache that it
-dnl ## needs to include or not include them.
-APR_SUBDIR_CONFIG(srclib/apr, "$apache_apr_flags --disable-shared")
-APR_SUBDIR_CONFIG(srclib/apr-util, "--with-apr=../apr --disable-shared")
-APR_SUBDIR_CONFIG(srclib/pcre)
-. ./srclib/apr/APRVARS
-
 dnl get the exported vars from APRUTIL
 . ./srclib/apr-util/export_vars.sh
 EXTRA_LIBS="$EXTRA_LIBS $APRUTIL_EXPORT_LIBS"
index a2798cfccc597211964e9cceac80aeb06ca5f43a..9d2c3fba6aff4c08f0ec9ad9a9814564e85b17e2 100644 (file)
@@ -13,12 +13,10 @@ AC_MSG_RESULT($APACHE_MPM)
 apache_cv_mpm=$APACHE_MPM
        
 if test "$apache_cv_mpm" = "threaded" -o "$apache_cv_mpm" = "perchild"; then
-  APR_PTHREADS_CHECK
-  AC_MSG_CHECKING([for which threading library to use])
-  AC_MSG_RESULT($threads_result)
+  APR_CHECK_APR_DEFINE(APR_HAS_THREADS, srclib/apr)
 
-  if test "$pthreads_working" = "no"; then
-    AC_MSG_RESULT(The currently selected MPM requires pthreads which your system seems to lack)
+  if test "x$ac_cv_define_APR_HAS_THREADS" = "xno"; then
+    AC_MSG_RESULT(The currently selected MPM requires threads which your system seems to lack)
     AC_MSG_CHECKING(checking for replacement)
     AC_MSG_RESULT(prefork selected)
     apache_cv_mpm=prefork
@@ -34,13 +32,3 @@ MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
 APACHE_SUBST(MPM_NAME)
 MODLIST="$MODLIST mpm_${MPM_NAME}"
 
-dnl Check for pthreads and attempt to support it
-AC_DEFUN(APACHE_MPM_PTHREAD, [
-  if test "$pthreads_working" != "yes"; then
-    AC_MSG_ERROR(This MPM requires pthreads. Try --with-mpm=prefork.)
-  fi
-
-  dnl User threads libraries need pthread.h included everywhere
-  AC_DEFINE(PTHREAD_EVERYWHERE,,
-    [Define if all code should have #include <pthread.h>])
-])
similarity index 87%
rename from server/mpm/perchild/config.m4
rename to server/mpm/experimental/perchild/config5.m4
index 355cc3ca41cdeaad0b02b845edc8696422eff48e..bd179baed93362f0ad8880ef9e172a6473640a0c 100644 (file)
@@ -3,5 +3,4 @@ dnl ## XXX - Need a more thorough check of the proper flags to use
 if test "$MPM_NAME" = "perchild" ; then
 
     APACHE_FAST_OUTPUT(server/mpm/$MPM_NAME/Makefile)
-    APACHE_MPM_PTHREAD
 fi
diff --git a/server/mpm/perchild/config5.m4 b/server/mpm/perchild/config5.m4
new file mode 100644 (file)
index 0000000..bd179ba
--- /dev/null
@@ -0,0 +1,6 @@
+dnl ## XXX - Need a more thorough check of the proper flags to use
+
+if test "$MPM_NAME" = "perchild" ; then
+
+    APACHE_FAST_OUTPUT(server/mpm/$MPM_NAME/Makefile)
+fi
similarity index 86%
rename from server/mpm/threaded/config.m4
rename to server/mpm/threaded/config5.m4
index 9702aa2c81455a444a9e70a619004732d9c5f420..dbc00cbf7227bc11e032013cd2c8edf3a96da070 100644 (file)
@@ -1,9 +1,5 @@
 dnl ## XXX - Need a more thorough check of the proper flags to use
 
 if test "$MPM_NAME" = "threaded" ; then
-
     APACHE_FAST_OUTPUT(server/mpm/$MPM_NAME/Makefile)
-
-    APACHE_MPM_PTHREAD
-
 fi