diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-02-07 15:03:56 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-02-07 15:04:25 +0000 |
commit | 88498b706a39bbe520f9591d8d52b54fb1f8e378 (patch) | |
tree | 5243eb3c97b8039d0ff43cd7121a632bbdb9d3bc /configure.ac | |
parent | b816cb6e900073c6a6126687f2102dfd8e594e68 (diff) | |
parent | 3f4ed9def33c359142c340f28345755ca37663f2 (diff) | |
download | dbus-88498b706a39bbe520f9591d8d52b54fb1f8e378.tar.gz |
Merge branch 'socket-set-33337'
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3ca922b8..6ecea15e 100644 --- a/configure.ac +++ b/configure.ac @@ -1036,6 +1036,36 @@ fi AM_CONDITIONAL(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX, test x$have_dnotify = xyes) +# For simplicity, we require the userland API for epoll_create1 at +# compile-time (glibc 2.9), but we'll run on kernels that turn out +# not to have it at runtime. +AC_ARG_ENABLE([epoll], + [AS_HELP_STRING([--enable-epoll],[use epoll(4) on Linux])], + [enable_epoll=$enableval], [enable_epoll=auto]) +if test x$enable_epoll = xno; then + have_linux_epoll=no +else + AC_MSG_CHECKING([for Linux epoll(4)]) + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [ + #ifndef __linux__ + #error This is not Linux + #endif + #include <sys/epoll.h> + ], + [epoll_create1 (EPOLL_CLOEXEC);])], + [have_linux_epoll=yes], + [have_linux_epoll=no]) + AC_MSG_RESULT([$have_linux_epoll]) +fi +if test x$enable_epoll,$have_linux_epoll = xyes,no; then + AC_MSG_ERROR([epoll support explicitly enabled but not available]) +fi +if test x$have_linux_epoll = xyes; then + AC_DEFINE([DBUS_HAVE_LINUX_EPOLL], 1, [Define to use epoll(4) on Linux]) +fi +AM_CONDITIONAL([HAVE_LINUX_EPOLL], [test x$have_linux_epoll = xyes]) + # kqueue checks if test x$enable_kqueue = xno ; then have_kqueue=no |