Mercurial > hg > octave-jordi
changeset 4104:fef735180134
[project @ 2002-10-15 20:28:20 by jwe]
author | jwe |
---|---|
date | Tue, 15 Oct 2002 20:28:21 +0000 |
parents | 677c5f3a15be |
children | 92f4552ea359 |
files | ChangeLog configure.in liboctave/ChangeLog liboctave/Makefile.in src/ChangeLog src/Makefile.in src/ov-mapper.cc test/ChangeLog test/Makefile.in |
diffstat | 9 files changed, 118 insertions(+), 97 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ +2002-10-15 Paul Kienzle <pkienzle@users.sf.net> + + * configure.in (library_path_var): New variable. + 2002-10-14 John W. Eaton <jwe@bevo.che.wisc.edu> * configure.in (SH_LDFLAGS): Additional options for Cygwin: - -Wl,--export-all-symbols -Wl,--enable-auto-import - -Wl,--allow-multiple-definition. + -Wl,--export-all-symbols -Wl,--enable-auto-import. * Makeconf.in (TERMLIBS): Substitute here.
--- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.377 $) +AC_REVISION($Revision: 1.378 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -641,6 +641,7 @@ INCLUDE_LINK_DEPS=false TEMPLATE_AR="$AR" TEMPLATE_ARFLAGS="$ARFLAGS" +library_path_var=LD_LIBRARY_PATH case "$canonical_host_type" in *-*-386bsd* | *-*-openbsd* | *-*-netbsd* | *-*-freebsd*) SH_LD=ld @@ -664,10 +665,11 @@ SHLEXT=dll SHLLIB=dll.a SHLBIN=dll - SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--allow-multiple-definition" + SH_LDFLAGS="-shared -Wl,--export-all-symbols -Wl,--enable-auto-import" SHLLINKEXT=.dll SONAME_FLAGS='-Wl,--out-implib=$@.a' INCLUDE_LINK_DEPS=true + library_path_var=PATH ;; *-*-linux* | *-*-gnu*) SONAME_FLAGS='-Xlinker -soname -Xlinker $@' @@ -757,6 +759,7 @@ 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_MSG_RESULT([defining library_path_var to be $library_path_var]) AC_SUBST(FPICFLAG) AC_SUBST(CPICFLAG) AC_SUBST(CXXPICFLAG) @@ -771,6 +774,7 @@ AC_SUBST(TEMPLATE_AR) AC_SUBST(TEMPLATE_ARFLAGS) AC_SUBST(INCLUDE_LINK_DEPS) +AC_SUBST(library_path_var) if $SHARED_LIBS; then LIBOCTINTERP=-loctinterp$SHLLINKEXT
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -6,7 +6,6 @@ * 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>
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -23,7 +23,7 @@ ifeq ($(INCLUDE_LINK_DEPS), true) LINK_DEPS = \ $(LIBOCTAVE_LFLAGS) \ - $(LIBCRUFT) $(BLAS_LIBS) $(FFTW_LIBS) $(LIBREADLINE) $(TERMLIBS) -lglob + $(LIBCRUFT) $(BLAS_LIBS) $(FFTW_LIBS) $(LIBREADLINE) -lglob endif MATRIX_INC := Array.h Array2.h Array3.h ArrayN.h DiagArray2.h Array-flags.h \
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2002-10-15 John W. Eaton <jwe@bevo.che.wisc.edu> + + * ov-mapper.cc (octave_mapper::apply): Handle real and complex + types first. If the arg is something else, try ch_map_fcn if it + is defined. + +2002-10-15 Paul Kienzle <pkienzle@users.sf.net> + + * Makefile.in: If building shared but not static libs, only set + XERBLA to the location of the pic object file if FPICFLAG is + defined. + 2002-10-14 John W. Eaton <jwe@bevo.che.wisc.edu> * DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/getrusage.cc, data.cc,
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -234,7 +234,9 @@ LIBRARIES = liboctinterp.$(LIBEXT) liboctinterp.$(SHLEXT_VER) else LIBRARIES = liboctinterp.$(SHLEXT_VER) - XERBLA = ../libcruft/blas-xtra/pic/xerbla.o + ifdef FPICFLAG + XERBLA = ../libcruft/blas-xtra/pic/xerbla.o + endif endif else ifeq ($(STATIC_LIBS), true)
--- a/src/ov-mapper.cc +++ b/src/ov-mapper.cc @@ -105,7 +105,89 @@ { octave_value retval; - if (ch_map_fcn) + if (arg.is_real_type ()) + { + if (arg.is_scalar_type ()) + { + double d = arg.double_value (); + + if (can_ret_cmplx_for_real && (d < lower_limit || d > upper_limit)) + { + if (c_c_map_fcn) + retval = c_c_map_fcn (Complex (d)); + else + error ("%s: unable to handle real arguments", + name().c_str ()); + } + else if (d_d_map_fcn) + retval = d_d_map_fcn (d); + else if (d_b_map_fcn) + retval = d_b_map_fcn (d); + else + error ("%s: unable to handle real arguments", + name().c_str ()); + } + else + { + Matrix m = arg.matrix_value (); + + if (error_state) + return retval; + + if (can_ret_cmplx_for_real + && (any_element_less_than (m, lower_limit) + || any_element_greater_than (m, upper_limit))) + { + if (c_c_map_fcn) + MAPPER_LOOP (ComplexMatrix, c_c_map_fcn, m); + else + error ("%s: unable to handle real arguments", + name().c_str ()); + } + else if (d_d_map_fcn) + MAPPER_LOOP (Matrix, d_d_map_fcn, m); + else if (d_b_map_fcn) + MAPPER_LOOP (boolMatrix, d_b_map_fcn, m); + else + error ("%s: unable to handle real arguments", + name().c_str ()); + } + } + else if (arg.is_complex_type ()) + { + if (arg.is_scalar_type ()) + { + Complex c = arg.complex_value (); + + if (d_c_map_fcn) + retval = d_c_map_fcn (c); + else if (c_c_map_fcn) + retval = c_c_map_fcn (c); + else if (c_b_map_fcn) + retval = c_b_map_fcn (c); + else + error ("%s: unable to handle complex arguments", + name().c_str ()); + } + else + { + ComplexMatrix cm = arg.complex_matrix_value (); + + if (error_state) + return retval; + + if (d_c_map_fcn) + MAPPER_LOOP (Matrix, d_c_map_fcn, cm); + else if (c_c_map_fcn) + MAPPER_LOOP (ComplexMatrix, c_c_map_fcn, cm); + else if (c_b_map_fcn) + MAPPER_LOOP (boolMatrix, c_b_map_fcn, cm); + else + error ("%s: unable to handle complex arguments", + name().c_str ()); + } + } + else if (ch_map_fcn) { // XXX FIXME XXX -- this could be done in a better way... @@ -140,92 +222,7 @@ } } else - { - if (arg.is_real_type ()) - { - if (arg.is_scalar_type ()) - { - double d = arg.double_value (); - - if (can_ret_cmplx_for_real && (d < lower_limit || d > upper_limit)) - { - if (c_c_map_fcn) - retval = c_c_map_fcn (Complex (d)); - else - error ("%s: unable to handle real arguments", - name().c_str ()); - } - else if (d_d_map_fcn) - retval = d_d_map_fcn (d); - else if (d_b_map_fcn) - retval = d_b_map_fcn (d); - else - error ("%s: unable to handle real arguments", - name().c_str ()); - } - else - { - Matrix m = arg.matrix_value (); - - if (error_state) - return retval; - - if (can_ret_cmplx_for_real - && (any_element_less_than (m, lower_limit) - || any_element_greater_than (m, upper_limit))) - { - if (c_c_map_fcn) - MAPPER_LOOP (ComplexMatrix, c_c_map_fcn, m); - else - error ("%s: unable to handle real arguments", - name().c_str ()); - } - else if (d_d_map_fcn) - MAPPER_LOOP (Matrix, d_d_map_fcn, m); - else if (d_b_map_fcn) - MAPPER_LOOP (boolMatrix, d_b_map_fcn, m); - else - error ("%s: unable to handle real arguments", - name().c_str ()); - } - } - else if (arg.is_complex_type ()) - { - if (arg.is_scalar_type ()) - { - Complex c = arg.complex_value (); - - if (d_c_map_fcn) - retval = d_c_map_fcn (c); - else if (c_c_map_fcn) - retval = c_c_map_fcn (c); - else if (c_b_map_fcn) - retval = c_b_map_fcn (c); - else - error ("%s: unable to handle complex arguments", - name().c_str ()); - } - else - { - ComplexMatrix cm = arg.complex_matrix_value (); - - if (error_state) - return retval; - - if (d_c_map_fcn) - MAPPER_LOOP (Matrix, d_c_map_fcn, cm); - else if (c_c_map_fcn) - MAPPER_LOOP (ComplexMatrix, c_c_map_fcn, cm); - else if (c_b_map_fcn) - MAPPER_LOOP (boolMatrix, c_b_map_fcn, cm); - else - error ("%s: unable to handle complex arguments", - name().c_str ()); - } - } - else - gripe_wrong_type_arg ("mapper", arg); - } + gripe_wrong_type_arg ("mapper", arg); return retval; }
--- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2002-10-15 Paul Kienzle <pkienzle@users.sf.net> + + * Makefile.in: Use @library_path_var@ instead of LD_LIBRARY_PATH. + 2002-09-27 Paul Kienzle <pkienzle@users.sf.net> * qr-7.m: Remove randomness from complex matrix generator.
--- a/test/Makefile.in +++ b/test/Makefile.in @@ -26,12 +26,12 @@ ifeq ($(SHARED_LIBS), true) OCTAVE_LD_LIBRARY_PATH = `pwd`/../src:`pwd`/../liboctave:`pwd`/../libcruft - ifeq ($(LD_LIBRARY_PATH),) + ifeq ($(@library_path_var@),) XLD_LIBRARY_PATH = $(OCTAVE_LD_LIBRARY_PATH) else - XLD_LIBRARY_PATH = $(OCTAVE_LD_LIBRARY_PATH):$(LD_LIBRARY_PATH) + XLD_LIBRARY_PATH = $(OCTAVE_LD_LIBRARY_PATH):$(@library_path_var@) endif - SET_LD_LIBRARY_PATH = LD_LIBRARY_PATH="$(XLD_LIBRARY_PATH)" + SET_LD_LIBRARY_PATH = @library_path_var@="$(XLD_LIBRARY_PATH)" endif # Complete directory trees to distribute.