From: Roland McGrath Date: Tue, 7 Feb 1995 05:23:22 +0000 (+0000) Subject: (AC_FUNC_GETLOADAVG): Check for -lkvm before -lutil; if we have -lkvm, put X-Git-Tag: fsf-origin~327 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2af4715980db4d33c3342aef476e306417f0f89;p=thirdparty%2Fautoconf.git (AC_FUNC_GETLOADAVG): Check for -lkvm before -lutil; if we have -lkvm, put it after -lutil in $LIBS. --- diff --git a/acspecific.m4 b/acspecific.m4 index c48ac5490..e57dda6c8 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -1,6 +1,6 @@ dnl Macros that test for specific features. dnl This file is part of Autoconf. -dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +dnl Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -1089,10 +1089,13 @@ NEED_SETGID=false AC_SUBST(NEED_SETGID)dnl ac_have_func=no -# Check for the 4.4BSD definition of getloadavg. -AC_CHECK_LIB(util, getloadavg, [LIBS="$LIBS -lutil" ac_have_func=yes # Some systems with -lutil have (and need) -lkvm as well, some do not. -AC_CHECK_LIB(kvm, kvm_open, LIBS="$LIBS -lkvm")]) +# If it is needed, it will be needed to detect getloadavg in -lutil. +ac_LIBS_before_kvm="$LIBS" +AC_CHECK_LIB(kvm, kvm_open, ac_LIBS_kvm=-lkvm, ac_LIBS_kvm=) +# Check for the 4.4BSD definition of getloadavg. +AC_CHECK_LIB(util, getloadavg, [ +LIBS="$ac_LIBS_before_kvm -lutil $ac_LIBS_kvm" ac_have_func=yes]) if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX. diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index c48ac5490..e57dda6c8 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -1,6 +1,6 @@ dnl Macros that test for specific features. dnl This file is part of Autoconf. -dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +dnl Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -1089,10 +1089,13 @@ NEED_SETGID=false AC_SUBST(NEED_SETGID)dnl ac_have_func=no -# Check for the 4.4BSD definition of getloadavg. -AC_CHECK_LIB(util, getloadavg, [LIBS="$LIBS -lutil" ac_have_func=yes # Some systems with -lutil have (and need) -lkvm as well, some do not. -AC_CHECK_LIB(kvm, kvm_open, LIBS="$LIBS -lkvm")]) +# If it is needed, it will be needed to detect getloadavg in -lutil. +ac_LIBS_before_kvm="$LIBS" +AC_CHECK_LIB(kvm, kvm_open, ac_LIBS_kvm=-lkvm, ac_LIBS_kvm=) +# Check for the 4.4BSD definition of getloadavg. +AC_CHECK_LIB(util, getloadavg, [ +LIBS="$ac_LIBS_before_kvm -lutil $ac_LIBS_kvm" ac_have_func=yes]) if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX.