X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fgetloadavg.m4;h=c4664f874ca1482489a2d492d0b3932ee9853d23;hb=423d3cac13c30bb0d5f85e5fac6ab1406ed1731a;hp=0a731c4f99349a7ca3bf8d1c2581b29f9b239ad9;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 0a731c4f9..c4664f874 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -7,6 +7,8 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +#serial 2 + # Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent. # New applications should use gl_GETLOADAVG instead. @@ -43,11 +45,10 @@ test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_have_func=yes # 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. -# For kstat on solaris, we need libelf to force the definition of SVR4 below. +# For kstat on solaris, we need to test for libelf and libkvm to force the +# definition of SVR4 below. if test $gl_have_func = no; then AC_CHECK_LIB([elf], [elf_begin], [LIBS="-lelf $LIBS"]) -fi -if test $gl_have_func = no; then AC_CHECK_LIB([kvm], [kvm_open], [LIBS="-lkvm $LIBS"]) # Check for the 4.4BSD definition of getloadavg. AC_CHECK_LIB([util], [getloadavg], @@ -144,7 +145,8 @@ AC_CHECK_HEADER([sys/dg_sys_info.h], # We cannot check for , because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for because # Irix 4.0.5F has the header but not the library. -if test $gl_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then +if test $gl_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes \ + && test "$ac_cv_lib_kvm_kvm_open" = yes; then gl_have_func=yes AC_DEFINE([SVR4], [1], [Define to 1 on System V Release 4.]) fi