Repository: trafficserver Updated Branches: refs/heads/master 6ff7aafe4 -> 135f88e11
TS-4302 Adds more control over the event API to use This closes #548 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/135f88e1 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/135f88e1 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/135f88e1 Branch: refs/heads/master Commit: 135f88e11cf1056a9a54ac55844d303a9bd430c4 Parents: 6ff7aaf Author: Leif Hedstrom <[email protected]> Authored: Thu Mar 31 08:23:26 2016 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Mon Apr 4 15:36:13 2016 -0600 ---------------------------------------------------------------------- configure.ac | 66 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/135f88e1/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 052bff9..d9d6049 100644 --- a/configure.ac +++ b/configure.ac @@ -1139,7 +1139,7 @@ TS_CHECK_CRYPTO_EC_KEYS # Check for ServerNameIndication TLS extension support. TS_CHECK_CRYPTO_SNI -# +# # Check for the presense of the certificate callback in the ssl library TS_CHECK_CRYPTO_CERT_CB @@ -1239,28 +1239,62 @@ AS_IF([test "$host_os_def" = "linux"], [ ]) TS_ARG_ENABLE_VAR([use], [remote_unwinding]) +# Find the appropriate event handling interface. This can be forced on +# platforms that support 2 or more of our supported interfaces. It +# could also (in the future?) be used to enable other event systems +# such as libev. +AC_ARG_WITH([event-interface], + [AS_HELP_STRING([--with-event-interface=epoll|kqueue|port],[event interface to use [default=auto]])], + [event_interface=$withval], + [event_interface="auto"] +) + use_epoll=0 use_kqueue=0 use_port=0 -if test "$ac_cv_func_epoll_ctl" = "yes"; then - use_epoll=1 - have_good_poller=1 - AC_MSG_NOTICE([Using epoll event interface]) -elif test "$ac_cv_func_kqueue" = "yes"; then - use_kqueue=1 - have_good_poller=1 - AC_MSG_NOTICE([Using kqueue event interface]) -elif test "$ac_cv_func_port_create" = "yes"; then - use_port=1 - have_good_poller=1 - AC_MSG_NOTICE([Using port event interface]) -else - AC_MSG_FAILURE([No suitable polling interface found]) -fi + +AS_IF([test "x$event_interface" = "xauto"], [ + if test "$ac_cv_func_port_create" = "yes"; then + use_port=1 + have_good_poller=1 + AC_MSG_NOTICE([Using port event interface]) + elif test "$ac_cv_func_epoll_ctl" = "yes"; then + use_epoll=1 + have_good_poller=1 + AC_MSG_NOTICE([Using epoll event interface]) + elif test "$ac_cv_func_kqueue" = "yes"; then + use_kqueue=1 + have_good_poller=1 + AC_MSG_NOTICE([Using kqueue event interface]) + else + AC_MSG_FAILURE([No suitable polling interface found]) + fi +],[ + case "x$event_interface" in + xepoll) + use_epoll=1 + AC_MSG_RESULT([forced to epoll]) + ;; + xport) + use_port=1 + AC_MSG_RESULT([forced to port]) + ;; + xkqueue) + use_kqueue=1 + AC_MSG_RESULT([forced to port]) + ;; + *) + AC_MSG_RESULT([failed]) + AC_MSG_FAILURE([unknown event system]) + esac +]) + AC_SUBST(use_epoll) AC_SUBST(use_kqueue) AC_SUBST(use_port) + +# Profiler support has_profiler=0 if test "x${with_profiler}" = "xyes"; then AC_SEARCH_LIBS([ProfilerStart], [profiler],
