examples: Disable tiny-nghttpd if timerfd_create is not available
This commit is contained in:
parent
bcbb2e8649
commit
6d42b6697b
10
configure.ac
10
configure.ac
|
@ -477,10 +477,18 @@ AC_CHECK_FUNCS([ \
|
||||||
timegm \
|
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
|
# Checks for epoll availability, primarily for examples/tiny-nghttpd
|
||||||
AX_HAVE_EPOLL([have_epoll=yes], [have_epoll=no])
|
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
|
dnl Windows library for winsock2
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
|
|
|
@ -49,13 +49,13 @@ libevent_server_SOURCES = libevent-server.c
|
||||||
|
|
||||||
deflate_SOURCES = deflate.c
|
deflate_SOURCES = deflate.c
|
||||||
|
|
||||||
if HAVE_EPOLL
|
if ENABLE_TINY_NGHTTPD
|
||||||
|
|
||||||
noinst_PROGRAMS += tiny-nghttpd
|
noinst_PROGRAMS += tiny-nghttpd
|
||||||
|
|
||||||
tiny_nghttpd_SOURCES = tiny-nghttpd.c
|
tiny_nghttpd_SOURCES = tiny-nghttpd.c
|
||||||
|
|
||||||
endif # HAVE_EPOLL
|
endif # ENABLE_TINY_NGHTTPD
|
||||||
|
|
||||||
if ENABLE_ASIO_LIB
|
if ENABLE_ASIO_LIB
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue