3 AT_BANNER([Fortran low level compiling/preprocessing macros.])
5 # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 # Since the macros which compile are required by most tests, check
24 # them first. But remember that looking for a compiler is even more
25 # primitive, so check those first.
28 ## --------------------- ##
29 ## Fortran 77 Compiler. ##
30 ## --------------------- ##
33 AT_CHECK_MACRO([GNU Fortran 77],
37 if AC_TRY_COMMAND([$F77 --version | grep GNU >&2]); then
38 # Be sure to remove files which might be created by compilers that
39 # don't support --version.
41 # Has GNU in --version.
43 AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler])
45 # Be sure to remove files which might be created by compilers that
46 # don't support --version.
50 AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler])
56 ## ------------------ ##
57 ## Fortran Compiler. ##
58 ## ------------------ ##
61 AT_CHECK_MACRO([GNU Fortran],
65 # No Fortran compiler is known not to support "*.f".
68 # GNU Fortran is known to support freeform.
70 [AC_MSG_WARN([Fortran does not accept free-form source])])
71 if test "$ac_compiler_gnu" = yes; then
74 *) AC_MSG_ERROR([failed to recognize GNU Fortran's -ffree-form option.]);;