octave-maintainers
[Top][All Lists]
Advanced

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

Re: f2c obsolete?


From: Michael Goffioul
Subject: Re: f2c obsolete?
Date: Tue, 23 Oct 2007 21:58:56 +0200

On 10/23/07, John W. Eaton <address@hidden> wrote:
> 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?

Yes. This will break compilation under MSVC, which relies on f2c.
This used to work me without any problem, using f2c and libf2c
available from http://www.netlib.org. Maybe it's just normal that
the -lf2c check fails on your system, because your libf2c is not
compatible with the way octave wants to use it.

Michael.


reply via email to

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