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}],[
7 APACHE_MPM=mpmt_pthread
10 APACHE_MPM=mpmt_beos;;
13 AC_MSG_RESULT($APACHE_MPM)
15 apache_cv_mpm=$APACHE_MPM
17 if test "$apache_cv_mpm" = "mpmt_pthread" -o "$apache_cv_mpm" = "dexter"; then
19 AC_MSG_CHECKING([for which threading library to use])
20 AC_MSG_RESULT($threads_result)
22 if test "$apache_threads_working" = "no"; then
23 AC_MSG_RESULT(The currently selected MPM requires pthreads which your system seems to lack)
24 AC_MSG_CHECKING(checking for replacement)
25 AC_MSG_RESULT(prefork selected)
32 APACHE_FAST_OUTPUT(modules/mpm/Makefile)
33 MPM_NAME=$apache_cv_mpm
34 MPM_DIR=modules/mpm/$MPM_NAME
35 MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
37 APACHE_SUBST(MPM_NAME)
38 MODLIST="$MODLIST mpm_${MPM_NAME}"
40 dnl All the unix MPMs use shared memory; save a little duplication
41 AC_DEFUN(APACHE_MPM_CHECK_SHMEM, [
42 AC_CHECK_FUNCS(shmget)
45 AC_MSG_CHECKING(which shared memory mechanism to use)
46 if test "$ac_cv_func_shmget" = "yes" ; then
47 AC_DEFINE(USE_SHMGET_SCOREBOARD,,
48 [Define if MPMs should use shmget to implement their shared memory])
50 elif test "$ac_cv_func_mmap" = "yes" ; then
51 AC_DEFINE(USE_MMAP_SCOREBOARD,,
52 [Define if MPMs should use mmap to implement their shared memory])
55 AC_MSG_ERROR(No known shared memory system)
59 dnl Check for pthreads and attempt to support it
60 AC_DEFUN(APACHE_MPM_PTHREAD, [
62 dnl XXX - We should be checking for the proper flags to use on a particular
63 dnl platform. This will cover a couple of them, anyway
65 AC_CHECK_HEADER(pthread.h, [ ],[
66 AC_MSG_ERROR(This MPM requires pthreads. Try --with-mpm=prefork.)
68 AC_CHECK_FUNC(pthread_create, [ ],[
69 AC_MSG_ERROR(Can't compile pthread code.)
72 dnl User threads libraries need pthread.h included everywhere
73 AC_DEFINE(PTHREAD_EVERYWHERE,,
74 [Define if all code should have #include <pthread.h>])