mirror of
git://git.sv.gnu.org/autoconf
synced 2024-12-21 02:28:54 +08:00
32876525ac
generates too many bug reports. * lib/autoconf/general.m4 (_AC_RUN_IFELSE): Pass the right exit status when executing the ACTION-IF-FALSE. * tests/base.at (AC_TRY_*): Rename as... (AC_TRY_COMMAND): this. (AC_RUN_IFELSE): New. * tests/compile.at (Extensions, C keywords) (AC_PROG_CPP requires AC_PROG_CC, GNU Fortran 77) (Broken/missing compilers, AC_PROG_CPP with warnings) (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): Move to... * tests/c.at (Extensions, C keywords) (Broken/missing compilers, AC_PROG_CPP with warnings) (AC_PROG_CPP without warnings, AC_PROG_CPP via CC) (AC_PROG_CPP requires AC_PROG_CC): here and... * tests/fortran.at (GNU Fortran 77): there. * doc/autoconf.texi (autoconf Invocation): Fix the example: AC_TRY_RUN is about compilation, not shell commands. (Test Programs): AC_TRY_RUN works as used to be advertised.
52 lines
1.7 KiB
Plaintext
52 lines
1.7 KiB
Plaintext
# -*- Autotest -*-
|
|
|
|
AT_BANNER([Fortran low level compiling/preprocessing macros.])
|
|
|
|
# Copyright 2000, 2001 Free Software Foundation, Inc.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
# any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
# 02111-1307, USA.
|
|
|
|
|
|
# Since the macros which compile are required by most tests, check
|
|
# them first. But remember that looking for a compiler is even more
|
|
# primitive, so check those first.
|
|
|
|
|
|
## --------------------- ##
|
|
## Fortran 77 Compiler. ##
|
|
## --------------------- ##
|
|
|
|
|
|
AT_CHECK_MACRO([GNU Fortran 77],
|
|
[[AC_LANG(Fortran 77)
|
|
AC_LANG_COMPILER
|
|
|
|
if AC_TRY_COMMAND([$F77 --version | grep GNU >&2]); then
|
|
# Be sure to remove files which might be created by compilers that
|
|
# don't support --version.
|
|
rm -f a.exe a.out
|
|
# Has GNU in --version.
|
|
test "$G77" != yes &&
|
|
AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler])
|
|
else
|
|
# Be sure to remove files which might be created by compilers that
|
|
# don't support --version.
|
|
rm -f a.exe a.out
|
|
# Has not.
|
|
test "$G77" = yes &&
|
|
AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler])
|
|
fi]])
|