Mercurial > hg > octave-terminal
changeset 1680:a3e4d62de24c
[project @ 1995-12-30 03:37:08 by jwe]
author | jwe |
---|---|
date | Sat, 30 Dec 1995 03:38:42 +0000 |
parents | 7dbdf23e1d18 |
children | c7c947c21e49 |
files | octMakefile.in readline/Makefile.in readline/configure.in |
diffstat | 3 files changed, 136 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/octMakefile.in +++ b/octMakefile.in @@ -30,9 +30,9 @@ DISTDIRS = emacs kpathsea make plplot # Subdirectories in which to run `make all'. -SUBDIRS = @DLD_DIR@ @INFO_DIR@ @PLPLOT_DIR@ @READLINE_DIR@ kpathsea \ - libcruft liboctave src scripts doc - +SUBDIRS = @INFO_DIR@ @PLPLOT_DIR@ @READLINE_DIR@ kpathsea \ + libcruft liboctave src scripts doc + # Subdirectories in which to run `make dist'. DISTSUBDIRS = libcruft liboctave info readline src scripts dld test doc @@ -108,7 +108,7 @@ maintainer-clean distclean:: rm -f octMakefile octave-bug Makefile Makeconf config.cache \ - config.h config.log config.status + config.h config.log config.status Makerules.f77 # Now that things are under RCS control, we need to do the recursive # chmod so that the distributed files end up with reasonable modes.
--- a/readline/Makefile.in +++ b/readline/Makefile.in @@ -14,6 +14,15 @@ CC = @CC@ CFLAGS = @CFLAGS@ +CPICFLAG = @CPICFLAG@ + +SHLEXT = @SHLEXT@ + +SHARED_LIBS = @SHARED_LIBS@ + +LIBS_TO_INSTALL = libreadline.a libhistory.a \ + libreadline.$(SHLEXT) libhistory.$(SHLEXT) + RANLIB = @RANLIB@ AR = ar RM = rm @@ -30,8 +39,42 @@ # Here is a rule for making .o files from .c files that doesn't force # the type of the machine (like -sun3) into the flags. .c.o: + [ -z "$(CPICFLAG)" ] ||\ + $(CC) -c $(CPPFLAGS) $(CPICFLAG) $(ALL_CFLAGS) $< -o pic/$@ $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< +# ==================== Where To Install Things ==================== + +# The default location for installation. Everything is placed in +# subdirectories of this directory. The default values for many of +# the variables below are expressed in terms of this one, so you may +# not need to change them. This defaults to /usr/local. +prefix = @prefix@ + +# Like `prefix', but used for architecture-specific files. +exec_prefix = @exec_prefix@ + +# Where to install binaries that people will want to run directly. +bindir = @bindir@ + +# Where to install architecture-independent data files. +datadir = @datadir@ + +# Where to install the libraries. +libdir = @libdir@ + +# Where to install readline's include files. The default is +# ${prefix}/include/readline +includedir = @includedir@ + +# Where to install readline's man pages, and what extension they should +# have. The default is ${prefix}/man/man1 +mandir = @mandir@ +manext = 1 + +# Where to install and expect the info files describing readline +infodir = @infodir@ + # The name of the main library target. LIBRARY_NAME = libreadline.a @@ -41,13 +84,25 @@ search.c signals.c tilde.c vi_keymap.c vi_mode.c xmalloc.c # The header files for this library. -HSOURCES = ansi_stdlib.h chardefs.h config.h history.h keymaps.h \ +HSOURCES := ansi_stdlib.h chardefs.h config.h history.h keymaps.h \ memalloc.h posixstat.h readline.h rlconf.h rldefs.h tilde.h -OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ +OBJECTS := readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ rltty.o complete.o bind.o isearch.o display.o signals.o \ history.o tilde.o xmalloc.o +HIST_OBJ := history.o + +ifeq ($(SHARED_LIBS), true) + ifdef CPICFLAG + PICOBJ := $(addprefix pic/, $(OBJECTS)) + HIST_PICOBJ := $(addprefix pic/, $(HIST_OBJ)) + else + PICOBJ := $(OBJECTS) + HIST_PICOBJ := $(HIST_OBJ) + endif +endif + DISTFILES = $(CSOURCES) $(HSOURCES) Makefile.in configure.in \ configure README STANDALONE COPYING config.h.in @@ -67,7 +122,13 @@ ########################################################################## -all: libreadline.a libhistory.a +all: stamp-picdir libreadline.a libhistory.a stamp-readline stamp-history + +stamp-picdir: + if [ -n "$(CPICFLAG)" ]; then \ + if [ -d pic ]; then true; else mkdir pic ; fi ; \ + else true; fi + touch stamp-picdir libreadline.a: $(OBJECTS) $(RM) -f $@ @@ -79,6 +140,18 @@ $(AR) cq $@ history.o -[ -n "$(RANLIB)" ] && $(RANLIB) $@ +stamp-readline: + if $(SHARED_LIBS); then \ + $(CC) -shared -o libreadine.$(SHLEXT) $(PICOBJ) -ltermcap; \ + fi + touch stamp-readline + +stamp-history: + if $(SHARED_LIBS); then \ + $(CC) -shared -o libhistory.$(SHLEXT) $(HIST_PICOBJ); \ + fi + touch stamp-history + documentation: force [ ! -d doc ] && mkdir doc (if [ -d doc ]; then cd doc; $(MAKE) $(MFLAGS); fi) @@ -88,6 +161,10 @@ # For Octave: install: + for f in $(LIBS_TO_INSTALL); do \ + if [ -f $$f ]; then $(INSTALL_DATA) $$f $(libdir)/$$f; fi; \ + done + uninstall: # The rule for 'includes' is written funny so that the if statement
--- a/readline/configure.in +++ b/readline/configure.in @@ -1,6 +1,58 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(readline.c) +AC_CANONICAL_HOST +if test -z "$host"; then + host=unknown +fi +target_host_type=$host +canonical_host_type=$host + + +### some defaults + +AC_PREFIX_DEFAULT(/usr/local) + +exec_prefix='$(prefix)' +bindir='$(exec_prefix)/bin' +datadir='$(prefix)/lib' +libdir='$(exec_prefix)/lib' +includedir='$(prefix)/include/octave' +mandir='$(prefix)/man/man1' +infodir='$(prefix)/info' + +### Enable creation of shared libraries. Currently only works with +### gcc on some systems. + +AC_ARG_ENABLE(shared, + [ --shared create shared libraries (not all systems)], + [if test $enableval = no; then SHARED_LIBS=false; else SHARED_LIBS=true; fi], + SHARED_LIBS=false) +AC_SUBST(SHARED_LIBS) + +if $SHARED_LIBS; then + CPICFLAG=-fPIC + SHLEXT=so + case "$canonical_host_type" in + alpha-dec-osf*) + CPICFLAG= + ;; + rs6000-ibm-aix*) + CPICFLAG= + ;; + hppa*-hp-hpux*) + SHLEXT=sl + ;; + esac +else + CPICFLAG= + SHLEXT= +fi +AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG]) +AC_MSG_RESULT([defining SHLEXT to be $SHLEXT]) +AC_SUBST(CPICFLAG) +AC_SUBST(SHLEXT) + AC_CONFIG_HEADER(config.h) AC_PROG_CC