autoconf
[Top][All Lists]
Advanced

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

Re: Hello all autoconf users - AC_PROG_FC question


From: Sébastien Le Roux
Subject: Re: Hello all autoconf users - AC_PROG_FC question
Date: Sun, 01 Feb 2009 11:21:30 -0500
User-agent: Thunderbird 2.0.0.19 (X11/20090105)


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 >configure.ac <<END
AC_INIT
set -x
AC_PROG_FC
set +x
END
autoconf
./configure

Hope that helps
Dear Ralf,
It helps a lot !
The fact is the AC_PROG_FC does not check for fortran compilers according the user $PATH but either to the choice of compilers given in the 'configure.ac' file when calling AC_PROG_FC ex: AC_PROG_FC([xlf95 fort ifort ifc efc f95 g95 pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 gfortran], [90]) or to the choice of fortran compilers provide by the macro itself in the file (fortran.m4) ... the fact is that gfortran appears first in the fortran.m4 file (and before it did in my configure.ac) I change this because I think that usually when people are using another compiler that is because (for some reason) they don't want gfortran to be used and then to be find first by the configure.
Thank you very much for your detailed answer :)

Your last command (short configure.ac file) is also quite useful :)

Sébastien

--
====================================================
Dr. Sébastien Le Roux
Department of Physics
203 Dow Science
Central Michigan University
Mt. Pleasant, MI 48859, USA
E-mail:  address@hidden
Webpage: http://www.phy.cmich.edu/people/lerou1s/
Fax:   +1 (989) 774 2697
Phone: +1 (989) 774 3180
====================================================





reply via email to

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