diff options
author | Jim Meyering <jim@meyering.net> | 2000-05-06 14:03:19 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-05-06 14:03:19 +0000 |
commit | a23b2bb94887664a1e5bfec69310a5637500125d (patch) | |
tree | 91b4ebd9db3cb43805c387a168c88e0ca741e5aa | |
parent | 669034433db1d346bf3b799900db0d397d04eb47 (diff) | |
download | coreutils-a23b2bb94887664a1e5bfec69310a5637500125d.tar.xz |
(jm_FUNC_NANOSLEEP): Save and restore LIBS around
AC_SEARCH_LIBS call for nanosleep.
(LIB_NANOSLEEP): Set and AC_SUBST.
-rw-r--r-- | m4/nanosleep.m4 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4 index 7e3351776..5ed4c4727 100644 --- a/m4/nanosleep.m4 +++ b/m4/nanosleep.m4 @@ -1,4 +1,4 @@ -#serial 5 +#serial 6 dnl From Jim Meyering. dnl Check for the nanosleep function. @@ -7,9 +7,12 @@ dnl AC_DEFUN(jm_FUNC_NANOSLEEP, [ + nanosleep_save_libs=$LIBS + # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - AC_SEARCH_LIBS(nanosleep, [rt posix4]) + AC_SEARCH_LIBS(nanosleep, [rt posix4], [LIB_NANOSLEEP=$ac_cv_search_nanosleep]) + AC_SUBST(LIB_NANOSLEEP) AC_CACHE_CHECK([whether nanosleep works], jm_cv_func_nanosleep_works, @@ -47,4 +50,6 @@ AC_DEFUN(jm_FUNC_NANOSLEEP, AC_DEFINE_UNQUOTED(nanosleep, rpl_nanosleep, [Define to rpl_nanosleep if the replacement function should be used.]) fi + + LIBS=$nanosleep_save_libs ]) |