From: Akim Demaille Date: Wed, 6 Jun 2001 08:25:00 +0000 (+0000) Subject: * tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect X-Git-Tag: AUTOCONF-2.50a~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f50c7ad5a845b7161fe002d36bebf4e07978168;p=thirdparty%2Fautoconf.git * tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect PR autoconf/187. --- diff --git a/BUGS b/BUGS index 9f531d92a..6be4c71bf 100644 --- a/BUGS +++ b/BUGS @@ -18,3 +18,9 @@ address them. /*--------------------------. | Good for production use. | `--------------------------*/ + +* Important bugs + +** AC_CHECK_LIB +Does not work properly when given variables instead of literals, e.g., +AC_CHECK_LIB($foo, $bar). diff --git a/ChangeLog b/ChangeLog index 24d7f4a9f..c27daf938 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-06-06 Akim Demaille + + * tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect + PR autoconf/187. + 2001-06-05 Akim Demaille * acgeneral.m4 (_AC_INIT_PARSE_ARGS): `prefix' and `exec_prefix' diff --git a/tests/semantics.at b/tests/semantics.at index 542a1125f..c63063230 100644 --- a/tests/semantics.at +++ b/tests/semantics.at @@ -17,9 +17,45 @@ AT_BANNER([Semantics.]) # But there are systems without libm, on which we don't want to have # this test fail, so exit successfully if `cos' is in libc. AT_CHECK_MACRO([AC_CHECK_LIB], -[AC_TRY_LINK_FUNC(cos, [AS_EXIT(0)]) +[AC_TRY_LINK_FUNC(cos, + [AC_MSG_ERROR([`cos' is in `libc'], 77)]) + AC_CHECK_LIB(m, cos,, - [AC_MSG_ERROR([cannot find `cos'])])]) + [AC_MSG_ERROR([cannot find `cos' in `libm'])]) + +# No kidding, using variables was broken in 2.50 :( +ac_sin=sin +AC_CHECK_LIB(m, $ac_sin,, + [AC_MSG_ERROR([cannot find `\$ac_sin' (= `$ac_sin') in `libm'])]) + +ac_m=m +AC_CHECK_LIB($ac_m, acos,, + [AC_MSG_ERROR([cannot find `acos' in `\$ac_m' (= `$ac_m')])]) + +ac_asin=asin +AC_CHECK_LIB($ac_m, $ac_asin,, + [AC_MSG_ERROR([cannot find `\$ac_asin' (= `$ac_asin') in `\$ac_m' (= `$at_m')])]) + +# But if the bug is in the caching mechanism, then be sure we +# correctly detect failures. + +AC_CHECK_LIB(m, cossack, + [AC_MSG_ERROR([found `cossack' in `libm'])]) + +# No kidding, using variables was broken in 2.50 :( +ac_sinner=sinner +AC_CHECK_LIB(m, $ac_sinner, + [AC_MSG_ERROR([found `\$ac_sinner' (= `$ac_sinner') in `libm'])]) + +ac_m=m +AC_CHECK_LIB($ac_m, acossack, + [AC_MSG_ERROR([found `acossack' in `\$ac_m' (= `$ac_m')])]) + +ac_asinner=asinner +AC_CHECK_LIB($ac_m, $ac_asinner, + [AC_MSG_ERROR([found `\$ac_asinner' (= `$ac_asinner') in `\$ac_m' (= `$at_m')])]) + +]) # AC_CHECK_DECLS diff --git a/tests/suite.at b/tests/suite.at index 495c91398..be1375541 100644 --- a/tests/suite.at +++ b/tests/suite.at @@ -39,6 +39,7 @@ m4_include([torture.at]) m4_include([compile.at]) # Checking that AC_CHECK_FOO macros work properly. +AT_BANNER([FIXME: AC_CHECK_TYPE is a known failure.]) m4_include([semantics.at]) # Blind testing the macros.