autoconf-patches
[Top][All Lists]
Advanced

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

AC_PROG_FC may not be first compiler check


From: Ralf Wildenhues
Subject: AC_PROG_FC may not be first compiler check
Date: Sun, 3 Sep 2006 18:08:33 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

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
won't help, as other Fortran compilers require `.f', if I understand
the comment to AC_FC_SRCEXT correctly.  Adding $FCFLAGS_<ext> to the
FCFLAGS (after AC_FC_SRCEXT expansion) isn't so practical either, for
documented reasons.

I think we should just document that it's the way things are.  I'd
appreciate being corrected if above is erroneous in some way.

OK to apply?

(Another idea would be to have AC_PROG_FC require AC_PROG_CC; but I
think projects using F77 and FC should not need to check the C
compiler.)

Cheers
Ralf

        * doc/autoconf.texi (Fortran Compiler): Document that AC_PROG_FC
        should not be called first.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1076
diff -u -r1.1076 autoconf.texi
--- doc/autoconf.texi   2 Sep 2006 05:37:07 -0000       1.1076
+++ doc/autoconf.texi   3 Sep 2006 16:05:08 -0000
@@ -6852,6 +6852,9 @@
 environment, then set it to @option{-g -02} for @acronym{GNU} @code{g77} (or
 @option{-O2} where @code{g77} does not accept @option{-g}).  Otherwise,
 set @code{FCFLAGS} to @option{-g} for all other Fortran compilers.
+
address@hidden may not be the first compiler to check; if in doubt,
+add @code{AC_PROG_CC} beforehand.
 @end defmac
 
 @defmac AC_PROG_F77_C_O




reply via email to

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