Hi Paul,

At the time the Fortran support was written, there wasn't a lot of
experience with Fortran 90, and it was believed that the two languages were
close enough that the Fortran 77 support in Autoconf and Automake would
support Fortran 90 as well, and that we would let user experience dictate
any changes in the future.

I think the current support for Fortran 77 in Autoconf and Automake is
sufficient for your Fortran 90 needs, but please let us know if this is not
the case.

The way I would use Fortran 90 in my projects is similar to the solution you
came up with, but I would move the "F77 = f90" assignment from your
Makefile.am and put it into your configure.in, since "compiler detection
logic" always belongs in configure, not in Automake files.  If you do this,
then you may want to put some shell code in your configure.in after the
"call" to the AC_PROG_F77 macro that deals with the case when a Fortran 90
compiler isn't found on the users system.

Note that you could even specify your Fortran 90 compiler when you run
configure if you wanted to, e.g. "F77=f90 configure".

An unfortunate problem that users of your package will face, however, is
that most of the messages printed to stdout by configure will specify
"Fortran 77" instead of "Fortran 90", even though a Fortran 90 compiler was
found and will be used.  This should be fixed. Patches are welcome :-)

On a final note and an FYI, the not-yet-released Autoconf available in the
Autoconf CVS repository (there is still some confusion in my mind about what
version number it will have, but it will be the one with a version number >
2.13) has better Fortran support than the version you are currently using
(you are using Autoconf 2.13, I believe).

Regards, Matt

--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
[EMAIL PROTECTED]

----- Original Message -----
From: "Paul F. Kunz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 07, 2000 3:56 PM
Subject: Fortran 90


>    I know Fortran 77 is supported, so I put the following in my
> Makefile.am
>
> ---
> bin_PROGRAMS = readfits
>
> readfits_SOURCES = readfits.f90
>
> SUFFIXES = .f90
>
> .f90.o
> f90 -c $<
> ---
>
> but then from automake I get warning
>
> ---
> automake: Makefile.am: Fortran 77 source seen but `F77' not defined
>   in `configure.in'
> ---
>
> and two implicit targets for `.f90.o', mine and one generated by
> automake.   Is this a bug?
>
>    I fixed it, by the way, with an `AC_PROG_F77' in configure.in and a
> "F77 = f90" in the Makefile.am.
>
> P.S.
>
>    No, I haven't switched to Fortran from C++, the Makefile is for my
> boss.
>
>

Reply via email to