# HG changeset patch # User jwe # Date 1035578175 0 # Node ID 919b2f6573ee927109d7f7a85584a33d4874b6e8 # Parent e07466fb2458c3a6a750e1197533dbbb243c92ce [project @ 2002-10-25 20:36:14 by jwe] diff -r e07466fb2458 -r 919b2f6573ee ChangeLog --- a/ChangeLog Fri Oct 25 20:13:31 2002 +0000 +++ b/ChangeLog Fri Oct 25 20:36:15 2002 +0000 @@ -1,5 +1,14 @@ 2002-10-25 John W. Eaton + * 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. diff -r e07466fb2458 -r 919b2f6573ee Makeconf.in --- a/Makeconf.in Fri Oct 25 20:13:31 2002 +0000 +++ b/Makeconf.in Fri Oct 25 20:36:15 2002 +0000 @@ -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}\";" \ diff -r e07466fb2458 -r 919b2f6573ee configure.in --- a/configure.in Fri Oct 25 20:13:31 2002 +0000 +++ b/configure.in Fri Oct 25 20:36:15 2002 +0000 @@ -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 ]) diff -r e07466fb2458 -r 919b2f6573ee examples/hello.cc --- a/examples/hello.cc Fri Oct 25 20:13:31 2002 +0000 +++ b/examples/hello.cc Fri Oct 25 20:36:15 2002 +0000 @@ -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 // diff -r e07466fb2458 -r 919b2f6573ee src/ChangeLog --- a/src/ChangeLog Fri Oct 25 20:13:31 2002 +0000 +++ b/src/ChangeLog Fri Oct 25 20:36:15 2002 +0000 @@ -1,3 +1,12 @@ +2002-10-25 John W. Eaton + + * 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 * cutils.c (octave_vsnprintf): Buffer and buffer size now static. diff -r e07466fb2458 -r 919b2f6573ee src/Makefile.in --- a/src/Makefile.in Fri Oct 25 20:13:31 2002 +0000 +++ b/src/Makefile.in Fri Oct 25 20:36:15 2002 +0000 @@ -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)) diff -r e07466fb2458 -r 919b2f6573ee src/fn-cache.cc --- a/src/fn-cache.cc Fri Oct 25 20:13:31 2002 +0000 +++ b/src/fn-cache.cc Fri Oct 25 20:36:15 2002 +0000 @@ -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 diff -r e07466fb2458 -r 919b2f6573ee src/mkbuiltins --- a/src/mkbuiltins Fri Oct 25 20:13:31 2002 +0000 +++ b/src/mkbuiltins Fri Oct 25 20:36:15 2002 +0000 @@ -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) \ diff -r e07466fb2458 -r 919b2f6573ee src/oct-conf.h.in --- a/src/oct-conf.h.in Fri Oct 25 20:13:31 2002 +0000 +++ b/src/oct-conf.h.in Fri Oct 25 20:36:15 2002 +0000 @@ -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 diff -r e07466fb2458 -r 919b2f6573ee src/toplev.cc --- a/src/toplev.cc Fri Oct 25 20:13:31 2002 +0000 +++ b/src/toplev.cc Fri Oct 25 20:36:15 2002 +0000 @@ -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;