# HG changeset patch # User jwe # Date 797491252 0 # Node ID be470fb54633cb8e1c2fa51f4d2556665dbb09cd # Parent 5f1bb459e99c26bcacbf10d2be0846532fa59267 [project @ 1995-04-10 05:20:52 by jwe] diff -r 5f1bb459e99c -r be470fb54633 configure.in --- a/configure.in Mon Apr 10 05:20:52 1995 +0000 +++ b/configure.in Mon Apr 10 05:20:52 1995 +0000 @@ -21,7 +21,7 @@ ### along with Octave; see the file COPYING. If not, write to the Free ### Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -AC_REVISION($Revision: 1.109 $) +AC_REVISION($Revision: 1.110 $) AC_PREREQ(2.0) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -280,19 +280,6 @@ AC_SUBST(CXXFLAGS) AC_SUBST(NO_IMPLICIT_TEMPLATES) -### See what libraries are used by the C++ compiler. Need this for -### dynamic linking. - -AC_MSG_CHECKING([for C++ libraries]) -AC_CACHE_VAL(octave_cv_cxxlibs, -[if test -n "$CXX"; then - export CXX -fi -octave_cv_cxxlibs=`sh $srcdir/cxxlibs.sh`]) -AC_MSG_RESULT([$octave_cv_cxxlibs]) -CXXLIBS="$octave_cv_cxxlibs" -AC_SUBST(CXXLIBS) - ### See which C compiler to use (we expect to find gcc). AC_PROG_CC @@ -358,6 +345,10 @@ AC_ALLOCA AC_C_CONST +### Get the list of libraries that the C++ compiler normally uses. + +OCTAVE_CXXLIBS + ### 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 @@ -370,39 +361,32 @@ ### ### I don't think the Cray compiler will ever work like f2c... +### XXX FIXME XXX -- I don't think the logic here is quite right if we +### want to allow --with-g77 or --with-f2c to force them to be used +### even if they aren't available or don't appear to work correctly. + if $use_g77; then F77=g77 -fi - -if test -n "$F77"; then - export F77 -fi - -if $use_f2c; then - true +elif $use_f2c; then + F77= else AC_CHECK_PROGS(F77, xlf cf77 f77 g77 fc) +fi - # If it looks like we have a Fortran compiler, try to determine - # whether it might be compatible with f2c. +# If it looks like we have a Fortran compiler, try to determine +# whether it might be compatible with f2c. - if test -n "$F77"; then - AC_MSG_CHECKING([$F77/f2c compatibility]) - export F77 - export CC - tmpdef=`sh $srcdir/f2c-compat.sh $srcdir/flibs.sh` - status=$? - octave_f77_f2c_compat=no - if test $status -eq 0; then - octave_f77_f2c_compat=yes - fi - AC_MSG_RESULT([$octave_f77_f2c_compat]) - if test "$octave_f77_f2c_compat" = yes; then - if test "$tmpdef" = '-DF77_APPEND_UNDERSCORE=1'; then - AC_DEFINE(F77_APPEND_UNDERSCORE, 1) - fi - else - F77= +if test -n "$F77"; then + OCTAVE_FLIBS + OCTAVE_F77_APPEND_UNDERSCORE + OCTAVE_F2C_F77_COMPAT + + if test "$octave_cv_f2c_f77_compat" = no; then + F77= + else + if test -z "$FFLAGS"; then + FFLAGS="-O" + AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) fi fi fi @@ -414,26 +398,13 @@ AC_CHECK_PROG(F2C, f2c, f2c, []) fi -if test -z "$F2CFLAGS"; then - F2CFLAGS= -fi - -if test -z "$FFLAGS"; then - FFLAGS="-O" - AC_MSG_RESULT([defining FFLAGS to be $FFLAGS]) -fi +### At this point, either F77, F2C, use_f2c, or use_g77 should be set. if test -n "$F77"; then if test "$F77" = "g77"; then FUGLY=-fugly AC_MSG_RESULT([defining FUGLY to be $FUGLY]) fi - AC_MSG_CHECKING([for Fortran librarires]) - AC_CACHE_VAL(octave_cv_flibs, - [export F77 - octave_cv_flibs=`sh $srcdir/flibs.sh`]) - FLIBS="$octave_cv_flibs" - AC_MSG_RESULT([$FLIBS]) DOT_C_FROM_DOT_F_CMD= DOT_O_FROM_DOT_F_PAT='.f.o:' DOT_O_FROM_DOT_F_CMD=' $(FC) -c $(ALL_FFLAGS) $<' @@ -827,6 +798,7 @@ C compiler: $CC $GCC_IEEE_FP_FLAG $CFLAGS C++ compiler: $CXX $CXX_EXTRAS $CXXFLAGS Fortran compiler: $FORT + Fortran libraries: $FLIBS Dynamic Linking: $use_dld Minimal kernel option: $lite_kernel Use GNU readline: $USE_READLINE