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 #include #include @@ -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