+2010-06-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Factorize testing gcj installation in the testsuite.
+ * tests/testsuite.at (LT_AT_TAG): For the GCJ tag, actually
+ try to compile a .java file when deciding whether to skip.
+ (LT_AT_EXEC_TAG): New macro, to also ensure runnability.
+ * tests/convenience.at (Java convenience archives): Use
+ LT_AT_EXEC_TAG, simplify accordingly.
+ * tests/flags.at (passing lt_tag flags through libtool): Use
+ m4_defn for tag so LT_AT_TAG works.
+ * tests/infer-tag.at (GCJ inferred tag): Simplify.
+ * THANKS: Update.
+ Report by Warren Dodge.
+
2010-06-09 Peter O'Gorman <peter@pogma.com>
Skip demo-nopic tests if SELinux policy will cause failure.
Tom Tromey tromey@cygnus.com
Tor Lillqvist tml@iki.fi
Ulrich Drepper drepper@ipd.info.uni-karlsruhe.de
+ Warren Dodge warren.l.dodge@Tektronix.com
Vadim Zeitlin vz-libtool@zeitlins.org
Vincent Lefevre vincent@vinc17.org
Vincent Torri vtorri@univ-evry.fr
# convenience.at -- testing C convenience archives -*- Autotest -*-
-# Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation,
+# Inc.
# Written by Ralf Wildenhues, 2005
#
# This file is part of GNU Libtool.
AT_SETUP([Java convenience archives])
-LT_AT_TAG([GCJ])
+LT_AT_EXEC_TAG([GCJ])
AT_KEYWORDS([libtool])
cat >foo1.java <<EOF
};
EOF
- # There are just too many broken gcj installations out there, either missing
- # libgcj.spec or unable to find it. Skip this test for them.
- if test $i -eq 1; then
- AT_CHECK([$GCJ $GCJFLAGS -c foo1.java || exit 77], [], [ignore], [ignore])
- AT_CHECK([$GCJ $GCJFLAGS --main=foo1 -o foo1$EXEEXT foo1.java A1.java || exit 77],[],[ignore],[ignore])
- AT_CHECK([./foo1$EXEEXT || exit 77],[],[ignore],[ignore])
- rm -f foo1.o foo1.obj foo1$EXEEXT
- fi
-
$LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c foo$i.java
$LIBTOOL --tag=GCJ --mode=compile $GCJ $GCJFLAGS -c A$i.java
$LIBTOOL --tag=GCJ --mode=link $GCJ $GCJFLAGS $LDFLAGS -o liba$i.la A$i.lo
# flags.at -- libtool passing of flags -*- Autotest -*-
#
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Libtool.
#
m4_foreach([lt_tag], [CC, CXX, F77, FC, GCJ],
[AT_SETUP([passing lt_tag flags through libtool])
AT_KEYWORDS([libtool])
-LT_AT_TAG([lt_tag])
+LT_AT_TAG(m4_defn([lt_tag]))
LDFLAGS="$LDFLAGS -no-undefined"
eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
# infer-tag.at -- libtool without --tag -*- Autotest -*-
#
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Libtool.
#
};
]])
-# There are just too many broken gcj installations out there, either missing
-# libgcj.spec or unable to find it. Skip this test for them.
-AT_CHECK([$GCJ $GCJFLAGS -c A.java || exit 77], [], [ignore], [ignore])
-
AT_CHECK([$LIBTOOL --mode=compile $GCJ $GCJCFLAGS -c A.java],
[], [ignore], [ignore])
# LT_AT_TAG(TAG)
# --------------
+# Declare that the language TAG will be used in this test.
+# Skips the test if the compiler is apparently not functional.
m4_define([LT_AT_TAG],
[AT_KEYWORDS([$1])
AT_CHECK([{ test -n "[$]$1" && test "X[$]$1" != Xno; } || (exit 77)])
-m4_if([$1], [CXX],
- [AT_CHECK([test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)])])
+m4_case([$1],
+ [CXX],
+ [AT_CHECK([test "X$CXX" != Xg++ || (g++ -v >/dev/null 2>&1) || (exit 77)])],
+ [GCJ],
+ [# There are just too many broken gcj installations out there, either missing
+ # libgcj.spec or unable to find it. Skip the test for them.
+ AT_DATA([gcj_test.java],
+[[public class gcj_test {
+ public static void main(String[] argv) { }
+ }
+]])
+ AT_CHECK([$GCJ $GCJFLAGS -c gcj_test.java || exit 77],
+ [], [ignore], [ignore])])
+])
+
+
+# LT_AT_EXEC_TAG([TAG])
+# ---------------------
+# Declare that the language TAG will be used and compiled programs may be run.
+# Skips the test if the compiler is apparently not functional.
+m4_define([LT_AT_EXEC_TAG],
+[LT_AT_TAG([$1])
+m4_case([$1],
+ [GCJ],
+ [AT_CHECK([$GCJ $GCJFLAGS --main=gcj_test -o gcj_test$EXEEXT gcj_test.java ]dnl
+ [|| exit 77], [], [ignore], [ignore])
+ AT_CHECK([./gcj_test$EXEEXT || exit 77], [], [ignore], [ignore])])
])