… | |
… | |
14 | [#include <unistd.h> |
14 | [#include <unistd.h> |
15 | #include <sys/syscall.h> |
15 | #include <sys/syscall.h> |
16 | #include <time.h>], |
16 | #include <time.h>], |
17 | [struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])], |
17 | [struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])], |
18 | [ac_have_clock_syscall=1 |
18 | [ac_have_clock_syscall=1 |
19 | AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, "use syscall interface for clock_gettime") |
19 | AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, Define to 1 to use the syscall interface for clock_gettime) |
20 | AC_MSG_RESULT(yes)], |
20 | AC_MSG_RESULT(yes)], |
21 | [AC_MSG_RESULT(no)]) |
21 | [AC_MSG_RESULT(no)]) |
22 | fi |
22 | fi |
23 | if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then |
23 | if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then |
24 | AC_CHECK_LIB(rt, clock_gettime) |
24 | AC_CHECK_LIB(rt, clock_gettime) |
… | |
… | |
33 | unset ac_cv_func_nanosleep |
33 | unset ac_cv_func_nanosleep |
34 | AC_CHECK_FUNCS(nanosleep) |
34 | AC_CHECK_FUNCS(nanosleep) |
35 | fi |
35 | fi |
36 | ]) |
36 | ]) |
37 | |
37 | |
38 | AC_CHECK_LIB(m, ceil) |
38 | if test -z "$LIBEV_M4_AVOID_LIBM"; then |
|
|
39 | LIBM=m |
|
|
40 | fi |
|
|
41 | AC_SEARCH_LIBS(floor, $LIBM, [AC_DEFINE(HAVE_FLOOR, 1, Define to 1 if the floor function is available)]) |
39 | |
42 | |