Mirror of :pserver:anonymous@cvs.schmorp.de/schmorpforge libev http://software.schmorp.de/pkg/libev.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

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