diff --git a/Makefile b/Makefile deleted file mode 100644 index 42db369..0000000 --- a/Makefile +++ /dev/null @@ -1,906 +0,0 @@ -# Generated automatically from Makefile.in by configure. -# Scheme 48 Makefile -# Documentation in files INSTALL and doc/install.txt - -SHELL = /bin/sh - -### Filled in by `configure' ### -srcdir = . -CC = gcc -DEFS = -DHAVE_CONFIG_H -LIBS = -lm -CFLAGS = -O2 -INSTALL = /usr/local/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -LDFLAGS = -g -LIBOBJS = - -RM = rm -f - -AR = ar cq -RANLIB = ranlib - -prefix = /home/ai/marting/install06 -exec_prefix = ${prefix} -### End of `configure' section### - -bindir = $(exec_prefix)/bin -libdir = $(exec_prefix)/lib -incdir = $(exec_prefix)/include -manext = 1 -mandir = $(prefix)/man/man$(manext) - -# HP 9000 series, if you don't have gcc -# CC = cc -# CFLAGS = -Aa -O +Obb1800 -# DEFS = -D_HPUX_SOURCE -Dhpux - -# Ultrix -# LDFLAGS = -N - -.c.o: - $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir)/c -I$(srcdir)/cig $(CFLAGS) -o $@ $< - -# You might want to change RUNNABLE to "s48" -RUNNABLE = scsh06 -MANPAGE = $(RUNNABLE).$(manext) -LIB = $(libdir)/$(RUNNABLE) - -distdir = /tmp - -# If make barfs on this include line, just comment it out. It's only -# really needed if you want to build the linker or rebuild initial.image. -include $(srcdir)/build/filenames.make -# -#NetBSD make wants to see this instead: -#.include "$(srcdir)/build/filenames.make" - - -# Static linker: -# -# You only need the linker if you're going to make changes to the -# things that go into the initial.image, which in general means the -# files in rts/. If you decide you need to use the linker, then you -# gots your choice; it can run in just about any version of Scheme 48 -# or Pseudoscheme. (It has also been made to run in Scheme->C.) It -# doesn't matter a whole lot which Scheme you use as long as it's not -# broken or unavailable. The two best choices are: -# 1. As below: build the linker on the scheme48vm and scheme48.image -# that are in the current directory. -# 2. LINKER_VM = $(RUNNABLE) $(BIG_HEAP) -# LINKER_RUNNABLE = $(RUNNABLE) -# These settings requires you to already have a $(RUNNABLE) -# command. This is desirable if you are making changes to the -# system that might break scheme48vm and/or scheme48.image. But it -# requires you to have squirreled away a previous working version -# of scheme48. - -BIG_HEAP = -h 5000000 -# JMG: 1. is broken ... -# LINKER_VM = ./$(VM) $(BIG_HEAP) -# LINKER_RUNNABLE = $(LINKER_VM) -i $(IMAGE) - -# JMG now according 2 -LINKER_VM = /home/ai/marting/lib/scheme48/scheme48vm $(BIG_HEAP) -LINKER_RUNNABLE = s4853 - -LINKER_IMAGE = build/linker.image -LINKER = $(LINKER_VM) -i $(LINKER_IMAGE) -START_LINKER = echo ',batch' && echo ',bench on' - -# -------------------- -# You shouldn't have to change anything below this point, except for possibly -# the external code rules. - -# Targets: - -IMAGE = scsh.image -INITIAL = build/initial.image -#JMG: renamed the vm -#JMG: we need cig at the moment -VM = scsh06vm -LIBCIG = cig/lib$(VM).a -CIG = cig/cig -CIGOBJS = cig/libcig.o cig/libcig1.o - -#JMG: the scsh-lib -LIBSCSH = scsh/lib$(VM).a -SCSHVMHACKS = scsh/proc2.o - -#JMG: and it's object files -#JMG left out: scsh/re.o scsh/re1.o scsh/regexp/regexp.o scsh/regexp/regsub.o -# -# -SCSHOBJS = \ - scsh/dirstuff1.o \ - scsh/fdports1.o \ - scsh/flock.o scsh/flock1.o \ - scsh/machine/stdio_dep.o \ - scsh/machine/time_dep1.o \ - scsh/machine/signals1.o \ - scsh/machine/libansi.o \ - scsh/network.o scsh/network1.o \ - scsh/putenv.o \ - scsh/rdelim.o \ - scsh/rx/re-low.o scsh/rx/re1.o \ - scsh/select.o scsh/select1.o \ - scsh/sleep1.o \ - scsh/syscalls.o scsh/syscalls1.o \ - scsh/time.o scsh/time1.o \ - scsh/tty.o scsh/tty1.o \ - scsh/userinfo1.o \ - scsh/sighandlers1.o scsh/sighandlers.o \ - scsh/regexp/libregex.a - -UNIX_OBJS = c/unix/misc.o c/unix/io.o c/unix/fd-io.o c/unix/event.o - -#JMG: I omit process_args.o and SCSHVMHACKS no longer -S48OBJS = c/scheme48vm.o c/scheme48heap.o c/extension.o c/external.o -OBJS = scsh/process_args.o $(S48OBJS) $(CIGOBJS) $(SCSHOBJS) $(SCSHVMHACKS) - -FAKEHS = c/fake/dlfcn.h c/fake/sigact.h c/fake/strerror.h \ - c/fake/sys-select.h - -# Sources: - -CONFIG_FILES = scheme/interfaces.scm scheme/low-packages.scm \ - scheme/rts-packages.scm scheme/comp-packages.scm - -# Rules: - -# The following is the first rule and therefore the "make" command's -# default target. -enough: $(VM) $(IMAGE) go $(LIBCIG) scsh $(LIBSCSH) -#JMG: no manpages at the moment $(MANPAGE) -#JMG no notify at the moment... .notify - -# -------------------- -# External code to include in the VM -# After changing any of these you should delete `scheme48vm' and remake it. - -CIGGED = flock network select syscalls tty time sighandlers re_low rdelim -#re -CIGGEDOBJ = $(patsubst %,scsh/%.o, $(CIGGED)) -CIGGEDINIT = $(patsubst %,s48_init_%, $(CIGGED)) - -EXTERNAL_OBJECTS = $(SOCKET_OBJECTS) $(LOOKUP_OBJECTS) -EXTERNAL_FLAGS = $(SOCKET_FLAGS) -EXTERNAL_INITIALIZERS = $(SOCKET_INITIALIZERS) $(LOOKUP_INITIALIZERS) s48_init_cig \ - $(CIGGEDINIT) - - -# Rules for any external code. - -# Socket rules - -c/unix/socket.o: c/scheme48.h c/fd-io.h c/event.h - -SOCKET_OBJECTS = c/unix/socket.o -SOCKET_LD_FLAGS = -SOCKET_INITIALIZERS = s48_init_socket - -# End of socket rules - -# Lookup rules (this is just for compatibility with old code) - -c/unix/dynamo.o: c/scheme48.h - -LOOKUP_OBJECTS = c/unix/dynamo.o -LOOKUP_INITIALIZERS = s48_init_external_lookup - -# End of lookup rules -# End of external rules -# -------------------- - -# The developers are curious to know. Don't be concerned if this fails. -.notify: build/minor-version-number - touch .notify - -echo Another 0.`cat $(srcdir)/build/minor-version-number` \ - installation. \ - | mail scheme-48-notifications@martigny.ai.mit.edu - -JMG: scsh stuff -# This says how to process .scm files with cig to make .c stubs. -.SUFFIXES: .scm -.scm.c: -# $(srcdir)/cig/cigscript $* - $(srcdir)/$(VM) -o $(srcdir)/$(VM) -i $(CIG) < $< > $*.c - -# These .h files mediate between the code exported from foo1.c -# and imported into foo.scm's stub foo.c. - -scsh/dirstuff1.o: scsh/dirstuff1.h -scsh/rdelim.o: scsh/fdports1.h -scsh/userinfo1.o: scsh/userinfo1.h - -scsh/fdports1.o scsh/fdports.o: scsh/fdports1.h -scsh/flock1.o scsh/flock.o: scsh/flock1.h -scsh/network1.o scsh/network.o: scsh/network1.h -#JMG exists no longer in 0.5.2scsh/re1.o scsh/re.o: scsh/re1.h -scsh/select1.o scsh/select.o: scsh/select1.h -scsh/syscalls1.o scsh/syscalls.o: scsh/syscalls1.h -scsh/time1.o scsh/time.o: scsh/time1.h -scsh/tty1.o scsh/tty.o: scsh/tty1.h - -scsh/rx/re1.o scsh/rx/re-low.o: scsh/rx/re1.h - -scsh/syscalls.o: scsh/syscalls1.h scsh/dirstuff1.h scsh/fdports1.h \ - scsh/select1.h scsh/userinfo1.h - -scsh/sighandlers1.o scsh/sighandlers.o: scsh/sighandlers1.h - -# Not really, but making regexp/libregex.a makes the regexp/regex.h file that -# re-low.c actually does need. -scsh/rx/re-low.o: scsh/regexp/libregex.a - -include $(srcdir)/scsh/machine/Makefile.inc -# Berkeley make wants to see this instead: (or use GNU make on BSD. -bri) -#.include "$(srcdir)/scsh/machine/Makefile.inc" - -$(VM): c/main.o $(OBJS) $(UNIX_OBJS) $(LIBOBJS) $(EXTERNAL_OBJECTS) - rm -f /tmp/s48_external_$$$$.c && \ - build/build-external-modules /tmp/s48_external_$$$$.c \ - $(EXTERNAL_INITIALIZERS) && \ - $(CC) $(LDFLAGS) $(CFLAGS) -o $@ c/main.o $(OBJS) $(UNIX_OBJS) \ - /tmp/s48_external_$$$$.c \ - $(LIBOBJS) $(LIBS) \ - $(EXTERNAL_OBJECTS) $(EXTERNAL_LD_FLAGS) && \ - rm -f /tmp/s48_external_$$$$.c - - - - -#JMG: again cig and scsh-lib -$(LIBCIG): c/main.o $(OBJS) -# $(CC) -r -o $@ main.o $(OBJS) - $(RM) $@ - $(AR) $@ c/main.o $(OBJS) - $(RANLIB) $@ - -$(LIBSCSH): c/smain.o $(OBJS) - $(RM) $@ - $(AR) $@ c/smain.o $(OBJS) - $(RANLIB) $@ - -c/main.o: c/main.c c/scheme48vm.h c/scheme48heap.h - $(CC) -c $(CFLAGS) -o $@ \ - -DDEFAULT_IMAGE_NAME=\"$(LIB)/$(IMAGE)\" \ - $(CPPFLAGS) $(DEFS) c/main.c - -c/scheme48vm.o: c/prescheme.h c/scheme48vm.h c/scheme48heap.h c/event.h \ - c/io.h c/fd-io.h c/scheme48vm-prelude.h -c/scheme48heap.o: c/prescheme.h c/scheme48vm.h c/scheme48heap.h c/event.h \ - c/io.h c/fd-io.h -c/extension.o: c/sysdep.h $(FAKEHS) c/scheme48.h c/scheme48vm.h -c/external.o: c/sysdep.h $(FAKEHS) c/scheme48.h -c/unix/event.o: c/sysdep.h $(FAKEHS) c/scheme48vm.h c/scheme48heap.h \ - c/event.h c/fd-io.h -c/unix/fd-io.o: c/sysdep.h $(FAKEHS) c/scheme48vm.h c/scheme48heap.h \ - c/event.h c/fd-io.h -c/unix/misc.o: c/sysdep.h $(FAKEHS) -c/unix/io.o: c/io.h -c/fake/libdl1.o: c/fake/dlfcn.h -c/fake/libdl2.o: c/fake/dlfcn.h -c/fake/strerror.o: c/fake/strerror.h - -# -------------------- -# Make scheme48.image from initial.image and library .scm files. -# -# For bootstrap reasons, initial.image is *not* listed as a source, -# even though it really is. - -$(IMAGE): $(VM) scheme/env/init-defpackage.scm scheme/more-interfaces.scm \ - scheme/link-packages.scm scheme/more-packages.scm \ - $(usual-files) build/initial.debug build/build-usual-image -# sh $(srcdir)/build/build-usual-image "$(srcdir)" "$(LIB)" "$(IMAGE)" \ -# "$(VM)" "$(INITIAL)" - build/build-usual-image . "`pwd`/scheme" '$(IMAGE)' './$(VM)' \ - '$(INITIAL)' - -### Fake targets: all clean install man dist - -install: enough dirs inst-script inst-vm inst-misc inst-man inst-inc install-cig \ - inst-image - -inst-vm: - $(INSTALL_PROGRAM) $(VM) $(LIB) - -inst-image: - rm -f '/tmp/$(IMAGE)' && \ - build/build-usual-image . '$(LIB)' '/tmp/$(IMAGE)' './$(VM)' \ - '$(INITIAL)' && \ - $(INSTALL_DATA) /tmp/$(IMAGE) $(LIB) && \ - rm /tmp/$(IMAGE) - -inst-man: - if [ -d $(mandir) -a -w $(mandir) ]; then \ - sed 's=LBIN=$(bindir)=g' doc/scheme48.man | \ - sed 's=LLIB=$(LIB)=g' | \ - sed 's=LS48=$(RUNNABLE)=g' >$(MANPAGE) && \ - $(INSTALL_DATA) $(MANPAGE) $(mandir) && \ - rm $(MANPAGE); \ - else \ - echo "$(mandir) not writable dir, not installing man page" \ - >&2; \ - fi - -inst-inc: - $(INSTALL_DATA) c/scheme48.h $(incdir) - -install-cig: cig - $(INSTALL_PROGRAM) $(srcdir)/$(CIG) $(LIB)/cig - $(INSTALL_PROGRAM) $(srcdir)/$(CIG).image $(LIB)/cig - $(INSTALL_DATA) $(srcdir)/$(LIBCIG) $(LIB)/cig - $(INSTALL_DATA) $(srcdir)/cig/libcig.h $(LIB)/cig - -inst-misc: - for stub in env big opt misc link; do \ - for f in scheme/$$stub/*.scm; do \ - $(INSTALL_DATA) $$f $(LIB)/$$stub || exit 1; \ - done; \ - done && \ - for f in scheme/rts/*num.scm scheme/rts/jar-defrecord.scm; do \ - $(INSTALL_DATA) $$f $(LIB)/rts || exit 1; \ - done - -inst-script: - script=$(bindir)/$(RUNNABLE) && \ - echo '#!/bin/sh' >$$script && \ - echo >>$$script && \ - echo 'lib=$(LIB)' >>$$script && \ - echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"' \ - >>$$script && \ - chmod +x $$script - -# Script to run scheme48 in this directory. -go: - echo '#!/bin/sh' >$@ && \ - echo >>$@ && \ - echo "lib=`pwd`" >>$@ && \ - echo 'exec $$lib/$(VM) -o $$lib/$(VM) -i $$lib/$(IMAGE) "$$@"' \ - >>$@ && \ - chmod +x $@ - -dirs: - for dir in $(libdir) $(bindir) $(incdir); do \ - [ -d $$dir -a -w $$dir ] || { \ - echo "$$dir not a writable directory" >&2; \ - exit 1; \ - }; \ - done - { mkdir -p $(LIB) && [ -w $(LIB) ]; } || { \ - echo "$(LIB) not a writable directory" >&2; \ - exit 1; \ - } - for dir in rts env big opt misc link; do \ - { mkdir -p $(LIB)/$$dir && [ -w $(LIB)/$$dir ]; } || { \ - echo "$(LIB)/$$dir not a writable directory" >&2; \ - exit 1; \ - }; \ - done - -configure: configure.in - autoheader && autoconf -#JMG: clean cig and the scsh too -clean: clean-cig clean-scsh - -rm -f $(VM) *.o c/unix/*.o c/*.o c/fake/*.o \ - TAGS $(IMAGE) \ - build/*.tmp $(MANPAGE) build/linker.image \ - scheme/debug/*.image scheme/debug/*.debug \ - scheme/vm/scheme48vm.c scheme/vm/scheme48heap.c \ - go $(distname) -clean-cig: - -rm -f cig/*.o $(CIG) $(CIG).image $(LIBCIG) - -clean-scm2c: - rm -f scsh/flock.c scsh/network.c scsh/rdelim.c \ - scsh/re.c scsh/select.c scsh/syscalls.c scsh/tty.c scsh/time.c - -#JMG: moved config.cache to distclean -distclean: clean - rm -f Makefile config.log config.status c/sysdep.h config.cache - -check: $(VM) $(IMAGE) scheme/debug/check.scm - ( \ - echo ',batch'; \ - echo ',translate =scheme48 scheme'; \ - echo ',config ,load scheme/debug/test.scm'; \ - echo ',exec ,load scheme/debug/check.scm'; \ - echo ',exec (done)' \ - ) | ./$(VM) -i $(IMAGE) - -# -------------------- -# Rules from here on down are not essential for the basic installation -# procedure, and are not expected to work when srcdir is not the -# distribution directory. - -all: vm linker - $(MAKE) image -vm: $(VM) -linker: $(LINKER_IMAGE) -image: $(INITIAL) - $(MAKE) $(IMAGE) - -tags: - etags scsh/*.scm scsh/*.c \ - scheme/vm/arch.scm scheme/rts/*.scm scheme/bcomp/*.scm \ - scheme/*.scm scheme/env/*.scm scheme/big/*.scm scheme/link/*.scm \ - scheme/opt/*.scm scheme/debug/*.scm scheme/misc/*.scm - -# -------------------- -# Distribution... - -# DISTFILES should include all sources. -DISTFILES = README COPYING INSTALL configure \ - acconfig.h configure.in Makefile.in install-sh \ - doc/*.ps doc/*.txt doc/html/*.html doc/scheme48.man \ - doc/src/*.tex doc/src/*.sty \ - emacs/README build/*-version-number build/*.exec \ - build/*.lisp build/build-usual-image build/filenames.make \ - build/filenames.scm build/initial.debug \ - build/initial.image build/initial.scm \ - build/build-external-modules \ - c/*.[ch] c/*/*.[ch] c/scheme48.h.in \ - emacs/*.el gdbinit \ - scheme/*.scm scheme/*/*.scm \ - ps-compiler \ - c/sysdep.h.in - -distname = $(RUNNABLE)-0.`cat build/minor-version-number` - -dist: build/initial.image - distname=$(distname) && \ - distfile=$(distdir)/$$distname.tgz && \ - if [ -d $(distdir) ] && \ - [ -w $$distfile -o -w $(distdir) ]; then \ - rm -f $$distname && \ - ln -s . $$distname && \ - files='' && \ - for i in $(DISTFILES); do \ - if [ "$$i" != "c/sysdep.h" ]; then \ - files="$$files $$distname/$$i"; \ - fi \ - done && \ - tar -cf - $$files | \ - gzip --best >$$distfile && \ - rm $$distname; \ - else \ - echo "Can't write $$distfile" >&2; \ - exit 1; \ - fi - -# Increment the minor version number -inc: - f=build/minor-version-number && \ - expr `cat $$f` + 1 >$$f.tmp && \ - mv $$f.tmp $$f && \ - echo '(define version-info "0.'`cat $$f`'")' \ - >scheme/env/version-info.scm - - -# -------------------- -# Generate build/filenames.make from *packages.scm -# -# This hack traces the module dependencies described in the -# various configuration files and converts them into dependency lists -# that "make" can use for its purposes. -# -# Since the distribution comes with a filenames.make, this rule -# shouldn't be invoked for simple installations. But it will be used -# if you change any of the *-packages.scm files. -# -# You can actually run the forms in filenames.scm in any Scheme -# implementation that has syntax-rules and explicit-renaming low-level -# macros (e.g., most versions of Scheme 48 and Pseudoscheme). -# If there are errors running this script, and you need to debug, -# don't use the initial.image, use something that has a reasonable -# environment. -# -# If this fails and you don't feel like debugging or fixing the problem, -# try "touch filenames.make" and hope for the best. - -PACKAGES=scheme/packages.scm scheme/rts-packages.scm scheme/alt-packages.scm \ - scheme/comp-packages.scm scheme/initial-packages.scm \ - scheme/link-packages.scm scheme/more-packages.scm \ - build/filenames.scm - -build/filenames.make: $(PACKAGES) - $(MAKE) $(VM) PACKAGES= - ./$(VM) -i $(srcdir)/$(INITIAL) -a batch $(CIG) - -chmod +x $(CIG) - mv /tmp/cig $(srcdir)/cig/standalone.image - $(RM) /tmp/cig - -$(CIG)2: - (echo ",batch"; \ - echo ",translate =scheme48/ $(srcdir)/scheme/"; \ - echo ",config ,load $(srcdir)/cig/cig2.scm"; \ - echo ",config ,load $(srcdir)/cig/libcig.scm"; \ - echo ",load-package cig-standalone"; \ - echo ",in cig-standalone"; \ - echo ",translate =scheme48/ $(LIB)/"; \ - echo '(dump-scsh-program cig-standalone-toplevel "/tmp/cig")') \ - | ./$(VM) -o ./$(VM) -i ./scsh/scsh.image - $(srcdir)/cig/image2script $(LIB)/$(VM) $(CIG)2 - -chmod +x $(CIG)2 - $(RM) /tmp/cig - -$(CIG).image: $(IMAGE) $(VM) $(srcdir)/cig/cig.scm $(srcdir)/cig/libcig.scm - (echo ",batch"; \ - echo ",translate =scheme48/ $(srcdir)/scheme/"; \ - echo ",config ,load $(srcdir)/cig/cig.scm"; \ - echo ",config ,load $(srcdir)/cig/libcig.scm"; \ - echo ",load-package cig-aux"; \ - echo ",open define-foreign-syntax"; \ - echo ",translate =scheme48/ $(LIB)/"; \ - echo ",dump /tmp/cig \"(CIG Preloaded -bri)\"") \ - | ./$(VM) -o ./$(VM) -i ./$(IMAGE) - $(srcdir)/cig/image2script $(LIB)/$(VM) \ - -o $(LIB)/$(VM) \ - $(CIG).image - -chmod +x $(CIG).image - $(RM) /tmp/cig - -#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -# SCSH Specifics -#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -scsh: cig scsh/scsh scsh/scsh.image - -SCHEME =scsh/awk.scm \ - scsh/char-set.scm \ - scsh/defrec.scm \ - scsh/endian.scm \ - scsh/enumconst.scm \ - scsh/event.scm \ - scsh/fdports.scm \ - scsh/fileinfo.scm \ - scsh/filemtch.scm \ - scsh/filesys.scm \ - scsh/flock.scm \ - scsh/fname.scm \ - scsh/fr.scm \ - scsh/glob.scm \ - scsh/here.scm \ - scsh/machine/bufpol.scm \ - scsh/machine/errno.scm \ - scsh/machine/fdflags.scm \ - scsh/machine/netconst.scm \ - scsh/machine/packages.scm \ - scsh/machine/signals.scm \ - scsh/machine/time_dep.scm \ - scsh/machine/tty-consts.scm \ - scsh/machine/waitcodes.scm \ - scsh/meta-arg.scm \ - scsh/network.scm \ - scsh/newports.scm \ - scsh/procobj.scm \ - scsh/pty.scm \ - scsh/rdelim.scm \ - scsh/rw.scm \ - scsh/scsh-condition.scm \ - scsh/scsh-interfaces.scm \ - scsh/scsh-package.scm \ - scsh/scsh-read.scm \ - scsh/scsh-version.scm \ - scsh/scsh.scm \ - scsh/select.scm \ - scsh/startup.scm \ - scsh/stringcoll.scm \ - scsh/syntax-helpers.scm \ - scsh/syntax.scm \ - scsh/syscalls.scm \ - scsh/time.scm \ - scsh/top.scm \ - scsh/tty.scm \ - scsh/utilities.scm - -# scsh/dbm.scm db.scm ndbm.scm -# static.scm static-heap.scm static1.scm -# jcontrol - -# Bogus, but it makes the scm->c->o two-ply dependency work. -# Explicitly giving the .o/.c dependency also makes it go. -############################################################ -cig/libcig.c: cig/libcig.scm -scsh/flock.c: scsh/flock.scm -scsh/jcontrol2.c: scsh/jcontrol2.scm -scsh/network.c: scsh/network.scm -scsh/rdelim.c: scsh/rdelim.scm -scsh/select.c: scsh/select.scm -scsh/syscalls.c: scsh/syscalls.scm -scsh/tty.c: scsh/tty.scm -scsh/time.c: scsh/time.scm - -scsh/scsh: scsh/scsh-tramp.c - $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) \ - -DVM=\"$(LIB)/$(VM)\" \ - -DIMAGE=\"$(LIB)/scsh.image\" \ - scsh/scsh-tramp.c - -loads = $(srcdir)/scsh/let-opt.scm $(srcdir)/scsh/scsh-interfaces.scm \ - $(srcdir)/scsh/machine/packages.scm \ - $(srcdir)/scsh/rx/packages.scm \ - $(srcdir)/scsh/rx/cond-package.scm \ - $(srcdir)/scsh/scsh-package.scm \ - $(srcdir)/scsh/lib/string-pack.scm \ - $(srcdir)/scsh/lib/list-pack.scm \ - $(srcdir)/scsh/lib/ccp-pack.scm - -#JMG : not anymore appropriate -#echo ",open external-calls"; \ -# echo "(lookup-all-externals)"; \ - -bs: build/build-scsh-image - sh $(srcdir)/build/build-scsh-image "$(srcdir)" "$(LIB)" "$(IMAGE)" \ - "$(VM)" cig/cig.image - -loads = $(srcdir)/scsh/let-opt.scm $(srcdir)/scsh/scsh-interfaces.scm \ - $(srcdir)/scsh/machine/packages.scm \ - $(srcdir)/scsh/rx/packages.scm \ - $(srcdir)/scsh/rx/cond-package.scm \ - $(srcdir)/scsh/scsh-package.scm \ - $(srcdir)/scsh/lib/string-pack.scm \ - $(srcdir)/scsh/lib/list-pack.scm \ - $(srcdir)/scsh/lib/ccp-pack.scm - -scsh/scsh.image: $(VM) $(SCHEME) $(CIG).image - (echo ",translate =scheme48/ $(srcdir)/scheme/"; \ - echo ",batch on"; \ - echo ",load-package floatnums"; \ - echo ",config"; \ - echo ",load $(loads)"; \ - echo ",load-package scsh"; \ - echo ",load-package events"; \ - echo ",load-package scsh-here-string-hax"; \ - echo ",translate =scheme48/ $(LIB)/"; \ - echo ",load-package list-lib"; \ - echo ",load-package string-lib"; \ - echo ",load-package ccp-lib"; \ - echo ",in scsh-level-0"; \ - echo "(init-scsh-signal)";\ - echo ",user"; \ - echo ",open floatnums"; \ - echo ",open scsh"; \ - echo ",open list-lib string-lib ccp-lib"; \ - echo ",batch off"; \ - echo ",open scsh-top-package"; \ - echo ",keep names maps files source tabulate"; \ - echo ",dump scsh06.image"; \ - echo "(dump-scsh \"scsh/scsh.image\")"; \ - echo ",batch on") \ - | ./$(VM) -o ./$(VM) -i $(CIG).image -h 10000000 - -# echo ",build (lambda (args) ((scsh-stand-alone-resumer (make-scsh-starter)) args)) bla.image"; \ -#scsh/scsh.image: $(VM) $(SCHEME) $(CIG).image -# (echo ",translate =scheme48/ $(srcdir)/"; \ -# echo ",batch on"; \ -# echo ",load-package floatnums"; \ -# echo ",open externals"; \ -# echo "(lookup-all-externals)"; \ -# echo ",config"; \ -# echo ",load $(srcdir)/scsh/let-opt.scm"; \ -# echo ",load $(srcdir)/scsh/scsh-interfaces.scm"; \ -# echo ",load $(srcdir)/scsh/machine/packages.scm"; \ -# echo ",load $(srcdir)/scsh/scsh-package.scm"; \ -# echo ",load-package scsh"; \ -# echo ",load-package scsh-here-string-hax"; \ -# echo ",translate =scheme48/ $(LIB)/"; \ -# echo ",in scsh-level-0"; \ -# echo "(%install-scsh-handlers)"; \ -# echo "(autoreap-policy 'early)"; \ -# echo ",user"; \ -# echo ",open floatnums"; \ -# echo ",open scsh"; \ -# echo ",dump scsh/scsh.image") \ -# | ./$(VM) -o ./$(VM) -i $(CIG).image - -# Removed these lines from scsh/scsh.image rule so you don't lose so -# badly when you are debugging in scsh. -Olin 6/95 -# echo ",flush"; -# echo ",flush maps source names files table"; - -#scsh/scsh.runnable: scsh/scsh.image -# cig/image2script $(LIB)/$(VM) -o $(LIB)/$(VM) -h 1800000 \ -# < scsh/scsh.image > $@ -# -chmod +x $@ - -scsh/regexp/libregex.a: - cd ./scsh/regexp; $(MAKE) lib - -scsh/scsh.vm: $(LIBSCSH) $(VM) scsh/scsh.image - ./$(VM) -o ./$(VM) -h 8000000 -i scsh/scsh.image \ - -lm ./vm/ps-interface.scm \ - -lm ./vm/interfaces.scm \ - -lm ./vm/package-defs.scm \ - -lm ./vm/s48-package-defs.scm \ - -dm -m static-heaps -e static-heap-linker \ - -s scsh/static.scm \ - -i scsh/scsh.image -o $@ - -install-scsh: scsh - $(RM) $(bindir)/$(RUNNABLE) - $(INSTALL_PROGRAM) $(srcdir)/scsh/scsh $(bindir)/$(RUNNABLE) - $(INSTALL_PROGRAM) $(srcdir)/scsh/scsh.image $(LIB)/scsh.image - $(INSTALL_PROGRAM) $(srcdir)/$(LIBSCSH) $(libdir)/$(LIBSCSH) - $(RANLIB) $(libdir)/$(LIBSCSH) - for f in $(srcdir)/scsh/*.scm; \ - do $(INSTALL_DATA) $$f $(LIB)/scsh/; done - -clean-scsh: - $(RM) scsh/*.o scsh/regexp/*.o scsh/rx/*.o scsh/machine/*.o - $(RM) scsh/*.image - $(RM) $(LIBSCSH) scsh/scsh$(EXEEXT) scsh/scsh.vm - -cd scsh/regexp; $(MAKE) clean - - diff --git a/config.log b/config.log deleted file mode 100644 index a8561e7..0000000 --- a/config.log +++ /dev/null @@ -1,71 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -configure:549: checking host system type -configure:573: checking for gcc -configure:650: checking whether the C compiler (gcc ) works -configure:664: gcc -o conftest conftest.c 1>&5 -configure:684: checking whether the C compiler (gcc ) is a cross-compiler -configure:689: checking whether we are using GNU C -configure:713: checking whether gcc accepts -g -configure:749: checking for POSIXized ISC -configure:813: gcc -o conftest -O2 conftest.c 1>&5 -configure:863: checking for a BSD compatible install -configure:915: checking for ranlib -configure:942: checking for working const -configure:1018: checking whether byte ordering is bigendian -configure:1149: checking for ELF -configure:1191: checking for main in -lm -configure:1234: checking for main in -ldl -configure:1277: checking for main in -lmld -configure:1320: checking for main in -lnsl -configure:1363: checking for main in -lgen -configure:1406: checking for main in -lsocket -configure:1449: checking for getpwnam in -lsun -configure:1496: checking for main in -lelf -configure:1544: checking for working const -configure:1619: checking return type of signal handlers -configure:1660: checking how to run the C preprocessor -configure:1724: checking for libgen.h -configure:1724: checking for sys/timeb.h -configure:1724: checking for posix/time.h -configure:1724: checking for sys/select.h -configure:1724: checking for nlist.h -configure:1764: checking for sys/un.h -configure:1803: checking for gettimeofday -configure:1803: checking for ftime -configure:1803: checking for nlist -configure:1803: checking for select -configure:1803: checking for setitimer -configure:1803: checking for sigaction -configure:1856: checking for dlopen -configure:1958: checking for socket -configure:1958: checking for chroot -configure:2011: checking for strerror -configure:2063: checking n_name -configure:2073: gcc -o conftest -O2 conftest.c -lm 1>&5 -configure:2088: checking __NEXT__ -configure:2103: gcc -o conftest -O2 conftest.c -lm 1>&5 -configure: In function `main': -configure:2100: `fail' undeclared (first use this function) -configure:2100: (Each undeclared identifier is reported only once -configure:2100: for each function it appears in.) -configure: failed program was: -#line 2090 "configure" -#include "confdefs.h" - -int main() { - -#ifdef __NeXT__ -return 0; -#else -fail -#endif - -; return 0; } -configure:2119: checking underscore before symbols -configure:2134: checking link with -rdynamic -configure:2145: gcc -c -O2 conftest.c 1>&5 -configure:2159: checking for tzname -configure:2194: checking for gmtoff -configure:2230: checking for const sys_errlist diff --git a/configure b/configure deleted file mode 100755 index ecb2007..0000000 --- a/configure +++ /dev/null @@ -1,2652 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=c/scheme48vm.c - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - - ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:549: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`$ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - - oldCFLAGS="$CFLAGS" - # 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:573: 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 - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -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:602: 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 - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# -gt 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:650: 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. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 - ac_cv_prog_cc_cross=no - else - ac_cv_prog_cc_cross=yes - fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no -fi -rm -fr conftest* - -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -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:684: 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:689: 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 - cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - 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:713: 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 - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-O2" - fi -else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" -fi - - if test "z$oldCFLAGS" = z; then - if test "z$GCC" = z; then - CFLAGS='-O' - else - CFLAGS='-O2' - fi - fi - - echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:749: 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 - echo "$ac_t""yes" 1>&6 - ISC=yes # If later tests want to check for ISC. - cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi -else - echo "$ac_t""no" 1>&6 - ISC= -fi - - - case "$host" in - *-*-linux* ) - echo $ac_n "checking for broken Linux that needs -static with -g""... $ac_c" 1>&6 -echo "configure:773: checking for broken Linux that needs -static with -g" >&5 - if eval "test \"`echo '$''{'scsh_cv_linux_static_debug'+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; then - rm -rf conftest* - scsh_cv_linux_static_debug=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - scsh_cv_linux_static_debug=yes -fi -rm -f conftest* -fi - - echo "$ac_t""$scsh_cv_linux_static_debug" 1>&6 - if test $scsh_cv_linux_static_debug = yes; then - LDFLAGS="-static ${LDFLAGS}" - fi - ;; - esac - - if test "$cross_compiling" = yes; then - true -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -fr conftest* -fi - - if test "z$GCC" = z; then - echo $ac_n "checking -cckr""... $ac_c" 1>&6 -echo "configure:825: checking -cckr" >&5 - oldCFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -cckr" - if test "$cross_compiling" = yes; then - echo "$ac_t""no" 1>&6 - CFLAGS="$oldCFLAGS" -else - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - echo "$ac_t""no" 1>&6 - CFLAGS="$oldCFLAGS" -fi -rm -fr conftest* -fi - - fi - - # Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# 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:863: 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 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - # 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:915: 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 - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:942: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - - - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1018: 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 -int main() { - -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif -; return 0; } -EOF -if { (eval echo configure:1036: \"$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 -int main() { - -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -; return 0; } -EOF -if { (eval echo configure:1051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_bigendian=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_bigendian=no -fi -rm -f conftest* -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -if test $ac_cv_c_bigendian = unknown; then -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 && (./conftest; exit) 2>/dev/null -then - ac_cv_c_bigendian=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_c_bigendian=yes -fi -rm -fr conftest* -fi - -fi -fi - -echo "$ac_t""$ac_cv_c_bigendian" 1>&6 -if test $ac_cv_c_bigendian = yes; then - cat >> confdefs.h <<\EOF -#define WORDS_BIGENDIAN 1 -EOF - -fi - - if test $ac_cv_c_bigendian = no ; then - ENDIAN=little - else - ENDIAN=big - fi - - AR=${AR-"ar cq"} - TMPDIR=${TMPDIR-"/usr/tmp"} - case "$host" in - ## Linux - *-*-linux* ) - dir=linux - # gross, but needed for some older a.out systems for 0.4.x - LIBS=-lc - - echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:1123: checking for ELF" >&5 - if eval "test \"`echo '$''{'scsh_cv_elf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - touch conftest.c - if ${CC} -v -o a.out conftest.c 2>&1 | grep -q __ELF__ ; then - scsh_cv_elf=yes - else - scsh_cv_elf=no - fi -fi - - echo "$ac_t""$scsh_cv_elf" 1>&6 - if test $scsh_cv_elf = yes; then - LDFLAGS=-rdynamic - fi - rm -f conftest.c a.out - - ;; - - ## NetBSD and FreeBSD ( and maybe 386BSD also) - *-*-*bsd* ) - dir=bsd - - echo $ac_n "checking for ELF""... $ac_c" 1>&6 -echo "configure:1149: checking for ELF" >&5 - if eval "test \"`echo '$''{'scsh_cv_elf'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - touch conftest.c - if ${CC} -v -o a.out conftest.c 2>&1 | grep -q __ELF__ ; then - scsh_cv_elf=yes - else - scsh_cv_elf=no - fi -fi - - echo "$ac_t""$scsh_cv_elf" 1>&6 - if test $scsh_cv_elf = yes; then - LDFLAGS=-rdynamic - fi - rm -f conftest.c a.out - - ;; - ## Solaris - Sparc and i386 - *-*-solaris* ) - dir=solaris - cat >> confdefs.h <<\EOF -#define HAVE_NLIST 1 -EOF - - ;; - - * ) - dir=generic - echo "WARNING: " - echo "WARNING: Using generic configuration." - echo "WARNING: See doc/install.txt for more information." - echo "WARNING: " - ;; - esac - rm -f $srcdir/scsh/machine - ln -s $srcdir/$dir $srcdir/scsh/machine - - - echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:1191: checking for main in -lm" >&5 -ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lm $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6 -echo "configure:1234: checking for main in -ldl" >&5 -ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-ldl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for main in -lmld""... $ac_c" 1>&6 -echo "configure:1277: checking for main in -lmld" >&5 -ac_lib_var=`echo mld'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lmld $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo mld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1320: checking for main in -lnsl" >&5 -ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6 -echo "configure:1363: checking for main in -lgen" >&5 -ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lgen $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:1406: checking for main in -lsocket" >&5 -ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lsocket $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for getpwnam in -lsun""... $ac_c" 1>&6 -echo "configure:1449: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lsun $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for main in -lelf""... $ac_c" 1>&6 -echo "configure:1496: checking for main in -lelf" >&5 -ac_lib_var=`echo elf'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - ac_save_LIBS="$LIBS" -LIBS="-lelf $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo checking for RISC/OS POSIX library lossage -if test -f /usr/posix/usr/lib/libc.a; then - LIBS="${LIBS} /usr/posix/usr/lib/libc.a" -fi - - echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1544: checking for working const" >&5 -if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <j = 5; -} -{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; -} - -; return 0; } -EOF -if { (eval echo configure:1598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_c_const=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_c_const=no -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_c_const" 1>&6 -if test $ac_cv_c_const = no; then - cat >> confdefs.h <<\EOF -#define const -EOF - -fi - - echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1619: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#ifdef signal -#undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif - -int main() { -int i; -; return 0; } -EOF -if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_type_signal=void -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int -fi -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <&6 -echo "configure:1660: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # 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:1681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - 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:1698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -for ac_hdr in libgen.h sys/timeb.h posix/time.h sys/select.h nlist.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1724: 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:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - for ac_hdr in sys/un.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1764: 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:1774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - for ac_func in gettimeofday ftime nlist select setitimer sigaction -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1803: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:1856: checking for dlopen" >&5 -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char dlopen(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_dlopen) || defined (__stub___dlopen) -choke me -#else -dlopen(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_dlopen=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_dlopen=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_DLOPEN 1 -EOF - -else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for nlist""... $ac_c" 1>&6 -echo "configure:1905: checking for nlist" >&5 -if eval "test \"`echo '$''{'ac_cv_func_nlist'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char nlist(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_nlist) || defined (__stub___nlist) -choke me -#else -nlist(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_nlist=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_nlist=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'nlist`\" = yes"; then - echo "$ac_t""yes" 1>&6 - LIBOBJS="$LIBOBJS c/fake/libdl1.c -else - echo "$ac_t""no" 1>&6 -LIBOBJS="$LIBOBJS c/fake/libdl2.c -fi - -fi - - for ac_func in socket chroot -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1958: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - echo $ac_n "checking for strerror""... $ac_c" 1>&6 -echo "configure:2011: checking for strerror" >&5 -if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char strerror(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_strerror) || defined (__stub___strerror) -choke me -#else -strerror(); -#endif - -; return 0; } -EOF -if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_strerror=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_strerror=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_STRERROR 1 -EOF - -else - echo "$ac_t""no" 1>&6 -LIBOBJS="$LIBOBJS c/fake/strerror.o" -fi - - echo $ac_n "checking n_name""... $ac_c" 1>&6 -echo "configure:2063: checking n_name" >&5 - cat > conftest.$ac_ext < -int main() { -struct nlist name_list; - name_list.n_name = "foo"; -; return 0; } -EOF -if { (eval echo configure:2073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define NLIST_HAS_N_NAME 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - echo $ac_n "checking __NEXT__""... $ac_c" 1>&6 -echo "configure:2088: checking __NEXT__" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - CC="$CC -posix" - cat >> confdefs.h <<\EOF -#define HAVE_SIGACTION 1 -EOF - - echo "$ac_t""yes" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""no" 1>&6 -fi -rm -f conftest* - echo $ac_n "checking underscore before symbols""... $ac_c" 1>&6 -echo "configure:2119: checking underscore before symbols" >&5 - echo 'main() { return 0; } fnord() {}' >conftest.c - if ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c ${LIBS} && - nm a.out | grep _fnord >/dev/null; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define USCORE 1 -EOF - - else - echo "$ac_t""no" 1>&6 - fi - rm -f conftest.c a.out - - echo $ac_n "checking link with -rdynamic""... $ac_c" 1>&6 -echo "configure:2134: checking link with -rdynamic" >&5 - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - echo "$ac_t""no" 1>&6 -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "$ac_t""yes" 1>&6 - LDFLAGS="$LDFLAGS -rdynamic" -fi -rm -f conftest* - - - echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:2159: checking for tzname" >&5 - if eval "test \"`echo '$''{'scsh_cv_tzname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -int main() { -return (int) tzname; -; return 0; } -EOF -if { (eval echo configure:2172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - scsh_cv_tzname=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - scsh_cv_tzname=no -fi -rm -f conftest* -fi - - echo "$ac_t""$scsh_cv_tzname" 1>&6 - if test $scsh_cv_tzname = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_TZNAME 1 -EOF - - fi - - - echo $ac_n "checking for gmtoff""... $ac_c" 1>&6 -echo "configure:2194: checking for gmtoff" >&5 - if eval "test \"`echo '$''{'scsh_cv_gmtoff'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < -int main() { -struct tm time; - return time.tm_gmtoff; -; return 0; } -EOF -if { (eval echo configure:2208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - scsh_cv_gmtoff=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - scsh_cv_gmtoff=no -fi -rm -f conftest* -fi - - echo "$ac_t""$scsh_cv_gmtoff" 1>&6 - if test $scsh_cv_gmtoff = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_GMTOFF 1 -EOF - - fi - - - echo $ac_n "checking for const sys_errlist""... $ac_c" 1>&6 -echo "configure:2230: checking for const sys_errlist" >&5 - if eval "test \"`echo '$''{'scsh_cv_const_sys_errlist'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - cat > conftest.$ac_ext < - #include -int main() { -const extern char *sys_errlist[]; -; return 0; } -EOF -if { (eval echo configure:2244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - scsh_cv_const_sys_errlist=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - scsh_cv_const_sys_errlist=no -fi -rm -f conftest* -fi - - echo "$ac_t""$scsh_cv_const_sys_errlist" 1>&6 - if test $scsh_cv_const_sys_errlist = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_CONST_SYS_ERRLIST 1 -EOF - - fi - - CFLAGS1=${CFLAGS} - - - - - - - - - - - - - - - - - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile scsh/regexp/Makefile scsh/endian.scm scsh/static.scm c/sysdep.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@RANLIB@%$RANLIB%g -s%@CPP@%$CPP%g -s%@LIBOBJS@%$LIBOBJS%g -s%@AIX_P@%$AIX_P%g -s%@AR@%$AR%g -s%@CFLAGS1@%$CFLAGS1%g -s%@EXEEXT@%$EXEEXT%g -s%@ENDIAN@%$ENDIAN%g -s%@LDFLAGS_AIX@%$LDFLAGS_AIX%g -s%@TMPDIR@%$TMPDIR%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - -chmod +x scsh/static.scm - diff --git a/scsh/endian.scm b/scsh/endian.scm deleted file mode 100644 index 8532354..0000000 --- a/scsh/endian.scm +++ /dev/null @@ -1,39 +0,0 @@ -;;; Endian routines for the Scheme Shell -;;; Copyright (c) 1995 by Brian D. Carlstrom. - -;; Big Endian - Motorola, Sparc, HPPA, etc -(define (net-to-host-32-big num32) - (and (<= 0 num32 #xffffffff) - num32)) - -(define (net-to-host-16-big num16) - (and (<= 0 num16 #xffffffff) - num16)) - -;; Little Endian - Intel, Vax, Alpha -(define (net-to-host-32-little num32) - (and (<= 0 num32 #xffffffff) - (let* ((num24 (arithmetic-shift num32 -8)) - (num16 (arithmetic-shift num24 -8)) - (num08 (arithmetic-shift num16 -8)) - (byte0 (bitwise-and #b11111111 num08)) - (byte1 (bitwise-and #b11111111 num16)) - (byte2 (bitwise-and #b11111111 num24)) - (byte3 (bitwise-and #b11111111 num32))) - (+ (arithmetic-shift byte3 24) - (arithmetic-shift byte2 16) - (arithmetic-shift byte1 8) - byte0)))) - -(define (net-to-host-16-little num16) - (and (<= 0 num16 #xffffffff) - (let* ((num08 (arithmetic-shift num16 -8)) - (byte0 (bitwise-and #b11111111 num08)) - (byte1 (bitwise-and #b11111111 num16))) - (+ (arithmetic-shift byte1 8) - byte0)))) - -(define net-to-host-32 net-to-host-32-little) -(define net-to-host-16 net-to-host-16-little) -(define host-to-net-32 net-to-host-32-little) -(define host-to-net-16 net-to-host-16-little) diff --git a/scsh/regexp/Makefile b/scsh/regexp/Makefile deleted file mode 100644 index e96995d..0000000 --- a/scsh/regexp/Makefile +++ /dev/null @@ -1,138 +0,0 @@ -# Generated automatically from Makefile.in by configure. -CC = gcc -CFLAGS1 = -g -O2 - -RANLIB = ranlib - -# You probably want to take -DREDEBUG out of CFLAGS, and put something like -# -O in, *after* testing (-DREDEBUG strengthens testing by enabling a lot of -# internal assertion checking and some debugging facilities). -# Put -Dconst= in for a pre-ANSI compiler. -# Do not take -DPOSIX_MISTAKE out. -# REGCFLAGS isn't important to you (it's for my use in some special contexts). -#CFLAGS=-I. -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS) -CFLAGS=-I. -DPOSIX_MISTAKE $(REGCFLAGS) $(CFLAGS1) - -# If you have a pre-ANSI compiler, put -o into MKHFLAGS. If you want -# the Berkeley __P macro, put -b in. -MKHFLAGS= - -# Flags for linking but not compiling, if any. -LDFLAGS= - -# Extra libraries for linking, if any. -LIBS= - -# Internal stuff, should not need changing. -OBJPRODN=regcomp.o regexec.o regerror.o regfree.o -OBJS=$(OBJPRODN) split.o debug.o main.o -H=cclass.h cname.h regex2.h utils.h -REGSRC=regcomp.c regerror.c regexec.c regfree.c -ALLSRC=$(REGSRC) engine.c debug.c main.c split.c - -# Stuff that matters only if you're trying to lint the package. -LINTFLAGS=-I. -Dstatic= -Dconst= -DREDEBUG -LINTC=regcomp.c regexec.c regerror.c regfree.c debug.c main.c -JUNKLINT=possible pointer alignment|null effect - -# arrangements to build forward-reference header files -.SUFFIXES: .ih .h -.c.ih: - sh ./mkh $(MKHFLAGS) -p $< >$@ - -default: r - -lib: purge $(OBJPRODN) - rm -f libregex.a - ar crv libregex.a $(OBJPRODN) - $(RANLIB) libregex.a - -purge: - rm -f *.o - -# stuff to build regex.h -REGEXH=regex.h -REGEXHSRC=regex2.h $(REGSRC) -$(REGEXH): $(REGEXHSRC) mkh - sh ./mkh $(MKHFLAGS) -i _REGEX_H_ $(REGEXHSRC) >regex.tmp - cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h - rm -f regex.tmp - -# dependencies -$(OBJPRODN) debug.o: utils.h regex.h regex2.h -regcomp.o: cclass.h cname.h regcomp.ih -regexec.o: engine.c engine.ih -regerror.o: regerror.ih -debug.o: debug.ih -main.o: main.ih - -# tester -re: $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ - -# regression test -r: re tests - ./re &1 | egrep -v '$(JUNKLINT)' | tee lint - -fullprint: - ti README WHATSNEW notes todo | list - ti *.h | list - list *.c - list regex.3 regex.7 - -print: - ti README WHATSNEW notes todo | list - ti *.h | list - list reg*.c engine.c - - -mf.tmp: Makefile - sed '/^REGEXH=/s/=.*/=regex.h/' Makefile | sed '/#DEL$$/d' >$@ - -DTRH=cclass.h cname.h regex2.h utils.h -PRE=COPYRIGHT README WHATSNEW -POST=mkh regex.3 regex.7 tests $(DTRH) $(ALLSRC) fake/*.[ch] -FILES=$(PRE) Makefile $(POST) -DTR=$(PRE) Makefile=mf.tmp $(POST) -dtr: $(FILES) mf.tmp - makedtr $(DTR) >$@ - rm mf.tmp - -cio: $(FILES) - cio $(FILES) - -rdf: $(FILES) - rcsdiff -c $(FILES) 2>&1 | p - -# various forms of cleanup -tidy: - rm -f junk* core core.* *.core dtr *.tmp lint - -clean: tidy - rm -f *.o *.s *.ih re libregex.a - -# don't do this one unless you know what you're doing -spotless: clean - rm -f mkh regex.h diff --git a/scsh/regexp/engine.ih b/scsh/regexp/engine.ih deleted file mode 100644 index cc98334..0000000 --- a/scsh/regexp/engine.ih +++ /dev/null @@ -1,35 +0,0 @@ -/* ========= begin header generated by ./mkh ========= */ -#ifdef __cplusplus -extern "C" { -#endif - -/* === engine.c === */ -static int matcher(register struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags); -static char *dissect(register struct match *m, char *start, char *stop, sopno startst, sopno stopst); -static char *backref(register struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev); -static char *fast(register struct match *m, char *start, char *stop, sopno startst, sopno stopst); -static char *slow(register struct match *m, char *start, char *stop, sopno startst, sopno stopst); -static states step(register struct re_guts *g, sopno start, sopno stop, register states bef, int ch, register states aft); -#define BOL (OUT+1) -#define EOL (BOL+1) -#define BOLEOL (BOL+2) -#define NOTHING (BOL+3) -#define BOW (BOL+4) -#define EOW (BOL+5) -#define CODEMAX (BOL+5) /* highest code used */ -#define NONCHAR(c) ((c) > CHAR_MAX) -#define NNONCHAR (CODEMAX-CHAR_MAX) -#ifdef REDEBUG -static void print(struct match *m, char *caption, states st, int ch, FILE *d); -#endif -#ifdef REDEBUG -static void at(struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst); -#endif -#ifdef REDEBUG -static char *pchar(int ch); -#endif - -#ifdef __cplusplus -} -#endif -/* ========= end header generated by ./mkh ========= */ diff --git a/scsh/regexp/regcomp.ih b/scsh/regexp/regcomp.ih deleted file mode 100644 index 0776e71..0000000 --- a/scsh/regexp/regcomp.ih +++ /dev/null @@ -1,51 +0,0 @@ -/* ========= begin header generated by ./mkh ========= */ -#ifdef __cplusplus -extern "C" { -#endif - -/* === regcomp.c === */ -static void p_ere(register struct parse *p, int stop); -static void p_ere_exp(register struct parse *p); -static void p_str(register struct parse *p); -static void p_bre(register struct parse *p, register int end1, register int end2); -static int p_simp_re(register struct parse *p, int starordinary); -static int p_count(register struct parse *p); -static void p_bracket(register struct parse *p); -static void p_b_term(register struct parse *p, register cset *cs); -static void p_b_cclass(register struct parse *p, register cset *cs); -static void p_b_eclass(register struct parse *p, register cset *cs); -static char p_b_symbol(register struct parse *p); -static char p_b_coll_elem(register struct parse *p, int endc); -static char othercase(int ch); -static void bothcases(register struct parse *p, int ch); -static void ordinary(register struct parse *p, register int ch); -static void nonnewline(register struct parse *p); -static void repeat(register struct parse *p, sopno start, int from, int to); -static int seterr(register struct parse *p, int e); -static cset *allocset(register struct parse *p); -static void freeset(register struct parse *p, register cset *cs); -static int freezeset(register struct parse *p, register cset *cs); -static int firstch(register struct parse *p, register cset *cs); -static int nch(register struct parse *p, register cset *cs); -static void mcadd(register struct parse *p, register cset *cs, register char *cp); -static void mcsub(register cset *cs, register char *cp); -static int mcin(register cset *cs, register char *cp); -static char *mcfind(register cset *cs, register char *cp); -static void mcinvert(register struct parse *p, register cset *cs); -static void mccase(register struct parse *p, register cset *cs); -static int isinsets(register struct re_guts *g, int c); -static int samesets(register struct re_guts *g, int c1, int c2); -static void categorize(struct parse *p, register struct re_guts *g); -static sopno dupl(register struct parse *p, sopno start, sopno finish); -static void doemit(register struct parse *p, sop op, size_t opnd); -static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos); -static void dofwd(register struct parse *p, sopno pos, sop value); -static void enlarge(register struct parse *p, sopno size); -static void stripsnug(register struct parse *p, register struct re_guts *g); -static void findmust(register struct parse *p, register struct re_guts *g); -static sopno pluscount(register struct parse *p, register struct re_guts *g); - -#ifdef __cplusplus -} -#endif -/* ========= end header generated by ./mkh ========= */ diff --git a/scsh/regexp/regerror.ih b/scsh/regexp/regerror.ih deleted file mode 100644 index 2cb668c..0000000 --- a/scsh/regexp/regerror.ih +++ /dev/null @@ -1,12 +0,0 @@ -/* ========= begin header generated by ./mkh ========= */ -#ifdef __cplusplus -extern "C" { -#endif - -/* === regerror.c === */ -static char *regatoi(const regex_t *preg, char *localbuf); - -#ifdef __cplusplus -} -#endif -/* ========= end header generated by ./mkh ========= */ diff --git a/scsh/regexp/regex.h b/scsh/regexp/regex.h deleted file mode 100644 index d094d07..0000000 --- a/scsh/regexp/regex.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _REGEX_H_ -#define _REGEX_H_ /* never again */ -/* ========= begin header generated by ./mkh ========= */ -#ifdef __cplusplus -extern "C" { -#endif - -/* === regex2.h === */ -typedef off_t regoff_t; -typedef struct { - int re_magic; - size_t re_nsub; /* number of parenthesized subexpressions */ - const char *re_endp; /* end pointer for REG_PEND */ - struct re_guts *re_g; /* none of your business :-) */ -} regex_t; -typedef struct { - regoff_t rm_so; /* start of match */ - regoff_t rm_eo; /* end of match */ -} regmatch_t; - - -/* === regcomp.c === */ -extern int regcomp(regex_t *, const char *, int); -#define REG_BASIC 0000 -#define REG_EXTENDED 0001 -#define REG_ICASE 0002 -#define REG_NOSUB 0004 -#define REG_NEWLINE 0010 -#define REG_NOSPEC 0020 -#define REG_PEND 0040 -#define REG_DUMP 0200 - - -/* === regerror.c === */ -#define REG_OKAY 0 -#define REG_NOMATCH 1 -#define REG_BADPAT 2 -#define REG_ECOLLATE 3 -#define REG_ECTYPE 4 -#define REG_EESCAPE 5 -#define REG_ESUBREG 6 -#define REG_EBRACK 7 -#define REG_EPAREN 8 -#define REG_EBRACE 9 -#define REG_BADBR 10 -#define REG_ERANGE 11 -#define REG_ESPACE 12 -#define REG_BADRPT 13 -#define REG_EMPTY 14 -#define REG_ASSERT 15 -#define REG_INVARG 16 -#define REG_ATOI 255 /* convert name to number (!) */ -#define REG_ITOA 0400 /* convert number to name (!) */ -extern size_t regerror(int, const regex_t *, char *, size_t); - - -/* === regexec.c === */ -extern int regexec(const regex_t *, const char *, size_t, regmatch_t [], int); -#define REG_NOTBOL 00001 -#define REG_NOTEOL 00002 -#define REG_STARTEND 00004 -#define REG_TRACE 00400 /* tracing of execution */ -#define REG_LARGE 01000 /* force large representation */ -#define REG_BACKR 02000 /* force use of backref code */ - - -/* === regfree.c === */ -extern void regfree(regex_t *); - -#ifdef __cplusplus -} -#endif -/* ========= end header generated by ./mkh ========= */ -#endif diff --git a/scsh/static.scm b/scsh/static.scm deleted file mode 100755 index e51cba4..0000000 --- a/scsh/static.scm +++ /dev/null @@ -1,913 +0,0 @@ -#!/home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/scshvm \ --o /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/scshvm -h 8000000 -i /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/scsh.image -lm /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/vm/ps-interface.scm -lm /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/vm/interfaces.scm -lm /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/vm/package-defs.scm -lm /home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh/vm/s48-package-defs.scm -dm -m static-heaps -e static-heap-linker -s -!# - -#! -For testing load this at a scsh prompt -,config ,load ../vm/ps-interface.scm -,config ,load ../vm/interfaces.scm -,config ,load ../vm/package-defs.scm -,config ,load ../vm/s48-package-defs.scm -,config ,load static.scm -,load-package static-heaps -,in static-heaps -!# - -;;; Static heap package for the Scheme Shell -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Copyright (c) 1995-1996 by Brian D. Carlstrom. -;;; -;;; based on Scheme48 implementation. -;;; Copyright (c) 1993, 1994 by Richard Kelsey and Jonathan Rees. -;;; -;;; The business of this package is converting a Scheme 48 bytecode -;;; image as embodied in a .image file to a C representation. This C -;;; code is then compiled and linked in with a virtual machine. One -;;; pleasant side effect of this is reduced startup times. Another -;;; good thing is that immutable parts of the image can be shared -;;; between processes. - -(define-structure static-heaps - (export static-heap-linker) - (open scheme heap memory data stob struct - heap-extra - vm-architecture - formats - enumerated - signals - tables - defrec-package - scsh) - (begin - -;;; static-heap-linker -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; the external entry point -;;; real work in static-heap-linker1 -;;; argl is a list of the command line arguments - (define (static-heap-linker argl) - (static-heap-linker1 (parse-options argl)) - (exit 0)) - -;;; parse-options -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; parses the command line options -;;; returns them in an options structure - (define (parse-options argl) - (let ((options (make-options))) - - (let loop ((args (cdr argl))) - (cond ((null? args) - (cond ((not (options:output-executable options)) - (display "error: -o is a required argument") - (newline) - (usage (car argl))) - ((not (options:input-image options)) - (display "error: -i is a required argument") - (newline) - (usage (car argl))))) - ((equal? (car args) "-i") - (cond ((not (null? (cdr args))) - (set-options:input-image options (cadr args)) - (loop (cddr args))) - (else - (display "error: -i requires argument") (newline) - (usage (car argl))))) - ((equal? (car args) "-o") - (cond ((not (null? (cdr args))) - (set-options:output-executable options (cadr args)) - (loop (cddr args))) - (else - (display "error: -o requires argument") (newline) - (usage (car argl))))) - ((equal? (car args) "--args") - (cond ((not (null? (cdr args))) - (set-options:args-parser options (cadr args)) - (loop (cddr args))) - (else - (display "error: --args requires argument") (newline) - (usage (car argl))))) - ((equal? (car args) "--temp") - (cond ((not (null? (cdr args))) - (set-options:temp-dir options (cadr args)) - (loop (cddr args))) - (else - (display "error: --temp requires argument") (newline) - (usage (car argl))))) - ((equal? (car args) "--cc") - (cond ((not (null? (cdr args))) - (set-options:cc-command options (cadr args)) - (loop (cddr args))) - (else - (display "error: --cc requires argument") (newline) - (usage (car argl))))) - ((equal? (car args) "--ld") - (cond ((not (null? (cdr args))) - (set-options:ld-command options (cadr args)) - (loop (cddr args))) - (else - (display "error: --ld requires argument") (newline) - (usage (car argl))))) - ((equal? (car args) "--libs") - (cond ((not (null? (cdr args))) - (set-options:libraries options (cadr args)) - (loop (cddr args))) - (else - (display "error: --libs requires argument") (newline) - (usage (car argl))))) - (else - (format #t "error: unknown argument ~a" (car args)) - (newline) - (usage (car argl))))) - (set-options:args-parser - options - (if (options:args-parser options) - (list (options:args-parser options)) - '())) - (set-options:temp-dir - options - (or (options:temp-dir options) - (getenv "TMPDIR") - "/usr/tmp")) - (set-options:cc-command - options - (or (options:cc-command options) - (getenv "CC") - "gcc -O2")) - (set-options:ld-flags - options - (or (options:ld-flags options) - (getenv "LDFLAGS") - "-rdynamic")) - (set-options:libraries - options - (or (options:libraries options) - (getenv "LIBS") - "-lcrypt -lm ")) - options)) - -;;; usage reporting -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (define (usage program-name) - (format #t - (string-append - "usage: ~a ~%" - " [-i image]~%" - " [-o executable]~%" - " [--args object]~%" - " [--temp directory]~%" - " [--cc command]~%" - " [--ld command]~%" - " [--libs libraries]~%") - program-name) - (exit 1)) - -;;; options structure -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - (define-record options - (input-image #f) ; the input scheme image file - (output-executable #f) ; the output executable file - (args-parser #f) ; .o file for replacement process_args - (temp-dir #f) ; place for intermediate .c .o files - (cc-command #f) ; command to compile a .c file - (ld-flags #f) ; flags needed to link executable - (libraries #f) ; linbraries need to link executable - ) - -;;; heap structure -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - (define-record heap - (length 0) - (objects '()) - ) - -;;; static-heap-linker1 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - (define (static-heap-linker1 options) - - ;;; munge some options into a more usable form - (set-options:temp-dir - options - (format #f "~a/scsh~s" (options:temp-dir options) (pid))) - (set-options:output-executable - options - (string-append (cwd) "/" (options:output-executable options))) - - ;;; Read the image - (let ((start ; entry point of image - (read-heap-image (options:input-image options)))) - - ;;; Process the image - (receive (pure impure reloc externs) - (create-heaps-and-tables) - - ;;; Prepare for output - ;;; if directory exists blow it away - ;;; useful for repeated runs from within same scsh process - (if (file-exists? (options:temp-dir options)) - (cond ((file-directory? (options:temp-dir otions)) - (with-cwd (options:temp-dir options) - (let loop ((files (directory-files - (options:temp-dir options) - #t))) - (cond ((not (null? files)) - (delete-file (car files)) - (loop (cdr files)))))) - (delete-directory (options:temp-dir options))) - (else - (delete-file (options:temp-dir options))))) - (create-directory (options:temp-dir options) #o755 #t) - - ;;; Process the info we gather to make it the output file - (with-cwd (options:temp-dir options) - (write-c-header-file pure impure externs) - (compile-main-c-file start reloc options) - (compile-c-image pure impure reloc externs options) - (link-files options) - (let loop ((files (directory-files - (options:temp-dir options) #t))) - (cond ((not (null? files)) - (delete-file (car files)) - (loop (cdr files)))))) - (delete-directory (options:temp-dir options))))) - -;;; read-heap-image -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; reads the scheme48 bytecode image into memory. -;;; returns entry point. - (define (read-heap-image infile) - (let ((bytes (file-info:size (file-info infile)))) - (init (inexact->exact (floor (* 1.1 bytes))) infile))) - ;; XXX the 1.1 is because we need a little extra space for find-all-xs - -;;; create-heaps-and-tables -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Walks over the in memory scheme 48 heap image. -;;; Returns -;;; 1.) vector of heaps describing pure heap objects -;;; 2.) vector of heaps describing impure heap objects -;;; 3.) vector of tables descibing relocations -;;; 4.) table of external references - (define (create-heaps-and-tables) - (let* ((n (nchunks)) ; number of chunks we have in image - ( pure (make-vector n)) ; immutable bits of each chunk - (impure (make-vector n)) ; mutable bits of each chunk - (reloc (make-vector n)) ; relocation information - (externs (make-table))) ; external references - ;; create empty heaps for each chunk - (let loop ((i 0)) - (cond ((not (= i n)) - (vector-set! pure i (make-heap)) - (vector-set! impure i (make-heap)) - (vector-set! reloc i (make-table)) - (loop (+ i 1))))) - ;; here is where we iterate through all the bits - ;; we construct our own data structures describing the layout - (scsh-for-each-stored-object - (lambda (chunk) - (display ".")) - (lambda (chunk x len) - (let* ((heap ; choose the appropriate heap - (vector-ref (if (mutable? x) impure pure) chunk))) - ;; add the relocation information - (table-set! (vector-ref reloc chunk) x (heap:length heap)) - ;; add object reference to heap chunk - (set-heap:objects heap (cons x (heap:objects heap))) - ;; update current heap chunk length - (set-heap:length heap (+ len (heap:length heap))) - ;; if we have an external reference handle add it to the list - (if (= (header-type (stob-header x)) (enum stob external)) - (table-set! externs - (external-value x) - (vm-string->string (external-name x)))))) - (lambda (chunk) 'foo)) - (newline) - ;; put all the heaps in the correct order - (let loop ((i 0)) - (cond ((not (= i n)) - (let ((p (vector-ref pure i)) - (i (vector-ref impure i))) - (set-heap:objects p (reverse (heap:objects p))) - (set-heap:objects i (reverse (heap:objects i)))) - (loop (+ i 1))))) - (values pure impure reloc externs))) - -;;; vm-string->string -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; converts a vm-string to a scheme one that we can handle - (define (vm-string->string x) - (cond ((vm-string? x) - (let ((len (vm-string-length x))) - (let loop ((i 0) - (l '())) - (cond ((= i len) - (list->string (reverse l))) - (else - (loop (+ i 1) (cons (vm-string-ref x i) l))))))) - (else - (message x " is not a vm-string")))) - -;;; write-c-header-file -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; declares the c long arrays for each heap chunk -;;; declares the extern references to other c functions - (define (write-c-header-file pure impure externs) - (call-with-output-file "static.h" - (lambda (port) - (format port "/* Static Heap File Automatically Generated~%") - (format port " * by scsh/static.scm */~%") - ;; declare the long arrays for each heap chunk - (let ((n (nchunks))) - (do ((i 0 (+ i 1))) - ((= i n)) - (format port "extern const long p~s[~s];~%" i - (quotient (heap:length (vector-ref pure i)) 4))) - (do ((i 0 (+ i 1))) - ((= i n)) - (format port "extern long i~s[~s];~%" i - (quotient (heap:length (vector-ref impure i)) 4)))) - ;; declare the external references - (table-walk - (lambda (address name) - (format port "const extern ~a();~%" name)) - externs) - ))) - -;;; compile-main-c-file -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; creates the top level interfaces that scheme48 wants to see -;;; p_count i_count -;;; number of chunks -;;; p_areas i_areas -;;; pointers to each chunk -;;; p_sizes i_sizes -;;; sizes of each chunk -;;; entry -;;; the starting entry point - (define (compile-main-c-file start reloc options) - (let ((n (nchunks)) - (cc (append (line->list (options:cc-command options)) '(-c)))) - (call-with-output-file "static.c" - (lambda (port) - (format port "#include \"static.h\"~%") - (format port "const long p_count = ~s;~%" n) - (format port "const long i_count = ~s;~%" n) - - (format port "const long * const p_areas[~s] = {" n) - (do ((i 0 (+ i 1))) - ((= i n)) - (format port "(const long *) &p~s, " i)) - (format port "};~%") - (format port "long * const i_areas[~s] = {" n) - (do ((i 0 (+ i 1))) - ((= i n)) - (format port "(long *) &i~s, " i)) - (format port "};~%") - - (format port "const long p_sizes[~s] = {" n) - (do ((i 0 (+ i 1))) - ((= i n)) - (format port "sizeof(p~s), " i)) - (format port "};~%") - (format port "const long i_sizes[~s] = {" n) - (do ((i 0 (+ i 1))) - ((= i n)) - (format port "sizeof(i~s), " i)) - (format port "};~%") - - (display "const long entry = " port) - (scsh-emit-descriptor start reloc port) - (write-char #\; port) - (newline port))) - (let ((command (append cc '("static.c")))) - (message command) - (run (,@command))))) - -;;; compile-c-image -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; responsible for writing and compiling the pure and impure heaps - (define (compile-c-image pure impure reloc externs options) - (compile-c-image1 pure "p" "const " reloc externs options) - (compile-c-image1 impure "i" "" reloc externs options)) - -;;; compile-c-image1 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; writes and compiles the c long array - (define (compile-c-image1 heap name const reloc externs options) - (let* ((n (nchunks)) - (process #f) - (cc (append (line->list (options:cc-command options)) '(-c)))) - ;; iterate over all the chunks for this part of heap - (let chunk-loop ((c 0)) - (cond ((not (= c n)) - (let ((filename (format #f "static-~a~s.c" name c))) - (call-with-output-file filename - (lambda (port) - (format port "#include \"static.h\"~%") - (format port "~a long ~a~s[]={~%" const name c) - (let ((heap (vector-ref heap c))) - ;; iterate over each object - (let heap-loop ((l (heap:objects heap))) - (cond ((not (null? l)) - (scsh-emit-initializer - (car l) reloc externs port) - (heap-loop (cdr l)))))) - (display "};" port) - (newline port))) - ;; wait for last compile before starting new one - (if process - (wait process)) - (let ((command (append cc (list filename)))) - (message command) - (set! process (& (,@command)))) - (chunk-loop (+ 1 c)))) - (else - (wait process)))))) - -;;; link-files -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; links the .o's from compile-c-files -;;; uses the provided flags and libraries -;;; produces outfile as executable - (define (link-files options) - (let ((n (nchunks)) - (ld (append (line->list (options:cc-command options)) - (line->list (options:ld-flags options)) - `(-o ,(options:output-executable options)))) - (libs (line->list (options:libraries options)))) - (let ((command (append ld - (let loop ((i 0) - (l '())) - (cond ((not (= i n)) - (loop (+ i 1) - (cons - (format #f "static-i~s.o" i) - (cons - (format #f "static-p~s.o" i) - l)))) - (else - (reverse - (cons "static.o" - l))))) - (options:args-parser options) - '("-L" "/home/gasbichl/i386_fbsd40/scsh-0.6//lib/scsh" "-lscshvm") - libs))) - (message command) - (run (,@command))))) - -;;; scsh-emit-initializer -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; see scheme48 emit-initialize below - (define (scsh-emit-initializer x reloc externs port) - ;; emit the header - (write-hex port (stob-header x)) - ;; handle descriptor vectors and vm-strings. - ;; everything else is a byte vector - (cond ((d-vector? x) - (scsh-emit-d-vector-initializer x reloc port)) - ((vm-string? x) - (scsh-emit-vm-string-initializer x port)) - (else - (scsh-emit-b-vector-initializer x externs port))) - (if *comments?* - (begin (display " /* " port) - (writex x port) - (display " */" port))) - (newline port)) - -;;; scsh-emit-d-vector -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; descriptor vectors are pretty easy given scsh-emit-descriptor - (define (scsh-emit-d-vector-initializer x reloc port) - (let ((len (d-vector-length x))) - (do ((i 0 (+ i 1))) - ((= i len)) - (scsh-emit-descriptor (d-vector-ref x i) reloc port) - (write-char #\, port)))) - -;;; scsh-emit-descriptor -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; for descrriptors we consult the relocation table - (define (scsh-emit-descriptor x reloc port) - (if (stob? x) - (let ((n (chunk-number x))) - (display "(long)(&" port) - (if (immutable? x) - (display "p" port) - (display "i" port)) - (display n port) - (display "[" port) - (display (quotient (table-ref (vector-ref reloc n) x) 4) port) - (display "])+7" port)) - (format port - (if (negative? x) "-0x~a" "0x~a") - (number->string (abs x) 16)))) - -;;; scsh-emit-vm-string-initializer -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; vm-strings are converted to numbers and byte order adjusted - (define (scsh-emit-vm-string-initializer x port) - (let* ((len (vm-string-length x)) ; end is jawilson style hack - (end (- (cells->bytes (bytes->cells (+ len 1))) 4))) - (do ((i 0 (+ i 4))) - ((= i end) - (case (- len end) - ((0) - (write-hex port 0)) - ((1) - (write-hex - port - (net-to-host-32 (arithmetic-shift - (char->ascii (vm-string-ref x i)) 24)))) - ((2) - (write-hex - port - (net-to-host-32 - (bitwise-ior - (arithmetic-shift - (char->ascii (vm-string-ref x i)) 24) - (arithmetic-shift - (char->ascii (vm-string-ref x (+ i 1))) 16))))) - ((3) - (write-hex - port - (net-to-host-32 - (bitwise-ior - (bitwise-ior - (arithmetic-shift - (char->ascii (vm-string-ref x i)) 24) - (arithmetic-shift - (char->ascii (vm-string-ref x (+ i 1))) 16)) - (arithmetic-shift - (char->ascii (vm-string-ref x (+ i 2))) 8))))))) - (write-hex port - (net-to-host-32 (bitwise-ior - (bitwise-ior - (arithmetic-shift - (char->ascii - (vm-string-ref x i)) 24) - (arithmetic-shift - (char->ascii - (vm-string-ref x (+ i 1))) 16)) - (bitwise-ior - (arithmetic-shift - (char->ascii - (vm-string-ref x (+ i 2))) 8) - (char->ascii - (vm-string-ref x (+ i 3)))))) - )))) - -;;; scsh-emit-b-vector-initializer -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; byte vectors are byte order adjusted too - (define (scsh-emit-b-vector-initializer x externs port) - (cond ((and (code-vector? x) - (table-ref externs x)) => - (lambda (name) - (format port "(long) *~a," name))) - (else - (let* ((len (b-vector-length x)) ;end is jawilson style hack - (end (- (cells->bytes (bytes->cells (+ len 1))) 4))) - (do ((i 0 (+ i 4))) - ((= i end) - (case (- len end) - ((1) - (write-hex - port - (net-to-host-32 - (arithmetic-shift (b-vector-ref x i) 24)))) - ((2) - (write-hex - port - (net-to-host-32 - (bitwise-ior - (arithmetic-shift (b-vector-ref x i) 24) - (arithmetic-shift (b-vector-ref x (+ i 1)) 16))))) - ((3) - (write-hex - port - (net-to-host-32 - (bitwise-ior - (bitwise-ior - (arithmetic-shift (b-vector-ref x i) 24) - (arithmetic-shift (b-vector-ref x (+ i 1)) 16)) - (arithmetic-shift (b-vector-ref x (+ i 2)) 8))) - )))) - (write-hex - port - (net-to-host-32 (bitwise-ior - (bitwise-ior - (arithmetic-shift - (b-vector-ref x i) 24) - (arithmetic-shift - (b-vector-ref x (+ i 1)) 16)) - (bitwise-ior - (arithmetic-shift - (b-vector-ref x (+ i 2)) 8) - (b-vector-ref x (+ i 3)))))))) - ))) - -;;; scsh-for-each-stored-object -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; see scheme48 for-each-stored-object -;;; Image traversal utility - - (define (scsh-for-each-stored-object chunk-start proc chunk-end) - (let ((limit (heap-pointer))) - (let chunk-loop ((addr (newspace-begin)) - (i 0) - (chunk (+ (newspace-begin) *chunk-size*))) - (if (addr< addr limit) - (begin (chunk-start i) - (let loop ((addr addr)) - (if (and (addr< addr limit) - (addr< addr chunk)) - (let* ((d (fetch addr)) - (len (addr1+ (header-a-units d)))) - (if (not (header? d)) - (warn "heap is in an inconsistent state" d)) - (proc i - (address->stob-descriptor (addr1+ addr)) - len) - (loop (addr+ addr len))) - (begin (chunk-end i) - (chunk-loop addr - (+ i 1) - (+ chunk *chunk-size*)))))))))) -;;; write-hex -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; utility routine to print a scheme number as a c hex number - (define (write-hex port x) - (format port - (if (negative? x) "-0x~a," "0x~a,") - (number->string (abs x) 16))) - -;;; line->list -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; utility that takes a string and break it into a list at whitespace -;;; rewrite using scsh stuff? - (define (line->list line) - (let ((len (string-length line))) - (let loop ((start 0) - (end 0) - (l '())) - (cond ((>= end len) - (if (= start end) - l - (append l (list (substring line start end))))) - ((and (= start end) - (or (char=? (string-ref line start) (ascii->char 32)) - (char=? (string-ref line start) (ascii->char 9)))) - (loop (+ 1 start) - (+ 1 end) - l)) - ((or (char=? (string-ref line end) (ascii->char 32)) - (char=? (string-ref line end) (ascii->char 9))) - (loop (+ 1 end) - (+ 1 end) - (append l (list (substring line start end))))) - ((< end len) - (loop start - (+ 1 end) - l)) - (else (error "unexpected case in line->list")))))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Debugging -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - (define (bin n) - (number->string n 2)) - - (define (oct n) - (number->string n 8)) - - (define (dec n) - (number->string n 10)) - - (define (hex n) - (number->string n 16)) - - ;;; Static Heap Code From Scheme48 - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;;; The Scheme 48 version produced monolithic C files that even - ;;; the GNU C Compiler couldn't handle, let alone standard vendor - ;;; compilers... - ;;; It also relied upon the C compiler to fill in some pointer - ;;; information. Because I needed to break up the files, I had to - ;;; calculate this information myself. - - ; For example: - ; (do-it 100000 "~/s48/debug/little.image" "little-heap.c") - ; - ; The first argument to do-it should be somewhat larger than the size, - ; in bytes, of the image file to be converted (which you can obtain with - ; "ls -l"). - ; - ; If the image contains 0-length stored objects, then the .c file will - ; have to be compiled by gcc, since 0-length arrays aren't allowed in - ; ANSI C. This wouldn't be difficult to work around. - - (define *comments?* #f) - - ; 800,000 bytes => 200,000 words => at least 100,000 objects - ; 50 chunks => 16,000 bytes per chunk => 2,000 objects per chunk - (define *chunk-size* 10000) - - (define (do-it bytes infile outfile) - (let ((start (init bytes infile))) - (call-with-output-file outfile - (lambda (port) - (format port "#define D(x) (long)(&x)+7~%") - (format port "#define H unsigned long~%") - (emit-area-declarations "p" immutable? "const " port) - (emit-area-declarations "i" mutable? "" port) - (emit-area-initializers "p" immutable? "const " port) - (emit-area-initializers "i" mutable? "" port) - (display "const long entry = " port) - (emit-descriptor start port) - (write-char #\; port) - (newline port))))) - - (define (init bytes infile) - (create-memory (quotient bytes 2) quiescent) ;Output of ls -l - (initialize-heap (memory-begin) (memory-size)) - (let ((start (read-image infile 0))) - (message (nchunks) - " chunks") - start)) - - (define (nchunks) (+ (chunk-number (heap-pointer)) 1)) - - ; emit struct declarations for areas - - (define (emit-area-declarations name in-area? const port) - (for-each-stored-object - (lambda (chunk) - (message name chunk " declaration") - (display "struct " port) (display name port) (display chunk port) - (display " {" port) (newline port)) - (lambda (x) - (if (in-area? x) - (emit-declaration x port))) - (lambda (chunk) - (display "};" port) - (newline port) - (display const port) - (display "extern struct " port) (display name port) (display chunk port) - (write-char #\space port) (display name port) (display chunk port) - (write-char #\; port) (newline port) - chunk))) - - (define (emit-declaration x port) - (display " H x" port) - (writex x port) - (cond ((d-vector? x) - (display "; long d" port) - (writex x port) - (write-char #\[ port) - (write (d-vector-length x) port)) - ((vm-string? x) - (display "; char d" port) - (writex x port) - (write-char #\[ port) - ;; Ensure alignment (thanks Ian) - (write (cells->bytes (bytes->cells (b-vector-length x))) - port)) - (else - (display "; unsigned char d" port) - (writex x port) - (write-char #\[ port) - ;; Ensure alignment - (write (cells->bytes (bytes->cells (b-vector-length x))) - port))) - (display "];" port) - (if *comments?* - (begin (display " /* " port) - (display (enumerand->name (stob-type x) stob) port) - (display " */" port))) - (newline port)) - - ; Emit initializers for areas - - (define (emit-area-initializers name in-area? const port) - (for-each-stored-object - (lambda (chunk) - (message name chunk " initializer") - - (display const port) - (display "struct " port) (display name port) (write chunk port) - (write-char #\space port) (display name port) (write chunk port) - (display " =" port) (newline port) - - (write-char #\{ port) (newline port)) - (lambda (x) - (if (in-area? x) - (emit-initializer x port))) - (lambda (chunk) - (display "};" port) (newline port))) - - (let ((n (nchunks))) - (format port "const long ~a_count = ~s;~%" name n) - (format port "~a long * const ~a_areas[~s] = {" const name n) - (do ((i 0 (+ i 1))) - ((= i n)) - (format port "(~a long *)&~a~s, " const name i)) - (format port "};~%const long ~a_sizes[~s] = {" name n) - (do ((i 0 (+ i 1))) - ((= i n)) - (format port "sizeof(~a~s), " name i)) - (format port "};~%"))) - - - (define (message . stuff) - (for-each display stuff) (newline)) - - (define (emit-initializer x port) - (display " " port) - (write (stob-header x) port) - (write-char #\, port) - (cond ((d-vector? x) - (emit-d-vector-initializer x port)) - ((vm-string? x) - (write-char #\" port) - (let ((len (vm-string-length x))) - (do ((i 0 (+ i 1))) - ((= i len) (write-char #\" port)) - (let ((c (vm-string-ref x i))) - (cond ((or (char=? c #\") (char=? c #\\)) - (write-char #\\ port)) - ((char=? c #\newline) - (display "\\n\\" port))) - (write-char c port))))) - (else - (write-char #\{ port) - (let ((len (b-vector-length x))) - (do ((i 0 (+ i 1))) - ((= i len) (write-char #\} port)) - (write (b-vector-ref x i) port) - (write-char #\, port))))) - (write-char #\, port) - (if *comments?* - (begin (display " /* " port) - (writex x port) - (display " */" port))) - (newline port)) - - (define (emit-d-vector-initializer x port) - (write-char #\{ port) - (let ((len (d-vector-length x))) - (do ((i 0 (+ i 1))) - ((= i len) (write-char #\} port)) - (emit-descriptor (d-vector-ref x i) port) - (write-char #\, port)))) - - (define (emit-descriptor x port) - (if (stob? x) - (begin (if (immutable? x) - (display "D(p" port) - (display "D(i" port)) - (display (chunk-number x) port) - (display ".x" port) - (writex x port) - (write-char #\) port)) - (write x port))) - - - ; Foo - - (define (writex x port) - (write (quotient (- (- x (memory-begin)) 7) 4) port)) - - (define (chunk-number x) - (quotient (- (- x (memory-begin)) 7) *chunk-size*)) - - - ; Image traversal utility - - (define (for-each-stored-object chunk-start proc chunk-end) - (let ((limit (heap-pointer))) - (let chunk-loop ((addr (newspace-begin)) - (i 0) - (chunk (+ (newspace-begin) *chunk-size*))) - (if (addr< addr limit) - (begin (chunk-start i) - (let loop ((addr addr)) - (if (and (addr< addr limit) - (addr< addr chunk)) - (let ((d (fetch addr))) - (if (not (header? d)) - (warn "heap is in an inconsistent state" d)) - (proc (address->stob-descriptor (addr1+ addr))) - (loop (addr1+ (addr+ addr (header-a-units d))))) - (begin (chunk-end i) - (chunk-loop addr - (+ i 1) - (+ chunk *chunk-size*)))))))))) - - (define (mutable? x) (not (immutable? x))) - - ;; End begin - ))