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 to not document these (yet) in the next autoconf release, but it might be a 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 basic idea is to divide Fortran support into two categories: legacy Fortran 77, 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 set of macros AC_PROG_FC, etcetera (just like the F77 macros with s/F77/FC/) to 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 Fortran compilers (xlf, ifc) expect all source files to end with .f, and require a special flag for other extensions (even "standard" ones like .f90). So, 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 it, e.g.: AC_FC_SRCEXT(f90) AC_FC_SRCEXT(f95) ... This defines output variables $FCFLAGS_f90, $FCFLAGS_f95, ... that you can use to compile .f90 and .f95 files. Due to compiler quirks, however, these flags must appear immediately before the source file to be compiled (and only one source file can be compiled at a time). For example, you might do: foo.o: foo.f90 $(FC) -c $(FCFLAGS) $(FCFLAGS_f90) foo.f90 Cordially, Steven G. Johnson
fortran.doc
Description: MS-Word document