]> granicus.if.org Git - apache/blob - server/mpm/config.m4
remove leader, perchild, and threadpool MPMs (other than non-English bits in common...
[apache] / 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={simple|beos|event|worker|prefork|mpmt_os2|winnt}
5                           Specify "shared" instead of an MPM name to load MPMs dynamically.
6 ),[
7   APACHE_MPM=$withval
8 ],[
9   if test "x$APACHE_MPM" = "x"; then
10     APACHE_MPM=simple
11   fi
12 ])
13 AC_MSG_RESULT($APACHE_MPM)
14
15 apache_cv_mpm=$APACHE_MPM
16
17 dnl Note that a build with an explicitly loaded MPM must support threaded MPMs.
18 ap_mpm_is_threaded ()
19 {
20     if test "$apache_cv_mpm" = "shared" -o "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "simple" -o "$apache_cv_mpm" = "winnt" ; then
21         return 0
22     else
23         return 1
24     fi
25 }
26
27 dnl No such check for a shared MPM.
28 ap_mpm_is_experimental ()
29 {
30     if test "$apache_cv_mpm" = "event"; then
31         return 0
32     else
33         return 1
34     fi
35 }
36
37 if ap_mpm_is_threaded; then
38   APR_CHECK_APR_DEFINE(APR_HAS_THREADS)
39
40   if test "x$ac_cv_define_APR_HAS_THREADS" = "xno"; then
41     AC_MSG_RESULT(The currently selected MPM requires threads which your system seems to lack)
42     AC_MSG_CHECKING(checking for replacement)
43     AC_MSG_RESULT(prefork selected)
44     apache_cv_mpm=prefork
45   else
46     case $host in
47       *-linux-*)
48         case `uname -r` in
49           2.0* )
50             dnl Threaded MPM's are not supported on Linux 2.0
51             dnl as on 2.0 the linuxthreads library uses SIGUSR1
52             dnl and SIGUSR2 internally
53             echo "Threaded MPM's are not supported on this platform"
54             AC_MSG_CHECKING(checking for replacement)
55             AC_MSG_RESULT(prefork selected)
56             apache_cv_mpm=prefork
57           ;;
58         esac
59       ;;
60     esac
61   fi
62 fi
63
64 APACHE_FAST_OUTPUT(server/mpm/Makefile)
65
66 if test "$apache_cv_mpm" = "shared"; then
67   MPM_NAME=""
68   MPM_SUBDIR_NAME=""
69   MPM_LIB=""
70   MPM_DIR=""
71 else
72   MPM_NAME=$apache_cv_mpm
73   if ap_mpm_is_experimental; then
74     AC_MSG_WARN(You have selected an EXPERIMENTAL MPM.  Be warned!)
75     MPM_SUBDIR_NAME=experimental/$MPM_NAME
76   else
77     MPM_SUBDIR_NAME=$MPM_NAME
78   fi
79   MPM_DIR=server/mpm/$MPM_SUBDIR_NAME
80   MPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
81
82   APACHE_SUBST(MPM_NAME)
83   APACHE_SUBST(MPM_SUBDIR_NAME)
84   MODLIST="$MODLIST mpm_${MPM_NAME}"
85 fi
86
87 APACHE_SUBST(MPM_NAME)
88 APACHE_SUBST(MPM_SUBDIR_NAME)