diff --git a/Makefile b/Makefile index a3aaf4b2a..14ffcf341 100644 --- a/Makefile +++ b/Makefile @@ -30,39 +30,39 @@ SHELL = /bin/sh MAKE = make # BSD doesn't have it as a default. -MACHINE = freebsd +MACHINE = @MACHINE@ # ========================= Last release ================================ -VERSION=0.2 +VERSION=0.3 WWW=http://ecls.sourceforge.net/ # ==================== Things `configure' Might Edit ==================== -CC=gcc -CPP=gcc -E +CC=/compat/linux/usr/bin/gcc +CPP=/compat/linux/usr/bin/gcc -E LN_S=ln -s -CFLAGS=-g -O2 +CFLAGS=-I/compat/linux/usr/i386-redhat-linux/include -I/compat/linux/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include -I/compat/linux/usr/include # Where to find the source code. # This is set by the configure script's `--srcdir' option. -srcdir=/home/worm/src/ecls/src +srcdir=/home/jjgarcia/src/eklos/src/.. -bindir=/home/worm/bin -infodir=/home/worm/info -mandir=/home/worm/man/man1 -libdir=/home/worm/lib/ecls +bindir=/home/jjgarcia/bin +infodir=/home/jjgarcia/info +mandir=/home/jjgarcia/man/man1 +libdir=/home/jjgarcia/lib/ecls # What to release -TAR_CONTENTS=Makefile.in Copy* README.1st README.orig doc \ - configure site.lsp src/c src/cmp src/crs src/clos src/lsp src/doc \ +TAR_CONTENTS=Makefile.in README.1st LGPL ANNOUNCEMENT doc \ + configure site.lsp src/c src/cmp src/clos src/lsp src/doc \ src/h src/etc src/gmp src/config* src/install.sh src/Makefile.in \ - src/util contrib/ src/clx src/tk src/gc src/*.in src/gabriel + src/util contrib/ src/clx src/tk src/gc src/*.in src/*.m4 src/gabriel # ==================== Utility Programs for the Build ==================== # Allow the user to specify the install program. -INSTALL = /usr/bin/install -c +INSTALL = /compat/linux/usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 diff --git a/site.lsp b/site.lsp deleted file mode 100644 index 4d142a289..000000000 --- a/site.lsp +++ /dev/null @@ -1,4 +0,0 @@ -;; Edit these with the name of your site: -;; -(defun short-site-name () "SHORT-SITE-NAME") -(defun long-site-name () "LONG-SITE-NAME") diff --git a/src/Makefile.in b/src/Makefile.in index 423f3ee1b..2b4585d3f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -5,26 +5,14 @@ top_srcdir= @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ -MACHINE = @MACHINE@ - # Programs used by "make": # CC = @CC@ -DEFS = -D$(MACHINE) +DEFS = -D@host@ LIBS = @LIBS@ @TKLIBS@ @CLIBS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ - -#ifdef __GO32__ -EXE = go32 -#elif defined(__EMX__) -EXE = emx -#else -EXE = -#endif - -SHELL = /bin/sh RM = @RM@ # ==================== Where To Install Things ==================== @@ -47,32 +35,10 @@ INSTALL_DATA = @INSTALL_DATA@ # Files -SUBDIR = c -LIBRARIES = libecls.a -TARGETS = ecls -#ifndef HAVE_LOCAL_GMP -SUBDIR += gmp -LIBRARIES += libgmp.a -#endif -#ifdef GBC_BOEHM -SUBDIR += gc -LIBRARIES += libgc.a -#endif GBC_BOEHM -LSP_LIBRARIES = liblsp.a -#ifdef CLOS -LSP_LIBRARIES += libclos.a -#endif -#ifndef RUNTIME -LSP_LIBRARIES += libcmp.a -#endif -#ifdef CLX -TARGETS += eclx -LSP_LIBRARIES += libclx.a -#endif - -# The makefiles of the directories in $SUBDIR. -# Don't split this line: configure does grep on it -SUBDIR_MAKEFILES= c/Makefile tk/Makefile doc/Makefile gc/Makefile +SUBDIR = @SUBDIR@ +LIBRARIES = @LIBRARIES@ +LSP_LIBRARIES = @LSP_LIBRARIES@ +TARGETS = @TARGETS@ all: $(TARGETS) doc .PHONY: all @@ -93,11 +59,12 @@ ecls_min: $(LIBRARIES) .gdbinit cp $(srcdir)/util/gdbinit $@ libecls.a: + (echo $(SUBDIR) | grep gmp) && cp $(top_srcdir)/gmp/*.h h/ cd c; $(MAKE) libgc.a: cd gc; $(MAKE) libgmp.a: - cd gmp; $(MAKE); cp .libs/libgmp.a .. + cd gmp; $(MAKE); mv .libs/libgmp.a .. BUILD-STAMP: config.status (echo "#"; uname -a) > $@ @@ -109,18 +76,18 @@ install: BUILD-STAMP test -d $(PREFIX)$(libdir)/h || (mkdir $(PREFIX)$(libdir)/h; chmod 755 $(PREFIX)$(libdir)/h) $(INSTALL_DATA) BUILD-STAMP $(PREFIX)$(libdir) $(INSTALL_DATA) h/config.h $(PREFIX)$(libdir)/h -#ifndef HAVE_LOCAL_GMP - $(INSTALL_DATA) gmp/?*.h $(PREFIX)$(libdir)/h - $(INSTALL_DATA) $(srcdir)/gmp/?*.h $(PREFIX)$(libdir)/h -#endif + if ( echo $(SUBDIR) | grep gmp ); then \ + $(INSTALL_DATA) gmp/?*.h $(PREFIX)$(libdir)/h; \ + $(INSTALL_DATA) $(srcdir)/gmp/?*.h $(PREFIX)$(libdir)/h; \ + fi for i in $(LSP_LIBRARIES) $(LIBRARIES); do \ $(INSTALL_DATA) $$i $(PREFIX)$(libdir); \ done -#ifdef GBC_BOEHM - for i in $(srcdir)/gc/include/?*.h; do $(INSTALL_DATA) $$i $(PREFIX)$(libdir)/h/`basename $$i`; done - test -d $(PREFIX)$(libdir)/h/private || (mkdir $(PREFIX)$(libdir)/h/private; chmod 755 $(PREFIX)$(libdir)/h/private) - for i in $(srcdir)/gc/include/private/?*.h; do $(INSTALL_DATA) $$i $(PREFIX)$(libdir)/h/private/`basename $$i`; done -#endif GBC_BOEHM + if ( echo $(SUBDIR) | grep gmp ); then \ + for i in $(srcdir)/gc/include/?*.h; do $(INSTALL_DATA) $$i $(PREFIX)$(libdir)/h/`basename $$i`; done; \ + test -d $(PREFIX)$(libdir)/h/private || (mkdir $(PREFIX)$(libdir)/h/private; chmod 755 $(PREFIX)$(libdir)/h/private); \ + for i in $(srcdir)/gc/include/private/?*.h; do $(INSTALL_DATA) $$i $(PREFIX)$(libdir)/h/private/`basename $$i`; done; \ + fi cd c; $(MAKE) PREFIX="$(PREFIX)" install cd doc; $(MAKE) PREFIX="$(PREFIX)" install diff --git a/src/bare.lsp.in b/src/bare.lsp.in index 31dba6187..6d4988f50 100644 --- a/src/bare.lsp.in +++ b/src/bare.lsp.in @@ -10,13 +10,13 @@ ;;; (load "lsp/load.lsp") -#ifdef CLOS ;;; ;;; * Load PCL-based Common-Lisp Object System ;;; +#+WANTS-CLOS +(progn (setf sys::*gc-verbose* nil) -(load "clos/load.lsp") -#endif +(load "clos/load.lsp")) ;;; ;;; * Load the compiler. diff --git a/src/c/Makefile.in b/src/c/Makefile.in index d6f0faa8b..7f7123566 100644 --- a/src/c/Makefile.in +++ b/src/c/Makefile.in @@ -5,25 +5,15 @@ top_srcdir= @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ -MACHINE = @MACHINE@ - # Programs used by "make": # CC = @CC@ -DEFS = -D$(MACHINE) +DEFS = -D@host@ CFLAGS = -c -I../h -I$(HDIR) -I$(top_srcdir)/gc @CFLAGS@ $(DEFS) -#ifndef HAVE_LOCAL_GMP -CFLAGS += -I$(top_srcdir)/gmp -#endif SHELL = /bin/sh RM = @RM@ - -#ifdef MSDOS -DPP = dpp.exe -#else DPP = ./dpp -#endif # Data for installation # @@ -39,14 +29,9 @@ HFILES = ../h/config.h $(HDIR)/ecls.h $(HDIR)/ecls-cmp.h\ $(HDIR)/external.h $(HDIR)/lisp_external.h $(HDIR)/eval.h\ $(HDIR)/number.h $(HDIR)/page.h $(HDIR)/unify.h\ $(HDIR)/lwp.h $(HDIR)/critical.h -#ifdef GBC_BOEHM -ALLOC = alloc_2.o -#else -ALLOC = alloc.o gbc.o -#endif -OBJS = main.o $(ALLOC) symbol.o package.o list.o\ +OBJS = main.o symbol.o package.o list.o\ apply.o eval.o interpreter.o compiler.o disassembler.o \ - lex.o reference.o character.o\ + clos.o instance.o gfun.o lex.o reference.o character.o\ file.o read.o print.o error.o string.o cfun.o\ typespec.o assignment.o \ predicate.o big.o number.o\ @@ -56,28 +41,7 @@ OBJS = main.o $(ALLOC) symbol.o package.o list.o\ time.o unixint.o\ mapfun.o multival.o hash.o format.o pathname.o\ structure.o load.o unixfsys.o unixsys.o \ - all_keywords.o all_symbols.o all_functions.o init.o -#ifdef THREADS -OBJS += lwp.o -#endif -#ifdef LOCATIVE -OBJS += unify.o -#endif -#if defined(TCP) || defined(CLX) -OBJS += tcp.o -#endif -#ifdef CLOS -OBJS += clos.o instance.o gfun.o -#endif -#ifdef TK -OBJS += tclBasic.o tkMain.o -#endif -#ifdef PROFILE -OBJS += profile.o -#endif -#ifdef MSDOS -OBJS += dostimes.o dosdummy.o -#endif + all_keywords.o all_symbols.o all_functions.o init.o @EXTRA_OBJS@ .SUFFIXES: .c .o .d @@ -115,17 +79,7 @@ dpp.exe : $(srcdir)/dpp.c #apply.o: apply.c $(HFILES) $(HDIR)/cs.h # dangerous to optimize due to assembler hack # $(CC) $(CFLAGS) -O0 -g apply.c -o $@ -#ifdef sgi -# gcc optimization causes trouble assignment.o: assignment.c $(HFILES) $(CC) $(CFLAGS) -g assignment.c -o $@ -#else -# $(CC) $(CFLAGS) assignment.c -o $@ -#endif -#ifdef sgi -# gcc optimization causes trouble gbc.o: gbc.c $(HFILES) $(CC) $(CFLAGS) -g gbc.c -o $@ -#else -# $(CC) $(CFLAGS) gbc.c -o $@ -#endif diff --git a/src/c/alloc.d b/src/c/alloc.d index af7a0a169..14cd364b5 100644 --- a/src/c/alloc.d +++ b/src/c/alloc.d @@ -34,6 +34,9 @@ #include "ecls.h" #include "page.h" + +#ifndef GBC_BOEHM + #ifdef BSD #include #endif BSD @@ -891,3 +894,5 @@ valloc(size_t size) { return memalign(getpagesize(), size);} # endif WANT_VALLOC #endif NEED_MALLOC + +#endif /* GBC_BOEHM */ diff --git a/src/c/alloc_2.d b/src/c/alloc_2.d index 0464bc50b..fd294b19d 100644 --- a/src/c/alloc_2.d +++ b/src/c/alloc_2.d @@ -15,6 +15,8 @@ #include "ecls.h" #include "page.h" +#ifdef GBC_BOEHM + /********************************************************** * OBJECT ALLOCATION * **********************************************************/ @@ -289,3 +291,5 @@ gc(enum type new_name) GC_gcollect(); end_critical_section(); } + +#endif /* GBC_BOEHM */ diff --git a/src/c/cinit.d b/src/c/cinit.d index 1eb6f4f27..6749c2af6 100644 --- a/src/c/cinit.d +++ b/src/c/cinit.d @@ -46,5 +46,14 @@ init_lisp_libs(void) { SYM_VAL(@'*package*') = system_package; SYM_VAL(@'*features*') = CONS(make_keyword("ECLS-MIN"), SYM_VAL(@'*features*')); +#ifdef CLOS + SYM_VAL(@'*features*') = CONS(make_keyword("WANTS-CLOS"), SYM_VAL(@'*features*')); +#endif +#ifndef RUNTIME + SYM_VAL(@'*features*') = CONS(make_keyword("WANTS-CMP"), SYM_VAL(@'*features*')); +#endif +#ifdef CLX + SYM_VAL(@'*features*') = CONS(make_kewyord("WANTS-CLX"), SYM_VAL(@'*features*')); +#endif make_si_function("TOP-LEVEL", @si::simple-toplevel); } diff --git a/src/c/gbc.d b/src/c/gbc.d index 014bf2dd6..335377f7d 100644 --- a/src/c/gbc.d +++ b/src/c/gbc.d @@ -17,6 +17,8 @@ #include "ecls.h" #include "page.h" +#ifndef GBC_BOEHM + /******************************* EXPORTS ******************************/ cl_object @'si::*gc-verbose*'; @@ -966,3 +968,5 @@ init_GC(void) GC_enable(); gc_time = 0; } + +#endif diff --git a/src/cmp/cmpcfg.lsp.in b/src/cmp/cmpcfg.lsp.in index 51c72392f..45354cc7c 100644 --- a/src/cmp/cmpcfg.lsp.in +++ b/src/cmp/cmpcfg.lsp.in @@ -4,6 +4,6 @@ ;; (in-package "COMPILER") (setq compiler::*cc* "@CC@") -(setq compiler::*cc-flags* "@CFLAGS@ -D@MACHINE@ @LSPCFLAGS@") +(setq compiler::*cc-flags* "@CFLAGS@ -D@host@ @LSPCFLAGS@") (setq compiler::*ld-flags* "-lecls -lgmp @LDFLAGS@ @CLIBS@") (setq compiler::*ld-shared-flags* "@SHARED_LDFLAGS@") diff --git a/src/compile.lsp.in b/src/compile.lsp.in index 4252297d5..4be07234b 100644 --- a/src/compile.lsp.in +++ b/src/compile.lsp.in @@ -14,30 +14,28 @@ (si::pathname-translations "SYS" '(("*.*" "./*.*"))) (setq compiler::*cc-flags* (concatenate 'string compiler::*cc-flags* " -I@srcdir@/h -I@srcdir@/gmp -I@builddir@/h")) -#ifndef RUNTIME ;;; ;;; * Compile, load and link Common-Lisp to C compiler ;;; +#+WANTS-CMP +(progn (load "cmp/defsys.lsp") (proclaim '(optimize (safety 2) (space 3))) (sbt::operate-on-system cmp :library) ;(sbt::operate-on-system cmp :load) -#endif RUNTIME +) -#ifdef CLOS ;;; ;;; * Compile, load and link PCL based Common-Lisp Object System ;;; +#+WANTS-CLOS +(progn (load "clos/defsys.lsp") (proclaim '(optimize (safety 2) (space 3))) (sbt::operate-on-system clos :library) ;(sbt::operate-on-system clos :load) -#endif CLOS - -(compiler::build-ecls "ecls" -#ifndef RUNTIME - 'cmp -#endif ) +(compiler::build-ecls "ecls" #+WANTS-CMP 'cmp) + (quit) diff --git a/src/compile_rest.lsp.in b/src/compile_rest.lsp.in index 81fee2591..4fd4ad4e6 100644 --- a/src/compile_rest.lsp.in +++ b/src/compile_rest.lsp.in @@ -25,19 +25,14 @@ :c-file t :h-file t :data-file t :system-p t (cdr s))) -#ifdef CLX ;;; ;;; * Compile and link MIT CLX extensions ;;; +#+WANTS-CLX +(progn (push :clx-ansi-common-lisp *features*) (load "defsys.lsp") (sbt::operate-on-system clx :library) - -(compiler::build-ecls "eclx" -#ifndef RUNTIME - 'cmp -#endif - 'clx +(compiler::build-ecls "eclx" #+WANTS-CMP 'cmp 'clx) ) -#endif CLX diff --git a/src/configure b/src/configure index cc1449171..889d643c0 100755 --- a/src/configure +++ b/src/configure @@ -600,7 +600,6 @@ echo "$ac_t""$host" 1>&6 - # Check whether --enable-boehm or --disable-boehm was given. if test "${enable_boehm+set}" = set; then enableval="$enable_boehm" @@ -634,7 +633,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:638: checking for $ac_word" >&5 +echo "configure:637: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -664,7 +663,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:668: checking for $ac_word" >&5 +echo "configure:667: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -715,7 +714,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:719: checking for $ac_word" >&5 +echo "configure:718: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -747,7 +746,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:751: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -758,12 +757,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 762 "configure" +#line 761 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -789,12 +788,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:793: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:792: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:798: checking whether we are using GNU C" >&5 +echo "configure:797: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -803,7 +802,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -822,7 +821,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:826: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:825: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -857,7 +856,7 @@ if test "$GCC" != "yes"; then { echo "configure: error: Cannot build ECLS without GCC" 1>&2; exit 1; } fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:861: checking how to run the C preprocessor" >&5 +echo "configure:860: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -872,13 +871,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -889,13 +888,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -906,13 +905,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -939,7 +938,7 @@ echo "$ac_t""$CPP" 1>&6 # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:943: checking for $ac_word" >&5 +echo "configure:942: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -978,7 +977,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:982: checking for a BSD compatible install" >&5 +echo "configure:981: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1031,7 +1030,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # sets variables INSTALL, INSTALL_DATA, INSTALL_PROGRAM echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1035: checking whether ln -s works" >&5 +echo "configure:1034: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1081,10 +1080,18 @@ fi + + + + + + + + echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6 -echo "configure:1088: checking for getpwnam in -lsun" >&5 +echo "configure:1095: checking for getpwnam in -lsun" >&5 ac_lib_var=`echo sun'_'getpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1092,7 +1099,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1135,17 +1142,17 @@ for ac_hdr in sys/resource.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1139: checking for $ac_hdr" >&5 +echo "configure:1146: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1175,17 +1182,17 @@ for ac_hdr in sys/utsname.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1179: checking for $ac_hdr" >&5 +echo "configure:1186: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1215,17 +1222,17 @@ for ac_hdr in float.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1219: checking for $ac_hdr" >&5 +echo "configure:1226: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1254,12 +1261,12 @@ done for ac_func in nanosleep do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1258: checking for $ac_func" >&5 +echo "configure:1265: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1307,7 +1314,7 @@ fi done echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1311: checking for POSIXized ISC" >&5 +echo "configure:1318: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1406,23 +1413,22 @@ eval `${CPP} -D${host} ${tempcname} \ rm ${tempcname} echo $ac_n "checking for ld flags when building shared libraries""... $ac_c" 1>&6 -echo "configure:1410: checking for ld flags when building shared libraries" >&5 +echo "configure:1417: checking for ld flags when building shared libraries" >&5 echo "$ac_t""${SHARED_LDFLAGS}" 1>&6 echo $ac_n "checking for required libraries""... $ac_c" 1>&6 -echo "configure:1413: checking for required libraries" >&5 +echo "configure:1420: checking for required libraries" >&5 echo "$ac_t""${CLIBS}" 1>&6 echo $ac_n "checking for architecture""... $ac_c" 1>&6 -echo "configure:1416: checking for architecture" >&5 +echo "configure:1423: checking for architecture" >&5 echo "$ac_t""${architecture}" 1>&6 echo $ac_n "checking for software type""... $ac_c" 1>&6 -echo "configure:1419: checking for software type" >&5 +echo "configure:1426: checking for software type" >&5 echo "$ac_t""${software_type}" 1>&6 echo $ac_n "checking for software version""... $ac_c" 1>&6 -echo "configure:1422: checking for software version" >&5 +echo "configure:1429: checking for software version" >&5 echo "$ac_t""${software_version}" 1>&6 - if test "x$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi bindir="${exec_prefix}/bin" @@ -1430,63 +1436,86 @@ libdir="${exec_prefix}/lib/ecls" mandir="${prefix}/man/man1" infodir="${prefix}/info" builddir=`pwd` - -if [ $profile ] ; then - if [ ${host} = linux ] ; then - LIBS="${LIBS} -lgmon" - fi -fi -if [ $tk ] ; then - TKLIBS="-ltk -ltcl -lXpm @XLIBS@" -fi - -CLIBS="${CLIBS} -lm" -test "${boehm}" && CLIBS="-lgc ${CLIBS}" -test "${boehm}" && cat >> confdefs.h <<\EOF +TARGETS=ecls +LIBRARIES=libecls.a +LSP_LIBRARIES=liblsp.a +SUBDIR=c +CLIBS="${CLIBS} -lgmp -lm" +if test ${boehm} ; then + LIBRARIES="${LIBRARIES} libgc.a" + CLIBS="-lgc ${CLIBS}" + SUBDIR="${SUBDIR} gc" + EXTRA_OBJS="${EXTRA_OBJS} alloc_2.o" + cat >> confdefs.h <<\EOF #define GBC_BOEHM 1 EOF -echo $ac_n "checking for clos""... $ac_c" 1>&6 -echo "configure:1451: checking for clos" >&5 -echo "$ac_t""${clos}" 1>&6 -test "${tk}" && cat >> confdefs.h <<\EOF -#define TK 1 +else + EXTRA_OBJS="${EXTRA_OBJS} alloc.o gbc.o" +fi +if test ${enable_local_gmp} ; then + cat >> confdefs.h <<\EOF +#define HAVE_LOCAL_GMP 1 EOF -test "${clx}" && cat >> confdefs.h <<\EOF -#define CLX 1 -EOF - -test "${tcp}" -o "${clx}" && cat >> confdefs.h <<\EOF -#define TCP 1 -EOF - -test "${locative}" && cat >> confdefs.h <<\EOF -#define LOCATIVE 1 -EOF - -test "${threads}" && cat >> confdefs.h <<\EOF -#define THREADS 1 -EOF - -test "${runtime}" && cat >> confdefs.h <<\EOF +else + LIBRARIES="${LIBRARIES} libgmp.a" + SUBDIR="${SUBDIR} gmp" +fi +if test ${runtime} ; then + cat >> confdefs.h <<\EOF #define RUNTIME 1 EOF -test "${profile}" && cat >> confdefs.h <<\EOF -#define PROFILE 1 +else + LSP_LIBRARIES="${LSP_LIBRARIES} libcmp.a" +fi +if test ${tk} ; then + TKLIBS="-ltk -ltcl -lXpm @XLIBS@" + cat >> confdefs.h <<\EOF +#define TK 1 EOF +fi +if test ${clx} ; then + TARGETS="${TARGETS} eclx" + LSP_LIBRARIES="${LSP_LIBRARIES} libclx.a" + cat >> confdefs.h <<\EOF +#define CLX 1 +EOF + +fi +if test "${tcp}" -o "${clx}"; then + cat >> confdefs.h <<\EOF +#define TCP 1 +EOF + + EXTRA_OBJS="${EXTRA_OBJS} tcp.o" +fi +if test "${locative}" ; then + EXTRA_OBJS="${EXTRA_OBJS} unify.o" + cat >> confdefs.h <<\EOF +#define LOCATIVE 1 +EOF + +fi +if test "${threads}" ; then + EXTRA_OBJS="${EXTRA_OBJS} lwp.o" + cat >> confdefs.h <<\EOF +#define THREADS 1 +EOF + +fi echo $ac_n "checking whether stack growns downwards""... $ac_c" 1>&6 -echo "configure:1484: checking whether stack growns downwards" >&5 +echo "configure:1513: checking whether stack growns downwards" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -1525,12 +1554,12 @@ fi echo $ac_n "checking if arguments can be accessed through vector""... $ac_c" 1>&6 -echo "configure:1529: checking if arguments can be accessed through vector" >&5 +echo "configure:1558: checking if arguments can be accessed through vector" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -1555,7 +1584,7 @@ int main() { } EOF -if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -1574,12 +1603,12 @@ fi echo $ac_n "checking appropiate type for fixnums""... $ac_c" 1>&6 -echo "configure:1578: checking appropiate type for fixnums" >&5 +echo "configure:1607: checking appropiate type for fixnums" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { @@ -1594,7 +1623,7 @@ int main() { exit(0); } EOF -if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cl_fixnum=`cat conftestval` echo "$ac_t""${cl_fixnum}" 1>&6 @@ -1612,12 +1641,12 @@ rm -fr conftest* fi echo $ac_n "checking most positive fixnum""... $ac_c" 1>&6 -echo "configure:1616: checking most positive fixnum" >&5 +echo "configure:1645: checking most positive fixnum" >&5 if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { @@ -1635,7 +1664,7 @@ int main() { exit(0); } EOF -if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cl_fixnum_limit=`cat conftestval` echo "$ac_t""${cl_fixnum_limit}" 1>&6 @@ -1655,14 +1684,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1659: checking whether byte ordering is bigendian" >&5 +echo "configure:1688: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1673,11 +1702,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1688,7 +1717,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1708,7 +1737,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1750,7 +1779,7 @@ fi # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1754: checking for X" >&5 +echo "configure:1783: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1812,12 +1841,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1886,14 +1915,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1999,17 +2028,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2003: checking whether -R must be followed by a space" >&5 +echo "configure:2032: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -2025,14 +2054,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -2064,7 +2093,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2068: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2097: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2072,7 +2101,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2105,7 +2134,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2109: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2138: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2113,7 +2142,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2153,12 +2182,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2157: checking for gethostbyname" >&5 +echo "configure:2186: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2202,7 +2231,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2206: checking for gethostbyname in -lnsl" >&5 +echo "configure:2235: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2210,7 +2239,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2251,12 +2280,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2255: checking for connect" >&5 +echo "configure:2284: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2300,7 +2329,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2304: checking for connect in -lsocket" >&5 +echo "configure:2333: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2308,7 +2337,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2343,12 +2372,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2347: checking for remove" >&5 +echo "configure:2376: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2392,7 +2421,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2396: checking for remove in -lposix" >&5 +echo "configure:2425: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2400,7 +2429,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2435,12 +2464,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2439: checking for shmat" >&5 +echo "configure:2468: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2484,7 +2513,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2488: checking for shmat in -lipc" >&5 +echo "configure:2517: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2492,7 +2521,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2536,7 +2565,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2540: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2569: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2544,7 +2573,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2600,16 +2629,11 @@ XLIBS="$XLIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" echo -n "checking for gmp..." if test "$enable_local_gmp" = "yes"; then -cat >> confdefs.h <<\EOF -#define HAVE_LOCAL_GMP 1 -EOF - echo "use local $enable_local_gmp" else echo "configuring gmp" (test -d gmp && rm -rf gmp; mkdir gmp; cd gmp; $srcdir/gmp/configure $gmp_flags) fi -CLIBS="-lgmp ${CLIBS}" trap '' 1 2 15 cat > confcache <<\EOF @@ -2712,7 +2736,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "h/config.h compile.lsp compile2.lsp compile_rest.lsp bare.lsp +trap 'rm -fr `echo "h/config.h compile.lsp compile_rest.lsp bare.lsp lsp/config.lsp cmp/cmpcfg.lsp lsp/load.lsp clos/load.lsp cmp/load.lsp ../Makefile Makefile c/Makefile doc/Makefile tk/Makefile clx/defsys.lsp tests/Makefile ansi-tests/Makefile gabriel/Makefile @@ -2756,7 +2780,6 @@ s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@builddir@%$builddir%g s%@top_srcdir@%$top_srcdir%g -s%@TKLIBS@%$TKLIBS%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@RANLIB@%$RANLIB%g @@ -2774,6 +2797,14 @@ s%@SHARED_LDFLAGS@%$SHARED_LDFLAGS%g s%@architecture@%$architecture%g s%@software_type@%$software_type%g s%@software_version@%$software_version%g +s%@EXTRA_OBJS@%$EXTRA_OBJS%g +s%@TARGETS@%$TARGETS%g +s%@TKLIBS@%$TKLIBS%g +s%@LIBRARIES@%$LIBRARIES%g +s%@LSP_LIBRARIES@%$LSP_LIBRARIES%g +s%@SUBDIR@%$SUBDIR%g +s%@SHORT_SITE_NAME@%$SHORT_SITE_NAME%g +s%@LONG_SITE_NAME@%$LONG_SITE_NAME%g s%@DOWN_STACK@%$DOWN_STACK%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g @@ -2822,7 +2853,7 @@ EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -# Fix machine dependencies in Makefiles -CPP=`grep "^s%@CPP@%" config.status | sed -e "s/^s%@CPP@%//g" -e "s/%g$//g"` -# Prefer cpp since it does not remove backslash newline -test -x /lib/cpp && CPP=/lib/cpp -# Get back the value for host: -host=`grep "^s%@host@" config.status | sed -e "s/s%@host@%//" -e "s/%g//"` - -# Can't use @host@ directly in Makefile's or CPP will replace with 1 -SUBDIR_MAKEFILES=`grep SUBDIR_MAKEFILES= Makefile | sed -e "s/SUBDIR_MAKEFILES=//"` -for mf in lsp/config.lsp compile.lsp compile2.lsp compile_rest.lsp bare.lsp\ - lsp/load.lsp cmp/load.lsp clos/load.lsp cmp/cmpcfg.lsp \ - Makefile ${SUBDIR_MAKEFILES}; do - echo updating $mf - # pull in configuration #defines, but omit #includes - cat h/config.h | \ - grep -v '^# *include' > junk.c - sed -e '/^# */d' $mf >> junk.c - ${CPP} -P -D${host} junk.c | \ - sed -e "s/@MACHINE@/${host}/" \ - -e 's/^#.*//' -e 's/^[ ][ ]*$//' -e 's/^ / /' | \ - sed -n -e '/^..*$/p' > $mf - rm -f junk.c -done -echo updating ../Makefile -# Fix srcdir and VPATH -sed -e "s/@MACHINE@/${host}/" -e "s%src/\.\.$%src%" ../Makefile > foo -mv foo ../Makefile -# Fix for GNU make: does not help -#touch Makefile exit 0 EOF diff --git a/src/configure.in b/src/configure.in index 9cff5a42f..83be8481b 100644 --- a/src/configure.in +++ b/src/configure.in @@ -44,13 +44,9 @@ AC_SUBST(mandir) AC_SUBST(infodir) AC_SUBST(builddir) AC_SUBST(top_srcdir) -AC_SUBST(TKLIBS) AC_ARG_ENABLE(boehm, [ --enable-boehm Enable Boehm & Weiser's garbage collector.], boehm="$enable_boehm") -dnl AC_ARG_ENABLE(profile, -dnl [ --enable-profile Enable profiling tool.], -dnl profile="$enable_profile") dnl AC_ARG_ENABLE(tk, dnl [ --enable-tk Include Tk.], dnl tk="$enable_tk") @@ -111,14 +107,22 @@ AC_SUBST(CP) AC_SUBST(RM) AC_SUBST(MV) AC_SUBST(RUN) -AC_SUBST(CFLAGS) -AC_SUBST(LSPCFLAGS) -AC_SUBST(CLIBS) -AC_SUBST(LDFLAGS) -AC_SUBST(SHARED_LDFLAGS) -AC_SUBST(architecture) -AC_SUBST(software_type) -AC_SUBST(software_version) +AC_SUBST(CFLAGS)dnl Flags for the compiler +AC_SUBST(LSPCFLAGS)dnl Additional flags needed to compile translated code +AC_SUBST(CLIBS)dnl System libraries to be linked in +AC_SUBST(LDFLAGS)dnl Flags for program linker +AC_SUBST(SHARED_LDFLAGS)dnl Flags for shared libraries linker +AC_SUBST(architecture)dnl Type of processor for which this is compiled +AC_SUBST(software_type)dnl Type of operating system +AC_SUBST(software_version)dnl Version number of operating system +AC_SUBST(SHORT_SITE_NAME)dnl Short name for the machine we built this on +AC_SUBST(LONG_SITE_NAME)dnl Long name for the machine we built this on +AC_SUBST(EXTRA_OBJS)dnl Extra *.o files to be compiled into libecls.a +AC_SUBST(TARGETS)dnl Versions of ECLS to be built +AC_SUBST(TKLIBS)dnl Libraries with the Tcl/Tk components +AC_SUBST(SUBDIR)dnl Subdirectories that make should process +AC_SUBST(LIBRARIES)dnl GMP, Boehm's GC, etc +AC_SUBST(LSP_LIBRARIES)dnl Libraries produced by lisp translator dnl ---------------------------------------------------------------------- dnl checks for UNIX variants that set DEFS @@ -145,7 +149,6 @@ ECLS_PROCESS_MACHINES_H() dnl ---------------------------------------------------------------------- dnl Set options dnl -[ if test "x$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi if test "x$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi bindir="${exec_prefix}/bin" @@ -153,28 +156,52 @@ libdir="${exec_prefix}/lib/ecls" mandir="${prefix}/man/man1" infodir="${prefix}/info" builddir=`pwd` - -if [ $profile ] ; then - if [ ${host} = linux ] ; then - LIBS="${LIBS} -lgmon" - fi +TARGETS=ecls +LIBRARIES=libecls.a +LSP_LIBRARIES=liblsp.a +SUBDIR=c +CLIBS="${CLIBS} -lgmp -lm" +if test ${boehm} ; then + LIBRARIES="${LIBRARIES} libgc.a" + CLIBS="-lgc ${CLIBS}" + SUBDIR="${SUBDIR} gc" + EXTRA_OBJS="${EXTRA_OBJS} alloc_2.o" + AC_DEFINE(GBC_BOEHM) +else + EXTRA_OBJS="${EXTRA_OBJS} alloc.o gbc.o" fi -if [ $tk ] ; then - TKLIBS="-ltk -ltcl -lXpm @XLIBS@" +if test ${enable_local_gmp} ; then + AC_DEFINE(HAVE_LOCAL_GMP) +else + LIBRARIES="${LIBRARIES} libgmp.a" + SUBDIR="${SUBDIR} gmp" +fi +if test ${runtime} ; then + AC_DEFINE(RUNTIME) +else + LSP_LIBRARIES="${LSP_LIBRARIES} libcmp.a" +fi +if test ${tk} ; then + TKLIBS="-ltk -ltcl -lXpm @XLIBS@" + AC_DEFINE(TK) +fi +if test ${clx} ; then + TARGETS="${TARGETS} eclx" + LSP_LIBRARIES="${LSP_LIBRARIES} libclx.a" + AC_DEFINE(CLX) +fi +if test "${tcp}" -o "${clx}"; then + AC_DEFINE(TCP) + EXTRA_OBJS="${EXTRA_OBJS} tcp.o" +fi +if test "${locative}" ; then + EXTRA_OBJS="${EXTRA_OBJS} unify.o" + AC_DEFINE(LOCATIVE) +fi +if test "${threads}" ; then + EXTRA_OBJS="${EXTRA_OBJS} lwp.o" + AC_DEFINE(THREADS) fi -] -CLIBS="${CLIBS} -lm" -test "${boehm}" && CLIBS="-lgc ${CLIBS}" -test "${boehm}" && AC_DEFINE(GBC_BOEHM) -AC_MSG_CHECKING(for clos) -AC_MSG_RESULT([${clos}]) -test "${tk}" && AC_DEFINE(TK) -test "${clx}" && AC_DEFINE(CLX) -test "${tcp}" -o "${clx}" && AC_DEFINE(TCP) -test "${locative}" && AC_DEFINE(LOCATIVE) -test "${threads}" && AC_DEFINE(THREADS) -test "${runtime}" && AC_DEFINE(RUNTIME) -test "${profile}" && AC_DEFINE(PROFILE) dnl ---------------------------------------------------------------------- dnl Study the call conventions @@ -235,50 +262,17 @@ dnl GNU multiprecision library dnl echo -n "checking for gmp..." if test "$enable_local_gmp" = "yes"; then -AC_DEFINE(HAVE_LOCAL_GMP) echo "use local $enable_local_gmp" else echo "configuring gmp" (test -d gmp && rm -rf gmp; mkdir gmp; cd gmp; $srcdir/gmp/configure $gmp_flags) fi -CLIBS="-lgmp ${CLIBS}" dnl --------------------------------------------------------------------- dnl Final pass over configuration files dnl -AC_OUTPUT(h/config.h compile.lsp compile2.lsp compile_rest.lsp bare.lsp +AC_OUTPUT(h/config.h compile.lsp compile_rest.lsp bare.lsp lsp/config.lsp cmp/cmpcfg.lsp lsp/load.lsp clos/load.lsp cmp/load.lsp ../Makefile Makefile c/Makefile doc/Makefile tk/Makefile clx/defsys.lsp tests/Makefile ansi-tests/Makefile gabriel/Makefile - lsp/defsys.lsp cmp/defsys.lsp clos/defsys.lsp gc/Makefile, - -# Fix machine dependencies in Makefiles -CPP=`grep "^s%@CPP@%" config.status | sed -e "s/^s%@CPP@%//g" -e "s/%g$//g"` -# Prefer cpp since it does not remove backslash newline -test -x /lib/cpp && CPP=/lib/cpp -# Get back the value for host: -host=`grep "^s%@host@" config.status | sed -e "s/s%@host@%//" -e "s/%g//"` - -# Can't use @host@ directly in Makefile's or CPP will replace with 1 -SUBDIR_MAKEFILES=`grep SUBDIR_MAKEFILES= Makefile | sed -e "s/SUBDIR_MAKEFILES=//"` -for mf in lsp/config.lsp compile.lsp compile2.lsp compile_rest.lsp bare.lsp\ - lsp/load.lsp cmp/load.lsp clos/load.lsp cmp/cmpcfg.lsp \ - Makefile ${SUBDIR_MAKEFILES}; do - echo updating $mf - # pull in configuration #defines, but omit #includes - cat h/config.h | \ - grep -v '^# *include' > junk.c - sed -e '/^# */d' $mf >> junk.c - ${CPP} -P -D${host} junk.c | \ - sed -e "s/@MACHINE@/${host}/" \ - -e 's/^#.*//' -e 's/^[ ][ ]*$//' -e 's/^ / /' | \ - sed -n -e '/^..*$/p' > $mf - rm -f junk.c -done -echo updating ../Makefile -# Fix srcdir and VPATH -sed -e "s/@MACHINE@/${host}/" -e "s%src/\.\.$%src%" ../Makefile > foo -mv foo ../Makefile -# Fix for GNU make: does not help -#touch Makefile -) + lsp/defsys.lsp cmp/defsys.lsp clos/defsys.lsp gc/Makefile) diff --git a/src/gc/Makefile.in b/src/gc/Makefile.in index 0873a87e5..b9f3ffd24 100644 --- a/src/gc/Makefile.in +++ b/src/gc/Makefile.in @@ -214,7 +214,7 @@ CURSES= -lcurses -ltermlib # the SHELL environment variable. SHELL= /bin/sh -SPECIALCFLAGS = +SPECIALCFLAGS = @CFLAGS@ # Alternative flags to the C compiler for mach_dep.c. # Mach_dep.c often doesn't like optimization, and it's # not time-critical anyway. diff --git a/src/lsp/config.lsp.in b/src/lsp/config.lsp.in index 47f44fd72..6514470b0 100644 --- a/src/lsp/config.lsp.in +++ b/src/lsp/config.lsp.in @@ -5,19 +5,20 @@ ;; ;; * Short and long site names ;; -#include "../../../site.lsp" +;; Edit these with the name of your site: +;; +(defun short-site-name () "@SHORT_SITE_NAME@") +(defun long-site-name () "@LONG_SITE_NAME@") ;; ;; * ECLS version, architecture, etc ;; (defun lisp-implementation-version () "@ECLS_VERSION@") (defun machine-type () "@architecture@") -#if !defined(unix) || defined(__NeXT) ;; obtained from uname(2) where available -(defun machine-instance () "@MACHINE_INSTANCE@") -(defun machine-version () "@MACHINE@") -(defun software-type () "@software_type@") -(defun software-version () "@software_version@") -#endif +;;(defun machine-instance () "@MACHINE_INSTANCE@") +;;(defun machine-version () "@MACHINE@") +;;(defun software-type () "@software_type@") +;;(defun software-version () "@software_version@") ;; ;; * Set up some room ;; @@ -25,12 +26,6 @@ (sys::allocate 'CONS 200) (sys::allocate 'STRING 40)) ;; -;; * Load symbols from this program -;; -#ifdef RSYM -(sys:build-symbol-table) -#endif -;; ;; * Set configuration pathnames. Notice the trailing slash! ;; Otherwise it would not be a directory. ;;