autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_PROG_FC may not be first compiler check


From: Ralf Wildenhues
Subject: Re: AC_PROG_FC may not be first compiler check
Date: Mon, 4 Sep 2006 22:00:26 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hello,

* Steven G. Johnson wrote on Mon, Sep 04, 2006 at 08:40:48PM CEST:
> On Sun, 3 Sep 2006, Ralf Wildenhues wrote:
> >The first of the checks AC_PROG_{CC,F77,FC,...} also pulls in checks
> >about default output and object file name/ending, and the like.  This
> >is a problem with AC_PROG_FC: it may simply not work to compile
> >conftest.f, because the compiler requires a `.f90' suffix.  Changing
> 
> Which compilers *require* a .f90 suffix?  My recollection was that all of 
> the ones I tested allowed .f, although they might treat .f as Fortran 77.
> 
> Can you give an example where putting AC_PROG_FC first fails?

I found that on an AIX 5.3 with the XL Fortran 9.1 compiler:
  AC_INIT
  AC_PROG_FC

fails with
  ./configure

because that will choose the `f95' driver, and unlike the `xlf95' it
will fail with `conftest.f' and requires a .f95 suffix; likewise, the
`f90' driver requires a .f90 suffix.

| configure:1771: checking for Fortran compiler default output file name
| configure:1798: f95    conftest.f  >&5
| f95: 1501-218 file conftest.f contains an incorrect file suffix
| ld: 0711-715 ERROR: File conftest.f cannot be processed.
|         The file must be an object file, an import file, or an archive.
| configure:1801: $? = 8
| configure:1839: result:
| configure: failed program was:
| |       program main
| |
| |       end
| configure:1845: error: Fortran compiler cannot create
| executables
| See `config.log' for more details.

Maybe AC_PROG_FC should by default check for xlf9x before checking f9x?
(Note that I'm not fully aware of other ordering conditions the current
list in _AC_PROG_FC may have).

I found this while testing some new tests for Automake.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]