1 AC_MSG_CHECKING(which MPM to use)
3 [ --with-mpm=MPM Choose the process model, etc. for Apache to use.],
5 if test "$withval" != "no" ; then
7 AC_MSG_RESULT($apache_cv_mpm)
9 apache_cv_mpm="mpmt_pthread"
10 AC_MSG_RESULT(No MPM specified. Using pthread)
13 apache_cv_mpm="mpmt_pthread"
14 AC_MSG_RESULT(No MPM specified. Using pthread)
17 APACHE_OUTPUT(modules/mpm/Makefile)
18 MPM_NAME=$apache_cv_mpm
19 MPM_DIR=modules/mpm/$MPM_NAME
20 MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
23 MODLIST="$MODLIST mpm_${MPM_NAME}"
25 dnl All the unix MPMs use shared memory; save a little duplication
26 AC_DEFUN(APACHE_MPM_CHECK_SHMEM, [
27 AC_CHECK_FUNCS(shmget)
30 AC_MSG_CHECKING(which shared memory mechanism to use)
31 if test "$ac_cv_func_shmget" = "yes" ; then
32 AC_DEFINE(USE_SHMGET_SCOREBOARD)
34 elif test "$ac_cv_func_mmap" = "yes" ; then
35 AC_DEFINE(USE_MMAP_SCOREBOARD)
38 AC_MSG_ERROR(No known shared memory system)
42 dnl Check for pthreads and attempt to support it
43 AC_DEFUN(APACHE_MPM_PTHREAD, [
45 dnl XXX - We should be checking for the proper flags to use on a particular
46 dnl platform. This will cover a couple of them, anyway
47 CFLAGS="-pthread $CFLAGS"
48 CXXFLAGS="-pthread $CXXFLAGS"
50 AC_CHECK_HEADER(pthread.h, [ ],[
51 AC_MSG_ERROR(This MPM requires pthreads. Try --with-mpm=prefork.)
53 AC_CHECK_FUNC(pthread_create, [ ],[
54 AC_MSG_ERROR(Can't compile pthread code.)
57 dnl User threads libraries need pthread.h included everywhere
58 AC_DEFINE(PTHREAD_EVERYWHERE)