On Mon, Nov 24, 2014 at 12:28:21 -0800, Rik wrote:
On 11/24/2014 11:33 AM, Daniel J Sebald wrote:
That is, if we want gfortran to have precedence, then we would define
(using the example at the above link)
AC_PROG_F77([gfortran fl32 f77 fort77 xlf g77 f90 xlf90])
So, perhaps that is a better solution than using the stream editor to
replace g77.
I think this is a fine idea. Eliminate all the weird hacks with sed in
favor of just listing our preference.
The main problem with listing our preferred compiler like this is that
it discards the curated list of supported compilers that Autoconf
gives us today. So from a portability point of view, we would be
throwing away the autodetection of xlf95, ifort, pgf95, etc, (just
picking some random examples) that we inherit from Autoconf.
There is no way (that I know of) to set our preferred compiler without
specifying the entire list of compilers to try, to put it another way.
Other than the bootstrap_epilogue function that we currently use.
And I'm not sure we want to rely on luck regarding a compiler that handles
both F77 and F90. I see several choices: 1) Change Jaroslav's code to be
F77-compliant, 2) Change the extension on Jaroslav's files to .f90, but we
would potentially then need to use the AC_PROG_FC macro and get that
working to handle the F90 stuff with a different compiler, 3) Switch
completely over to AC_PROG_FC, but this assumes that any compiler chosen
will be able to compile both F77 and F90 code, 4) force use of gfortran.
I have no idea how valid it is, but Autoconf's working assumption
seems to be that a F95 compiler will also support F90 and F77, and an
F90 compiler will also support F77.