]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect
authorAkim Demaille <akim@epita.fr>
Wed, 6 Jun 2001 08:25:00 +0000 (08:25 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 6 Jun 2001 08:25:00 +0000 (08:25 +0000)
PR autoconf/187.

BUGS
ChangeLog
tests/semantics.at
tests/suite.at

diff --git a/BUGS b/BUGS
index 9f531d92af9ba0abec839306360dbacce7d7795b..6be4c71bf8c8eb9a6da4c06591f495efa2c15591 100644 (file)
--- 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).
index 24d7f4a9f96fc9f93553b531253f993a2557540a..c27daf93891f78734101ef606dcd2ba7f3665a3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-06  Akim Demaille  <akim@epita.fr>
+
+       * tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect
+       PR autoconf/187.
+
 2001-06-05  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (_AC_INIT_PARSE_ARGS): `prefix' and `exec_prefix'
index 542a1125f318a3576247f76ea8d0dfb7facaa75a..c63063230addd0c1c6b1d81f87867a0fde34a0e1 100644 (file)
@@ -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
index 495c9139845ee70757985f1579297f1dccdc6615..be137554195097459c9b4afe75d758202f5eeecd 100644 (file)
@@ -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.