[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
f2c obsolete?
From: |
John W. Eaton |
Subject: |
f2c obsolete? |
Date: |
Tue, 23 Oct 2007 15:10:55 -0400 |
While working on the latest change to configure.in, I discovered that
support for f2c is somewhat broken, at least on my system because
linking to -lf2c requires a definition of MAIN__. Even the check for
-lf2c was failing. I tried to work around this problem by changing
AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, $CONFLIB_ARG)
to
XLIBS="$LIBS"
LIBS="-lf2c $LIBS $CONFLIB_ARG"
AC_LINK_IFELSE([AC_LANG_CALL([int MAIN__ () { return 1; }], [f_open])],
[FLIBS=-lf2c], [FLIBS=])
LIBS="$XLIBS"
but then any subsequent checks that use $FLIBS (for example, checks
for blas, lapack, cholmod) then fail.
Rather than go to extremes to try to make this work, maybe it is time
to remove the direct support for f2c from configure, and assume that
if someone wants to use f2c, they have to use a wrapper script that
functions as a compiler (calls f2c and $CC and generates an object
file from a Fortran input file)? The script should also accept -v so
that the normal method used by configure to check for Fortran
libraries works. Maybe then everything could be made to work properly
provided that the macros
AC_PROG_F77
AC_F77_LIBRARY_LDFLAGS
AC_F77_DUMMY_MAIN
AC_F77_WRAPPERS
are called in configure. This would greatly simplify the portion of
Octave's configure script that checks for a Fortran compiler.
Comments?
Would anyone like to write a script like this, or point us to one that
already exists? Perhaps the script could even be distributed with
Octave?
Thanks,
jwe
- f2c obsolete?,
John W. Eaton <=
- Re: f2c obsolete?, Michael Goffioul, 2007/10/23
- Re: f2c obsolete?, John W. Eaton, 2007/10/23
- Re: f2c obsolete?, Michael Goffioul, 2007/10/24
- Re: f2c obsolete?, John W. Eaton, 2007/10/24
- Re: f2c obsolete?, John W. Eaton, 2007/10/24
- Re: f2c obsolete?, Michael Goffioul, 2007/10/24
- Re: f2c obsolete?, John W. Eaton, 2007/10/24
- Re: f2c obsolete?, Michael Goffioul, 2007/10/24
- Re: f2c obsolete?, John W. Eaton, 2007/10/24
- Re: f2c obsolete?, Michael Goffioul, 2007/10/24