summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 3d2f311cf..0e38b1911 100644
--- a/configure.in
+++ b/configure.in
@@ -638,6 +638,25 @@ AC_SUBST(have_sigwait)
AC_CHECK_FUNCS(poll)
+# Checks for the FreeBSD KQueue and Linux epoll interfaces:
+AC_CHECK_FUNC(kevent,
+ [AC_DEFINE([HAVE_KQUEUE], 1, [Define if the KQueue interface is supported])])
+
+# epoll* may be available in libc but return ENOSYS on a pre-2.6 kernel.
+AC_CACHE_CHECK([for epoll support], [apr_cv_epoll],
+[AC_TRY_RUN([
+#include <sys/epoll.h>
+#include <unistd.h>
+
+int main()
+{
+ return epoll_create(5) == -1;
+}], [apr_cv_epoll=yes], [apr_cv_epoll=no], [apr_cv_epoll=no])])
+
+if test "$apr_cv_epoll" = "yes"; then
+ AC_DEFINE([HAVE_EPOLL], 1, [Define if the epoll interface is supported])
+fi
+
dnl ----------------------------- Checking for missing POSIX thread functions
AC_CHECK_FUNCS([getpwnam_r getpwuid_r getgrnam_r getgrgid_r])