ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/libev.m4
Revision: 1.17
Committed: Thu Jun 20 23:14:54 2019 UTC (5 years ago) by root
Branch: MAIN
CVS Tags: EV-rel-4_28, EV-rel-4_27, rel-4_27
Changes since 1.16: +2 -1 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 dnl this file is part of libev, do not make local modifications
2 dnl http://software.schmorp.de/pkg/libev
3
4 dnl libev support
5 AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h port.h poll.h)
6 AC_CHECK_HEADERS(sys/select.h sys/eventfd.h sys/signalfd.h linux/aio_abi.h)
7
8 AC_CHECK_FUNCS(inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd)
9
10 AC_CHECK_FUNCS(clock_gettime, [], [
11 dnl on linux, try syscall wrapper first
12 if test $(uname) = Linux; then
13 AC_MSG_CHECKING(for clock_gettime syscall)
14 AC_LINK_IFELSE([AC_LANG_PROGRAM(
15 [#include <unistd.h>
16 #include <sys/syscall.h>
17 #include <time.h>],
18 [struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])],
19 [ac_have_clock_syscall=1
20 AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, Define to 1 to use the syscall interface for clock_gettime)
21 AC_MSG_RESULT(yes)],
22 [AC_MSG_RESULT(no)])
23 fi
24 if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then
25 AC_CHECK_LIB(rt, clock_gettime)
26 unset ac_cv_func_clock_gettime
27 AC_CHECK_FUNCS(clock_gettime)
28 fi
29 ])
30
31 AC_CHECK_FUNCS(nanosleep, [], [
32 if test -z "$LIBEV_M4_AVOID_LIBRT"; then
33 AC_CHECK_LIB(rt, nanosleep)
34 unset ac_cv_func_nanosleep
35 AC_CHECK_FUNCS(nanosleep)
36 fi
37 ])
38
39 if test -z "$LIBEV_M4_AVOID_LIBM"; then
40 LIBM=m
41 fi
42 AC_SEARCH_LIBS(floor, $LIBM, [AC_DEFINE(HAVE_FLOOR, 1, Define to 1 if the floor function is available)])
43