diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-02-22 07:06:47 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-02-22 07:06:47 +0000 |
commit | 0e1b33afd3b54905e25190ab64776f86b60d928a (patch) | |
tree | 13c411b9f3724248189bce2f616c4e1923ff86b8 /m4/xnanosleep.m4 | |
parent | 7244117ba2d1cedf43b6670d6d506ebb209624ea (diff) | |
download | coreutils-0e1b33afd3b54905e25190ab64776f86b60d928a.tar.xz |
Initial revision.
Diffstat (limited to 'm4/xnanosleep.m4')
-rw-r--r-- | m4/xnanosleep.m4 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/m4/xnanosleep.m4 b/m4/xnanosleep.m4 new file mode 100644 index 000000000..b7866538d --- /dev/null +++ b/m4/xnanosleep.m4 @@ -0,0 +1,35 @@ +# xnanosleep.m4 serial 1 +dnl Copyright (C) 2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Paul Eggert. + +AC_DEFUN([gl_XNANOSLEEP], +[ + AC_LIBSOURCES([xnanosleep.c, xnanosleep.h]) + AC_LIBOBJ([xnanosleep]) + + dnl Prerequisites of lib/xnanosleep.c. + AC_REQUIRE([gl_PREREQ_GETHRXTIME]) + + LIB_XNANOSLEEP= + case $LIB_GETHRXTIME in + ?*) + AC_CACHE_CHECK([whether __linux__ is defined], + gl_cv_have___linux__, + [AC_EGREP_CPP([have___linux__], + [ +# ifdef __linux__ + have___linux__ +# endif + ], + gl_cv_have___linux__=yes, + gl_cv_have___linux__=no)]) + if test $gl_cv_have___linux__ = yes; then + LIB_XNANOSLEEP=$LIB_GETHRXTIME + fi;; + esac + AC_SUBST([LIB_XNANOSLEEP]) +]) |