From 5d542a3437adc64451bddbe482f10784d862b7ac Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 12 Apr 2002 16:37:27 +0000 Subject: [PATCH] * tests/discover.test: Use a full configure.in that calls AC_INIT. Use AC_LIBOBJ. Grep the error message. * test/ldadd.test: Don't use LIBOBJS. Use a full configure.in. Grep the error message. Require libtool. * tests/ldflags.test: Don't use LIBOBJS. * tests/seenc.test: Use AC_LIBOBJ, --Wno-error, and grep the error messages for CC and CXX. --- ChangeLog | 10 ++++++++++ tests/discover.test | 8 ++++---- tests/ldadd.test | 11 +++++------ tests/ldflags.test | 10 +++------- tests/seenc.test | 12 +++++++++--- 5 files changed, 31 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 307eba36..57bd6f4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-04-12 Alexandre Duret-Lutz + + * tests/discover.test: Use a full configure.in that calls AC_INIT. + Use AC_LIBOBJ. Grep the error message. + * test/ldadd.test: Don't use LIBOBJS. Use a full configure.in. + Grep the error message. Require libtool. + * tests/ldflags.test: Don't use LIBOBJS. + * tests/seenc.test: Use AC_LIBOBJ, --Wno-error, and grep the + error messages for CC and CXX. + 2002-04-12 Alexandre Duret-Lutz * automake.in (scan_autoconf_traces) : Ignore ANSI2KNR diff --git a/tests/discover.test b/tests/discover.test index 35f05cdf..37052b73 100755 --- a/tests/discover.test +++ b/tests/discover.test @@ -4,11 +4,11 @@ . $srcdir/defs || exit 1 -cat > configure.in << 'END' +cat >> configure.in << 'END' AC_PROG_RANLIB AC_PROG_CC -LIBOBJS="$LIBOBJS fsusage.o" -AC_OUTPUT(Makefile) +AC_LIBOBJ([fsusage]) +AC_OUTPUT END cat > Makefile.am << 'END' @@ -20,5 +20,5 @@ END : > fsusage.c $ACLOCAL || exit 1 -$AUTOMAKE && exit 1 +$AUTOMAKE 2>&1 | fgrep fsusage.c || exit 1 exit 0 diff --git a/tests/ldadd.test b/tests/ldadd.test index ff316770..4784f74b 100755 --- a/tests/ldadd.test +++ b/tests/ldadd.test @@ -2,15 +2,14 @@ # Check to make sure incorrect LDADD usage is diagnosed. +required=libtool . $srcdir/defs || exit 1 -cat > configure.in << 'END' +cat >> configure.in << 'END' AC_PROG_CC AC_PROG_LIBTOOL -AC_OUTPUT(Makefile) -LTLIBOBJS="$LTLIBOBJS q.o" -LIBOBJS="$LIBOBJS q.o" -AC_SUBST(LTLIBOBJS) +AC_SUBST([LTLIBOBJS], [q.lo]) +AC_OUTPUT END cat > Makefile.am << 'END' @@ -26,5 +25,5 @@ END : > q.c $ACLOCAL || exit 1 -$AUTOMAKE && exit 1 +$AUTOMAKE 2>&1 | grep LDADD || exit 1 exit 0 diff --git a/tests/ldflags.test b/tests/ldflags.test index 47844623..56c746f2 100755 --- a/tests/ldflags.test +++ b/tests/ldflags.test @@ -5,16 +5,12 @@ required=libtool . $srcdir/defs || exit 1 -cat > configure.in << 'END' -AC_INIT -AM_INIT_AUTOMAKE(no, 0) +cat >> configure.in << 'END' AC_PROG_CC AC_PROG_LIBTOOL -AC_OUTPUT(Makefile) -LTLIBOBJS="$LTLIBOBJS q.o" -LIBOBJS="$LIBOBJS q.o" -AC_SUBST(LTLIBOBJS) +AC_SUBST([LTLIBOBJS], [q.o]) AM_CONDITIONAL(USE_SWIG, :) +AC_OUTPUT END cat > Makefile.am << 'END' diff --git a/tests/seenc.test b/tests/seenc.test index 16ce89f8..544b0202 100755 --- a/tests/seenc.test +++ b/tests/seenc.test @@ -5,7 +5,9 @@ . $srcdir/defs || exit 1 cat >> configure.in << 'END' -LIBOBJS="$LIBOBJS fsusage.o mountlist.o" +dnl AC_PROG_CC and AC_PROG_CXX missing on purpose +AC_LIBOBJ([fsusage]) +AC_LIBOBJ([mountlist]) END cat > Makefile.am << 'END' @@ -18,5 +20,9 @@ END : > mountlist.c $ACLOCAL || exit 1 -$AUTOMAKE > out 2>&1 && exit 1 -exit 0 +# Use -Wno-error, because there are many error messages +# output for this test, and we just want to make sure some of +# them are about CC and CXX being undefined. +$AUTOMAKE --Wno-error 2> err && exit 1 +fgrep CC err || exit 1 +fgrep CXX err || exit 1 -- 2.43.5