ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/libev.m4
Revision: 1.18
Committed: Fri Nov 22 14:32:13 2019 UTC (4 years, 8 months ago) by root
Branch: MAIN
CVS Tags: EV-rel-4_29, rel-4_33, EV-rel-4_31, EV-rel-4_30, rel-4_31, HEAD
Changes since 1.17: +6 -2 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 dnl this file is part of libev, do not make local modifications
2     dnl http://software.schmorp.de/pkg/libev
3    
4 root 1.16 dnl libev support
5 root 1.18 AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/timerfd.h)
6     AC_CHECK_HEADERS(sys/select.h sys/eventfd.h sys/signalfd.h linux/aio_abi.h linux/fs.h)
7 root 1.1
8 root 1.12 AC_CHECK_FUNCS(inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd)
9 root 1.1
10 root 1.16 AC_CHECK_FUNCS(clock_gettime, [], [
11 root 1.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 root 1.13 [#include <unistd.h>
16     #include <sys/syscall.h>
17 root 1.11 #include <time.h>],
18     [struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])],
19     [ac_have_clock_syscall=1
20 root 1.15 AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, Define to 1 to use the syscall interface for clock_gettime)
21 root 1.11 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 root 1.16 AC_CHECK_LIB(rt, clock_gettime)
26 root 1.7 unset ac_cv_func_clock_gettime
27 root 1.5 AC_CHECK_FUNCS(clock_gettime)
28 root 1.3 fi
29 root 1.1 ])
30    
31 root 1.16 AC_CHECK_FUNCS(nanosleep, [], [
32 root 1.8 if test -z "$LIBEV_M4_AVOID_LIBRT"; then
33 root 1.16 AC_CHECK_LIB(rt, nanosleep)
34 root 1.9 unset ac_cv_func_nanosleep
35     AC_CHECK_FUNCS(nanosleep)
36 root 1.8 fi
37     ])
38    
39 root 1.18 AC_CHECK_TYPE(__kernel_rwf_t, [
40     AC_DEFINE(HAVE_KERNEL_RWF_T, 1, Define to 1 if linux/fs.h defined kernel_rwf_t)
41     ], [], [#include <linux/fs.h>])
42    
43 root 1.15 if test -z "$LIBEV_M4_AVOID_LIBM"; then
44     LIBM=m
45     fi
46     AC_SEARCH_LIBS(floor, $LIBM, [AC_DEFINE(HAVE_FLOOR, 1, Define to 1 if the floor function is available)])
47 root 1.1