[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fortran 9x support
Re: Fortran 9x support
Thu, 9 Oct 2003 12:04:00 +0200
I can understand keeping F77/FFLAGS/FLIBS/AC_PROG_F77 for backwards
However, the current approach is to keep using these macros and
variables for f77 and use the new FC* ones only for f90 and upwards. My
question is whether it is not possible to also include f77 in the FC
If so, this might open up a different way to go forward:
- Only allow the user to use either AC_PROG_F77 or AC_PROG_FC (the old
or the new way of doing fortran).
- Use FFLAGS and FLIBS for both F77 and FC. This would make the FC
approach compatible with GNU make which uses the FC/FFLAGS combination
for compiling fortran. The fact that we only allow F77 or FC will
prevent conflicts with these variables.
- After some time the F77 macro/variable set might be phased out in
favor of using the FC approach to do f77 compilation.
Just my 2c.
On vrijdag, okt 3, 2003, at 20:12 Europe/Amsterdam, Steven G. Johnson
Dear Automake folks,
Recently, we've committed a set of patches to autoconf CVS to support
newer revisions to the Fortran language standard. The current plan is
not document these (yet) in the next autoconf release, but it might be
good idea to start thinking about how to support these in automake,
especially if revisions to the autoconf macros are required.
I've attached a draft of the documentation for the new macros. The
idea is to divide Fortran support into two categories: legacy Fortran
and modern Fortran:
* For legacy F77 code, there are the current AC_PROG_F77 etc. macros to
find $F77, $FFLAGS, $FLIBS, and so on.
* For newer Fortran dialects, the idea is to treat them more like C and
C++, in that we don't attempt to have separate macros and variables for
separate language versions going forward. Instead, there are a new
macros AC_PROG_FC, etcetera (just like the F77 macros with s/F77/FC/)
find output variables $FC, $FCFLAGS, $FCLIBS, etcetera.
Basically, automake should just compile .f90, .f95, etcetera files with
these new output variables. There is one additional twist: some
compilers (xlf, ifc) expect all source files to end with .f, and
special flag for other extensions (even "standard" ones like .f90).
there is a new autoconf macro AC_FC_SRCEXT to figure out how to do
this. For each source-file extension required, the user should call
This defines output variables $FCFLAGS_f90, $FCFLAGS_f95, ... that you
use to compile .f90 and .f95 files. Due to compiler quirks, however,
these flags must appear immediately before the source file to be
(and only one source file can be compiled at a time). For example, you
$(FC) -c $(FCFLAGS) $(FCFLAGS_f90) foo.f90
Steven G. Johnson