config.m4 revision 59db624a43cd8ef36dbedd7eb11a49b6c76c3f42
3802a3d3d7af51ddff31943d5514382f01265770Lennart PoetteringAC_MSG_CHECKING(which MPM to use)
12b42c76672a66c2d4ea7212c14f8f1b5a62b78dTom GundersenAPACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use.
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek MPM={beos|event|worker|prefork|mpmt_os2|perchild|leader|threadpool|winnt}),[
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek APACHE_MPM=$withval
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek if test "x$APACHE_MPM" = "x"; then
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek APACHE_MPM=prefork
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-SzmekAC_MSG_RESULT($APACHE_MPM)
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmekapache_cv_mpm=$APACHE_MPM
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmekap_mpm_is_threaded ()
b975b0d514321f169b3c4599a8ea92e13741b4e4Zbigniew Jędrzejewski-Szmek if test "$apache_cv_mpm" = "worker" -o "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "winnt" -o "$apache_cv_mpm" = "threadpool" ; then
0e8415f2e5c42e87ca3b7a96138675f64696cb7aZbigniew Jędrzejewski-Szmekap_mpm_is_experimental ()
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek if test "$apache_cv_mpm" = "event" -o "$apache_cv_mpm" = "perchild" -o "$apache_cv_mpm" = "leader" -o "$apache_cv_mpm" = "threadpool" ; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekif ap_mpm_is_threaded; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek APR_CHECK_APR_DEFINE(APR_HAS_THREADS)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek if test "x$ac_cv_define_APR_HAS_THREADS" = "xno"; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_MSG_RESULT(The currently selected MPM requires threads which your system seems to lack)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_MSG_CHECKING(checking for replacement)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_MSG_RESULT(prefork selected)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek apache_cv_mpm=prefork
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek case `uname -r` in
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek dnl Threaded MPM's are not supported on Linux 2.0
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek dnl as on 2.0 the linuxthreads library uses SIGUSR1
330427e271c37400f091bf4570b5d8fa96574d36Zbigniew Jędrzejewski-Szmek dnl and SIGUSR2 internally
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek echo "Threaded MPM's are not supported on this platform"
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_MSG_CHECKING(checking for replacement)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_MSG_RESULT(prefork selected)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek apache_cv_mpm=prefork
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAPACHE_FAST_OUTPUT(server/mpm/Makefile)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekMPM_NAME=$apache_cv_mpm
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmekif ap_mpm_is_experimental; then
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek AC_MSG_WARN(You have selected an EXPERIMENTAL MPM. Be warned!)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek MPM_SUBDIR_NAME=experimental/$MPM_NAME
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-Szmek MPM_SUBDIR_NAME=$MPM_NAME
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekMPM_DIR=server/mpm/$MPM_SUBDIR_NAME
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekMPM_LIB=$MPM_DIR/lib${MPM_NAME}.la
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-Szmekif test ! -f "$abs_srcdir/$MPM_DIR/mpm.h"; then
a8ca47227d1ab716ba928d8b9334b655ca5a840cZbigniew Jędrzejewski-Szmek AC_MSG_ERROR(the selected mpm -- $apache_cv_mpm -- is not supported)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAPACHE_SUBST(MPM_NAME)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekAPACHE_SUBST(MPM_SUBDIR_NAME)
fdfccdbc985944a57017a25f44dd6acc1a937babZbigniew Jędrzejewski-SzmekMODLIST="$MODLIST mpm_${MPM_NAME}"