X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgetloadavg.m4;h=ff8cf309b0c3db2757f2c2afc25971dd0c336e9d;hb=cdb16e449503bbdc0cb239ebae9372227c250dfd;hp=d0ab2b85cb5765d4660427288e6b177c3bf0787d;hpb=ac5ef5241072c25fe19b8c19b27886e5345d9a34;p=gnulib.git diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index d0ab2b85c..ff8cf309b 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -1,4 +1,4 @@ -#serial 7 +#serial 9 # A replacement for autoconf's macro by the same name. This version # accepts an optional argument specifying the name of the $srcdir-relative @@ -12,10 +12,13 @@ undefine([AC_FUNC_GETLOADAVG]) AC_DEFUN([AC_FUNC_GETLOADAVG], [ac_have_func=no # yes means we've found a way to get the load average. +AC_CHECK_HEADERS(locale.h unistd.h mach/mach.h fcntl.h) +AC_CHECK_FUNCS(setlocale) + # By default, expect to find getloadavg.c in $srcdir/. ac_lib_dir_getloadavg=$srcdir # But if there's an argument, DIR, expect to find getloadavg.c in $srcdir/DIR. -ifval([$1], [ac_lib_dir_getloadavg=$srcdir/$1]) +m4_ifval([$1], [ac_lib_dir_getloadavg=$srcdir/$1]) # Make sure getloadavg.c is where it belongs, at ./configure-time. test -f $ac_lib_dir_getloadavg/getloadavg.c \ || AC_MSG_ERROR([getloadavg.c is not in $ac_lib_dir_getloadavg]) @@ -99,5 +102,7 @@ if test "x$ac_save_LIBS" = x; then else GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"` fi +LIBS=$ac_save_LIBS + AC_SUBST(GETLOADAVG_LIBS)dnl ])# AC_FUNC_GETLOADAVG