[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_PROG_FC may not be first compiler check
From: |
Ralf Wildenhues |
Subject: |
Re: AC_PROG_FC may not be first compiler check |
Date: |
Tue, 5 Sep 2006 19:18:56 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello,
* Steven G. Johnson wrote on Mon, Sep 04, 2006 at 10:30:20PM CEST:
> On Mon, 4 Sep 2006, Ralf Wildenhues wrote:
> >Maybe AC_PROG_FC should by default check for xlf9x before checking f9x?
> That sounds fine to me. On any system with xlf*, the xlf* compilers are
> probably preferable to f*.
OK, thanks. I installed the patch below. A good reason for changing
the Fortran 77 compiler order as well is that we should try not to
choose a different-vendor F77 than FC on systems where this may matter
(XL compilers are available for other systems, e.g., GNU/Linux ppc).
>>(Note that I'm not fully aware of other ordering conditions the current
>>list in _AC_PROG_FC may have).
FWIW, I found only "cf77 before fort77" for ancient Crays (forgot I
added that...)
Cheers, and thanks for your help,
Ralf
* lib/autoconf/fortran.m4 (_AC_PROG_FC): Prefer xlf90/xlf95 over
f90/f95 because the latter drivers of AIX Fortran 9.1 do not
accept files with extension `.f'. For consistency, also prefer
xlf over f77.
* doc/autoconf.texi (Fortran Compiler): Remove mention of bug
from last patch.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1079
diff -u -r1.1079 autoconf.texi
--- doc/autoconf.texi 5 Sep 2006 14:36:18 -0000 1.1079
+++ doc/autoconf.texi 5 Sep 2006 17:11:57 -0000
@@ -6852,9 +6852,6 @@
environment, then set it to @option{-g -02} for @acronym{GNU} @code{g77} (or
@option{-O2} where @code{g77} does not accept @option{-g}). Otherwise,
set @code{FCFLAGS} to @option{-g} for all other Fortran compilers.
-
-Because of a bug in Autoconf, you should invoke @code{AC_PROG_CC} before
-invoking @code{AC_PROG_FC}.
@end defmac
@defmac AC_PROG_F77_C_O
Index: lib/autoconf/fortran.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/fortran.m4,v
retrieving revision 1.211
diff -u -r1.211 fortran.m4
--- lib/autoconf/fortran.m4 24 Aug 2006 16:46:20 -0000 1.211
+++ lib/autoconf/fortran.m4 5 Sep 2006 17:11:57 -0000
@@ -341,6 +341,8 @@
# frt: Fujitsu F77 compiler
# pgf77/pgf90/pghpf/pgf95: Portland Group F77/F90/F95 compilers
# xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers
+# Prefer xlf9x to the generic names because they do not reject file
+# with extension `.f'.
# lf95: Lahey-Fujitsu F95 compiler
# fl32: Microsoft Fortran 77 "PowerStation" compiler
# af77: Apogee F77 compiler for Intergraph hardware running CLIX
@@ -348,9 +350,9 @@
# fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha
# ifort, previously ifc: Intel Fortran 95 compiler for Linux/x86
# efc: Intel Fortran 95 compiler for IA64
-m4_define([_AC_F95_FC], [gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95
ftn])
-m4_define([_AC_F90_FC], [f90 xlf90 pgf90 pghpf epcf90])
-m4_define([_AC_F77_FC], [g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77])
+m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95
ftn])
+m4_define([_AC_F90_FC], [xlf90 f90 pgf90 pghpf epcf90])
+m4_define([_AC_F77_FC], [g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77])
AC_DEFUN([_AC_PROG_FC],
[_AC_FORTRAN_ASSERT()dnl
AC_CHECK_TOOLS([]_AC_FC[],