From debian/patches/other-debian.patch. autoconf (2.13-24) unstable; urgency=low * Fix test for getloadavg (Bug#84170). -- Ben Pfaff <blp@gnu.org> Wed, 31 Jan 2001 19:12:03 -0500 --- autoconf-2.13/acspecific.m4 +++ autoconf-2.13/acspecific.m4 @@ -1477,14 +1477,19 @@ AC_SUBST(ALLOCA)dnl AC_DEFUN(AC_FUNC_GETLOADAVG, [ac_have_func=no # yes means we've found a way to get the load average. -# Some systems with -lutil have (and need) -lkvm as well, some do not. -# On Solaris, -lkvm requires nlist from -lelf, so check that first -# to get the right answer into the cache. -AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS") -AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS") -# Check for the 4.4BSD definition of getloadavg. -AC_CHECK_LIB(util, getloadavg, - [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes]) +# Some systems have getloadavg without any extra libraries. +AC_CHECK_FUNC(getloadavg, [ac_have_func=yes]) + +if test $ac_have_func = no; then + # Some systems with -lutil have (and need) -lkvm as well, some do not. + # On Solaris, -lkvm requires nlist from -lelf, so check that first + # to get the right answer into the cache. + AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS") + AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS") + # Check for the 4.4BSD definition of getloadavg. + AC_CHECK_LIB(util, getloadavg, + [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes]) +fi if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX.