[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improved Fortran support
From: |
Tom Tromey |
Subject: |
Re: Improved Fortran support |
Date: |
04 Feb 2001 13:20:37 -0700 |
>>>>> ">" == marq <address@hidden> writes:
>> The last point is annoying, since it prohibits the use of any .F90
>> or even .f95 files in any project that is maintained with automake:
>> it simply doesn't generate the proper dependencies for a library or
>> program - a .F90, .f95 or .F95 is never compiled, even if the
>> Makefile.am contains handwritten rules for their generation.
Hmm... that sounds wrong. Did you try adding the suffixes to the
SUFFIXES macro?
>> - Files ending with .f90 are also handled this way; i.e. Fortran 77 (!)
>> targets are created for them - not really fine... :-(
I thought we were just following what the autoconf Fortran guys
suggested.
I don't know Fortran and I definitely don't know anything about what
Fortran compilers exist or how they work. So I'm looking to automake
users who do know Fortran to tell me what is right.
On that basis I'm inclined to accept your patch.
>> The generated targets are more or less identical to those generated
>> from the f77/ppf77 set of routines, but use the Makefile variables
>> F90, F90FLAGS, F90LINK and F95, F95FLAGS, F95LINK,
>> respectively. These somehow have to be generated by configure.in.
This part is a bit of a problem. Ideally we would have a handy
autoconf macro that users could just drop in. Or at the very least we
would warn if these are not defined (maybe we already do, with your
patch? I don't know).
>> - if (/AC_PROG_(F77|YACC|RANLIB|CC|CXXCPP|CXX|LEX|AWK|CPP|LN_S)/)
>> + if (/AC_PROG_(F77|F90|F95|YACC|RANLIB|CC|CXXCPP|CXX|LEX|AWK|CPP|LN_S)/)
Do we actually have AC_PROG_F90 or AC_PROG_F95? If not then this hunk
is wrong.
>> + # Check for Fortran 90 intrinsic and run-time libraries.
>> + if (/AC_F90_LIBRARY_LDFLAGS/)
>> + {
>> + $configure_vars{'FLIBS'} = $filename . ':' . $.;
>> + }
>> + # Check for Fortran 95 intrinsic and run-time libraries.
>> + if (/AC_F95_LIBRARY_LDFLAGS/)
>> + {
>> + $configure_vars{'FLIBS'} = $filename . ':' . $.;
>> + }
Ditto.
>> +sub lang_f90_finish
>> +{
Since the body of this, lang_f95_finish, and lang_f7_finish are nearly
identical, how about making a new subroutine which all three call with
the appropriate arguments? That would seem to make maintenance
easier.
One question I have about the Fortran support: is it really the case
that there are projects with a mix of F77, F90, and F95 code? What if
we just assume the "F77" compiler is a poorly-named macro holding a
generic "Fortran" compiler, and then let it handle the new prefixes as
well? Would that work? I really don't know.
I'll need paperwork from you before I can check in this patch (or any
variant of it). I've been putting off figuring out how to do that,
but I'll see if I can motivate this week.
Tom