[Top][All Lists]

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

Re: Hello all autoconf users - AC_PROG_FC question

From: Ralf Wildenhues
Subject: Re: Hello all autoconf users - AC_PROG_FC question
Date: Sun, 1 Feb 2009 10:02:05 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

[ resending to the list only, as some mail server thinks I am
  sending inappropriate content to Sébastien; apologies for dupes ]

Hello Sébastien, and welcome,

* Sébastien Le Roux wrote on Sat, Jan 31, 2009 at 11:32:36PM CET:
> Thus I have a question concerning the behavior of the 'configuration'
> process, I would like to understand how does the AC_PROG_FC check for
> any Fortran  compiler.

If you use AC_PROG_FC without any arguments, then it has a built-in list
of compiler names to try, looking at each directory in $PATH in turn.
Optionally, you can pass as first macro argument an alternative list of
names you would like to have found, or as second argument a Fortran
dialect, which will cause the built-in list to be adjusted accordingly.

The list entries itself are subject to change as fit; roughly, the
criteria are that: the developer's wishes for dialect support or
alternate list should be preferred, then a GNU compiler should be
preferred over other ones, then the order is rather arbitrary, with
generally more common ones listed earlier, and warts avoided.

You can find the current documentation about the macro here:

and the current (git Autoconf) implementation here:
(Look for _AC_PROG_FC, around line 310)

> Indeed so far I've seen that even if the first
> F90 compiler that appears  in my $PATH (env var) is not the GNU
> fortran compiler (ie. ifort) the result of the AC_PROG_FC  will be to
> put FC="gfortran" ... how can this be possible ... the gfortran / f95
> command of course appears in my $PATH but in this case after the
> 'ifort' command.

That matches not the current implementation, unless gfortran is not
present in your PATH at all.  Which autoconf version do you use?
The loop over compiler name is the outer one, the one over PATH entries
the inner one.  You should be able to verify this with this test:

cat > <<END
set -x
set +x

Hope that helps.


reply via email to

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