/* Define to 1 if you have the <edit/readline/readline.h> header file. */
#undef HAVE_EDIT_READLINE_READLINE_H
+/* Define to 1 if you have the `epoll_create1' function. */
+#undef HAVE_EPOLL_CREATE1
+
/* Define to 1 if you have the `EVP_aes_128_ecb' function. */
#undef HAVE_EVP_AES_128_ECB
GEOIPLINKOBJS
GEOIPLINKSRCS
ISC_PLATFORM_HAVEDEVPOLL
-ISC_PLATFORM_HAVEEPOLL
ISC_PLATFORM_NORETURN_POST
ISC_PLATFORM_NORETURN_PRE
ISC_SOCKADDR_LEN_T
#
# Check whether --enable-epoll was given.
if test "${enable_epoll+set}" = set; then :
- enableval=$enable_epoll; want_epoll="$enableval"
+ enableval=$enable_epoll;
else
- want_epoll="auto"
+ enable_epoll="yes"
fi
-case $want_epoll in
-auto)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking epoll support" >&5
-$as_echo_n "checking epoll support... " >&6; }
- if test "$cross_compiling" = yes; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/epoll.h>
-int main() {
- if (epoll_create(1) < 0)
- return (1);
- return (0);
-}
+if test "$enable_epoll" = "yes"; then :
+ for ac_func in epoll_create1
+do :
+ ac_fn_c_check_func "$LINENO" "epoll_create1" "ac_cv_func_epoll_create1"
+if test "x$ac_cv_func_epoll_create1" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_EPOLL_CREATE1 1
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
- ;;
-yes)
- ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
- ;;
-*)
- ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
- ;;
-esac
+fi
+done
+fi
#
# check if we support /dev/poll
# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
# so we need to try running the code, not just test its existence.
#
-AC_ARG_ENABLE(epoll,
- AS_HELP_STRING([--enable-epoll],
- [use Linux epoll when available [default=auto]]),
- want_epoll="$enableval", want_epoll="auto")
-case $want_epoll in
-auto)
- AC_MSG_CHECKING(epoll support)
- AC_TRY_RUN([
-#include <sys/epoll.h>
-int main() {
- if (epoll_create(1) < 0)
- return (1);
- return (0);
-}
-],
- [AC_MSG_RESULT(yes)
- ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
- [AC_MSG_RESULT(no)
- ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"],
- [AC_MSG_RESULT(no)
- ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
- ;;
-yes)
- ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
- ;;
-*)
- ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
- ;;
-esac
-AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
+AC_ARG_ENABLE([epoll],
+ [AS_HELP_STRING([--enable-epoll],
+ [use Linux epoll when available [default=auto]])],
+ [], [enable_epoll="yes"])
+
+AS_IF([test "$enable_epoll" = "yes"],
+ [AC_CHECK_FUNCS([epoll_create1])])
#
# check if we support /dev/poll
*/
@ISC_PLATFORM_HAVETFO@
-/*! \brief
- * Define if the system supports epoll multiplexing
- */
-@ISC_PLATFORM_HAVEEPOLL@
-
/*! \brief
* Define if the system supports /dev/poll multiplexing
*/
#ifdef HAVE_KQUEUE
#include <sys/event.h>
#endif
-#ifdef ISC_PLATFORM_HAVEEPOLL
+#ifdef HAVE_EPOLL_CREATE1
#include <sys/epoll.h>
#endif
#ifdef ISC_PLATFORM_HAVEDEVPOLL
*/
#if defined(HAVE_KQUEUE)
#define USE_KQUEUE
-#elif defined (ISC_PLATFORM_HAVEEPOLL)
+#elif defined(HAVE_EPOLL_CREATE1)
#define USE_EPOLL
#elif defined (ISC_PLATFORM_HAVEDEVPOLL)
#define USE_DEVPOLL