]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: skip fcdemo checks when $FC cannot compile fortran90.
authorGary V. Vaughan <gary@gnu.org>
Tue, 29 Oct 2013 23:01:27 +0000 (12:01 +1300)
committerGary V. Vaughan <gary@gnu.org>
Wed, 1 Jan 2014 23:06:29 +0000 (12:06 +1300)
Avoid spurious fcdemo failures when Autoconf picks f77 or
similar for a fortran90 compiler.
* tests/testsuite.at (LT_AT_TAG): Using FC and FCFLAGS from make
TESTS_ENVIRONMENT, check that we really can compile fortran90
or else skip.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
tests/testsuite.at

index 99122be64ded7516063d51a6d1d7afaa30a8f1a5..31344772c40144f4c0cde638acb8d3fa6eda93c4 100644 (file)
@@ -352,6 +352,15 @@ AT_CHECK([{ test -n "[$]$1" && test "X[$]$1" != Xno; } || (exit 77)])
 m4_case([$1],
   [CXX],
   [AT_CHECK([test g++ != "$CXX" || (g++ -v >/dev/null 2>&1) || (exit 77)])],
+  [FC],
+  [# Autoconf will accept f77 or similar as a valid FC, but often f77
+   # will not compile fortran90 code; in that case skip the FC checks.
+   AT_DATA([fc_test.f90],
+[[     program main
+
+       end
+]])
+   AT_CHECK([$FC $FCFLAGS fc_test.f90 || exit 77], [], [ignore], [ignore])],
   [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.