"Fossies" - the Fresh Open Source Software Archive

Member "libev-4.33/libev.m4" (22 Nov 2019, 1775 Bytes) of package /linux/misc/libev-4.33.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "libev.m4": 4.27_vs_4.31.

    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 sys/timerfd.h)
    6 AC_CHECK_HEADERS(sys/select.h sys/eventfd.h sys/signalfd.h linux/aio_abi.h linux/fs.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 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 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