* INSTALL, lib/INSTALL, lib/config-ml.in, lib/config.guess,
[automake/plouj.git] / tests / fort2.test
blobc0502fc8a14ef2cd0ed9e257a4bfe980c3849545
1 #! /bin/sh
2 # Copyright (C) 2006 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Test that AC_FC_SRCEXT(f9x) works as intended:
22 # - $(FCFLAGS_f) will be used
24 # Cf. fort1.test and link_f90_only.test.
26 . ./defs || exit 1
28 set -e
30 mkdir sub
32 cat >>configure.in <<'END'
33 AC_PROG_FC
34 AC_FC_SRCEXT([f90])
35 AC_FC_SRCEXT([f95])
36 AC_FC_SRCEXT([blabla])
37 END
39 cat >Makefile.am <<'END'
40 bin_PROGRAMS = hello goodbye
41 hello_SOURCES = hello.f90 foo.f95 sub/bar.f95
42 goodbye_SOURCES = bye.f95 sub/baz.f90
43 goodbye_FCFLAGS =
44 END
46 $ACLOCAL
47 $AUTOMAKE
48 # The following tests aren't fool-proof, but they don't
49 # need a Fortran compiler.
50 grep '.\$(LINK)' Makefile.in && exit 1
51 grep '.\$(FCLINK)' Makefile.in
52 grep '.\$(FCCOMPILE)' Makefile.in > stdout
53 grep -v '\$(FCFLAGS_f' stdout && exit 1
54 grep '.\$(FC.*\$(FCFLAGS_blabla' Makefile.in && exit 1
55 # Notice the TAB:
56 grep '^[ ].*\$(FC.*\$(FCFLAGS_f90).*\.f95' Makefile.in && exit 1
57 grep '^[ ].*\$(FC.*\$(FCFLAGS_f95).*\.f90' Makefile.in && exit 1