Mercurial > hg > octave-max
changeset 3034:ad0e94b6784c
[project @ 1997-06-05 21:25:53 by jwe]
author | jwe |
---|---|
date | Thu, 05 Jun 1997 21:29:47 +0000 |
parents | 968e85a82e25 |
children | 882b6ea36be6 |
files | ChangeLog Makeconf.in configure.in kpathsea/ChangeLog kpathsea/acklibtool.m4 libcruft/ChangeLog libcruft/Makefile.in libcruft/Makerules.in liboctave/ChangeLog liboctave/Makefile.in src/ChangeLog src/Makefile.in |
diffstat | 12 files changed, 94 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Thu Jun 5 01:38:04 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + * Makeconf.in (STATIC_LIBS): New variable. + * configure.in: Handle --enable-static. + * Makeconf.in (LIBEXT, SHLEXT_VER): New macros. (octlibdir, mk-libdir-link): Delete.
--- a/Makeconf.in +++ b/Makeconf.in @@ -48,6 +48,8 @@ OCTAVE_LITE = @OCTAVE_LITE@ +STATIC_LIBS = @STATIC_LIBS@ + SHARED_LIBS = @SHARED_LIBS@ SHLEXT = @SHLEXT@ SHLEXT_VER = $(SHLEXT).$(version)
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.273 $) +AC_REVISION($Revision: 1.274 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -537,6 +537,15 @@ else WITH_SHL=maybe; fi], WITH_SHL=maybe) +### Enable creation of static libraries. + +AC_ARG_ENABLE(static, + [ --enable-static create static libraries], + [if test "$enableval" = no; then STATIC_LIBS=false; + else STATIC_LIBS=true; fi], + STATIC_LIBS=true) +AC_SUBST(STATIC_LIBS) + ### Enable creation of shared libraries. Currently only works with ### gcc on some systems. @@ -547,6 +556,12 @@ SHARED_LIBS=false) AC_SUBST(SHARED_LIBS) +if $STATIC_LIBS || $SHARED_LIBS; then + true +else + AC_MSG_ERROR([You can't disable building static AND shared libraries!]) +fi + use_rpath=true AC_ARG_ENABLE(rpath, [ --enable-rpath add -rpath to link command for shared libraries], @@ -1226,8 +1241,11 @@ gnuplot: $GNUPLOT_BINARY Do internal array bounds checking: $BOUNDS_CHECKING + Build static libraries: $STATIC_LIBS Build shared libraries: $SHARED_LIBS Minimal kernel option: $OCTAVE_LITE Dynamic Linking (dlopen/dlsym): $WITH_DL Dynamic Linking (shl_load/shl_findsym): $WITH_SHL + Include support for GNU readline: $USE_READLINE + Include support for the GNU Info reader: $USE_GNU_INFO ])
--- a/kpathsea/ChangeLog +++ b/kpathsea/ChangeLog @@ -1,3 +1,8 @@ +Thu Jun 5 12:38:35 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * acklibtool.m4: For use with Octave, ignore --enable-static and + --enable-shared and only build static libraries. + Wed Jun 4 12:14:38 1997 John W. Eaton <jwe@bevo.che.wisc.edu> * progname.c (selfdir): Handle dir/exename case here.
--- a/kpathsea/acklibtool.m4 +++ b/kpathsea/acklibtool.m4 @@ -1,5 +1,5 @@ dnl Autoconf support for Klibtool. -dnl $Id: acklibtool.m4,v 1.1 1997-05-23 03:09:14 jwe Exp $ +dnl $Id: acklibtool.m4,v 1.2 1997-06-05 21:27:07 jwe Exp $ dnl dnl dnl Find the script, check for subprogs, etc. @@ -20,14 +20,18 @@ exit 1 fi # +## For use with Octave, ignore these options and only build static libraries. +## ## Argument parsing: we support --enable-shared and --enable-static. -AC_ARG_ENABLE(shared, -[ --enable-shared build shared libraries [default=no]],, - enable_shared=no) -# -AC_ARG_ENABLE(static, -[ --enable-static build shared libraries [default=yes]],, - enable_static=yes) +##AC_ARG_ENABLE(shared, +##[ --enable-shared build shared libraries [default=no]],, +## enable_shared=no) +### +##AC_ARG_ENABLE(static, +##[ --enable-static build shared libraries [default=yes]],, +## enable_static=yes) +enable_shared=no +enable_static=yes # # If they explicitly --enable-static, make that the link type. # More commonly, they will just --enable-shared; make that the link type.
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,5 +1,7 @@ Thu Jun 5 01:40:36 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + * Makefile.in, Makerules.in: Make building of static library optional. + * Makerules.in (stamp-picdir): Delete. (pic): New target. Don't worry so much about creating pic directory only when it is really needed.
--- a/libcruft/Makefile.in +++ b/libcruft/Makefile.in @@ -80,7 +80,7 @@ $(LN_S) libcruft.$(SHLEXT_VER) libcruft.$(SHLEXT) libcruft.$(SHLEXT_VER): $(CRUFT_PICOBJ) - $(SH_LD) $(SH_LDFLAGS) -o libcruft.$(SHLEXT_VER) $(CRUFT_PICOBJ) + $(SH_LD) $(SH_LDFLAGS) -o $@ $(CRUFT_PICOBJ) $(CRUFT_OBJ): @@ -92,9 +92,11 @@ install:: $(top_srcdir)/mkinstalldirs $(libdir) - rm -f $(libdir)/libcruft.$(LIBEXT) - $(INSTALL_DATA) libcruft.$(LIBEXT) $(libdir)/libcruft.$(LIBEXT) - $(RANLIB) $(libdir)/libcruft.a + if $(STATIC_LIBS); then \ + rm -f $(libdir)/libcruft.$(LIBEXT) ; \ + $(INSTALL_DATA) libcruft.$(LIBEXT) $(libdir)/libcruft.$(LIBEXT) ; \ + $(RANLIB) $(libdir)/libcruft.$(LIBEXT) ; \ + fi if $(SHARED_LIBS); then \ rm -f $(libdir)/libcruft.$(SHLEXT_VER); \ $(INSTALL_PROGRAM) \
--- a/libcruft/Makerules.in +++ b/libcruft/Makerules.in @@ -27,13 +27,17 @@ CWD = $(shell pwd) THISDIR = $(notdir $(CWD)) -LIBCRUFT = ../libcruft.a +LIBCRUFT := ../libcruft.$(LIBEXT) + +ifeq ($(STATIC_LIBS), true) + LIBCRUFT_DEPEND := $(LIBCRUFT) +endif LIBCRUFT_OBJS = $(CRUFT_OBJ) $(SPECIAL_DEPEND) LIBCRUFT_DEPS = $(LIBCRUFT)($(LIBCRUFT_OBJS)) -all: pic $(LIBCRUFT) $(CRUFT_PICOBJ) $(SPECIAL_PICDEPEND) +all: pic $(LIBCRUFT_DEPEND) $(CRUFT_PICOBJ) $(SPECIAL_PICDEPEND) .PHONY: all # Cancel the default action for when an archive member is out of
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,7 @@ Thu Jun 5 01:44:43 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + * Makefile.in: Make building of static library optional. + * Makefile.in (stamp-picdir): Delete. (pic): New target. Don't worry so much about creating pic directory only when it is really needed.
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -117,7 +117,7 @@ LIBOCTAVE_DEPEND := $(patsubst %, liboctave.$(LIBEXT)(%), $(OBJECTS)) -all: libraries +all: stamp-prereq libraries .PHONY: all stamp-prereq: pic safe-stat.h safe-lstat.h @@ -132,13 +132,21 @@ fi ifeq ($(SHARED_LIBS), true) -libraries: liboctave.$(LIBEXT) liboctave.$(SHLEXT) + ifeq ($(STATIC_LIBS), true) + libraries: liboctave.$(LIBEXT) liboctave.$(SHLEXT) + else + libraries: liboctave.$(SHLEXT) + endif else -libraries: liboctave.$(LIBEXT) + ifeq ($(STATIC_LIBS), true) + libraries: liboctave.$(LIBEXT) + else + libraries: + endif endif .PHONY: libraries -liboctave.$(LIBEXT): stamp-prereq $(OBJECTS) +liboctave.$(LIBEXT): $(OBJECTS) $(AR) $(ARFLAGS) liboctave.$(LIBEXT) $(OBJECTS) $(RANLIB) liboctave.$(LIBEXT) @@ -147,7 +155,7 @@ $(LN_S) liboctave.$(SHLEXT_VER) liboctave.$(SHLEXT) liboctave.$(SHLEXT_VER): stamp-prereq $(PICOBJ) - $(SH_LD) $(SH_LDFLAGS) -o liboctave.$(SHLEXT_VER) $(PICOBJ) + $(SH_LD) $(SH_LDFLAGS) -o $@ $(PICOBJ) extract_stat = sed 's/@l@//g; s/@L@//g; /@LSTAT_ONLY@/d' extract_lstat = sed 's/@l@/l/g; s/@L@/L/g; s/ *@LSTAT_ONLY@//' @@ -187,9 +195,11 @@ install-lib: $(top_srcdir)/mkinstalldirs $(libdir) - rm -f $(libdir)/liboctave.$(LIBEXT) - $(INSTALL_DATA) liboctave.$(LIBEXT) $(libdir)/liboctave.$(LIBEXT) - $(RANLIB) $(libdir)/liboctave.$(LIBEXT) + if $(STATIC_LIBS); then \ + rm -f $(libdir)/liboctave.$(LIBEXT); \ + $(INSTALL_DATA) liboctave.$(LIBEXT) $(libdir)/liboctave.$(LIBEXT); \ + $(RANLIB) $(libdir)/liboctave.$(LIBEXT); \ + fi if $(SHARED_LIBS); then \ rm -f $(libdir)/liboctave.$(SHLEXT_VER); \ $(INSTALL_PROGRAM) \
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ Thu Jun 5 01:42:39 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + * Makefile.in: Make building of static library optional. + * dynamic-ld.cc (octave_shl_load_dynamic_loader::resolve_reference): Call shl_findsym with type set to TYPE_UNDEFINED.
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -215,9 +215,17 @@ fi ifeq ($(SHARED_LIBS), true) -libraries: liboctinterp.$(LIBEXT) liboctinterp.$(SHLEXT) + ifeq ($(STATIC_LIBS), true) + libraries: liboctinterp.$(LIBEXT) liboctinterp.$(SHLEXT) + else + libraries: liboctinterp.$(SHLEXT) + endif else -libraries: liboctinterp.$(LIBEXT) + ifeq ($(STATIC_LIBS), true) + libraries: liboctinterp.$(LIBEXT) + else + libraries: + endif endif .PHONY: libraries @@ -230,7 +238,7 @@ $(LN_S) liboctinterp.$(SHLEXT_VER) liboctinterp.$(SHLEXT) liboctinterp.$(SHLEXT_VER): stamp-prereq $(PICOBJ) - $(SH_LD) $(SH_LDFLAGS) -o liboctinterp.$(SHLEXT_VER) $(PICOBJ) + $(SH_LD) $(SH_LDFLAGS) -o $@ $(PICOBJ) builtins.cc: $(DEF_FILES) mkbuiltins @echo making $@ @@ -283,9 +291,12 @@ install-lib: $(top_srcdir)/mkinstalldirs $(libdir) - rm -f $(libdir)/liboctinterp.$(LIBEXT) - $(INSTALL_DATA) liboctinterp.$(LIBEXT) \ - $(libdir)/liboctinterp.$(LIBEXT) + if $(STATIC_LIBS); then \ + rm -f $(libdir)/liboctinterp.$(LIBEXT); \ + $(INSTALL_DATA) liboctinterp.$(LIBEXT) \ + $(libdir)/liboctinterp.$(LIBEXT); \ + $(RANLIB) $(libdir)/liboctinterp.$(LIBEXT); \ + fi if $(SHARED_LIBS); then \ rm -f $(libdir)/liboctinterp.$(SHLEXT_VER); \ $(INSTALL_PROGRAM) \