1 AC_MSG_CHECKING(which MPM to use)
3 [ --with-mpm=MPM Choose the process model for Apache to use.
4 MPM={dexter,mpmt_beos,mpmt_pthread,prefork,spmt_os2}],[
8 APACHE_MPM=mpmt_pthread
9 PLAT=`$ac_config_guess`
10 PLAT=`$ac_config_sub $PLAT`
13 APACHE_MPM=mpmt_beos;;
19 AC_MSG_RESULT($APACHE_MPM)
21 apache_cv_mpm=$APACHE_MPM
23 if test "$apache_cv_mpm" = "mpmt_pthread" -o "$apache_cv_mpm" = "dexter"; then
25 AC_MSG_CHECKING([for which threading library to use])
26 AC_MSG_RESULT($threads_result)
28 if test "$pthreads_working" = "no"; then
29 AC_MSG_RESULT(The currently selected MPM requires pthreads which your system seems to lack)
30 AC_MSG_CHECKING(checking for replacement)
31 AC_MSG_RESULT(prefork selected)
36 APACHE_CHECK_SIGWAIT_ONE_ARG
38 APACHE_FAST_OUTPUT(modules/mpm/Makefile)
40 MPM_NAME=$apache_cv_mpm
41 MPM_DIR=modules/mpm/$MPM_NAME
42 MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
44 if test "$mpm_explicit" = "no"; then
45 if test "$MPM_NAME" = "prefork" ; then
46 MPM_NAME="mpmt_pthread"
47 EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_THREADS"
49 ac_cv_enable_threads="no"
53 if test "$MPM_NAME" = "mpmt_pthread" ; then
54 EXTRA_CFLAGS="$EXTRA_CFLAGS -DMPMT_PTHREAD"
55 elif test "$MPM_NAME" = "dexter" ; then
56 EXTRA_CFLAGS="$EXTRA_CFLAGS -DDEXTER"
59 if test "$MPM_NAME" = "dexter" -o "$MPM_NAME" = "mpmt_pthread"; then
60 MPM_DIR=modules/mpm/mpmt;
61 MPM_LIB=$MPM_DIR/libmpmt.la
64 MPM_DIR=modules/mpm/$MPM_NAME
65 MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
69 APACHE_SUBST(MPM_NAME)
70 MODLIST="$MODLIST mpm_${MPM_NAME}"
72 dnl Check for pthreads and attempt to support it
73 AC_DEFUN(APACHE_MPM_PTHREAD, [
74 if test "$pthreads_working" != "yes"; then
75 AC_MSG_ERROR(This MPM requires pthreads. Try --with-mpm=prefork.)
78 dnl User threads libraries need pthread.h included everywhere
79 AC_DEFINE(PTHREAD_EVERYWHERE,,
80 [Define if all code should have #include <pthread.h>])