--- coreutils-5.0/m4/nanosleep.m4.orig 2001-09-17 23:44:03.000000000 +0200 +++ coreutils-5.0/m4/nanosleep.m4 2003-12-29 01:37:31.015081160 +0100 @@ -11,7 +11,8 @@ # 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], [LIB_NANOSLEEP=$ac_cv_search_nanosleep]) + AC_CHECK_FUNC(nanosleep, [LIB_NANOSLEEP=], + [AC_SEARCH_LIBS(nanosleep, [rt posix4], [LIB_NANOSLEEP=$ac_cv_search_nanosleep])]) AC_SUBST(LIB_NANOSLEEP) AC_CACHE_CHECK([whether nanosleep works],