Commit 6d42b669 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

examples: Disable tiny-nghttpd if timerfd_create is not available

parent bcbb2e86
......@@ -477,10 +477,18 @@ AC_CHECK_FUNCS([ \
timegm \
])
# timerfd_create was added in linux kernel 2.6.25
AC_CHECK_FUNC([timerfd_create],
[have_timerfd_create=yes], [have_timerfd_create=no])
# Checks for epoll availability, primarily for examples/tiny-nghttpd
AX_HAVE_EPOLL([have_epoll=yes], [have_epoll=no])
AM_CONDITIONAL([HAVE_EPOLL], [ test "x${have_epoll}" = "xyes" ])
AM_CONDITIONAL([ENABLE_TINY_NGHTTPD],
[ test "x${have_epoll}" = "xyes" &&
test "x${have_timerfd_create}" = "xyes"])
dnl Windows library for winsock2
case "${host}" in
......
......@@ -49,13 +49,13 @@ libevent_server_SOURCES = libevent-server.c
deflate_SOURCES = deflate.c
if HAVE_EPOLL
if ENABLE_TINY_NGHTTPD
noinst_PROGRAMS += tiny-nghttpd
tiny_nghttpd_SOURCES = tiny-nghttpd.c
endif # HAVE_EPOLL
endif # ENABLE_TINY_NGHTTPD
if ENABLE_ASIO_LIB
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment