Mercurial > hg > octave-avbm
changeset 4128:919b2f6573ee
[project @ 2002-10-25 20:36:14 by jwe]
author | jwe |
---|---|
date | Fri, 25 Oct 2002 20:36:15 +0000 |
parents | e07466fb2458 |
children | d38de1db3667 |
files | ChangeLog Makeconf.in configure.in examples/hello.cc src/ChangeLog src/Makefile.in src/fn-cache.cc src/mkbuiltins src/oct-conf.h.in src/toplev.cc |
diffstat | 10 files changed, 46 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2002-10-25 John W. Eaton <jwe@bevo.che.wisc.edu> + * configure.in (ENABLE_DYNAMIC_LINKING): Rename from + WITH_DYNAMIC_LINKING. + * Makeconf.in: Likewise. + * toplev.cc + * examples/hello.cc: Likewise. Improve comments. + + * configure.in: Revive --enable-dl to set default value for + WITH_DYNAMIC_LINKING. + * configure.in: Also set SHLEXT_VER, SHLLIB_VER, SHLBIN_VER. * Makeconf.in: Substitute them here. Also substitute SHLLINKEXT.
--- a/Makeconf.in +++ b/Makeconf.in @@ -54,7 +54,7 @@ HAVE_SHL_LOAD_API = @HAVE_SHL_LOAD_API@ HAVE_LOADLIBRARY_API = @HAVE_LOADLIBRARY_API@ -WITH_DYNAMIC_LINKING = @WITH_DYNAMIC_LINKING@ +ENABLE_DYNAMIC_LINKING = @ENABLE_DYNAMIC_LINKING@ STATIC_LIBS = @STATIC_LIBS@ @@ -430,7 +430,7 @@ -e "s;%OCTAVE_CONF_STATIC_LIBS%;\"${STATIC_LIBS}\";" \ -e "s;%OCTAVE_CONF_UGLY_DEFS%;\"${UGLY_DEFS}\";" \ -e "s;%OCTAVE_CONF_VERSION%;\"${version}\";" \ - -e "s;%OCTAVE_CONF_WITH_DYNAMIC_LINKING%;\"${WITH_DYNAMIC_LINKING}\";" \ + -e "s;%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%;\"${ENABLE_DYNAMIC_LINKING}\";" \ -e "s;%OCTAVE_CONF_XTRA_CFLAGS%;\"${XTRA_CFLAGS}\";" \ -e "s;%OCTAVE_CONF_XTRA_CXXFLAGS%;\"${XTRA_CXXFLAGS}\";" \ -e "s;%OCTAVE_CONF_YACC%;\"${YACC}\";" \
--- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.382 $) +AC_REVISION($Revision: 1.383 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -596,6 +596,17 @@ SHARED_LIBS=false) AC_SUBST(SHARED_LIBS) +### Enable dynamic linking. --enable-shared implies this, so +### --enable-dl is only need if you are only building static libraries +### and want to try dynamic linking too (works on some systems, for +### example, OS X and Windows). + +AC_ARG_ENABLE(dl, + [ --enable-dl create shared libraries (not all systems)], + [if test "$enableval" = no; then ENABLE_DYNAMIC_LINKING=false; + else ENABLE_DYNAMIC_LINKING=true; fi], + ENABLE_DYNAMIC_LINKING=false) + if $STATIC_LIBS || $SHARED_LIBS; then true else @@ -897,7 +908,6 @@ LIBDLFCN= DLFCN_INCFLAGS= RDYNAMIC_FLAG= -WITH_DYNAMIC_LINKING=false DL_API_MSG="" dlopen_api=false shl_load_api=false @@ -953,8 +963,8 @@ fi if $dlopen_api || $shl_load_api || $loadlibrary_api; then - WITH_DYNAMIC_LINKING=true - AC_DEFINE(WITH_DYNAMIC_LINKING, 1, [Define if using dynamic linking]) + ENABLE_DYNAMIC_LINKING=true + AC_DEFINE(ENABLE_DYNAMIC_LINKING, 1, [Define if using dynamic linking]) fi else LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' @@ -965,7 +975,7 @@ AC_SUBST(LIBDLFCN) AC_SUBST(DLFCN_INCFLAGS) AC_SUBST(RDYNAMIC_FLAG) -AC_SUBST(WITH_DYNAMIC_LINKING) +AC_SUBST(ENABLE_DYNAMIC_LINKING) AC_SUBST(LIBOCTINTERP) AC_SUBST(LIBOCTAVE) AC_SUBST(LIBCRUFT) @@ -1351,7 +1361,7 @@ Do internal array bounds checking: $BOUNDS_CHECKING Build static libraries: $STATIC_LIBS Build shared libraries: $SHARED_LIBS - Dynamic Linking: $WITH_DYNAMIC_LINKING $DL_API_MSG + Dynamic Linking: $ENABLE_DYNAMIC_LINKING $DL_API_MSG Include support for GNU readline: $USE_READLINE ])
--- a/examples/hello.cc +++ b/examples/hello.cc @@ -3,10 +3,10 @@ // To use this file, your version of Octave must support dynamic // linking. To find out if it does, type the command // -// x = octave_config_info; x.DEFS +// octave_config_info ("ENABLE_DYNAMIC_LINKING") // // at the Octave prompt. Support for dynamic linking is included if -// the output contains the string -DWITH_DYNAMIC_LINKING=1. +// this expression returns the string "true". // // To compile this file, type the command //
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2002-10-25 John W. Eaton <jwe@bevo.che.wisc.edu> + + * toplev.cc (octave_config_info): Rename WITH_DYNAMIC_LINKING to + ENABLE_DYNAMIC_LINKING. + * oct-conf.h.in: Likewise. + * mkbuiltins: Likewise. + * fn-cache.cc (file_name_cache_elt::update): Likewise. + * Makefile.in: Likewise. + 2002-10-24 John W. Eaton <jwe@bevo.che.wisc.edu> * cutils.c (octave_vsnprintf): Buffer and buffer size now static.
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -29,7 +29,7 @@ # How to make a .oct file from a .o file: -ifeq ($(WITH_DYNAMIC_LINKING), true) +ifeq ($(ENABLE_DYNAMIC_LINKING), true) ifdef CXXPICFLAG %.oct : pic/%.o $(SH_LD) $(SH_LDFLAGS) -o $@ $< $(OCT_LINK_DEPS) @@ -55,7 +55,7 @@ DLD_OBJ := $(patsubst %.cc, %.o, $(DLD_XSRC)) -ifeq ($(WITH_DYNAMIC_LINKING), true) +ifeq ($(ENABLE_DYNAMIC_LINKING), true) OCT_FILES := $(patsubst %.o, %.oct, $(DLD_OBJ)) ifdef CXXPICFLAG DLD_PICOBJ := $(addprefix pic/, $(DLD_OBJ))
--- a/src/fn-cache.cc +++ b/src/fn-cache.cc @@ -204,7 +204,7 @@ int len = entry.length (); -#if defined (WITH_DYNAMIC_LINKING) +#if defined (ENABLE_DYNAMIC_LINKING) if ((len > 2 && entry[len-2] == '.' && entry[len-1] == 'm') || (len > 4
--- a/src/mkbuiltins +++ b/src/mkbuiltins @@ -33,7 +33,7 @@ #undef quad #endif -#if defined (WITH_DYNAMIC_LINKING) +#if defined (ENABLE_DYNAMIC_LINKING) #define XDEFUN_DLD_INTERNAL(name, args_name, nargout_name, is_text_fcn, doc) #else #define XDEFUN_DLD_INTERNAL(name, args_name, nargout_name, is_text_fcn, doc) \
--- a/src/oct-conf.h.in +++ b/src/oct-conf.h.in @@ -292,8 +292,8 @@ #define OCTAVE_CONF_UGLY_DEFS %OCTAVE_CONF_UGLY_DEFS% #endif -#ifndef OCTAVE_CONF_WITH_DYNAMIC_LINKING -#define OCTAVE_CONF_WITH_DYNAMIC_LINKING %OCTAVE_CONF_WITH_DYNAMIC_LINKING% +#ifndef OCTAVE_CONF_ENABLE_DYNAMIC_LINKING +#define OCTAVE_CONF_ENABLE_DYNAMIC_LINKING %OCTAVE_CONF_ENABLE_DYNAMIC_LINKING% #endif #ifndef OCTAVE_CONF_XTRA_CFLAGS
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -642,7 +642,7 @@ { octave_value retval; -#if defined (WITH_DYNAMIC_LINKING) +#if defined (ENABLE_DYNAMIC_LINKING) bool octave_supports_dynamic_linking = true; #else bool octave_supports_dynamic_linking = false; @@ -717,7 +717,7 @@ m ["STATIC_LIBS"] = OCTAVE_CONF_STATIC_LIBS; m ["UGLY_DEFS"] = OCTAVE_CONF_DEFS; m ["UGLY_DEFS"] = OCTAVE_CONF_UGLY_DEFS; - m ["WITH_DYNAMIC_LINKING"] = OCTAVE_CONF_WITH_DYNAMIC_LINKING; + m ["ENABLE_DYNAMIC_LINKING"] = OCTAVE_CONF_ENABLE_DYNAMIC_LINKING; m ["XTRA_CFLAGS"] = OCTAVE_CONF_XTRA_CFLAGS; m ["XTRA_CXXFLAGS"] = OCTAVE_CONF_XTRA_CXXFLAGS; m ["YACC"] = OCTAVE_CONF_YACC;