Mercurial > hg > octave-avbm
changeset 3859:890a7e4c1362
[project @ 2001-11-09 17:05:08 by jwe]
author | jwe |
---|---|
date | Fri, 09 Nov 2001 17:05:09 +0000 |
parents | de05e6bdf897 |
children | 23f6e22426d6 |
files | ChangeLog Makeconf.in mkoctfile.in octave-bug.in src/ChangeLog src/DLD-FUNCTIONS/lsode.cc src/oct-conf.h.in src/toplev.cc |
diffstat | 8 files changed, 129 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2001-11-09 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octave-bug.in (BLAS_LIBS, FFTW_LIBS, LD_CXX): Substitute and + print values. + * mkoctfile.in: Accept --compile as an alias for -c. + New option, --link-stand-alone. + New option, --no-pathsearch. + New option, --no-readline. + Substitute RLD_FLAG, FLIBS, LIBKPATHSEA, LIBOCTINTERP, + LIBOCTAVE, LIBOCT_READLINE, LIBOCT_PATHSEARCH, LIBCRUFT, + BLAS_LIBS, FFTW_LIBS, and LIBS. + * Makeconf.in (MKOCTFILE_LFLAGS): New variable. + (do-subst-config-vals): Substitute FFTW_LIBS, LD_CXX, + LIBOCT_PATHSEARCH, LIBOCT_READLINE, MKOCTFILE_LFLAGS. + 2001-11-06 John W. Eaton <jwe@bevo.che.wisc.edu> * Makefile.in (LIBOCT_READLINE, LIBOCT_PATHSEARCH): New variables.
--- a/Makeconf.in +++ b/Makeconf.in @@ -272,6 +272,9 @@ MKOCTFILE_INCFLAGS = \ -I$(octincludedir) -I$(octincludedir)/octave -I$(includedir) +# The -L flags to use for the mkoctfile scrip (for --link-stand-alone) +MKOCTFILE_LFLAGS = -L$(octlibdir) + # The following pattern rules and the substitution functions require # GNU make. If you don't have it, get it! @@ -369,11 +372,13 @@ -e "s;%OCTAVE_CONF_F77%;\"${F77}\";" \ -e "s;%OCTAVE_CONF_FC%;\"${FC}\";" \ -e "s;%OCTAVE_CONF_FFLAGS%;\"${FFLAGS}\";" \ + -e "s;%OCTAVE_CONF_FFTW_LIBS%;\"${FFTW_LIBS}\";" \ -e "s;%OCTAVE_CONF_FLIBS%;\"${FLIBS}\";" \ -e "s;%OCTAVE_CONF_FORTRAN_MAIN_FLAG%;\"${FORTRAN_MAIN_FLAG}\";" \ -e "s;%OCTAVE_CONF_FPICFLAG%;\"${FPICFLAG}\";" \ -e "s;%OCTAVE_CONF_GLOB_INCFLAGS%;\"${GLOB_INCFLAGS}\";" \ -e "s;%OCTAVE_CONF_INCFLAGS%;\"${INCFLAGS}\";" \ + -e "s;%OCTAVE_CONF_LD_CXX%;\"${LD_CXX}\";" \ -e "s;%OCTAVE_CONF_LDFLAGS%;\"${LDFLAGS}\";" \ -e "s;%OCTAVE_CONF_LD_STATIC_FLAG%;\"${LD_STATIC_FLAG}\";" \ -e "s;%OCTAVE_CONF_LEX%;\"${LEX}\";" \ @@ -387,10 +392,13 @@ -e "s;%OCTAVE_CONF_LIBKPATHSEA%;\"${LIBKPATHSEA}\";" \ -e "s;%OCTAVE_CONF_LIBOCTAVE%;\"${LIBOCTAVE}\";" \ -e "s;%OCTAVE_CONF_LIBOCTINTERP%;\"${LIBOCTINTERP}\";" \ + -e "s;%OCTAVE_CONF_LIBOCT_PATHSEARCH%;\"${LIBOCT_PATHSEARCH}\";" \ + -e "s;%OCTAVE_CONF_LIBOCT_READLINE%;\"${LIBOCT_READLINE}\";" \ -e "s;%OCTAVE_CONF_LIBPLPLOT%;\"${LIBPLPLOT}\";" \ -e "s;%OCTAVE_CONF_LIBS%;\"${LIBS}\";" \ -e "s;%OCTAVE_CONF_LN_S%;\"${LN_S}\";" \ -e "s;%OCTAVE_CONF_MKOCTFILE_INCFLAGS%;\"${MKOCTFILE_INCFLAGS}\";" \ + -e "s;%OCTAVE_CONF_MKOCTFILE_LFLAGS%;\"${MKOCTFILE_LFLAGS}\";" \ -e "s;%OCTAVE_CONF_OCTAVE_LITE%;\"${OCTAVE_LITE}\";" \ -e "s;%OCTAVE_CONF_RANLIB%;\"${RANLIB}\";" \ -e "s;%OCTAVE_CONF_RDYNAMIC_FLAG%;\"${RDYNAMIC_FLAG}\";" \
--- a/mkoctfile.in +++ b/mkoctfile.in @@ -32,12 +32,31 @@ : ${SH_LD=%OCTAVE_CONF_SH_LD%} : ${SH_LDFLAGS=%OCTAVE_CONF_SH_LDFLAGS%} +: ${RLD_FLAG=%OCTAVE_CONF_RLD_FLAG%} +: ${RDYNAMIC_FLAG=%OCTAVE_CONF_RDYNAMIC_FLAG%} +: ${LIBOCTAVE=%OCTAVE_CONF_LIBOCTAVE%} +: ${LIBOCT_READLINE=%OCTAVE_CONF_LIBOCT_READLINE%} +: ${LIBCRUFT=%OCTAVE_CONF_LIBCRUFT%} +: ${BLAS_LIBS=%OCTAVE_CONF_BLAS_LIBS%} +: ${FFTW_LIBS=%OCTAVE_CONF_FFTW_LIBS%} +: ${LIBS=%OCTAVE_CONF_LIBS%} +: ${FLIBS=%OCTAVE_CONF_FLIBS%} +: ${FORTRAN_MAIN_FLAG=%OCTAVE_CONF_FORTRAN_MAIN_FLAG%} +: ${LD_CXX=%OCTAVE_CONF_LD_CXX%} +: ${LDFLAGS=%OCTAVE_CONF_LDFLAGS%} +: ${LD_STATIC_FLAG=%OCTAVE_CONF_LD_STATIC_FLAG%} +: ${LFLAGS=%OCTAVE_CONF_MKOCTFILE_LFLAGS%} + : ${ALL_FFLAGS="$FFLAGS"} : ${ALL_CFLAGS="$INCFLAGS $XTRA_CFLAGS $CFLAGS"} : ${ALL_CXXFLAGS="$INCFLAGS $XTRA_CXXFLAGS $CXXFLAGS"} +: ${ALL_LDFLAGS="$FORTRAN_MAIN_FLAG $LD_STATIC_FLAG $CPICFLAG $LDFLAGS"} + +: ${OCTAVE_LIBS="$LIBOCTAVE $LIBOCT_READLINE $SPECIAL_MATH_LIB $LIBCRUFT"} + # Local variables. usage_msg="usage: mkoctfile [options] file ..." @@ -54,6 +73,7 @@ dbg=: strip=false link=true +link_stand_alone=false depend=false compile=true @@ -103,9 +123,10 @@ -M, --depend Generate dependency files (.d) for C and C++ source files. - -c Compile, but do not link. + -c, --compile Compile, but do not link. - -o FILE, --output FILE Output file name. Default extension is .oct. + -o FILE, --output FILE Output file name. Default extension is .oct + unless linking a stand-alone executable. -p VAR, --print VAR Print configuration variable VAR. Recognized variables are: @@ -119,7 +140,20 @@ FPICFLAG SHLEXT CC SH_LD CFLAGS SH_LDFLAGS - + + LD_CXX LFLAGS + LDFLAGS LD_STATIC_FLAG + RLD_FLAG RDYNAMIC_FLAG + + FORTRAN_MAIN_FLAG + + LIBOCTAVE LIBOCT_READLINE + LIBCRUFT BLAS_LIBS + FFTW_LIBS LIBS + FLIBS OCTAVE_LIBS + + --link-stand-alone Link a stand-alone executable file. + -s, --strip Strip output file. -v, --verbose Echo commands as they are executed. @@ -153,7 +187,7 @@ -o | --output) shift if [ $# -gt 0 ]; then - octfile=`echo $1 | sed 's,\.[^.]*$,,'`.oct + octfile="$1" else echo "mkoctfile: output file name missing" 1>&2 fi @@ -171,9 +205,12 @@ -s | --strip) strip=true ;; - -c) + -c | --compile) link=false ;; + --link-stand-alone) + link_stand_alone=true + ;; *) echo "mkoctfile: unrecognized argument $1" 1>&2 exit 1 @@ -181,12 +218,18 @@ esac if [ -n "$file" ]; then if [ -z "$octfile" ]; then - octfile=`echo $file | sed 's,\.[^.]*$,,'`.oct + octfile="$file" fi fi shift done +if $link_stand_alone; then + true +else + octfile=`echo $octfile | sed 's,\.[^.]*$,,'`.oct +fi + # Generate dependency files for C and C++ files. if $depend; then @@ -318,9 +361,20 @@ # Link all the object files. if $link; then - cmd="$SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags" - $dbg $cmd - eval $cmd + if $link_stand_alone; then + if [ -n "$LD_CXX" ]; then + cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBS $FLIBS" + $dbg $cmd + eval $cmd + else + echo "mkoctfile: no way to link stand-alone executable file" 1>&2 + exit 1 + fi + else + cmd="$SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags" + $dbg $cmd + eval $cmd + fi # Maybe strip it.
--- a/octave-bug.in +++ b/octave-bug.in @@ -32,10 +32,13 @@ CXX_VERSION=%OCTAVE_CONF_CXX_VERSION% CXXFLAGS=%OCTAVE_CONF_CXXFLAGS% CXXPICFLAG=%OCTAVE_CONF_CXXPICFLAG% +LD_CXX=%OCTAVE_CONF_LD_CXX% LDFLAGS=%OCTAVE_CONF_LDFLAGS% LIBFLAGS=%OCTAVE_CONF_LIBFLAGS% RLD_FLAG=%OCTAVE_CONF_RLD_FLAG% LIBS=%OCTAVE_CONF_LIBS% +BLAS_LIBS=%OCTAVE_CONF_BLAS_LIBS% +FFTW_LIBS=%OCTAVE_CONF_FFTW_LIBS% LEXLIB=%OCTAVE_CONF_LEXLIB% LIBPLPLOT=%OCTAVE_CONF_LIBPLPLOT% LIBGLOB=%OCTAVE_CONF_LIBGLOB% @@ -177,9 +180,12 @@ C++ compiler: $CXX_AND_VERSION CXXFLAGS: $CXXFLAGS CXXPICFLAG: $CXXPICFLAG +LD_CXX: $LD_CXX LDFLAGS: $LDFLAGS LIBFLAGS: $LIBFLAGS RLD_FLAG: $RLD_FLAG +BLAS_LIBS: $BLAS_LIBS +FFTW_LIBS: $FFTW_LIBS LIBS: $LIBS LEXLIB: $LEXLIB LIBPLPLOT: $LIBPLPLOT
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2001-11-09 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-conf.h.in (FFTW_LIBS, LD_CXX, LIBOCT_PATHSEARCH, + LIBOCT_READLINE, MKOCTFILE_LFLAGS): Substitute. + * toplev.cc (octave_config_info): Add them to the map. + +2001-11-08 John W. Eaton <jwe@bevo.che.wisc.edu> + + * DLD-FUNCTIONS/lsode.cc (Flsode): Don't bother to give OUTPUT + matrix a size before calling integration function. + 2001-11-06 John W. Eaton <jwe@bevo.che.wisc.edu> Makefile.in (OCTAVE_LIBS): Add $(LIBOCT_READLINE) and
--- a/src/DLD-FUNCTIONS/lsode.cc +++ b/src/DLD-FUNCTIONS/lsode.cc @@ -275,9 +275,7 @@ ode.copy (lsode_opts); - int nstates = state.capacity (); - Matrix output (nsteps, nstates + 1); - + Matrix output; if (crit_times_set) output = ode.integrate (out_times, crit_times); else
--- a/src/oct-conf.h.in +++ b/src/oct-conf.h.in @@ -128,6 +128,10 @@ #define OCTAVE_CONF_FFLAGS %OCTAVE_CONF_FFLAGS% #endif +#ifndef OCTAVE_CONF_FFTW_LIBS +#define OCTAVE_CONF_FFTW_LIBS %OCTAVE_CONF_FFTW_LIBS% +#endif + #ifndef OCTAVE_CONF_FLIBS #define OCTAVE_CONF_FLIBS %OCTAVE_CONF_FLIBS% #endif @@ -152,6 +156,10 @@ #define OCTAVE_CONF_LDFLAGS %OCTAVE_CONF_LDFLAGS% #endif +#ifndef OCTAVE_CONF_LD_CXX +#define OCTAVE_CONF_LD_CXX %OCTAVE_CONF_LD_CXX% +#endif + #ifndef OCTAVE_CONF_LD_STATIC_FLAG #define OCTAVE_CONF_LD_STATIC_FLAG %OCTAVE_CONF_LD_STATIC_FLAG% #endif @@ -192,6 +200,14 @@ #define OCTAVE_CONF_LIBKPATHSEA %OCTAVE_CONF_LIBKPATHSEA% #endif +#ifndef OCTAVE_CONF_LIBOCT_PATHSEARCH +#define OCTAVE_CONF_LIBOCT_PATHSEARCH %OCTAVE_CONF_LIBOCT_PATHSEARCH% +#endif + +#ifndef OCTAVE_CONF_LIBOCT_READLINE +#define OCTAVE_CONF_LIBOCT_READLINE %OCTAVE_CONF_LIBOCT_READLINE% +#endif + #ifndef OCTAVE_CONF_LIBOCTAVE #define OCTAVE_CONF_LIBOCTAVE %OCTAVE_CONF_LIBOCTAVE% #endif @@ -216,6 +232,10 @@ #define OCTAVE_CONF_MKOCTFILE_INCFLAGS %OCTAVE_CONF_MKOCTFILE_INCFLAGS% #endif +#ifndef OCTAVE_CONF_MKOCTFILE_LFLAGS +#define OCTAVE_CONF_MKOCTFILE_LFLAGS %OCTAVE_CONF_MKOCTFILE_LFLAGS% +#endif + #ifndef OCTAVE_CONF_OCTAVE_LITE #define OCTAVE_CONF_OCTAVE_LITE %OCTAVE_CONF_OCTAVE_LITE% #endif
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -666,12 +666,14 @@ m ["F77"] = OCTAVE_CONF_F77; m ["FC"] = OCTAVE_CONF_FC; m ["FFLAGS"] = OCTAVE_CONF_FFLAGS; + m ["FFTW_LIBS"] = OCTAVE_CONF_FFTW_LIBS; m ["FLIBS"] = OCTAVE_CONF_FLIBS; m ["FORTRAN_MAIN_FLAG"] = OCTAVE_CONF_FORTRAN_MAIN_FLAG; m ["FPICFLAG"] = OCTAVE_CONF_FPICFLAG; m ["GLOB_INCFLAGS"] = OCTAVE_CONF_GLOB_INCFLAGS; m ["INCFLAGS"] = OCTAVE_CONF_INCFLAGS; m ["LDFLAGS"] = OCTAVE_CONF_LDFLAGS; + m ["LD_CXX"] = OCTAVE_CONF_LD_CXX; m ["LD_STATIC_FLAG"] = OCTAVE_CONF_LD_STATIC_FLAG; m ["LEX"] = OCTAVE_CONF_LEX; m ["LEXLIB"] = OCTAVE_CONF_LEXLIB; @@ -682,12 +684,15 @@ m ["LIBFLAGS"] = OCTAVE_CONF_LIBFLAGS; m ["LIBGLOB"] = OCTAVE_CONF_LIBGLOB; m ["LIBKPATHSEA"] = OCTAVE_CONF_LIBKPATHSEA; + m ["LIBOCT_PATHSEARCH"] = OCTAVE_CONF_LIBOCT_PATHSEARCH; + m ["LIBOCT_READLINE"] = OCTAVE_CONF_LIBOCT_READLINE; m ["LIBOCTAVE"] = OCTAVE_CONF_LIBOCTAVE; m ["LIBOCTINTERP"] = OCTAVE_CONF_LIBOCTINTERP; m ["LIBPLPLOT"] = OCTAVE_CONF_LIBPLPLOT; m ["LIBS"] = OCTAVE_CONF_LIBS; m ["LN_S"] = OCTAVE_CONF_LN_S; m ["MKOCTFILE_INCFLAGS"] = OCTAVE_CONF_MKOCTFILE_INCFLAGS; + m ["MKOCTFILE_LFLAGS"] = OCTAVE_CONF_MKOCTFILE_LFLAGS; m ["OCTAVE_LITE"] = OCTAVE_CONF_OCTAVE_LITE; m ["RANLIB"] = OCTAVE_CONF_RANLIB; m ["RDYNAMIC_FLAG"] = OCTAVE_CONF_RDYNAMIC_FLAG;