examples: Disable tiny-nghttpd if timerfd_create is not available

This commit is contained in:
Tatsuhiro Tsujikawa 2014-10-09 21:18:24 +09:00
parent bcbb2e8649
commit 6d42b6697b
2 changed files with 11 additions and 3 deletions

View File

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

View File

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