]> git.saurik.com Git - bison.git/commitdiff
(AT_COMPILE): Use new LDFLAGS, LIBS vars, to avoid testing problems
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 18 Feb 2003 05:09:44 +0000 (05:09 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 18 Feb 2003 05:09:44 +0000 (05:09 +0000)
for installations that set these vars at configure-time.

tests/testsuite.at

index 870207a42939b43711b092a0c324d3b030af9944..06063d6ee1a7240510742fc5258db85dbf6e5df9 100644 (file)
@@ -52,10 +52,11 @@ $2])
 
 # AT_COMPILE(OUTPUT, [SOURCES = OUTPUT.c])
 # ----------------------------------------
+# Compile SOURCES into OUTPUT.  If OUTPUT does not contain '.',
+# assume that we are linking too; this is a hack.
 m4_define([AT_COMPILE],
-[AT_CHECK([$CC $CFLAGS $CPPFLAGS m4_default([$2], [$1.c]) -o $1], 0,
-          [], [ignore])])
-
+[AT_CHECK([$CC $CFLAGS $CPPFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS ])m4_default([$2], [$1.c]) m4_bmatch([$1], [[.]], [], [$LIBS ])-o $1],
+          0, [], [ignore])])
 
 # AT_COMPILE_CXX(OUTPUT, [SOURCES = OUTPUT.c])
 # --------------------------------------------