rbb 99/12/24 10:31:11
Modified: src acinclude.m4 configure.in
src/modules/mpm config.m4
Log:
Finish the MPM decision logic. This moves the threads checking stuff into
the mpm directory where it belongs. It also adds logic so that if threads
aren't detected, we automatically choose to use the prefork mpm. Lastly,
I also cleaned up a variable name to make it more consistent with the other
variables used in our configure script.
Revision Changes Path
1.9 +5 -5 apache-2.0/src/acinclude.m4
Index: acinclude.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- acinclude.m4 1999/12/23 21:01:27 1.8
+++ acinclude.m4 1999/12/24 18:31:08 1.9
@@ -113,10 +113,10 @@
int data = 1;
return pthread_create(&thd, NULL, thread_routine, &data);
} ], [
- THREADS_WORKING="yes"
+ apache_threads_working="yes"
], [
- THREADS_WORKING="no"
- ], THREADS_WORKING="no" ) ] )
+ apache_threads_working="no"
+ ], apache_threads_working="no" ) ] )
define(APACHE_CHECK_THREADS, [dnl
cflags_orig="$CFLAGS"
@@ -126,11 +126,11 @@
CFLAGS="$test_cflag $cflags_orig"
LDFLAGS="$test_ldflag $ldflags_orig"
THREAD_TEST()
- if test "$THREADS_WORKING" = "yes"; then
+ if test "$apache_threads_working" = "yes"; then
break
fi
done
- if test "$THREADS_WORKING" = "yes"; then
+ if test "$apache_threads_working" = "yes"; then
threads_result="Updating CFLAGS and LDFLAGS"
break
fi
1.16 +0 -4 apache-2.0/src/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/configure.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- configure.in 1999/12/23 21:01:28 1.15
+++ configure.in 1999/12/24 18:31:09 1.16
@@ -73,10 +73,6 @@
dnl ## Check for library functions
-AC_MSG_CHECKING([for which threading library to use])
-APACHE_CHECK_THREADS('' -pthread -D_REENTRANT, '' -lpthread -lc_r)
-AC_MSG_RESULT("$threads_result")
-
dnl See Comment #Spoon
AC_CHECK_FUNCS( \
1.6 +12 -0 apache-2.0/src/modules/mpm/config.m4
Index: config.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/mpm/config.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- config.m4 1999/12/23 21:01:31 1.5
+++ config.m4 1999/12/24 18:31:10 1.6
@@ -14,6 +14,18 @@
AC_MSG_RESULT(No MPM specified. Using pthread)
])
+AC_MSG_CHECKING([for which threading library to use])
+APACHE_CHECK_THREADS('' -pthread -D_REENTRANT, '' -lpthread -lc_r)
+AC_MSG_RESULT("$threads_result")
+
+AC_MSG_CHECKING([to ensure I can compile the selected MPM])
+if test "$apache_threads_working" = "no" && "$apache_cv_mpm" != "prefork";
then
+AC_MSG_RESULT([can't compile selected MPM because there are no threads,
defaulting to prefork])
+ apache_cv_mpm="prefork"
+else
+AC_MSG_RESULT([OK])
+fi
+
APACHE_OUTPUT(modules/mpm/Makefile)
MPM_NAME=$apache_cv_mpm
MPM_DIR=modules/mpm/$MPM_NAME