Mercurial > hg > octave-terminal
changeset 4102:cbac6756967e
[project @ 2002-10-14 20:16:44 by jwe]
author | jwe |
---|---|
date | Mon, 14 Oct 2002 20:16:45 +0000 |
parents | ea537559ab07 |
children | 677c5f3a15be |
files | ChangeLog Makeconf.in aclocal.m4 configure.in libcruft/ChangeLog libcruft/Makefile.in liboctave/ChangeLog liboctave/Makefile.in liboctave/lo-cieee.c liboctave/lo-ieee.cc liboctave/lo-ieee.h mkoctfile.in src/ChangeLog src/DLD-FUNCTIONS/getrusage.cc src/DLD-FUNCTIONS/minmax.cc src/Makefile.in src/data.cc src/file-io.cc src/oct-conf.h.in src/ov-base.cc src/ov-bool-mat.cc src/ov-ch-mat.cc src/ov-complex.cc src/ov-cx-mat.cc src/ov-range.cc src/ov-re-mat.cc src/ov-re-nd-array.cc src/toplev.cc |
diffstat | 28 files changed, 383 insertions(+), 238 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,39 @@ +2002-10-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makeconf.in (TERMLIBS): Substitute here. + + * configure.in: Define OCTAVE_USE_WINDOWS_API if + defined (__WIN32__) && ! defined (__CYGWIN__), not if + defined (__WIN32__) || ! defined (__CYGWIN__). + Also call AC_SUBST for TERMLIBS. + +2002-10-14 Paul Kienzle <pkienzle@users.sf.net> + + * configure.in: Use correct SHLEXT and PICFLAG for Cygwin. + * configure.in: Cygwin must link against -loctave.dll, etc. + + * configure.in: Define INCLUDE_LINK_DEPS because Cygwin needs DLLs + to be linked against their dependencies. + * Makeconf.in: Ditto. + + * configure.in: Define SHLLIB and SHLBIN because Cygwin doesn't + link against shared libs but instead against -lxxx.dll. LIB and + BIN are the link and load forms respectively of the library. + * Makeconf.in: Ditto, and define the corresponding XXX_VER. + + * configure.in: Remove LIBOCT_READLINE and LIBOCT_PATHSEARCH + because they are merged into LIBOCTAVE to avoid circular + dependencies. + * Makeconf.in: Ditto. + * mkoctfile.in: Ditto. + + * aclocal.m4 (OCTAVE_ENABLE_READLINE): Define LIBREADLINE because + Cygwin requires liboctave to be linked against -lreadline so + including it in LIBS isn't sufficient. + * mkoctfile.in: Substitute and use LIBREADLINE here. + + * aclocal.m4 (OCTAVE_CXX_PREPENDS_UNDERSCORE): Force no for cygwin. + 2002-10-11 John W. Eaton <jwe@bevo.che.wisc.edu> * configure.in (AH_BOTTOM): Maybe define OCTAVE_USE_WINDOWS_API
--- a/Makeconf.in +++ b/Makeconf.in @@ -62,6 +62,12 @@ SHARED_LIBS = @SHARED_LIBS@ SHLEXT = @SHLEXT@ SHLEXT_VER = $(SHLEXT).$(version) +SHLLIB = @SHLLIB@ +SHLLIB_VER = $(SHLLIB).$(version) +SHLBIN = @SHLBIN@ +SHLBIN_VER = $(SHLBIN).$(version) + +INCLUDE_LINK_DEPS = @INCLUDE_LINK_DEPS@ LIBEXT = a @@ -158,9 +164,9 @@ LIBKPATHSEA = @LIBKPATHSEA@ LIBOCTINTERP = @LIBOCTINTERP@ LIBOCTAVE = @LIBOCTAVE@ -LIBOCT_READLINE = @LIBOCT_READLINE@ -LIBOCT_PATHSEARCH = @LIBOCT_PATHSEARCH@ LIBCRUFT = @LIBCRUFT@ +LIBREADLINE = @LIBREADLINE@ +TERMLIBS = @TERMLIBS@ BLAS_LIBS = @BLAS_LIBS@ FFTW_LIBS = @FFTW_LIBS@ @@ -385,6 +391,7 @@ -e "s;%OCTAVE_CONF_FPICFLAG%;\"${FPICFLAG}\";" \ -e "s;%OCTAVE_CONF_GLOB_INCFLAGS%;\"${GLOB_INCFLAGS}\";" \ -e "s;%OCTAVE_CONF_INCFLAGS%;\"${INCFLAGS}\";" \ + -e "s;%OCTAVE_CONF_INCLUDE_LINK_DEPS%;\"${INCLUDE_LINK_DEPS}\";"\ -e "s;%OCTAVE_CONF_LD_CXX%;\"${LD_CXX}\";" \ -e "s;%OCTAVE_CONF_LDFLAGS%;\"${LDFLAGS}\";" \ -e "s;%OCTAVE_CONF_LD_STATIC_FLAG%;\"${LD_STATIC_FLAG}\";" \ @@ -399,9 +406,8 @@ -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_LIBREADLINE%;\"${LIBREADLINE}\";" \ -e "s;%OCTAVE_CONF_LIBS%;\"${LIBS}\";" \ -e "s;%OCTAVE_CONF_LN_S%;\"${LN_S}\";" \ -e "s;%OCTAVE_CONF_MKOCTFILE_INCFLAGS%;\"${MKOCTFILE_INCFLAGS}\";" \ @@ -414,6 +420,7 @@ -e "s;%OCTAVE_CONF_SED%;\"${SED}\";" \ -e "s;%OCTAVE_CONF_SHARED_LIBS%;\"${SHARED_LIBS}\";" \ -e "s;%OCTAVE_CONF_SHLEXT%;\"${SHLEXT}\";" \ + -e "s;%OCTAVE_CONF_SHLLINKEXT%;\"${SHLLINKEXT}\";" \ -e "s;%OCTAVE_CONF_SHLEXT_VER%;\"${SHLEXT_VER}\";" \ -e "s;%OCTAVE_CONF_SH_LD%;\"${SH_LD}\";" \ -e "s;%OCTAVE_CONF_SH_LDFLAGS%;\"${SH_LDFLAGS}\";" \
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -601,6 +601,15 @@ cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD fi AC_LANG_POP(C++) +### XXX FIXME XXX -- Ignore test result for cygwin. Yes it prepends +### underscore, but dlsym dnl seems to add it automatically. The +### correct test is to build the shared library then try to grab the +### symbol from it with and without underscore. + case "$canonical_host_type" in + *-*-cygwin*) + octave_cv_cxx_prepends_underscore=no + ;; + esac ]) AC_MSG_RESULT($octave_cv_cxx_prepends_underscore) if test $octave_cv_cxx_prepends_underscore = yes; then @@ -652,6 +661,7 @@ dnl OCTAVE_ENABLE_READLINE AC_DEFUN(OCTAVE_ENABLE_READLINE, [ USE_READLINE=true + LIBREADLINE= AC_ARG_ENABLE(readline, [ --enable-readline use readline library (default is yes)], [if test "$enableval" = no; then @@ -660,13 +670,15 @@ fi]) if $USE_READLINE; then AC_CHECK_LIB(readline, rl_set_keyboard_input_timeout, [ - LIBS="-lreadline $LIBS" + LIBREADLINE="-lreadline" + LIBS="$LIBREADLINE $LIBS" AC_DEFINE(USE_READLINE, 1, [Define to use the readline library.]) ], [ AC_MSG_WARN([I need GNU Readline 4.2 or later]) AC_MSG_ERROR([this is fatal unless you specify --disable-readline]) ]) fi + AC_SUBST(LIBREADLINE) ]) dnl dnl Determine the C++ compiler ABI. It sets the macro CXX_ABI to the
--- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.375 $) +AC_REVISION($Revision: 1.376 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -621,25 +621,6 @@ AC_MSG_ERROR([You can't disable building static AND shared libraries!]) fi -if $SHARED_LIBS; then - LIBOCTINTERP=-loctinterp - LIBOCTAVE=-loctave - LIBOCT_READLINE=-loct-readline - LIBOCT_PATHSEARCH=-loct-pathsearch - LIBCRUFT=-lcruft -else - LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' - LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' - LIBOCT_READLINE='$(TOPDIR)/liboctave/liboct-readline.$(LIBEXT)' - LIBOCT_PATHSEARCH='$(TOPDIR)/liboctave/liboct-pathsearch.$(LIBEXT)' - LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' -fi -AC_SUBST(LIBOCTINTERP) -AC_SUBST(LIBOCTAVE) -AC_SUBST(LIBOCT_READLINE) -AC_SUBST(LIBOCT_PATHSEARCH) -AC_SUBST(LIBCRUFT) - use_rpath=true AC_ARG_ENABLE(rpath, [ --enable-rpath add -rpath to link command for shared libraries], @@ -650,10 +631,14 @@ CXXPICFLAG=-fPIC FPICFLAG=-fPIC SHLEXT=so +SHLLINKEXT= +SHLBIN= +SHLLIB=$SHLEXT SH_LD="$CXX" SH_LDFLAGS=-shared SONAME_FLAGS= RLD_FLAG= +INCLUDE_LINK_DEPS=false TEMPLATE_AR="$AR" TEMPLATE_ARFLAGS="$ARFLAGS" case "$canonical_host_type" in @@ -672,6 +657,18 @@ *-*-darwin*) SH_LDFLAGS='-bundle -bundle_loader $(bindir)/octave' ;; + *-*-cygwin*) + CXXPICFLAG= + CPICFLAG= + FPICFLAG= + SHLEXT=dll + SHLLIB=dll.a + SHLBIN=dll + SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import" + SHLLINKEXT=.dll + SONAME_FLAGS='-Wl,--out-implib=$@.a' + INCLUDE_LINK_DEPS=true + ;; *-*-linux* | *-*-gnu*) SONAME_FLAGS='-Xlinker -soname -Xlinker $@' RLD_FLAG='-Xlinker -rpath -Xlinker $(octlibdir)' @@ -759,10 +756,13 @@ AC_MSG_RESULT([defining RLD_FLAG to be $RLD_FLAG]) AC_MSG_RESULT([defining TEMPLATE_AR to be $TEMPLATE_AR]) AC_MSG_RESULT([defining TEMPLATE_ARFLAGS to be $TEMPLATE_ARFLAGS]) +AC_MSG_RESULT([defining INCLUDE_LINK_DEPS to be $INCLUDE_LINK_DEPS]) AC_SUBST(FPICFLAG) AC_SUBST(CPICFLAG) AC_SUBST(CXXPICFLAG) AC_SUBST(SHLEXT) +AC_SUBST(SHLLIB) +AC_SUBST(SHLBIN) AC_SUBST(DLFCN_DIR) AC_SUBST(SH_LD) AC_SUBST(SH_LDFLAGS) @@ -770,6 +770,20 @@ AC_SUBST(RLD_FLAG) AC_SUBST(TEMPLATE_AR) AC_SUBST(TEMPLATE_ARFLAGS) +AC_SUBST(INCLUDE_LINK_DEPS) + +if $SHARED_LIBS; then + LIBOCTINTERP=-loctinterp$SHLLINKEXT + LIBOCTAVE=-loctave$SHLLINKEXT + LIBCRUFT=-lcruft$SHLLINKEXT +else + LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' + LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' + LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' +fi +AC_SUBST(LIBOCTINTERP) +AC_SUBST(LIBOCTAVE) +AC_SUBST(LIBCRUFT) ### Allow compilation of smaller kernel. This only works if some form ### of dynamic linking is also supported and used. @@ -1067,6 +1081,7 @@ case "${TERMLIBS}" in *-l${termlib}*) LIBS="$TERMLIBS $LIBS" + AC_SUBST(TERMLIBS) octave_found_termlib=yes break ;; @@ -1299,7 +1314,7 @@ #endif /* Define if we expect to have <windows.h>, Sleep, etc. */ -#if defined (__WIN32__) || ! defined (__CYGWIN__) +#if defined (__WIN32__) && ! defined (__CYGWIN__) #define OCTAVE_USE_WINDOWS_API 1 #endif ])
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,17 @@ +2002-10-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (install): No need to use cd to create links. + +2002-10-14 Paul Kienzle <pkienzle@users.sf.net> + + * Makefile.in: Use link dependencies for shared libs if + INCLUDE_LINK_DEPS. + (LIBRARIES): If doing shared libs, include versioned library in list. + (libcruft.$(SHLEXT), libcruft.$(SHLEXT_VER)): Reverse actions -- + build unversioned library, symbolic link adds version info. + (install, uninstall): Handle link and load forms of the library + separately. + 2002-09-30 Paul Kienzle <pkienzle@users.sf.net> * slatec-fn/xdacosh.f: Mark external functions as external.
--- a/libcruft/Makefile.in +++ b/libcruft/Makefile.in @@ -44,6 +44,11 @@ BINDISTFILES = libcruft.$(SHLEXT_VER) endif +# include BLAS and FFTW just in case some of libcruft depends on them +ifeq ($(INCLUDE_LINK_DEPS),true) + LINK_DEPS = $(BLAS_LIBS) $(FFTW_LIBS) $(FLIBS) +endif + all: libraries .PHONY: all @@ -75,9 +80,9 @@ ifeq ($(SHARED_LIBS), true) ifeq ($(STATIC_LIBS), true) - LIBRARIES = libcruft.$(LIBEXT) libcruft.$(SHLEXT) + LIBRARIES = libcruft.$(LIBEXT) libcruft.$(SHLEXT_VER) else - LIBRARIES = libcruft.$(SHLEXT) + LIBRARIES = libcruft.$(SHLEXT_VER) endif else ifeq ($(STATIC_LIBS), true) @@ -96,13 +101,13 @@ $(AR) $(ARFLAGS) $@ $^ $(RANLIB) $@ -libcruft.$(SHLEXT): libcruft.$(SHLEXT_VER) +libcruft.$(SHLEXT_VER): libcruft.$(SHLEXT) rm -f $@ $(LN_S) $< $@ -libcruft.$(SHLEXT_VER): $(CRUFT_PICOBJ) +libcruft.$(SHLEXT): $(CRUFT_PICOBJ) rm -f $@ - $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ + $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(LINK_DEPS) $(CRUFT_OBJ): @@ -121,12 +126,18 @@ $(RANLIB) $(octlibdir)/libcruft.$(LIBEXT) ; \ fi if $(SHARED_LIBS); then \ - rm -f $(octlibdir)/libcruft.$(SHLEXT_VER); \ + rm -f $(octlibdir)/libcruft.$(SHLLIB_VER); \ $(INSTALL_PROGRAM) \ - libcruft.$(SHLEXT_VER) $(octlibdir)/libcruft.$(SHLEXT_VER); \ - cd $(octlibdir); \ - rm -f libcruft.$(SHLEXT); \ - $(LN_S) libcruft.$(SHLEXT_VER) libcruft.$(SHLEXT); \ + libcruft.$(SHLLIB) $(octlibdir)/libcruft.$(SHLLIB_VER); \ + rm -f $(octlibdir)/libcruft.$(SHLLIB); \ + $(LN_S) libcruft.$(SHLLIB_VER) $(octlibdir)/libcruft.$(SHLLIB); \ + if test x$(SHLBIN) != x ; then \ + rm -f $(bindir)/libcruft.$(SHLBIN_VER); \ + $(INSTALL_PROGRAM) \ + libcruft.$(SHLBIN) $(bindir)/libcruft.$(SHLBIN_VER); \ + rm -f $(bindir)/libcruft.$(SHLBIN); \ + $(LN_S) libcruft.$(SHLBIN_VER) $(bindir)/libcruft.$(SHLBIN); \ + fi; \ fi install-strip:: @@ -134,8 +145,12 @@ uninstall:: rm -f $(octlibdir)/libcruft.$(LIBEXT) - rm -f $(octlibdir)/libcruft.$(SHLEXT) - rm -f $(octlibdir)/libcruft.$(SHLEXT_VER) + rm -f $(octlibdir)/libcruft.$(SHLLIB) + rm -f $(octlibdir)/libcruft.$(SHLLIB_VER) + if test x$(SHLBIN) != x; then \ + rm -f $(bindir)/libcruft.$(SHLBIN); \ + rm -f $(bindir)/libcruft.$(SHLBIN_VER); \ + fi tags TAGS:: $(SOURCES) $(SUBDIR_FOR_COMMAND)
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,24 @@ +2002-10-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lo-cieee.c: Move everything but lo_ieee_init here. + (lo_ieee_Inf_value, lo_ieee_NA_value, lo_ieee_NaN_value): + New functions. + + * Makefile.in (install): No need to use cd to create links. + (LINK_DEPS): Include $(LIBOCTAVE_LFLAGS) before list of libraries. + Include $(TERMLIBS) in list. + +2002-10-14 Paul Kienzle <pkienzle@users.sf.net> + + * Makefile.in: Merge liboctave with liboct-readline and + liboct-pathsearch. + Use link dependencies for shared libs if INCLUDE_LINK_DEPS. + (libraries): Depend on versioned library. + (liboctave.$(SHLEXT), liboctave.$(SHLEXT_VER)): Reverse actions -- + build unversioned library, symbolic link adds version info. + (install, uninstall): Handle link and load forms of the library + separately. + 2002-10-11 John W. Eaton <jwe@bevo.che.wisc.edu> * oct-time.cc: Use OCTAVE_USE_WINDOWS_API instead of __WIN32__ and
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -18,10 +18,13 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ -LIBOCTAVE_LFLAGS = -L../libcruft -L../readline -L../kpathsea \ - -L../glob -L. $(RLD_FLAG) +LIBOCTAVE_LFLAGS = -L../libcruft -L../kpathsea -L../glob -L. $(RLD_FLAG) -LIBOCTAVE_LIBS = -lcruft -lreadline -lkpathsea -lglob +ifeq ($(INCLUDE_LINK_DEPS), true) + LINK_DEPS = \ + $(LIBOCTAVE_LFLAGS) \ + $(LIBCRUFT) $(BLAS_LIBS) $(FFTW_LIBS) $(LIBREADLINE) $(TERMLIBS) -lglob +endif MATRIX_INC := Array.h Array2.h Array3.h ArrayN.h DiagArray2.h Array-flags.h \ Array-idx.h Array2-idx.h Array3-idx.h ArrayN-idx.h MArray-defs.h \ @@ -149,25 +152,17 @@ LIBOCTAVE_OBJECTS := \ $(LIBOCTAVE_CXX_SOURCES:.cc=.o) \ - $(LIBOCTAVE_C_SOURCES:.c=.o) - -LIBOCT_READLINE_OBJECTS := \ + $(LIBOCTAVE_C_SOURCES:.c=.o) \ $(LIBOCT_READLINE_CXX_SOURCES:.cc=.o) \ - $(LIBOCT_READLINE_C_SOURCES:.c=.o) - -LIBOCT_PATHSEARCH_OBJECTS := \ + $(LIBOCT_READLINE_C_SOURCES:.c=.o) \ $(LIBOCT_PATHSEARCH_CXX_SOURCES:.cc=.o) \ $(LIBOCT_PATHSEARCH_C_SOURCES:.c=.o) ifeq ($(SHARED_LIBS), true) ifdef CXXPICFLAG LIBOCTAVE_PICOBJ := $(addprefix pic/, $(LIBOCTAVE_OBJECTS)) - LIBOCT_READLINE_PICOBJ := $(addprefix pic/, $(LIBOCT_READLINE_OBJECTS)) - LIBOCT_PATHSEARCH_PICOBJ := $(addprefix pic/, $(LIBOCT_PATHSEARCH_OBJECTS)) else LIBOCTAVE_PICOBJ := $(LIBOCTAVE_OBJECTS) - LIBOCT_READLINE_PICOBJ := $(LIBOCT_READLINE_OBJECTS) - LIBOCT_PATHSEARCH_PICOBJ := $(LIBOCT_PATHSEARCH_OBJECTS) endif endif @@ -199,23 +194,17 @@ ifeq ($(STATIC_LIBS), true) libraries: \ stamp-prereq \ - liboctave.$(LIBEXT) liboctave.$(SHLEXT) \ - liboct-readline.$(LIBEXT) liboct-readline.$(SHLEXT) \ - liboct-pathsearch.$(LIBEXT) liboct-pathsearch.$(SHLEXT) + liboctave.$(LIBEXT) liboctave.$(SHLEXT_VER) else libraries: \ stamp-prereq \ - liboctave.$(SHLEXT) \ - liboct-readline.$(SHLEXT) \ - liboct-pathsearch.$(SHLEXT) + liboctave.$(SHLEXT_VER) endif else ifeq ($(STATIC_LIBS), true) libraries: \ stamp-prereq \ - liboctave.$(LIBEXT) \ - liboct-readline.$(LIBEXT) \ - liboct-pathsearch.$(LIBEXT) + liboctave.$(LIBEXT) else libraries: stamp-prereq endif @@ -227,45 +216,15 @@ $(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^ $(RANLIB) $@ -liboctave.$(SHLEXT): liboctave.$(SHLEXT_VER) - rm -f $@ - $(LN_S) $< $@ - -liboctave.$(SHLEXT_VER): $(LIBOCTAVE_PICOBJ) - rm -f $@ - $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ - -$(LIBOCTAVE_PICOBJ): stmp-pic - -liboct-readline.$(LIBEXT): $(LIBOCT_READLINE_OBJECTS) - rm -f $@ - $(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^ - $(RANLIB) $@ - -liboct-readline.$(SHLEXT): liboct-readline.$(SHLEXT_VER) +liboctave.$(SHLEXT_VER): liboctave.$(SHLEXT) rm -f $@ $(LN_S) $< $@ -liboct-readline.$(SHLEXT_VER): $(LIBOCT_READLINE_PICOBJ) - rm -f $@ - $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ - -$(LIBOCT_READLINE_PICOBJ): stmp-pic - -liboct-pathsearch.$(LIBEXT): $(LIBOCT_PATHSEARCH_OBJECTS) +liboctave.$(SHLEXT): $(LIBOCTAVE_PICOBJ) rm -f $@ - $(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^ - $(RANLIB) $@ + $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(LINK_DEPS) $(LIBKPATHSEA) -liboct-pathsearch.$(SHLEXT): liboct-pathsearch.$(SHLEXT_VER) - rm -f $@ - $(LN_S) $< $@ - -liboct-pathsearch.$(SHLEXT_VER): $(LIBOCT_PATHSEARCH_PICOBJ) - rm -f $@ - $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(LIBKPATHSEA) - -$(LIBOCT_PATHSEARCH_PICOBJ): stmp-pic +$(LIBOCTAVE_PICOBJ): stmp-pic check: all .PHONY: check @@ -284,40 +243,20 @@ $(INSTALL_DATA) liboctave.$(LIBEXT) \ $(octlibdir)/liboctave.$(LIBEXT); \ $(RANLIB) $(octlibdir)/liboctave.$(LIBEXT); \ - \ - rm -f $(octlibdir)/liboct-readline.$(LIBEXT); \ - $(INSTALL_DATA) liboct-readline.$(LIBEXT) \ - $(octlibdir)/liboct-readline.$(LIBEXT); \ - $(RANLIB) $(octlibdir)/liboct-readline.$(LIBEXT); \ - \ - rm -f $(octlibdir)/liboct-pathsearch.$(LIBEXT); \ - $(INSTALL_DATA) liboct-pathsearch.$(LIBEXT) \ - $(octlibdir)/liboct-pathsearch.$(LIBEXT); \ - $(RANLIB) $(octlibdir)/liboct-pathsearch.$(LIBEXT); \ fi if $(SHARED_LIBS); then \ - rm -f $(octlibdir)/liboctave.$(SHLEXT_VER); \ - $(INSTALL_PROGRAM) \ - liboctave.$(SHLEXT_VER) $(octlibdir)/liboctave.$(SHLEXT_VER); \ - ( cd $(octlibdir); \ - rm -f liboctave.$(SHLEXT); \ - $(LN_S) liboctave.$(SHLEXT_VER) liboctave.$(SHLEXT); ); \ - rm -f $(octlibdir)/liboct-readline.$(SHLEXT_VER); \ + rm -f $(octlibdir)/liboctave.$(SHLLIB_VER); \ $(INSTALL_PROGRAM) \ - liboct-readline.$(SHLEXT_VER) \ - $(octlibdir)/liboct-readline.$(SHLEXT_VER); \ - ( cd $(octlibdir); \ - rm -f liboct-readline.$(SHLEXT); \ - $(LN_S) \ - liboct-readline.$(SHLEXT_VER) liboct-readline.$(SHLEXT); ); \ - rm -f $(octlibdir)/liboct-pathsearch.$(SHLEXT_VER); \ - $(INSTALL_PROGRAM) \ - liboct-pathsearch.$(SHLEXT_VER) \ - $(octlibdir)/liboct-pathsearch.$(SHLEXT_VER); \ - ( cd $(octlibdir); \ - rm -f liboct-pathsearch.$(SHLEXT); \ - $(LN_S) \ - liboct-pathsearch.$(SHLEXT_VER) liboct-pathsearch.$(SHLEXT); ); \ + liboctave.$(SHLLIB) $(octlibdir)/liboctave.$(SHLLIB_VER); \ + rm -f $(octlibdir)/liboctave.$(SHLLIB); \ + $(LN_S) liboctave.$(SHLLIB_VER) $(octlibdir)/liboctave.$(SHLLIB); \ + if test x$(SHLBIN) != x ; then \ + rm -f $(bindir)/liboctave.$(SHLBIN_VER); \ + $(INSTALL_PROGRAM) \ + liboctave.$(SHLBIN) $(bindir)/liboctave.$(SHLBIN_VER); \ + rm -f $(bindir)/liboctave.$(SHLBIN); \ + $(LN_S) liboctave.$(SHLBIN_VER) $(bindir)/liboctave.$(SHLBIN); \ + fi; \ fi .PHONY: install-lib @@ -331,14 +270,12 @@ uninstall: rm -f $(octlibdir)/liboctave.$(LIBEXT) - rm -f $(octlibdir)/liboctave.$(SHLEXT) - rm -f $(octlibdir)/liboctave.$(SHLEXT_VER) - rm -f $(octlibdir)/liboct-readline.$(LIBEXT) - rm -f $(octlibdir)/liboct-readline.$(SHLEXT) - rm -f $(octlibdir)/liboct-readline.$(SHLEXT_VER) - rm -f $(octlibdir)/liboct-pathsearch.$(LIBEXT) - rm -f $(octlibdir)/liboct-pathsearch.$(SHLEXT) - rm -f $(octlibdir)/liboct-pathsearch.$(SHLEXT_VER) + rm -f $(octlibdir)/liboctave.$(SHLLIB) + rm -f $(octlibdir)/liboctave.$(SHLLIB_VER) + if test x$(SHLBIN) != x; then \ + rm -f $(bindir)/liboctave.$(SHLBIN); \ + rm -f $(bindir)/liboctave.$(SHLBIN_VER); \ + fi for f in $(INCLUDES); do rm -f $(octincludedir)/octave/$$f; done .PHONY: uninstall
--- a/liboctave/lo-cieee.c +++ b/liboctave/lo-cieee.c @@ -52,6 +52,18 @@ #define finite(x) ((x) < DBL_MAX && (x) > -DBL_MAX) #endif +/* Octave's idea of infinity. */ +double octave_Inf; + +/* Octave's idea of a missing value. */ +double octave_NA; + +/* Octave's idea of not a number. */ +double octave_NaN; + +int lo_ieee_hw; +int lo_ieee_lw; + #if defined (SCO) int @@ -116,6 +128,24 @@ return lo_ieee_isnan (x); } +double +lo_ieee_inf_value (void) +{ + return octave_Inf; +} + +double +lo_ieee_na_value (void) +{ + return octave_NA; +} + +double +lo_ieee_nan_value (void) +{ + return octave_NaN; +} + /* ;;; Local Variables: *** ;;; mode: C++ ***
--- a/liboctave/lo-ieee.cc +++ b/liboctave/lo-ieee.cc @@ -48,18 +48,6 @@ #include "lo-ieee.h" #include "mach-info.h" -// Octave's idea of infinity. -double octave_Inf; - -// Octave's idea of not a number. -double octave_NaN; - -// Octave's idea of a missing value. -double octave_NA; - -int lo_ieee_hw; -int lo_ieee_lw; - void octave_ieee_init (void) {
--- a/liboctave/lo-ieee.h +++ b/liboctave/lo-ieee.h @@ -27,6 +27,15 @@ extern "C" { #endif +/* Octave's idea of infinity. */ +extern double octave_Inf; + +/* Octave's idea of a missing value. */ +extern double octave_NA; + +/* Octave's idea of not a number. */ +extern double octave_NaN; + extern int lo_ieee_hw; extern int lo_ieee_lw; @@ -39,15 +48,6 @@ #define LO_IEEE_NA_HW 0x7ff00000 #define LO_IEEE_NA_LW 1954 -// Octave's idea of infinity. -extern double octave_Inf; - -// Octave's idea of not a number. -extern double octave_NaN; - -// Octave's idea of a missing value. -extern double octave_NA; - extern void octave_ieee_init (void); #if defined (SCO) @@ -62,6 +62,10 @@ extern int lo_ieee_is_NA (double); extern int lo_ieee_is_NaN_or_NA (double); +extern double lo_ieee_inf_value (void); +extern double lo_ieee_na_value (void); +extern double lo_ieee_nan_value (void); + #ifdef __cplusplus } #endif
--- a/mkoctfile.in +++ b/mkoctfile.in @@ -37,7 +37,8 @@ : ${RLD_FLAG=%OCTAVE_CONF_RLD_FLAG%} : ${RDYNAMIC_FLAG=%OCTAVE_CONF_RDYNAMIC_FLAG%} : ${LIBOCTAVE=%OCTAVE_CONF_LIBOCTAVE%} -: ${LIBOCT_READLINE=%OCTAVE_CONF_LIBOCT_READLINE%} +: ${LIBOCTINTERP=%OCTAVE_CONF_LIBOCTINTERP%} +: ${LIBREADLINE=%OCTAVE_CONF_LIBREADLINE%} : ${LIBCRUFT=%OCTAVE_CONF_LIBCRUFT%} : ${BLAS_LIBS=%OCTAVE_CONF_BLAS_LIBS%} : ${FFTW_LIBS=%OCTAVE_CONF_FFTW_LIBS%} @@ -47,6 +48,7 @@ : ${LDFLAGS=%OCTAVE_CONF_LDFLAGS%} : ${LD_STATIC_FLAG=%OCTAVE_CONF_LD_STATIC_FLAG%} : ${LFLAGS=%OCTAVE_CONF_MKOCTFILE_LFLAGS%} +: ${INCLUDE_LINK_DEPS=%OCTAVE_CONF_INCLUDE_LINK_DEPS%} : ${ALL_FFLAGS="$FFLAGS"} @@ -56,7 +58,7 @@ : ${ALL_LDFLAGS="$LD_STATIC_FLAG $CPICFLAG $LDFLAGS"} -: ${OCTAVE_LIBS="$LIBOCTAVE $LIBOCT_READLINE $SPECIAL_MATH_LIB $LIBCRUFT"} +: ${OCTAVE_LIBS="$LIBOCTAVE $SPECIAL_MATH_LIB $LIBCRUFT"} # Local variables. @@ -133,24 +135,26 @@ -p VAR, --print VAR Print configuration variable VAR. Recognized variables are: - CPPFLAGS CPICFLAG - INCFLAGS CXX - F2C CXXFLAGS - F2CFLAGS CXXPICFLAG - F77 XTRA_CFLAGS - FFLAGS XTRA_CXXFLAGS - FPICFLAG SHLEXT - CC SH_LD - CFLAGS SH_LDFLAGS + CPPFLAGS CPICFLAG + INCFLAGS CXX + F2C CXXFLAGS + F2CFLAGS CXXPICFLAG + F77 XTRA_CFLAGS + FFLAGS XTRA_CXXFLAGS + FPICFLAG SHLEXT + CC SH_LD + CFLAGS SH_LDFLAGS - LD_CXX LFLAGS - LDFLAGS LD_STATIC_FLAG - RLD_FLAG RDYNAMIC_FLAG + INCLUDE_LINK_DEPS - LIBOCTAVE LIBOCT_READLINE - LIBCRUFT BLAS_LIBS - FFTW_LIBS LIBS - FLIBS OCTAVE_LIBS + LD_CXX LFLAGS + LDFLAGS LD_STATIC_FLAG + RLD_FLAG RDYNAMIC_FLAG + + LIBOCTAVE LIBCRUFT + LIBOCTINTERP OCTAVE_LIBS + BLAS_LIBS FFTW_LIBS + LIBS FLIBS --link-stand-alone Link a stand-alone executable file. @@ -369,7 +373,7 @@ if $link; then if $link_stand_alone; then if [ -n "$LD_CXX" ]; then - cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $output_option $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBS $FLIBS" + cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $output_option $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBREADLINE $LIBS $FLIBS" $dbg $cmd eval $cmd else @@ -377,7 +381,11 @@ exit 1 fi else - cmd="$SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags" + LINK_DEPS= + if $INCLUDE_LINK_DEPS ; then + LINK_DEPS="$LFLAGS $LIBOCTAVE $LIBCRUFT $LIBOCTINTERP $BLAS_LIBS $FFTW_LIBS" + fi + cmd="$SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags $LINK_DEPS" $dbg $cmd eval $cmd fi
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,31 @@ +2002-10-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/getrusage.cc, data.cc, + file-io.cc, ov-base.cc, ov-bool-mat.cc, ov-ch-mat.cc, + ov-complex.cc, ov-cx-mat.cc, ov-range.cc, ov-re-mat.cc, + ov-re-nd-array.cc: Change all uses of octave_Inf, octave_NA, and + octave_NaN to be calls to lo_ieee_Inf_value, lo_ieee_NA_value, and + lo_ieee_NaN_value instead of using the constants directly to avoid + linking problem with Cygwin. + + * Makefile.in (install): No need to use cd to create links. + +2002-10-14 Paul Kienzle <pkienzle@users.sf.net> + + * Makefile.in: Merge liboctave with liboct-readline and + liboct-pathsearch. + Use link dependencies for shared libs if INCLUDE_LINK_DEPS. + (LIBRARIES): If doing shared libs, include versioned library in list. + (liboctinterp.$(SHLEXT), liboctinterp.$(SHLEXT_VER)): Reverse + actions -- build unversioned library, symbolic link adds version + info. + (install, uninstall): Handle link and load forms of the library + separately. + + * toplev.cc (octave_config_info): Remove LIBOCT_READLINE and + LIBOCT_PATHSEARCH, add LIBREADLINE. + * oct-conf.h.in: Likewise. + 2002-10-11 John W. Eaton <jwe@bevo.che.wisc.edu> * lex.l (handle_identifier): Don't enter token in local symbol
--- a/src/DLD-FUNCTIONS/getrusage.cc +++ b/src/DLD-FUNCTIONS/getrusage.cc @@ -202,20 +202,22 @@ #endif - m ["maxrss"] = octave_NaN; - m ["ixrss"] = octave_NaN; - m ["idrss"] = octave_NaN; - m ["isrss"] = octave_NaN; - m ["minflt"] = octave_NaN; - m ["majflt"] = octave_NaN; - m ["nswap"] = octave_NaN; - m ["inblock"] = octave_NaN; - m ["oublock"] = octave_NaN; - m ["msgsnd"] = octave_NaN; - m ["msgrcv"] = octave_NaN; - m ["nsignals"] = octave_NaN; - m ["nvcsw"] = octave_NaN; - m ["nivcsw"] = octave_NaN; + double tmp = lo_ieee_nan_value (); + + m ["maxrss"] = tmp; + m ["ixrss"] = tmp; + m ["idrss"] = tmp; + m ["isrss"] = tmp; + m ["minflt"] = tmp; + m ["majflt"] = tmp; + m ["nswap"] = tmp; + m ["inblock"] = tmp; + m ["oublock"] = tmp; + m ["msgsnd"] = tmp; + m ["msgrcv"] = tmp; + m ["nsignals"] = tmp; + m ["nvcsw"] = tmp; + m ["nivcsw"] = tmp; #endif
--- a/src/DLD-FUNCTIONS/minmax.cc +++ b/src/DLD-FUNCTIONS/minmax.cc @@ -422,13 +422,15 @@ \ if (len > 0) \ { \ + double nan_val = lo_ieee_nan_value (); \ + \ RowVector idx (len); \ \ for (int i = 0; i < len; i++) \ { \ int tmp = index.elem (i) + 1; \ idx.elem (i) = (tmp <= 0) \ - ? octave_NaN : static_cast<double> (tmp); \ + ? nan_val : static_cast<double> (tmp); \ } \ \ retval(1) = idx; \
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -32,13 +32,14 @@ ifeq ($(OCTAVE_LITE), true) ifdef CXXPICFLAG %.oct : pic/%.o - $(SH_LD) $(SH_LDFLAGS) -o $@ $< + $(SH_LD) $(SH_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) else %.oct : %.o - $(SH_LD) $(SH_LDFLAGS) -o $@ $< + $(SH_LD) $(SH_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) endif endif + OPT_HANDLERS := DASPK-opts.cc DASRT-opts.cc DASSL-opts.cc \ LSODE-opts.cc NLEqn-opts.cc ODESSA-opts.cc Quad-opts.cc @@ -194,14 +195,20 @@ OCTAVE_LFLAGS = -L$(TOPDIR)/liboctave -L$(TOPDIR)/libcruft \ -L$(TOPDIR)/src $(RLD_FLAG) -OCTAVE_LIBS = $(LIBOCTINTERP) $(LIBOCTAVE) $(LIBOCT_READLINE) \ - $(LIBOCT_PATHSEARCH) $(SPECIAL_MATH_LIB) $(LIBCRUFT) \ +OCTAVE_LIBS = $(LIBOCTINTERP) $(LIBOCTAVE) \ + $(SPECIAL_MATH_LIB) $(LIBCRUFT) \ $(LIBPLPLOT) $(LIBGLOB) $(LIBDLFCN) ifneq ($SHARED_LIBS), true) OCTAVE_LIBS += $(LIBKPATHSEA) endif +ifeq ($(INCLUDE_LINK_DEPS),true) + OCTINTERP_LINK_DEPS = -L../liboctave $(LIBOCTAVE) -L../libcruft $(LIBCRUFT) + OCT_LINK_DEPS = \ + -L../libcruft $(LIBCRUFT) -L../liboctave $(LIBOCTAVE) -L. $(LIBOCTINTERP) +endif + DISTFILES = Makefile.in ChangeLog mkdefs mkops mkgendoc \ DOCSTRINGS mkbuiltins mk-oct-links \ defaults.h.in oct-conf.h.in octave.gperf oct-gperf.h \ @@ -224,9 +231,9 @@ ifeq ($(SHARED_LIBS), true) ifeq ($(STATIC_LIBS), true) - LIBRARIES = liboctinterp.$(LIBEXT) liboctinterp.$(SHLEXT) + LIBRARIES = liboctinterp.$(LIBEXT) liboctinterp.$(SHLEXT_VER) else - LIBRARIES = liboctinterp.$(SHLEXT) + LIBRARIES = liboctinterp.$(SHLEXT_VER) XERBLA = ../libcruft/blas-xtra/pic/xerbla.o endif else @@ -247,13 +254,13 @@ $(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^ $(RANLIB) $@ -liboctinterp.$(SHLEXT): liboctinterp.$(SHLEXT_VER) +liboctinterp.$(SHLEXT_VER): liboctinterp.$(SHLEXT) rm -f $@ $(LN_S) $< $@ -liboctinterp.$(SHLEXT_VER): $(PICOBJ) +liboctinterp.$(SHLEXT): $(PICOBJ) rm -f $@ - $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ + $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(OCTINTERP_LINK_DEPS) stamp-oct-links: $(OCT_FILES) if [ -n "$(OCT_FILES)" ]; then \ @@ -368,11 +375,17 @@ fi if $(SHARED_LIBS); then \ rm -f $(octlibdir)/liboctinterp.$(SHLEXT_VER); \ - $(INSTALL_PROGRAM) liboctinterp.$(SHLEXT_VER) \ - $(octlibdir)/liboctinterp.$(SHLEXT_VER); \ - cd $(octlibdir); \ - rm -f liboctinterp.$(SHLEXT); \ - $(LN_S) liboctinterp.$(SHLEXT_VER) liboctinterp.$(SHLEXT); \ + $(INSTALL_PROGRAM) liboctinterp.$(SHLLIB) \ + $(octlibdir)/liboctinterp.$(SHLLIB_VER); \ + rm -f $(octlibdir)/liboctinterp.$(SHLLIB); \ + $(LN_S) liboctinterp.$(SHLLIB_VER) $(octlibdir)/liboctinterp.$(SHLLIB); \ + if test x$(SHLBIN) != x ; then \ + rm -f $(bindir)/liboctinterp.$(SHLBIN_VER); \ + $(INSTALL_PROGRAM) \ + liboctinterp.$(SHLBIN) $(bindir)/octinterp.$(SHLBIN_VER); \ + rm -f $(bindir)/liboctinterp.$(SHLBIN); \ + $(LN_S) liboctinterp.$(SHLBIN_VER) $(bindir)/liboctinterp.$(SHLBIN); \ + fi; \ fi .PHONY: install-lib @@ -395,8 +408,12 @@ uninstall: rm -f $(bindir)/octave$(EXEEXT) rm -f $(octlibdir)/liboctinterp.$(LIBEXT) - rm -f $(octlibdir)/liboctinterp.$(SHLEXT) - rm -f $(octlibdir)/liboctinterp.$(SHLEXT_VER) + rm -f $(octlibdir)/liboctinterp.$(SHLLIB) + rm -f $(octlibdir)/liboctinterp.$(SHLLIB_VER) + if test x$(SHLBIN) != x ; then \ + rm -f $(bindir)/liboctinterp.$(SHLBIN); \ + rm -f $(bindir)/liboctinterp.$(SHLBIN_VER); \ + fi for f in $(INCLUDES) defaults.h oct-conf.h; do \ rm -f $(octincludedir)/octave/$$f; \ done
--- a/src/data.cc +++ b/src/data.cc @@ -1187,19 +1187,19 @@ DEFCONST (I, Complex (0.0, 1.0), IMAGINARY_DOC_STRING); - DEFCONST (Inf, octave_Inf, + DEFCONST (Inf, lo_ieee_inf_value (), INFINITY_DOC_STRING); DEFCONST (J, Complex (0.0, 1.0), IMAGINARY_DOC_STRING); - DEFCONST (NA, octave_NA, + DEFCONST (NA, lo_ieee_na_value (), "-*- texinfo -*-\n\ @defvr {Built-in Variable} NA\n\ Missing value.\n\ @end defvr"); - DEFCONST (NaN, octave_NaN, + DEFCONST (NaN, lo_ieee_nan_value (), NAN_DOC_STRING); #if defined (M_E) @@ -1258,13 +1258,13 @@ DEFCONST (i, Complex (0.0, 1.0), IMAGINARY_DOC_STRING); - DEFCONST (inf, octave_Inf, + DEFCONST (inf, lo_ieee_inf_value (), INFINITY_DOC_STRING); DEFCONST (j, Complex (0.0, 1.0), IMAGINARY_DOC_STRING); - DEFCONST (nan, octave_NaN, + DEFCONST (nan, lo_ieee_nan_value (), NAN_DOC_STRING); #if defined (M_PI)
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -856,7 +856,8 @@ int count = 0; Array<double> size = (nargin == 3) - ? args(2).vector_value () : Array<double> (1, octave_Inf); + ? args(2).vector_value () + : Array<double> (1, lo_ieee_inf_value ()); if (! error_state) { @@ -940,7 +941,7 @@ Array<double> size = (nargin == 3) ? args(2).vector_value () - : Array<double> (1, octave_Inf); + : Array<double> (1, lo_ieee_inf_value ()); octave_value tmp = os.scanf (fmt, size, count); @@ -1185,7 +1186,7 @@ if (! error_state) { octave_value size = (nargin > 1) - ? args(1) : octave_value (octave_Inf); + ? args(1) : octave_value (lo_ieee_inf_value ()); octave_value prec = (nargin > 2) ? args(2) : octave_value ("uchar");
--- a/src/oct-conf.h.in +++ b/src/oct-conf.h.in @@ -196,14 +196,6 @@ #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 +208,10 @@ #define OCTAVE_CONF_LIBPLPLOT %OCTAVE_CONF_LIBPLPLOT% #endif +#ifndef OCTAVE_CONF_LIBREADLINE +#define OCTAVE_CONF_LIBREADLINE %OCTAVE_CONF_LIBREADLINE% +#endif + #ifndef OCTAVE_CONF_LIBS #define OCTAVE_CONF_LIBS %OCTAVE_CONF_LIBS% #endif
--- a/src/ov-base.cc +++ b/src/ov-base.cc @@ -213,7 +213,7 @@ double octave_base_value::double_value (bool) const { - double retval = octave_NaN; + double retval = lo_ieee_nan_value (); gripe_wrong_type_arg ("octave_base_value::double_value ()", type_name ()); return retval; } @@ -237,7 +237,8 @@ Complex octave_base_value::complex_value (bool) const { - Complex retval (octave_NaN, octave_NaN); + double tmp = lo_ieee_nan_value (); + Complex retval (tmp, tmp); gripe_wrong_type_arg ("octave_base_value::complex_value()", type_name ()); return retval; }
--- a/src/ov-bool-mat.cc +++ b/src/ov-bool-mat.cc @@ -88,7 +88,7 @@ double octave_bool_matrix::double_value (bool) const { - double retval = octave_NaN; + double retval = lo_ieee_nan_value (); if ((rows () == 1 && columns () == 1) || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) @@ -102,7 +102,9 @@ Complex octave_bool_matrix::complex_value (bool) const { - Complex retval (octave_NaN, octave_NaN); + double tmp = lo_ieee_nan_value (); + + Complex retval (tmp, tmp); if ((rows () == 1 && columns () == 1) || (Vdo_fortran_indexing && rows () > 0 && columns () > 0))
--- a/src/ov-ch-mat.cc +++ b/src/ov-ch-mat.cc @@ -57,7 +57,7 @@ double octave_char_matrix::double_value (bool) const { - double retval = octave_NaN; + double retval = lo_ieee_nan_value (); if ((rows () == 1 && columns () == 1) || (Vdo_fortran_indexing && rows () > 0 && columns () > 0)) @@ -71,7 +71,9 @@ Complex octave_char_matrix::complex_value (bool) const { - Complex retval (octave_NaN, octave_NaN); + double tmp = lo_ieee_nan_value (); + + Complex retval (tmp, tmp); if ((rows () == 1 && columns () == 1) || (Vdo_fortran_indexing && rows () > 0 && columns () > 0))
--- a/src/ov-complex.cc +++ b/src/ov-complex.cc @@ -90,7 +90,7 @@ double octave_complex::double_value (bool force_conversion) const { - double retval = octave_NaN; + double retval = lo_ieee_nan_value (); int flag = force_conversion;
--- a/src/ov-cx-mat.cc +++ b/src/ov-cx-mat.cc @@ -123,7 +123,7 @@ double octave_complex_matrix::double_value (bool force_conversion) const { - double retval = octave_NaN; + double retval = lo_ieee_nan_value (); int flag = force_conversion; @@ -171,7 +171,9 @@ Complex octave_complex_matrix::complex_value (bool) const { - Complex retval (octave_NaN, octave_NaN); + double tmp = lo_ieee_nan_value (); + + Complex retval (tmp, tmp); if ((rows () == 1 && columns () == 1) || (Vdo_fortran_indexing && rows () > 0 && columns () > 0))
--- a/src/ov-range.cc +++ b/src/ov-range.cc @@ -129,7 +129,7 @@ double octave_range::double_value (bool) const { - double retval = octave_NaN; + double retval = lo_ieee_nan_value (); int nel = range.nelem (); @@ -190,7 +190,9 @@ Complex octave_range::complex_value (bool) const { - Complex retval (octave_NaN, octave_NaN); + double tmp = lo_ieee_nan_value (); + + Complex retval (tmp, tmp); int nel = range.nelem ();
--- a/src/ov-re-mat.cc +++ b/src/ov-re-mat.cc @@ -82,7 +82,7 @@ double octave_matrix::double_value (bool) const { - double retval = octave_NaN; + double retval = lo_ieee_nan_value (); // XXX FIXME XXX -- maybe this should be a function, valid_as_scalar() if ((rows () == 1 && columns () == 1) @@ -97,7 +97,9 @@ Complex octave_matrix::complex_value (bool) const { - Complex retval (octave_NaN, octave_NaN); + double tmp = lo_ieee_nan_value (); + + Complex retval (tmp, tmp); if ((rows () == 1 && columns () == 1) || (Vdo_fortran_indexing && rows () > 0 && columns () > 0))
--- a/src/ov-re-nd-array.cc +++ b/src/ov-re-nd-array.cc @@ -113,7 +113,7 @@ double octave_matrix::double_value (bool) const { - double retval = octave_NaN; + double retval = lo_ieee_nan_value (); // XXX FIXME XXX -- maybe this should be a function, valid_as_scalar() if ((rows () == 1 && columns () == 1) @@ -128,7 +128,9 @@ Complex octave_matrix::complex_value (bool) const { - Complex retval (octave_NaN, octave_NaN); + double tmp = lo_ieee_nan_value (); + + Complex retval (tmp, tmp); if ((rows () == 1 && columns () == 1) || (Vdo_fortran_indexing && rows () > 0 && columns () > 0))
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -692,11 +692,10 @@ 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 ["LIBREADLINE"] = OCTAVE_CONF_LIBREADLINE; m ["LIBS"] = OCTAVE_CONF_LIBS; m ["LN_S"] = OCTAVE_CONF_LN_S; m ["MKOCTFILE_INCFLAGS"] = OCTAVE_CONF_MKOCTFILE_INCFLAGS;