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 supports
22 dnl XXX APR_POLLSET_THREADSAFE, and duplicates APR's Darwin version check.
23 dnl A run-time check for
24 dnl apr_pollset_create(,,APR_POLLSET_THREADSAFE) == APR_SUCCESS
25 dnl would be great but an in-tree apr (srclib/apr) hasn't been built yet.
27 AC_CACHE_CHECK([whether APR supports thread-safe pollsets], [ac_cv_have_threadsafe_pollset], [
29 *-apple-darwin[[1-9]].*)
30 APR_SETIFNULL(ac_cv_func_kqueue, [no])
33 AC_CHECK_FUNCS(kqueue port_create epoll_create)
34 if test "$ac_cv_func_kqueue$ac_cv_func_port_create$ac_cv_func_epoll_create" != "nonono"; then
35 ac_cv_have_threadsafe_pollset=yes
37 ac_cv_have_threadsafe_pollset=no
41 dnl See if APR has skiplist
42 dnl The base httpd prereq is APR 1.4.x, so we don't have to consider
52 dnl See if this is a forking platform w.r.t. MPMs
54 *mingw32* | *os2-emx*)
55 forking_mpms_supported=no
58 forking_mpms_supported=yes
62 dnl APACHE_MPM_SUPPORTED(name, supports-shared, is_threaded)
63 AC_DEFUN([APACHE_MPM_SUPPORTED],[
64 if test "$2" = "yes"; then
65 eval "ap_supported_mpm_$1=shared"
66 ap_supported_shared_mpms="$ap_supported_shared_mpms $1 "
68 eval "ap_supported_mpm_$1=static"
70 if test "$3" = "yes"; then
71 eval "ap_threaded_mpm_$1=yes"
75 dnl APACHE_MPM_ENABLED(name)
76 AC_DEFUN([APACHE_MPM_ENABLED],[
77 if ap_mpm_is_enabled $1; then
80 eval "ap_enabled_mpm_$1=yes"
81 ap_enabled_mpms="$ap_enabled_mpms $1 "
85 ap_mpm_is_supported ()
87 eval "tmp=\$ap_supported_mpm_$1"
88 if test -z "$tmp"; then
95 ap_mpm_supports_shared ()
97 eval "tmp=\$ap_supported_mpm_$1"
98 if test "$tmp" = "shared"; then
105 ap_mpm_is_threaded ()
107 if test "$mpm_build" = "shared" -a ac_cv_define_APR_HAS_THREADS = "yes"; then
111 for mpm in $ap_enabled_mpms; do
112 eval "tmp=\$ap_threaded_mpm_$mpm"
113 if test "$tmp" = "yes"; then
122 eval "tmp=\$ap_enabled_mpm_$1"
123 if test "$tmp" = "yes"; then