From 1609bae901992a7ee9c36faa002cc7d8253bf5da Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 6 May 2000 14:03:19 +0000 Subject: [PATCH] (jm_FUNC_NANOSLEEP): Save and restore LIBS around AC_SEARCH_LIBS call for nanosleep. (LIB_NANOSLEEP): Set and AC_SUBST. --- m4/nanosleep.m4 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4 index 7e3351776e..5ed4c47275 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 ]) -- 2.30.2