httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r836165 - in /httpd/httpd/trunk/server/mpm: config.m4 event/config.m4 simple/config.m4
Date Sat, 14 Nov 2009 13:01:43 GMT
Author: trawick
Date: Sat Nov 14 13:01:43 2009
New Revision: 836165

URL: http://svn.apache.org/viewvc?rev=836165&view=rev
Log:
Improve hack to "determine" if APR supports thread-safe pollsets by hiding the
presence of kqueue() on Leopard, matching APR's configuration.

Event and Simple no longer report that they are supported on Leopard, resolving
a broken default config file with --enable-mpms-shared=all on that platform.
(Event was loaded by default in httpd.conf, and it failed at startup when it 
failed to obtain a thread-safe pollset.)

Modified:
    httpd/httpd/trunk/server/mpm/config.m4
    httpd/httpd/trunk/server/mpm/event/config.m4
    httpd/httpd/trunk/server/mpm/simple/config.m4

Modified: httpd/httpd/trunk/server/mpm/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/config.m4?rev=836165&r1=836164&r2=836165&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/config.m4 (original)
+++ httpd/httpd/trunk/server/mpm/config.m4 Sat Nov 14 13:01:43 2009
@@ -18,16 +18,25 @@
 esac
 
 dnl See if APR supports APR_POLLSET_THREADSAFE.
-dnl XXX This hack tests for the underlying functions used by APR when it
-dnl XXX supports APR_POLLSET_THREADSAFE.
-dnl FIXME with a run-time check for
+dnl XXX This hack tests for the underlying functions used by APR when it supports
+dnl XXX APR_POLLSET_THREADSAFE, and duplicates APR's Darwin version check.
+dnl A run-time check for
 dnl     apr_pollset_create(,,APR_POLLSET_THREADSAFE) == APR_SUCCESS
-AC_CHECK_FUNCS(kqueue port_create epoll_create)
-if test "$ac_cv_func_kqueue$ac_cv_func_port_create$ac_cv_func_epoll_create" != "nonono";
then
-    have_threadsafe_pollset=yes
-else
-    have_threadsafe_pollset=no
-fi
+dnl would be great but an in-tree apr (srclib/apr) hasn't been built yet.
+
+AC_CACHE_CHECK([whether APR supports thread-safe pollsets], [ac_cv_have_threadsafe_pollset],
[
+    case $host in
+        *-apple-darwin[[1-9]].*)
+            APR_SETIFNULL(ac_cv_func_kqueue, [no])
+            ;;
+    esac
+    AC_CHECK_FUNCS(kqueue port_create epoll_create)
+    if test "$ac_cv_func_kqueue$ac_cv_func_port_create$ac_cv_func_epoll_create" != "nonono";
then
+        ac_cv_have_threadsafe_pollset=yes
+    else
+        ac_cv_have_threadsafe_pollset=no
+    fi
+])
 
 dnl See if this is a forking platform w.r.t. MPMs
 case $host in

Modified: httpd/httpd/trunk/server/mpm/event/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/config.m4?rev=836165&r1=836164&r2=836165&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/config.m4 (original)
+++ httpd/httpd/trunk/server/mpm/event/config.m4 Sat Nov 14 13:01:43 2009
@@ -5,7 +5,7 @@
     AC_MSG_RESULT(no - APR does not support threads)
 elif test $have_threaded_sig_graceful != yes; then
     AC_MSG_RESULT(no - SIG_GRACEFUL cannot be used with a threaded MPM)
-elif test $have_threadsafe_pollset != yes; then
+elif test $ac_cv_have_threadsafe_pollset != yes; then
     AC_MSG_RESULT(no - APR_POLLSET_THREADSAFE is not supported)
 else
     AC_MSG_RESULT(yes)

Modified: httpd/httpd/trunk/server/mpm/simple/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/config.m4?rev=836165&r1=836164&r2=836165&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/config.m4 (original)
+++ httpd/httpd/trunk/server/mpm/simple/config.m4 Sat Nov 14 13:01:43 2009
@@ -5,7 +5,7 @@
     AC_MSG_RESULT(no - APR does not support threads)
 elif test $have_threaded_sig_graceful != yes; then
     AC_MSG_RESULT(no - SIG_GRACEFUL cannot be used with a threaded MPM)
-elif test $have_threadsafe_pollset != yes; then
+elif test $ac_cv_have_threadsafe_pollset != yes; then
     AC_MSG_RESULT(no - APR_POLLSET_THREADSAFE is not supported)
 else
     AC_MSG_RESULT(yes)



Mime
View raw message