Mercurial > hg > octave-nkf
diff configure.in @ 2562:0c978e147a3a
[project @ 1996-12-05 17:05:54 by jwe]
author | jwe |
---|---|
date | Thu, 05 Dec 1996 17:05:54 +0000 |
parents | c097977bca6f |
children | bcdd6bf533ea |
line wrap: on
line diff
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.236 $) +AC_REVISION($Revision: 1.237 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -458,6 +458,20 @@ OCTAVE_CXXLIBS +### We need these before trying to find libf2c. + +if test -z "$AR"; then + AR=ar +fi +AC_SUBST(AR) + +if test -z "$ARFLAGS"; then + ARFLAGS="rc" +fi +AC_SUBST(ARFLAGS) + +AC_PROG_RANLIB + ### If we haven't been forced to use f2c, try to find a Fortran compiler ### under any one of several common Un*x Fortran compiler names. ### Put fc last to avoid confusion with some vendor's /bin/sh fc @@ -571,13 +585,36 @@ elif $have_f2c; then AC_DEFINE(F77_APPEND_UNDERSCORE, 1) AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1]) - AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, [], -lm) - if test -z "$FLIBS"; then - AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, [], -lm) - if test -n "$FLIBS"; then - AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", [], -lF77) + +### This seems to be necessary on some Linux system. + + cat > conftest.$ac_ext << EOF +int MAIN_ () { return 0; } +int MAIN__ () { return 0; } +EOF + +### XXX FIMXE XXX -- these shouldn't be fixed names, eh? + + oct_conflib=libconflib.a + oct_obj_ext=o + + if AC_TRY_EVAL(ac_compile); then + $AR $ARFLAGS $oct_conflib conftest.$oct_obj_ext 1>&AC_FD_CC + if test -n "$RANLIB"; then + $RANLIB $oct_conflib 1>&AC_FD_CC fi fi + rm -f conftest* + AC_CHECK_LIB(f2c, f_open, FLIBS=-lf2c, FLIBS=, [-L. -lconflib -lm]) + rm -f $oct_conflib + + if test -z "$FLIBS"; then + AC_CHECK_LIB(F77, d_sin, FLIBS=-lF77, FLIBS=, -lm) + if test -n "$FLIBS"; then + AC_CHECK_LIB(I77, f_rew, FLIBS="$FLIBS -lI77", FLIBS=, -lF77) + fi + fi + if test -z "$FLIBS"; then AC_MSG_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a]) fi @@ -921,18 +958,6 @@ ;; esac -if test -z "$AR"; then - AR=ar -fi -AC_SUBST(AR) - -if test -z "$ARFLAGS"; then - ARFLAGS="rc" -fi -AC_SUBST(ARFLAGS) - -AC_PROG_RANLIB - AC_PROG_LN_S ### Kluge for SunOS 4.x vs. shared libraries.