]> granicus.if.org Git - apache/blob - server/mpm/config.m4
Update APR macro usage to new name-protected names.
[apache] / server / mpm / config.m4
1 AC_MSG_CHECKING(which MPM to use)
2 AC_ARG_WITH(mpm,
3 [  --with-mpm=MPM          Choose the process model for Apache to use.
4                MPM={beos,threaded,prefork,spmt_os2,perchild}],[
5   APACHE_MPM=$withval
6 ],[
7   if test "x$APACHE_MPM" = "x"; then
8     APACHE_MPM=threaded
9   fi
10 ])
11 AC_MSG_RESULT($APACHE_MPM)
12
13 apache_cv_mpm=$APACHE_MPM
14         
15 if test "$apache_cv_mpm" = "threaded" -o "$apache_cv_mpm" = "perchild"; then
16   APR_PTHREADS_CHECK
17   AC_MSG_CHECKING([for which threading library to use])
18   AC_MSG_RESULT($threads_result)
19
20   if test "$pthreads_working" = "no"; then
21     AC_MSG_RESULT(The currently selected MPM requires pthreads which your system seems to lack)
22     AC_MSG_CHECKING(checking for replacement)
23     AC_MSG_RESULT(prefork selected)
24     apache_cv_mpm=prefork
25   fi
26 fi
27
28 APACHE_CHECK_SIGWAIT_ONE_ARG
29
30 APACHE_FAST_OUTPUT(server/mpm/Makefile)
31
32 MPM_NAME=$apache_cv_mpm
33 MPM_DIR=server/mpm/$MPM_NAME
34 MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
35
36 APACHE_SUBST(MPM_NAME)
37 MODLIST="$MODLIST mpm_${MPM_NAME}"
38
39 dnl Check for pthreads and attempt to support it
40 AC_DEFUN(APACHE_MPM_PTHREAD, [
41   if test "$pthreads_working" != "yes"; then
42     AC_MSG_ERROR(This MPM requires pthreads. Try --with-mpm=prefork.)
43   fi
44
45   dnl User threads libraries need pthread.h included everywhere
46   AC_DEFINE(PTHREAD_EVERYWHERE,,
47     [Define if all code should have #include <pthread.h>])
48 ])