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 this is a forking platform w.r.t. MPMs
43 *mingw32* | *os2-emx*)
44 forking_mpms_supported=no
47 forking_mpms_supported=yes
51 dnl APACHE_MPM_SUPPORTED(name, supports-shared, is_threaded)
52 AC_DEFUN(APACHE_MPM_SUPPORTED,[
53 if test "$2" = "yes"; then
54 eval "ap_supported_mpm_$1=shared"
55 ap_supported_shared_mpms="$ap_supported_shared_mpms $1 "
57 eval "ap_supported_mpm_$1=static"
59 if test "$3" = "yes"; then
60 eval "ap_threaded_mpm_$1=yes"
64 dnl APACHE_MPM_ENABLED(name)
65 AC_DEFUN(APACHE_MPM_ENABLED,[
66 if ap_mpm_is_enabled $1; then
69 eval "ap_enabled_mpm_$1=yes"
70 ap_enabled_mpms="$ap_enabled_mpms $1 "
74 ap_mpm_is_supported ()
76 eval "tmp=\$ap_supported_mpm_$1"
77 if test -z "$tmp"; then
84 ap_mpm_supports_shared ()
86 eval "tmp=\$ap_supported_mpm_$1"
87 if test "$tmp" = "shared"; then
96 if test "$mpm_build" = "shared" -a ac_cv_define_APR_HAS_THREADS = "yes"; then
100 for mpm in $ap_enabled_mpms; do
101 eval "tmp=\$ap_threaded_mpm_$mpm"
102 if test "$tmp" = "yes"; then
111 eval "tmp=\$ap_enabled_mpm_$1"
112 if test "$tmp" = "yes"; then