dnl From Jim Meyering.
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
dnl
dnl From Jim Meyering.
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
dnl
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
# 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,
[
AC_CACHE_CHECK([whether nanosleep works],
jm_cv_func_nanosleep_works,
[
jm_cv_func_nanosleep_works=yes,
jm_cv_func_nanosleep_works=no,
dnl When crosscompiling, assume the worst.
jm_cv_func_nanosleep_works=yes,
jm_cv_func_nanosleep_works=no,
dnl When crosscompiling, assume the worst.
- AC_SUBST(LIBOBJS)
- LIBOBJS="$LIBOBJS nanosleep.$ac_objext"
- AC_DEFINE_UNQUOTED(nanosleep, gnu_nanosleep,
- [Define to gnu_nanosleep if the replacement function should be used.])
+ AC_LIBOBJ(nanosleep)
+ AC_DEFINE(nanosleep, rpl_nanosleep,
+ [Define to rpl_nanosleep if the replacement function should be used.])