Hi,

make-3.79.1, built on a recent glibc snapshot, links with the shared
library libutil, but doesn't any symbol from this library! Of course
this costs startup time.

The reason is the AC_FUNC_GETLOADAVG macro. It checks for getloadavg
in -lutil. Now glibc-2.2 has getloadavg in libc, but it also has an
(unrelated) libutil. This code from AC_FUNC_GETLOADAVG

# 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])

ought to be changed to

# Check for the glibc-2.2 definition of getloadavg.
AC_CHECK_FUNC(getloadavg, [ac_have_func=yes])
# Check for the 4.4BSD definition of getloadavg.
if test $ac_have_func = no; then
  AC_CHECK_LIB(util, getloadavg,
    [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
fi

This way, getloadavg is recognized as existent, but -lutil is not
unnecessarily added to LIBS.

Bruno

Reply via email to