1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
Index: cherokee-0.5.6/configure.in
===================================================================
--- cherokee-0.5.6.orig/configure.in
+++ cherokee-0.5.6/configure.in
@@ -274,13 +274,20 @@ fi
dnl
dnl Epoll
dnl
-AC_CHECK_HEADER(sys/epoll.h, have_epoll_include=yes, have_epoll_include=no)
-have_epoll=no
-if test "x$have_epoll_include" = "xyes"; then
- AC_MSG_CHECKING(for epoll system call)
+AC_ARG_ENABLE([epoll], AC_HELP_STRING([--disable-epoll], [Disable epoll system call usage, default: check]))
- AC_TRY_RUN([
+have_epoll=no
+if test "x$enable_epoll" != "xno"; then
+ AC_CHECK_HEADER(sys/epoll.h, have_epoll_include=yes, have_epoll_include=no)
+ if test "x$have_epoll_include" = "xyes"; then
+ AC_MSG_CHECKING(for epoll system call)
+
+ if test "$host" != "$build"; then
+ AC_MSG_RESULT([crosscompile, assuming yes])
+ have_epoll=yes
+ else
+ AC_TRY_RUN([
#include <stdint.h>
#include <sys/param.h>
#include <sys/types.h>
@@ -297,8 +304,10 @@ if test "x$have_epoll_include" = "xyes";
epfd = epoll_create(256);
exit (epfd == -1 ? 1 : 0);
}
- ], have_epoll=yes)
- AC_MSG_RESULT($have_epoll)
+ ], have_epoll=yes)
+ AC_MSG_RESULT($have_epoll)
+ fi
+ fi
fi
dnl
|