2 # Copyright (C) 2006-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Test mixing Fortran 77 and Fortran (FC), libtool version.
19 # For now, require the GNU compilers (to avoid some Libtool/Autoconf
21 required
='libtoolize g77 gfortran'
48 sed s
,foo
,bar
, foo.f90
> sub
/bar.f90
49 sed s
,foo
,baz
, foo.f90
> sub
/baz.f
51 cat >>configure.ac
<<'END'
54 AC_FC_SRCEXT([f90], [],
55 [AC_MSG_FAILURE([$FC compiler cannot create executables], 77)])
63 cat >Makefile.am
<<'END'
65 lib_LTLIBRARIES = libhello.la
66 noinst_LTLIBRARIES = libgoodbye.la
67 hello_SOURCES = hello.f
68 hello_LDADD = libhello.la
69 libhello_la_SOURCES = foo.f90 sub/bar.f90
70 libhello_la_LIBADD = libgoodbye.la
71 libgoodbye_la_SOURCES = bye.f90 sub/baz.f
72 libgoodbye_la_FCFLAGS =
81 # This test requires Libtool >= 2.0. Earlier Libtool does not
82 # have the LT_PREREQ macro to cause autoconf failure.
83 grep LT_PREREQ configure
&& skip_
"libtool is too old (probably < 2.0)"
85 # Ensure we use --tag for f90, too.
86 grep " --tag=FC" Makefile.
in
88 # ./configure may exit with status 77 if no compiler is found,
89 # or if the compiler cannot compile Fortran 90 files).
92 subobjs
=$
(echo sub
/*.lo
)
93 test "$subobjs" = 'sub/*.lo'
96 # The following will be fixed in a later patch:
98 echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
104 test ! -e libgoodbye_la-baz.lo