From: Roland McGrath Date: Fri, 8 Mar 1996 20:04:52 +0000 (+0000) Subject: Wed Mar 6 14:38:31 1996 Roland McGrath X-Git-Tag: fsf-origin~177 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0508616ce89d235084576407487477c730494c04;p=thirdparty%2Fautoconf.git Wed Mar 6 14:38:31 1996 Roland McGrath * acgeneral.m4 (AC_CHECK_LIB): Use a cache variable name containing both the library and function name. --- diff --git a/acgeneral.m4 b/acgeneral.m4 index 96393e10..59fa4cdb 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1404,9 +1404,11 @@ dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND dnl [, OTHER-LIBRARIES]]]) AC_DEFUN(AC_CHECK_LIB, [AC_MSG_CHECKING([for -l$1]) -changequote(, )dnl -ac_lib_var=`echo $1 | tr '.-/+' '___p'` -changequote([, ])dnl +dnl Use a cache variable name containing both the library and function name, +dnl because the test really is for library $1 defining function $2, not +dnl just for library $1. Separate tests with the same $1 and different $2s +dnl may have different results. +ac_lib_var=`echo $1[_]$2 | tr '.-/+' '___p'` AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, [ac_save_LIBS="$LIBS" LIBS="-l$1 $5 $LIBS" diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 96393e10..59fa4cdb 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1404,9 +1404,11 @@ dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND dnl [, OTHER-LIBRARIES]]]) AC_DEFUN(AC_CHECK_LIB, [AC_MSG_CHECKING([for -l$1]) -changequote(, )dnl -ac_lib_var=`echo $1 | tr '.-/+' '___p'` -changequote([, ])dnl +dnl Use a cache variable name containing both the library and function name, +dnl because the test really is for library $1 defining function $2, not +dnl just for library $1. Separate tests with the same $1 and different $2s +dnl may have different results. +ac_lib_var=`echo $1[_]$2 | tr '.-/+' '___p'` AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, [ac_save_LIBS="$LIBS" LIBS="-l$1 $5 $LIBS"