summaryrefslogtreecommitdiff
path: root/m4/jm-macros.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-08 10:24:58 +0000
committerJim Meyering <jim@meyering.net>2004-04-08 10:24:58 +0000
commita021886f982ed533fddf6e93ea50ba07a0d5fe75 (patch)
tree2b90563b063daab259758f55af55876789b3977a /m4/jm-macros.m4
parent0c5fbdba06f7a6eb8f9af9c6e0f5be2f02166d10 (diff)
downloadcoreutils-a021886f982ed533fddf6e93ea50ba07a0d5fe75.tar.xz
(jm_MACROS): Check for fdatasync within
-lrt and -lposix4, so that it can be used in Solaris 2.5.1 and later.
Diffstat (limited to 'm4/jm-macros.m4')
-rw-r--r--m4/jm-macros.m410
1 files changed, 9 insertions, 1 deletions
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 7716e6411..3c8372c6c 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -81,7 +81,6 @@ AC_DEFUN([jm_MACROS],
AC_CHECK_FUNCS( \
endgrent \
endpwent \
- fdatasync \
ftruncate \
gethrtime \
hasmntopt \
@@ -111,6 +110,15 @@ AC_DEFUN([jm_MACROS],
AC_REQUIRE([GL_FUNC_GETCWD_PATH_MAX])
AC_REQUIRE([GL_FUNC_READDIR])
+ # for dd.c and shred.c
+ fetish_saved_libs=$LIBS
+ AC_SEARCH_LIBS([fdatasync], [rt posix4],
+ [test "$ac_cv_search_fdatasync" = "none required" ||
+ LIB_FDATASYNC=$ac_cv_search_fdatasync])
+ AC_SUBST([LIB_FDATASYNC])
+ AC_CHECK_FUNCS(fdatasync)
+ LIBS=$fetish_saved_libs
+
# See if linking `seq' requires -lm.
# It does on nearly every system. The single exception (so far) is
# BeOS which has all the math functions in the normal runtime library