autoconf-patches
[Top][All Lists]
Advanced

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

Re: Fortran 90/95 support (autoconf)


From: Lassi A. Tuura
Subject: Re: Fortran 90/95 support (autoconf)
Date: Fri, 06 Jul 2001 11:38:17 +0200

> I'm also skeptical of LD9[05]FLAGS.  Autoconf uses a single LDFLAGS for
> every other language; why should F9[05] be different?

I would advocate for an option to have language-specific LIBS, LDFLAGS,
CFLAGS and CPPFLAGS.  If that option is not requested by configure.in,
the default should be to share the flags among all languages.

The reason is mixed languages linking tests. I actually worry more about
C/C++ than F77/F90/C/C++.  With a package of mixed C and C++ wanting to
make checks against both C and C++, life quickly become painful because
the C compiler usually fails if it is given C++ libraries.  As long as
the tests are linked with the right language driver, the right thing
usually happens.  This is much the same for F77 and F90: the FORTRAN
driver links in its runtime automatically, so I would prefer autoconf to
avoid the fragile guesses of what the runtime consists of.  (This still
leaves the problem of how to link mixed language programs/libraries so
that all language runtimes are correctly dealt with.  I would very much
prefer to see this solved with separate macros, as not all systems want
that as a guess.  For example, our build systems usually know this
already, and don't want to rely on a guess.  This doesn't reduce the
usefulness of other language-related tests.)

How about a AC_LANG_SPEC_VARS which would cause all AC_LANGs to switch
to languange-specific options?  I'd be willing to produce the patch for
this if the maintainers agree this is an acceptable approach.

Another issue would be to clarify in the manual whether/how mixed
language tests are meant to work.  For example I would be perfectly
happy with the following test limitations:
  - C driver: C only
  - C++ driver: C++ and mixed C++/C
  - F77 driver: F77 only
  - F90 driver: F90 only

> It is hard for me to imagine a
> project that would mix, say, f90 and f77, and which would not be willing
> to use the f90 compiler for the f77 stuff.

Alas...  we'd want that separation :-(

//lat
-- 
Success consists of going from failure to failure without
loss of enthusiasm.  --Winston Churchill



reply via email to

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