1 dnl common platform checks needed by MPMs, methods for MPMs to state
2 dnl their support for the platform, functions to query MPM properties
4 APR_CHECK_APR_DEFINE(APR_HAS_THREADS)
6 have_threaded_sig_graceful=yes
11 dnl Threaded MPM's are not supported on Linux 2.0
12 dnl as on 2.0 the linuxthreads library uses SIGUSR1
13 dnl and SIGUSR2 internally
14 have_threaded_sig_graceful=no
20 dnl See if APR supports APR_POLLSET_THREADSAFE.
21 dnl XXX This hack tests for the underlying functions used by APR when it
22 dnl XXX supports APR_POLLSET_THREADSAFE.
23 dnl FIXME with a run-time check for
24 dnl apr_pollset_create(,,APR_POLLSET_THREADSAFE) == APR_SUCCESS
25 AC_CHECK_FUNCS(kqueue port_create epoll_create)
26 if test "$ac_cv_func_kqueue$ac_cv_func_port_create$ac_cv_func_epoll_create" != "nonono"; then
27 have_threadsafe_pollset=yes
29 have_threadsafe_pollset=no
32 dnl See if this is a forking platform w.r.t. MPMs
35 forking_mpms_supported=no
38 forking_mpms_supported=yes
42 dnl APACHE_MPM_SUPPORTED(name, supports-shared, is_threaded)
43 AC_DEFUN(APACHE_MPM_SUPPORTED,[
44 SUPPORTED_MPMS="$SUPPORTED_MPMS $1 "
45 if test "$3" = "yes"; then
46 THREADED_MPMS="$THREADED_MPMS $1 "
50 dnl APACHE_MPM_ENABLED(name)
51 AC_DEFUN(APACHE_MPM_ENABLED,[
52 ENABLED_MPMS="$ENABLED_MPMS $1 "
55 ap_mpm_is_supported ()
57 if echo "$SUPPORTED_MPMS" | grep " $1 " >/dev/null; then
66 dnl Special support for --with-mpm=shared
67 dnl Assume a threaded MPM can be used.
68 if test "x$MPM_NAME" = "xshared"; then
72 for mpm in $ENABLED_MPMS; do
73 if echo "$THREADED_MPMS" | grep " $mpm " >/dev/null; then