1 # xnanosleep.m4 serial 1
2 dnl Copyright (C) 2005 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 dnl Written by Paul Eggert.
9 AC_DEFUN([gl_XNANOSLEEP],
11 AC_LIBSOURCES([xnanosleep.c, xnanosleep.h])
12 AC_LIBOBJ([xnanosleep])
14 dnl Prerequisites of lib/xnanosleep.c.
15 AC_REQUIRE([gl_PREREQ_GETHRXTIME])
18 case $LIB_GETHRXTIME in
20 AC_CACHE_CHECK([whether __linux__ is defined],
22 [AC_EGREP_CPP([have___linux__],
28 gl_cv_have___linux__=yes,
29 gl_cv_have___linux__=no)])
30 if test $gl_cv_have___linux__ = yes; then
31 LIB_XNANOSLEEP=$LIB_GETHRXTIME
34 AC_SUBST([LIB_XNANOSLEEP])