Mercurial > hg > octave-nkf
changeset 5076:dc5f6082aa74
[project @ 2004-11-12 03:49:26 by jwe]
author | jwe |
---|---|
date | Fri, 12 Nov 2004 03:49:26 +0000 |
parents | b6a9f78f60e9 |
children | 19cb76761269 |
files | ChangeLog aclocal.m4 configure.in |
diffstat | 3 files changed, 83 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-11-11 John W. Eaton <jwe@octave.org> + + * (OCTAVE_PROG_GNUPLOT): Don't set GNUPLOT_BINARY before calling + AC_CHECK_PROGS(GNUPLOT_BINARY, ...). + + * configure.in: Use it to see if the C, C++, and Fortran compilers + accept -ffloat-store. + * aclocal.m4 (OCTAVE_F77_FLAG): New macro. + 2004-09-08 John W. Eaton <jwe@octave.org> * configure.in (GXX_PICKY_FLAGS): Remove -fno-nonnull-objects.
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -383,6 +383,36 @@ fi ]) dnl +dnl Check to see if Fortran compiler handles FLAG command line option. If +dnl two arguments are specified, execute the second arg as shell +dnl commands. Otherwise, add FLAG to FFLAGS if the compiler accepts +dnl the flag. +dnl +dnl OCTAVE_F77_FLAG +AC_DEFUN(OCTAVE_F77_FLAG, [ + ac_safe=`echo "$1" | sed 'y%./+-:=%__p___%'` + AC_MSG_CHECKING(whether ${F77-g77} accepts $1) + AC_CACHE_VAL(octave_cv_f77_flag_$ac_safe, [ + AC_LANG_PUSH(Fortran 77) + XFFLAGS="$FFLAGS" + FFLAGS="$FFLAGS $1" + AC_TRY_LINK([], [], + eval "octave_cv_f77_flag_$ac_safe=yes", + eval "octave_cv_f77_flag_$ac_safe=no") + FFLAGS="$XFFLAGS" + AC_LANG_POP(Fortran 77) + ]) + if eval "test \"`echo '$octave_cv_f77_flag_'$ac_safe`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , [ + FFLAGS="$FFLAGS $1" + AC_MSG_RESULT([adding $1 to FFLAGS])], [$2]) + else + AC_MSG_RESULT(no) + ifelse([$3], , , [$3]) + fi +]) +dnl dnl Check for flex dnl AC_DEFUN(OCTAVE_PROG_FLEX, [ @@ -458,7 +488,6 @@ gp_default=gnuplot ;; esac -GNUPLOT_BINARY="$gp_default" GNUPLOT_HAS_FRAMES=1 if test "$cross_compiling" = yes; then AC_MSG_RESULT(assuming $GNUPLOT_BINARY exists on $canonical_host_type host) @@ -483,6 +512,8 @@ else warn_gnuplot="yes" + GNUPLOT_BINARY="$gp_default" + ## If you change this text, be sure to also copy it to the set of ## warnings at the end of the script @@ -496,6 +527,8 @@ AC_MSG_WARN([gnuplot_binary = "/full/path/to/gnuplot/binary"]) AC_MSG_WARN([]) AC_MSG_WARN([at the Octave prompt.]) + AC_MSG_WARN([]) + AC_MSG_WARN([Setting default value to $GNUPLOT_BINARY]) fi fi AC_DEFINE_UNQUOTED(GNUPLOT_BINARY, "$GNUPLOT_BINARY", [Name of gnuplot program.])
--- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.456 $) +AC_REVISION($Revision: 1.457 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -231,23 +231,36 @@ AC_SUBST(DEPEND_FLAGS) AC_SUBST(DEPEND_EXTRA_SED_PATTERN) -### On Intel systems with gcc, we may need to compile with -mieee-fp to -### get full support for IEEE floating point. +### On Intel systems with gcc, we may need to compile with -mieee-fp +### and -ffloat-store to get full support for IEEE floating point. ### ### On Alpha/OSF systems, we need -mieee. ieee_fp_flag= case "$canonical_host_type" in i[[3456789]]86-*-*) - OCTAVE_CC_FLAG(-mieee-fp, [ - ieee_fp_flag=-mieee-fp - XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" - AC_MSG_RESULT([adding -mieee-fp to XTRA_CFLAGS])]) + if test "$GCC" = yes; then + OCTAVE_CC_FLAG(-mieee-fp, [ + ieee_fp_flag=-mieee-fp + XTRA_CFLAGS="$XTRA_CFLAGS -mieee-fp" + AC_MSG_RESULT([adding -mieee-fp to XTRA_CFLAGS])]) - OCTAVE_CXX_FLAG(-mieee-fp, [ - ieee_fp_flag=-mieee-fp - XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp" - AC_MSG_RESULT([adding -mieee-fp to XTRA_CXXFLAGS])]) + OCTAVE_CC_FLAG(-ffloat-store, [ + float_store_flag=-ffloat-store + XTRA_CFLAGS="$XTRA_CFLAGS -ffloat-store" + AC_MSG_RESULT([adding -ffloat-store to XTRA_CFLAGS])]) + fi + if test "$GXX" = yes; then + OCTAVE_CXX_FLAG(-mieee-fp, [ + ieee_fp_flag=-mieee-fp + XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-fp" + AC_MSG_RESULT([adding -mieee-fp to XTRA_CXXFLAGS])]) + + OCTAVE_CXX_FLAG(-ffloat-store, [ + float_store_flag=-ffloat-store + XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ffloat-store" + AC_MSG_RESULT([adding -ffloat-store to XTRA_CXXFLAGS])]) + fi ;; alpha*-*-*) if test "$GCC" = yes; then @@ -255,17 +268,18 @@ ieee_fp_flag=-mieee XTRA_CFLAGS="$XTRA_CFLAGS -mieee" AC_MSG_RESULT([adding -mieee to XTRA_CFLAGS])]) - + else + OCTAVE_CC_FLAG(-ieee, [ + ieee_fp_flag=-ieee + XTRA_CFLAGS="$XTRA_CFLAGS -ieee" + AC_MSG_RESULT([adding -ieee to XTRA_CFLAGS])]) + fi + if test "$GXX" = yes; then OCTAVE_CXX_FLAG(-mieee, [ ieee_fp_flag=-mieee XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee" AC_MSG_RESULT([adding -mieee to XTRA_CXXFLAGS])]) else - OCTAVE_CC_FLAG(-ieee, [ - ieee_fp_flag=-ieee - XTRA_CFLAGS="$XTRA_CFLAGS -ieee" - AC_MSG_RESULT([adding -ieee to XTRA_CFLAGS])]) - OCTAVE_CXX_FLAG(-ieee, [ ieee_fp_flag=-ieee XTRA_CXXFLAGS="$XTRA_CXXFLAGS -ieee" @@ -485,11 +499,18 @@ AC_F77_DUMMY_MAIN AC_F77_WRAPPERS case "$canonical_host_type" in + i[[3456789]]86-*-*) + if test "$ac_cv_f77_compiler_gnu" = yes; then + OCTAVE_F77_FLAG(-mieee-fp) + OCTAVE_F77_FLAG(-ffloat-store) + fi + ;; alpha*-*-*) if test "$ac_cv_f77_compiler_gnu" = yes; then - FFLAGS="$ieee_fp_flag $FFLAGS" + OCTAVE_F77_FLAG(-mieee) else - FFLAGS="-fpe1 $FFLAGS" + OCTAVE_F77_FLAG(-ieee) + OCTAVE_F77_FLAG(-fpe1) fi ;; powerpc-apple-machten*)