From: Akim Demaille Date: Mon, 22 May 2000 15:31:54 +0000 (+0000) Subject: Reading the ChangeLog revealed that the recent update of X-Git-Tag: autoconf-2.50~885 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e511577401d708f98a7eb580b3487fe6a24e6ee2;p=thirdparty%2Fautoconf.git Reading the ChangeLog revealed that the recent update of AC_FUNC_GETLOADAVG introduced a bug which already happened (see Mon Nov 11 18:02:58 1996 David J MacKenzie). * acgeneral.m4 (AC_CHECK_LIB): Use a less tempting name: s/ac_save_LIBS/ac_check_lib_save_LIBS/. --- diff --git a/ChangeLog b/ChangeLog index 9a0ff501c..1fa262d3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-05-22 Akim Demaille + + Reading the ChangeLog revealed that the recent update of + AC_FUNC_GETLOADAVG introduced a bug which already happened (see + Mon Nov 11 18:02:58 1996 David J MacKenzie). + + * acgeneral.m4 (AC_CHECK_LIB): Use a less tempting name: + s/ac_save_LIBS/ac_check_lib_save_LIBS/. + 2000-05-22 Akim Demaille * acspecific.m4 (_AC_LIBOBJ_ALLOCA): New macro, extracted from... diff --git a/acgeneral.m4 b/acgeneral.m4 index 8b6763b69..0221d8b38 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -2729,16 +2729,22 @@ AC_SHELL_IFELSE([test "$ac_cv_search_$1" != no], # FIXME: This macro is extremely suspicious. It DEFINEs unconditionnally, # whatever the FUNCTION, in addition to not being a *S macro. Note # that the cache does depend upon the function we are looking for. +# +# It is on purpose we used `ac_check_lib_save_LIBS' and not just +# `ac_save_LIBS': there are many macros which don't want to see `LIBS' +# changed but still want to use AC_CHECK_LIB, so they save `LIBS'. +# And ``ac_save_LIBS' is too tempting a name, so let's leave them some +# freedom. AC_DEFUN([AC_CHECK_LIB], [AH_CHECK_LIB([$1])dnl AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl AC_CACHE_CHECK([for $2 in -l$1], ac_Lib, -[ac_save_LIBS=$LIBS +[ac_check_lib_save_LIBS=$LIBS LIBS="-l$1 $5 $LIBS" AC_TRY_LINK_FUNC([$2], [AC_VAR_SET(ac_Lib, yes)], [AC_VAR_SET(ac_Lib, no)]) -LIBS=$ac_save_LIBS]) +LIBS=$ac_check_lib_save_LIBS]) AC_SHELL_IFELSE([test AC_VAR_GET(ac_Lib) = yes], [m4_default([$3], [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1)) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 8b6763b69..0221d8b38 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2729,16 +2729,22 @@ AC_SHELL_IFELSE([test "$ac_cv_search_$1" != no], # FIXME: This macro is extremely suspicious. It DEFINEs unconditionnally, # whatever the FUNCTION, in addition to not being a *S macro. Note # that the cache does depend upon the function we are looking for. +# +# It is on purpose we used `ac_check_lib_save_LIBS' and not just +# `ac_save_LIBS': there are many macros which don't want to see `LIBS' +# changed but still want to use AC_CHECK_LIB, so they save `LIBS'. +# And ``ac_save_LIBS' is too tempting a name, so let's leave them some +# freedom. AC_DEFUN([AC_CHECK_LIB], [AH_CHECK_LIB([$1])dnl AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl AC_CACHE_CHECK([for $2 in -l$1], ac_Lib, -[ac_save_LIBS=$LIBS +[ac_check_lib_save_LIBS=$LIBS LIBS="-l$1 $5 $LIBS" AC_TRY_LINK_FUNC([$2], [AC_VAR_SET(ac_Lib, yes)], [AC_VAR_SET(ac_Lib, no)]) -LIBS=$ac_save_LIBS]) +LIBS=$ac_check_lib_save_LIBS]) AC_SHELL_IFELSE([test AC_VAR_GET(ac_Lib) = yes], [m4_default([$3], [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1))