1 AC_MSG_CHECKING(which MPM to use by default)
3 APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use by default.
4 MPM={simple|motorz|event|worker|prefork|winnt}
5 This will be statically linked as the only available MPM unless
6 --enable-mpms-shared is also specified.
9 AC_MSG_RESULT($withval);
11 dnl Order of preference for default MPM:
12 dnl The Windows and OS/2 MPMs are used on those platforms.
13 dnl Everywhere else: event, worker, prefork
14 if ap_mpm_is_supported "winnt"; then
17 elif ap_mpm_is_supported "mpmt_os2"; then
19 AC_MSG_RESULT(mpmt_os2)
20 elif ap_mpm_is_supported "event"; then
23 elif ap_mpm_is_supported "worker"; then
25 AC_MSG_RESULT(worker - event is not supported)
28 AC_MSG_RESULT(prefork - event and worker are not supported)
32 APACHE_MPM_ENABLED($default_mpm)
34 AC_ARG_ENABLE(mpms-shared,
35 APACHE_HELP_STRING(--enable-mpms-shared=MPM-LIST,Space-separated list of MPM modules to enable for dynamic loading. MPM-LIST=list | "all"),[
36 if test "$enableval" = "no"; then
40 dnl Build just the default MPM if --enable-mpms-shared has no argument.
41 if test "$enableval" = "yes"; then
42 enableval=$default_mpm
44 for i in $enableval; do
45 if test "$i" = "all"; then
46 for j in $ap_supported_shared_mpms; do
47 eval "enable_mpm_$j=shared"
48 APACHE_MPM_ENABLED($j)
51 i=`echo $i | sed 's/-/_/g'`
52 if ap_mpm_supports_shared $i; then
53 eval "enable_mpm_$i=shared"
54 APACHE_MPM_ENABLED($i)
56 AC_MSG_ERROR([MPM $i does not support dynamic loading.])
61 ], [mpm_build=static])
63 for i in $ap_enabled_mpms; do
64 if ap_mpm_is_supported $i; then
67 AC_MSG_ERROR([MPM $i is not supported on this platform.])
71 if test $mpm_build = "shared"; then
72 eval "tmp=\$enable_mpm_$default_mpm"
73 if test "$tmp" != "shared"; then
74 AC_MSG_ERROR([The default MPM ($default_mpm) must be included in --enable-mpms-shared. Use --with-mpm to change the default MPM.])
78 APACHE_FAST_OUTPUT(server/mpm/Makefile)
80 if test $mpm_build = "shared"; then
83 MPM_LIB=server/mpm/$default_mpm/lib${default_mpm}.la
84 MODLIST="$MODLIST mpm_${default_mpm}"
87 MPM_SUBDIRS=$ap_enabled_mpms
88 APACHE_SUBST(MPM_SUBDIRS)