Reword the copyright notices to match what's suggested in GPLv3.
[autoconf/tsuna.git] / tests / fortran.at
blob0f37719b0a34318bd063e6f7b86b39556d9ea235
1 #                                                       -*- Autotest -*-
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],
33 [[AC_LANG(Fortran 77)
34 AC_LANG_COMPILER
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.
39   rm -f a.exe a.out
40   # Has GNU in --version.
41   test "$G77" != yes &&
42     AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler])
43 else
44   # Be sure to remove files which might be created by compilers that
45   # don't support --version.
46   rm -f a.exe a.out
47   # Has not.
48   test "$G77" = yes &&
49     AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler])
51 ]])
55 ## ------------------ ##
56 ## Fortran Compiler.  ##
57 ## ------------------ ##
60 AT_CHECK_MACRO([GNU Fortran],
61 [[AC_LANG(Fortran)
62 AC_LANG_COMPILER
64 # No Fortran compiler is known not to support "*.f".
65 AC_FC_SRCEXT([f])
67 # GNU Fortran is known to support freeform.
68 AC_FC_FREEFORM([],
69                [AC_MSG_WARN([Fortran does not accept free-form source])])
70 if test "$ac_compiler_gnu" = yes; then
71   case $FCFLAGS in
72    *-ffree-form*) ;;
73    *) AC_MSG_ERROR([failed to recognize GNU Fortran's -ffree-form option.]);;
74   esac
76 ]])