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 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 # Since the macros which compile are required by most tests, check
23 # them first. But remember that looking for a compiler is even more
24 # primitive, so check those first.
27 ## --------------------- ##
28 ## Fortran 77 Compiler. ##
29 ## --------------------- ##
32 AT_CHECK_MACRO([GNU Fortran 77],
36 if AC_TRY_COMMAND([$F77 --version | grep GNU >&2]); then
37 # Be sure to remove files which might be created by compilers that
38 # don't support --version.
40 # Has GNU in --version.
42 AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler])
44 # Be sure to remove files which might be created by compilers that
45 # don't support --version.
49 AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler])
55 ## ------------------ ##
56 ## Fortran Compiler. ##
57 ## ------------------ ##
60 AT_CHECK_MACRO([GNU Fortran],
64 # No Fortran compiler is known not to support "*.f".
67 # GNU Fortran is known to support freeform.
69 [AC_MSG_WARN([Fortran does not accept free-form source])])
70 if test "$ac_compiler_gnu" = yes; then
73 *) AC_MSG_ERROR([failed to recognize GNU Fortran's -ffree-form option.]);;