upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / server / mpm / config.m4
1 AC_MSG_CHECKING(which MPM to use)
2 AC_ARG_WITH(mpm,
3 APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use.
4                           MPM={beos|worker|prefork|mpmt_os2|perchild|leader|threadpool}),[
5   APACHE_MPM=$withval
6 ],[
7   if test "x$APACHE_MPM" = "x"; then
8     APACHE_MPM=prefork
9   fi
10 ])
11 AC_MSG_RESULT($APACHE_MPM)
12
13 apache_cv_mpm=$APACHE_MPM
14         
15 if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "threadpool" ; then
16   APR_CHECK_APR_DEFINE(APR_HAS_THREADS)
17
18   if test "x$ac_cv_define_APR_HAS_THREADS" = "xno"; then
19     AC_MSG_RESULT(The currently selected MPM requires threads which your system seems to lack)
20     AC_MSG_CHECKING(checking for replacement)
21     AC_MSG_RESULT(prefork selected)
22     apache_cv_mpm=prefork
23   fi
24 fi
25
26 APACHE_FAST_OUTPUT(server/mpm/Makefile)
27
28 MPM_NAME=$apache_cv_mpm
29 if test "$MPM_NAME" = "leader" -o "$MPM_NAME" = "threadpool" -o "$MPM_NAME" = "perchild"; then
30   AC_MSG_WARN(You have selected an EXPERIMENTAL MPM.  Be warned!)
31   MPM_SUBDIR_NAME=experimental/$MPM_NAME
32 else
33   MPM_SUBDIR_NAME=$MPM_NAME
34 fi
35 MPM_DIR=server/mpm/$MPM_SUBDIR_NAME
36 MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
37
38 if test ! -f "$abs_srcdir/$MPM_DIR/mpm.h"; then
39     AC_MSG_ERROR(the selected mpm -- $apache_cv_mpm -- is not supported)
40 fi
41
42 APACHE_SUBST(MPM_NAME)
43 APACHE_SUBST(MPM_SUBDIR_NAME)
44 MODLIST="$MODLIST mpm_${MPM_NAME}"
45