Changed the makefile system to autoconf/automake.
authorphil <none@none>
Wed, 20 Jan 1999 01:52:45 +0000 (01:52 +0000)
committerphil <none@none>
Wed, 20 Jan 1999 01:52:45 +0000 (01:52 +0000)
added a man page
modified almost every file to get it working with autoconf/automake.
rewrote every line that generated a warning.
cleaned up some of the gc code.

93 files changed:
AUTHORS [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile [deleted file]
Makefile.am [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
Makefile.maintainer [new file with mode: 0644]
Makefile.pre-automake [new file with mode: 0644]
NEWS [new file with mode: 0644]
acconfig.h [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
alpha/Makefile.am [new file with mode: 0644]
alpha/Makefile.in [new file with mode: 0644]
alpha/ngen.c
alpha/threads.h
builtin.c
comp/Makefile.am [new file with mode: 0644]
comp/Makefile.in [new file with mode: 0644]
comp/defines.c
compiler.c
config.guess [new file with mode: 0755]
config.h.in [new file with mode: 0644]
config.sub [new file with mode: 0755]
configure [new file with mode: 0755]
configure.in [new file with mode: 0644]
doc/cacao.1 [new file with mode: 0644]
global.h
headers.c
install-sh [new file with mode: 0755]
jit.c
jit.h
jit/Makefile.am [new file with mode: 0644]
jit/Makefile.in [new file with mode: 0644]
jit/jitdef.h
jit/parse.c
mips/Makefile.am [new file with mode: 0644]
mips/Makefile.in [new file with mode: 0644]
mips/ngen.c
mips/threads.h
missing [new file with mode: 0755]
mm/Makefile [deleted file]
mm/Makefile.am [new file with mode: 0644]
mm/Makefile.in [new file with mode: 0644]
mm/Makefile.pre-automake [new file with mode: 0644]
mm/allocator.h
mm/allocator3.c [new file with mode: 0644]
mm/allocator3.h [new file with mode: 0644]
mm/bitmap2.c
mm/bitmap2.h
mm/bitmap3.c [new file with mode: 0644]
mm/heap.old.c
mm/heap2.c
mm/heap3.c [new file with mode: 0644]
mm/lifespan.c
mm/mm.h
mm/mm3.h [new file with mode: 0644]
nat/Makefile.am [new file with mode: 0644]
nat/Makefile.in [new file with mode: 0644]
nat/lang.c
native.c
src/cacaoh/headers.c
src/mm/Makefile.am [new file with mode: 0644]
src/mm/memory.c
src/native/native.c
src/native/vm/Makefile.am [new file with mode: 0644]
src/threads/green/Makefile.am [new file with mode: 0644]
src/threads/green/locks.c
src/threads/green/locks.h
src/threads/green/threadio.c
src/threads/green/threads.c
src/threads/green/threads.h
src/toolbox/Makefile.am [new file with mode: 0644]
src/vm/builtin.c
src/vm/global.h
src/vm/jit/Makefile.am [new file with mode: 0644]
src/vm/jit/parse.c
src/vm/tables.h
stamp-h.in [new file with mode: 0644]
tables.h
threads/Makefile [deleted file]
threads/Makefile.am [new file with mode: 0644]
threads/Makefile.in [new file with mode: 0644]
threads/Makefile.pre-automake [new file with mode: 0755]
threads/locks.c
threads/locks.h
threads/thread.c
threads/thread.h
threads/threadio.c
toolbox/Makefile [deleted file]
toolbox/Makefile.am [new file with mode: 0644]
toolbox/Makefile.in [new file with mode: 0644]
toolbox/Makefile.pre-automake [new file with mode: 0755]
toolbox/memory.c

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..2593bbb
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,56 @@
+To submit patches
+
+----------------------------------------------------------------------------
+
+OLD JIT-COMPILER
+  Author:
+    Reinhard Grafl
+  Status:
+    Obsolete
+
+NEW JIT-COMPILER
+  Author:
+    Andreas Krall     (andi@complang.tuwien.ac.at)
+  Status:
+    Experimental
+
+ALPHA BACKEND:
+  Authors:
+    Reinhard Grafl
+    Andreas Krall     (andi@complang.tuwien.ac.at)
+  Status:
+    Maintained
+
+SPARC BACKEND:
+  Authors:
+    Andreas Krall     (andi@complang.tuwien.ac.at)
+  Status:
+    Experimental
+
+THREAD SUPPORT
+  Authors:
+    Andreas Krall     (andi@complang.tuwien.ac.at)
+    Mark Probst       (schani@complang.tuwien.ac.at)
+  Status:
+    Maintained
+
+OLD GARBAGE COLLECTOR
+  Author:
+    Reinhard Grafl
+  Maintainer:
+    Philipp Tomsich   (phil@complang.tuwien.ac.at)
+  Status:
+    Obsolete
+
+NEW GARBAGE COLLECTOR
+  Author/Maintainer:
+    Philipp Tomsich   (phil@complang.tuwien.ac.at)
+  Status:
+    Experimental
+
+AUTOMAKE, AUTOCONF SUPPORT
+  Author:
+    Philipp Tomsich
+  Status:
+    Maintained
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..b42a17a
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,182 @@
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory.  After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 211fa6f..0000000
--- a/Makefile
+++ /dev/null
@@ -1,220 +0,0 @@
-################################################################################
-#                    Makefile for the JavaVM - compiler CACAO                  #
-################################################################################
-#
-# Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
-#
-# See file COPYRIGHT for information on usage and disclaimer of warranties
-#
-# Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
-#          Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
-#
-# Last Change: $Id: Makefile 110 1999-01-05 19:26:33Z phil $
-#
-#
-# ATTENTION: This version of the makefile only works with gmake.
-#            This Makefile not only generates object files, but also additional
-#            files needed during compilation:
-#                nativetypes.hh
-#                nativetables.hh
-#            All object files and the *.hh can be deleted savely. They will be
-#            generated automatically.
-#
-################################################################################
-
-VERSION_MAJOR = 0
-VERSION_MINOR = 31
-VERSION_POSTFIX = 
-
-VERSION_STRING=$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_POSTFIX)
-
-##################### generation of the excutable ##############################
-
-# Enabling/disabling thread support
-# USE_THREADS = YES
-USE_THREADS = NO
-
-ifeq ($(USE_THREADS),YES)
-THREAD_OBJ = threads/threads.a
-THREAD_CFLAGS = -DUSE_THREADS -DEXTERNAL_OVERFLOW -DDONT_FREE_FIRST
-else
-THREAD_OBJ =
-THREAD_CFLAGS =
-endif
-
-#CC = cc
-#ARCHFLAGS = 
-#CFLAGS = -g -mieee -Wall $(THREAD_CFLAGS) $(ARCHFLAGS)
-#CFLAGS = -mieee -O3 -Wall $(THREAD_CFLAGS) $(ARCHFLAGS)
-#LFLAGS = -lm
-
-CC = cc
-ARCHFLAGS = 
-CFLAGS = -g -ieee $(THREAD_CFLAGS) $(ARCHFLAGS)
-#CFLAGS = -O6 -g -pg -ieee $(THREAD_CFLAGS) $(ARCHFLAGS)
-#CFLAGS = -O2 -g -ieee -fno-inline $(THREAD_CFLAGS) $(ARCHFLAGS)
-#CFLAGS = -O6 -ieee $(THREAD_CFLAGS) $(ARCHFLAGS)
-#CFLAGS = -O3 -ieee $(THREAD_CFLAGS) $(ARCHFLAGS)
-LFLAGS = -lm
-
-# IRIX 6.5 MIPSPro 7.2.1
-#CC = cc
-#ARCHFLAGS = -DDONT_MMAP
-#CFLAGS = -g $(THREAD_CFLAGS) -DMAP_ANONYMOUS=0 -woff 1048,1110,1164,1515 $(ARCHFLAGS)
-#CFLAGS = -O2 -OPT:Olimit=0 $(THREAD_CFLAGS) -DMAP_ANONYMOUS=0 $(ARCHFLAGS)
-#LFLAGS = -lm -lelfutil
-
-OBJ = main.o tables.o loader.o compiler.o jit.o builtin.o asmpart.o \
-       toolbox/toolbox.a native.o $(THREAD_OBJ) mm/mm.o
-OBJH = headers.o tables.o loader.o builtin.o toolbox/toolbox.a $(THREAD_OBJ) \
-mm/mm.o
-
-cacao: $(OBJ)
-       $(CC) $(CFLAGS) -o cacao $(OBJ) $(LFLAGS)
-cacaoh: $(OBJH)
-       $(CC) $(CFLAGS) -o cacaoh $(OBJH) $(LFLAGS)
-
-main.o: main.c global.h tables.h loader.h jit.h compiler.h \
-        asmpart.h builtin.h native.h
-
-headers.o:  headers.c global.h tables.h loader.h
-
-loader.o:   loader.c global.h loader.h tables.h native.h asmpart.h
-
-compiler.o: builtin.h compiler.h global.h loader.h tables.h native.h \
-            asmpart.h compiler.c comp/*.c sysdep/gen.c sysdep/disass.c
-
-jit.o:  builtin.h jit.h global.h loader.h tables.h native.h asmpart.h \
-            jit/jitdef.h jit/*.c sysdep/ngen.h sysdep/ngen.c sysdep/disass.c
-
-builtin.o: builtin.c global.h loader.h builtin.h tables.h sysdep/native-math.h
-
-native.o: native.c global.h tables.h native.h asmpart.h builtin.h \
-          nativetypes.hh nativetable.hh nat/*.c
-
-tables.o: tables.c global.h tables.h
-
-global.h: sysdep/types.h toolbox/*.h
-       touch global.h
-
-toolbox/toolbox.a: toolbox/*.c toolbox/*.h
-       cd toolbox; $(MAKE) toolbox.a "CFLAGS=$(CFLAGS)" "CC=$(CC)" 
-
-ifeq ($(USE_THREADS),YES)
-threads/threads.a: threads/*.c threads/*.h sysdep/threads.h
-       cd threads; $(MAKE) threads.a "USE_THREADS=$(USE_THREADS)" "CFLAGS=$(CFLAGS)" "CC=$(CC)" 
-endif
-
-mm/mm.o: mm/*.[ch] mm/Makefile
-       cd mm; $(MAKE) mm.o "USE_THREADS=$(USE_THREADS)" "CFLAGS=$(CFLAGS)" "CC=$(CC)"
-
-asmpart.o: sysdep/asmpart.c sysdep/offsets.h
-       rm -f asmpart.s
-       $(CC) -E sysdep/asmpart.c > asmpart.s
-       $(CC) -c -o asmpart.o asmpart.s
-       rm -f asmpart.s
-
-
-########################### support targets ####################################
-
-clean:
-       rm -f *.o cacao cacaoh cacao.tgz nativetable.hh nativetypes.hh \
-             core tst/core
-       cd toolbox; $(MAKE) clean
-       cd threads; $(MAKE) clean
-       cd mm; $(MAKE) clean
-
-
-### DISTRIBUTION TARGETS ###
-
-DISTRIBUTION_FILES = \
-Makefile \
-*/Makefile \
-README \
-COPYRIGHT \
-tst/*.java \
-doc/*.doc \
-html/*.html \
-*.[ch] \
-comp/*.[ch] \
-jit/*.[ch] \
-alpha/*.doc \
-alpha/*.[ch] \
-nat/*.[ch] \
-toolbox/*.[ch] \
-threads/*.[ch] \
-mm/*.[ch] \
-# sparc/*.[ch]
-
-tar:
-       rm -f cacao.tgz cacao.tar
-       tar -cvf cacao.tar $(DISTRIBUTION_FILES)
-       ls -l cacao.tar
-       gzip -9 cacao.tar
-       mv cacao.tar.gz cacao.tgz
-       ls -l cacao.tgz
-
-dist:
-       rm -rf cacao-$(VERSION_STRING).tar.gz cacao-$(VERSION_STRING);
-       ( mkdir cacao-$(VERSION_STRING); \
-         tar -cvf cacao-$(VERSION_STRING).tar $(DISTRIBUTION_FILES); \
-         cd cacao-$(VERSION_STRING); \
-         tar -xf ../cacao-$(VERSION_STRING).tar; \
-         cd ..; \
-         rm cacao-$(VERSION_STRING).tar; \
-         tar -cvf cacao-$(VERSION_STRING).tar cacao-$(VERSION_STRING); \
-         rm -rf cacao-$(VERSION_STRING); )
-       gzip -9 cacao-$(VERSION_STRING).tar
-       ls -l cacao-$(VERSION_STRING).tar.gz
-
-########################## supported architectures #############################
-
-config-alpha:
-       rm -f sysdep
-       ln -s alpha sysdep
-       rm -f threads/sysdep
-       ln -s ../sysdep threads/sysdep
-       $(MAKE) clean
-
-config-sparc:
-       rm -f sysdep
-       ln -s sparc sysdep
-       rm -f threads/sysdep
-       ln -s ../sysdep threads/sysdep
-       $(MAKE) clean
-
-config-mips:
-       rm -f sysdep
-       ln -s mips sysdep
-       rm -f threads/sysdep
-       ln -s ../sysdep threads/sysdep
-       $(MAKE) clean
-
-
-##################### generation of NATIVE - header files ######################
-
-sysdep/offsets.h nativetypes.hh nativetable.hh : cacaoh
-       ./cacaoh java.lang.Object \
-       java.lang.String \
-       java.lang.Class \
-       java.lang.ClassLoader \
-       java.lang.Compiler \
-       java.lang.Double \
-       java.lang.Float \
-       java.lang.Math \
-       java.lang.Runtime \
-       java.lang.SecurityManager \
-       java.lang.System \
-       java.lang.Thread \
-       java.lang.ThreadGroup \
-       java.lang.Throwable \
-\
-       java.io.File \
-       java.io.FileDescriptor \
-       java.io.FileInputStream \
-       java.io.FileOutputStream \
-       java.io.PrintStream \
-       java.io.RandomAccessFile \
-\
-       java.util.Properties \
-       java.util.Date
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..ba76358
--- /dev/null
@@ -0,0 +1,97 @@
+## Process this file with automake to produce Makefile.in
+
+# $Id: Makefile.am 115 1999-01-20 01:52:45Z phil $
+
+MAINTAINERCLEANFILES = Makefile.in configure
+SUBDIRS = toolbox mm alpha jit nat comp threads mips
+
+EXTRA_DIST = html/cacaoinstall.html html/cacaoman.html html/index.html \
+                        doc/cacao.1
+
+CLEANFILES = @SYSDEP_DIR@/asmpart.o \
+                        @SYSDEP_DIR@/asmpart.s \
+             @SYSDEP_DIR@/offsets.h \
+                nativetable.hh \
+                nativetypes.hh
+
+bin_PROGRAMS = cacao
+noinst_PROGRAMS = cacaoh
+man_MANS = doc/cacao.1
+
+INCLUDES=-I/usr/include -I$(top_srcdir)/@SYSDEP_DIR@ -I$(top_srcdir)/jit
+
+cacao_SOURCES = \
+       asmpart.h \
+       builtin.c \
+       builtin.h \
+       callargs.h \
+       compiler.c \
+       compiler.h \
+       global.h \
+       jit.c \
+       jit.h \
+       loader.c \
+       loader.h \
+       main.c \
+       native.c \
+       native.h \
+       tables.c \
+       tables.h
+
+cacao_LDADD = \
+       @SYSDEP_DIR@/asmpart.o \
+       toolbox/libtoolbox.a \
+       @GC_OBJ@ \
+    @THREAD_OBJ@
+
+cacao_DEPENDENCIES = \
+       @SYSDEP_DIR@/asmpart.o \
+       toolbox/libtoolbox.a \
+       @GC_OBJ@ \
+       @THREAD_OBJ@
+
+cacaoh_SOURCES = headers.c tables.c loader.c builtin.c
+cacaoh_LDADD = toolbox/libtoolbox.a @GC_OBJ@ @THREAD_OBJ@
+cacaoh_DEPENDENCIES = toolbox/libtoolbox.a @GC_OBJ@ @THREAD_OBJ@
+
+native.c: nativetypes.hh @SYSDEP_DIR@/offsets.h nativetable.hh
+
+nativetypes.hh @SYSDEP_DIR@/offsets.h nativetable.hh: cacaoh
+       ./cacaoh \
+               java.lang.Object \
+               java.lang.String \
+               java.lang.Class \
+               java.lang.ClassLoader \
+               java.lang.Compiler \
+               java.lang.Double \
+               java.lang.Float \
+               java.lang.Math \
+               java.lang.Runtime \
+               java.lang.SecurityManager \
+               java.lang.System \
+               java.lang.Thread \
+               java.lang.ThreadGroup \
+               java.lang.Throwable \
+               java.io.File \
+               java.io.FileDescriptor \
+               java.io.FileInputStream \
+               java.io.FileOutputStream \
+               java.io.PrintStream \
+               java.io.RandomAccessFile \
+               java.util.Properties \
+               java.util.Date
+
+@SYSDEP_DIR@/asmpart.o: $(top_srcdir)/@SYSDEP_DIR@/asmpart.c @SYSDEP_DIR@/offsets.h
+       rm -f @SYSDEP_DIR@/asmpart.s
+       @CPP@ $(top_srcdir)/@SYSDEP_DIR@/asmpart.c > @SYSDEP_DIR@/asmpart.s
+       @CC@ -c -o @SYSDEP_DIR@/asmpart.o @SYSDEP_DIR@/asmpart.s
+       rm -f asmpart.s
+
+
+## Local variables:
+## mode: Makefile
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 4
+## compile-command: "automake --add-missing"
+## End:
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..5d806f1
--- /dev/null
@@ -0,0 +1,558 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# $Id: Makefile.in 115 1999-01-20 01:52:45Z phil $
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+MAINTAINERCLEANFILES = Makefile.in configure
+SUBDIRS = toolbox mm alpha jit nat comp threads mips
+
+EXTRA_DIST = html/cacaoinstall.html html/cacaoman.html html/index.html                          doc/cacao.1
+
+
+CLEANFILES = @SYSDEP_DIR@/asmpart.o                     @SYSDEP_DIR@/asmpart.s              @SYSDEP_DIR@/offsets.h              nativetable.hh                  nativetypes.hh
+
+
+bin_PROGRAMS = cacao
+noinst_PROGRAMS = cacaoh
+man_MANS = doc/cacao.1
+
+INCLUDES = -I/usr/include -I$(top_srcdir)/@SYSDEP_DIR@ -I$(top_srcdir)/jit
+
+cacao_SOURCES =        asmpart.h       builtin.c       builtin.h       callargs.h      compiler.c      compiler.h      global.h        jit.c   jit.h   loader.c        loader.h        main.c  native.c        native.h        tables.c        tables.h
+
+
+cacao_LDADD =          @SYSDEP_DIR@/asmpart.o  toolbox/libtoolbox.a    @GC_OBJ@     @THREAD_OBJ@
+
+
+cacao_DEPENDENCIES =   @SYSDEP_DIR@/asmpart.o  toolbox/libtoolbox.a    @GC_OBJ@        @THREAD_OBJ@
+
+
+cacaoh_SOURCES = headers.c tables.c loader.c builtin.c
+cacaoh_LDADD = toolbox/libtoolbox.a @GC_OBJ@ @THREAD_OBJ@
+cacaoh_DEPENDENCIES = toolbox/libtoolbox.a @GC_OBJ@ @THREAD_OBJ@
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = 
+PROGRAMS =  $(bin_PROGRAMS) $(noinst_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I.
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+cacao_OBJECTS =  builtin.o compiler.o jit.o loader.o main.o native.o \
+tables.o
+cacao_LDFLAGS = 
+cacaoh_OBJECTS =  headers.o tables.o loader.o builtin.o
+cacaoh_LDFLAGS = 
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+man1dir = $(mandir)/man1
+MANS = $(man_MANS)
+
+NROFF = nroff
+DIST_COMMON =  README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
+Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 config.guess \
+config.h.in config.sub configure configure.in install-sh missing \
+mkinstalldirs
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+SOURCES = $(cacao_SOURCES) $(cacaoh_SOURCES)
+OBJECTS = $(cacao_OBJECTS) $(cacaoh_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4):  configure.in 
+       cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+       cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+       @if test ! -f $@; then \
+               rm -f stamp-h; \
+               $(MAKE) stamp-h; \
+       else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES= CONFIG_HEADERS=config.h \
+            $(SHELL) ./config.status
+       @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
+       @if test ! -f $@; then \
+               rm -f $(srcdir)/stamp-h.in; \
+               $(MAKE) $(srcdir)/stamp-h.in; \
+       else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+       cd $(top_srcdir) && $(AUTOHEADER)
+       @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+       -rm -f config.h
+
+maintainer-clean-hdr:
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(bindir)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         if test -f $$p; then \
+           echo "  $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+            $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+         else :; fi; \
+       done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       list='$(bin_PROGRAMS)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+       done
+
+mostlyclean-noinstPROGRAMS:
+
+clean-noinstPROGRAMS:
+       -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+distclean-noinstPROGRAMS:
+
+maintainer-clean-noinstPROGRAMS:
+
+.c.o:
+       $(COMPILE) -c $<
+
+.s.o:
+       $(COMPILE) -c $<
+
+.S.o:
+       $(COMPILE) -c $<
+
+mostlyclean-compile:
+       -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+       -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+cacao: $(cacao_OBJECTS) $(cacao_DEPENDENCIES)
+       @rm -f cacao
+       $(LINK) $(cacao_LDFLAGS) $(cacao_OBJECTS) $(cacao_LDADD) $(LIBS)
+
+cacaoh: $(cacaoh_OBJECTS) $(cacaoh_DEPENDENCIES)
+       @rm -f cacaoh
+       $(LINK) $(cacaoh_LDFLAGS) $(cacaoh_OBJECTS) $(cacaoh_LDADD) $(LIBS)
+
+install-man1:
+       $(mkinstalldirs) $(DESTDIR)$(man1dir)
+       @list='$(man1_MANS)'; \
+       l2='$(man_MANS)'; for i in $$l2; do \
+         case "$$i" in \
+           *.1*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+         else file=$$i; fi; \
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+         $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+       done
+
+uninstall-man1:
+       @list='$(man1_MANS)'; \
+       l2='$(man_MANS)'; for i in $$l2; do \
+         case "$$i" in \
+           *.1*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+         rm -f $(DESTDIR)$(man1dir)/$$inst; \
+       done
+install-man: $(MANS)
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-man1
+uninstall-man:
+       @$(NORMAL_UNINSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) uninstall-man1
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive  \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+       @set fnord $(MAKEFLAGS); amf=$$2; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @set fnord $(MAKEFLAGS); amf=$$2; \
+       dot_seen=no; \
+       rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+         rev="$$subdir $$rev"; \
+         test "$$subdir" = "." && dot_seen=yes; \
+       done; \
+       test "$$dot_seen" = "no" && rev=". $$rev"; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+   if test "$$subdir" = .; then :; else \
+           test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+   fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+       -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       -rm -rf $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+       mkdir $(distdir)/=build
+       mkdir $(distdir)/=inst
+       dc_install_base=`cd $(distdir)/=inst && pwd`; \
+       cd $(distdir)/=build \
+         && ../configure --srcdir=.. --prefix=$$dc_install_base \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) dist
+       -rm -rf $(distdir)
+       @banner="$(distdir).tar.gz is ready for distribution"; \
+       dashes=`echo "$$banner" | sed s/./=/g`; \
+       echo "$$dashes"; \
+       echo "$$banner"; \
+       echo "$$dashes"
+dist: distdir
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
+dist-all: distdir
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
+distdir: $(DISTFILES)
+       -rm -rf $(distdir)
+       mkdir $(distdir)
+       -chmod 777 $(distdir)
+       $(mkinstalldirs) $(distdir)/doc $(distdir)/html
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+       for subdir in $(SUBDIRS); do \
+         if test "$$subdir" = .; then :; else \
+           test -d $(distdir)/$$subdir \
+           || mkdir $(distdir)/$$subdir \
+           || exit 1; \
+           chmod 777 $(distdir)/$$subdir; \
+           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+             || exit 1; \
+         fi; \
+       done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-recursive
+
+install-data-am: install-man
+install-data: install-data-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+uninstall: uninstall-recursive
+all-am: Makefile $(PROGRAMS) $(MANS) config.h
+all-redirect: all-recursive-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+       $(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
+
+
+mostlyclean-generic:
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-hdr mostlyclean-binPROGRAMS \
+               mostlyclean-noinstPROGRAMS mostlyclean-compile \
+               mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am:  clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS \
+               clean-compile clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am:  distclean-hdr distclean-binPROGRAMS \
+               distclean-noinstPROGRAMS distclean-compile \
+               distclean-tags distclean-generic clean-am
+
+distclean: distclean-recursive
+       -rm -f config.status
+
+maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-binPROGRAMS \
+               maintainer-clean-noinstPROGRAMS \
+               maintainer-clean-compile maintainer-clean-tags \
+               maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
+clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile install-man1 uninstall-man1 install-man \
+uninstall-man install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+native.c: nativetypes.hh @SYSDEP_DIR@/offsets.h nativetable.hh
+
+nativetypes.hh @SYSDEP_DIR@/offsets.h nativetable.hh: cacaoh
+       ./cacaoh \
+               java.lang.Object \
+               java.lang.String \
+               java.lang.Class \
+               java.lang.ClassLoader \
+               java.lang.Compiler \
+               java.lang.Double \
+               java.lang.Float \
+               java.lang.Math \
+               java.lang.Runtime \
+               java.lang.SecurityManager \
+               java.lang.System \
+               java.lang.Thread \
+               java.lang.ThreadGroup \
+               java.lang.Throwable \
+               java.io.File \
+               java.io.FileDescriptor \
+               java.io.FileInputStream \
+               java.io.FileOutputStream \
+               java.io.PrintStream \
+               java.io.RandomAccessFile \
+               java.util.Properties \
+               java.util.Date
+
+@SYSDEP_DIR@/asmpart.o: $(top_srcdir)/@SYSDEP_DIR@/asmpart.c @SYSDEP_DIR@/offsets.h
+       rm -f @SYSDEP_DIR@/asmpart.s
+       @CPP@ $(top_srcdir)/@SYSDEP_DIR@/asmpart.c > @SYSDEP_DIR@/asmpart.s
+       @CC@ -c -o @SYSDEP_DIR@/asmpart.o @SYSDEP_DIR@/asmpart.s
+       rm -f asmpart.s
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Makefile.maintainer b/Makefile.maintainer
new file mode 100644 (file)
index 0000000..67a420c
--- /dev/null
@@ -0,0 +1,12 @@
+all:
+       autoconf;
+       aclocal;
+       autoheader;
+       automake;
+
+fixed_deps:
+       automake -i;
+
+clean:
+       rm -f *~ */*~;
+       make maintainer-clean;
\ No newline at end of file
diff --git a/Makefile.pre-automake b/Makefile.pre-automake
new file mode 100644 (file)
index 0000000..c5d2692
--- /dev/null
@@ -0,0 +1,220 @@
+################################################################################
+#                    Makefile for the JavaVM - compiler CACAO                  #
+################################################################################
+#
+# Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
+#
+# See file COPYRIGHT for information on usage and disclaimer of warranties
+#
+# Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
+#          Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
+#
+# Last Change: $Id: Makefile.pre-automake 115 1999-01-20 01:52:45Z phil $
+#
+#
+# ATTENTION: This version of the makefile only works with gmake.
+#            This Makefile not only generates object files, but also additional
+#            files needed during compilation:
+#                nativetypes.hh
+#                nativetables.hh
+#            All object files and the *.hh can be deleted savely. They will be
+#            generated automatically.
+#
+################################################################################
+
+VERSION_MAJOR = 0
+VERSION_MINOR = 31
+VERSION_POSTFIX = 
+
+VERSION_STRING=$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_POSTFIX)
+
+##################### generation of the excutable ##############################
+
+# Enabling/disabling thread support
+# USE_THREADS = YES
+USE_THREADS = NO
+
+ifeq ($(USE_THREADS),YES)
+THREAD_OBJ = threads/threads.a
+THREAD_CFLAGS = -DUSE_THREADS -DEXTERNAL_OVERFLOW -DDONT_FREE_FIRST
+else
+THREAD_OBJ =
+THREAD_CFLAGS =
+endif
+
+#CC = cc
+#ARCHFLAGS = 
+#CFLAGS = -g -mieee -Wall $(THREAD_CFLAGS) $(ARCHFLAGS)
+#CFLAGS = -mieee -O3 -Wall $(THREAD_CFLAGS) $(ARCHFLAGS)
+#LFLAGS = -lm
+
+CC = cc
+ARCHFLAGS = 
+CFLAGS = -g -ieee $(THREAD_CFLAGS) $(ARCHFLAGS)
+#CFLAGS = -O6 -g -pg -ieee $(THREAD_CFLAGS) $(ARCHFLAGS)
+#CFLAGS = -O2 -g -ieee -fno-inline $(THREAD_CFLAGS) $(ARCHFLAGS)
+#CFLAGS = -O6 -ieee $(THREAD_CFLAGS) $(ARCHFLAGS)
+#CFLAGS = -O3 -ieee $(THREAD_CFLAGS) $(ARCHFLAGS)
+LFLAGS = -lm
+
+# IRIX 6.5 MIPSPro 7.2.1
+#CC = cc
+#ARCHFLAGS = -DDONT_MMAP
+#CFLAGS = -g $(THREAD_CFLAGS) -DMAP_ANONYMOUS=0 -woff 1048,1110,1164,1515 $(ARCHFLAGS)
+#CFLAGS = -O2 -OPT:Olimit=0 $(THREAD_CFLAGS) -DMAP_ANONYMOUS=0 $(ARCHFLAGS)
+#LFLAGS = -lm -lelfutil
+
+OBJ = main.o tables.o loader.o compiler.o jit.o builtin.o asmpart.o \
+       toolbox/toolbox.a native.o $(THREAD_OBJ) mm/mm.o
+OBJH = headers.o tables.o loader.o builtin.o toolbox/toolbox.a $(THREAD_OBJ) \
+mm/mm.o
+
+cacao: $(OBJ)
+       $(CC) $(CFLAGS) -o cacao $(OBJ) $(LFLAGS)
+cacaoh: $(OBJH)
+       $(CC) $(CFLAGS) -o cacaoh $(OBJH) $(LFLAGS)
+
+main.o: main.c global.h tables.h loader.h jit.h compiler.h \
+        asmpart.h builtin.h native.h
+
+headers.o:  headers.c global.h tables.h loader.h
+
+loader.o:   loader.c global.h loader.h tables.h native.h asmpart.h
+
+compiler.o: builtin.h compiler.h global.h loader.h tables.h native.h \
+            asmpart.h compiler.c comp/*.c sysdep/gen.c sysdep/disass.c
+
+jit.o:  builtin.h jit.h global.h loader.h tables.h native.h asmpart.h \
+            jit/jitdef.h jit/*.c sysdep/ngen.h sysdep/ngen.c sysdep/disass.c
+
+builtin.o: builtin.c global.h loader.h builtin.h tables.h sysdep/native-math.h
+
+native.o: native.c global.h tables.h native.h asmpart.h builtin.h \
+          nativetypes.hh nativetable.hh nat/*.c
+
+tables.o: tables.c global.h tables.h
+
+global.h: sysdep/types.h toolbox/*.h
+       touch global.h
+
+toolbox/toolbox.a: toolbox/*.c toolbox/*.h
+       cd toolbox; $(MAKE) toolbox.a "CFLAGS=$(CFLAGS)" "CC=$(CC)" 
+
+ifeq ($(USE_THREADS),YES)
+threads/threads.a: threads/*.c threads/*.h sysdep/threads.h
+       cd threads; $(MAKE) threads.a "USE_THREADS=$(USE_THREADS)" "CFLAGS=$(CFLAGS)" "CC=$(CC)" 
+endif
+
+mm/mm.o: mm/*.[ch] mm/Makefile
+       cd mm; $(MAKE) mm.o "USE_THREADS=$(USE_THREADS)" "CFLAGS=$(CFLAGS)" "CC=$(CC)"
+
+asmpart.o: sysdep/asmpart.c sysdep/offsets.h
+       rm -f asmpart.s
+       $(CC) -E sysdep/asmpart.c > asmpart.s
+       $(CC) -c -o asmpart.o asmpart.s
+       rm -f asmpart.s
+
+
+########################### support targets ####################################
+
+clean:
+       rm -f *.o cacao cacaoh cacao.tgz nativetable.hh nativetypes.hh \
+             core tst/core
+       cd toolbox; $(MAKE) clean
+       cd threads; $(MAKE) clean
+       cd mm; $(MAKE) clean
+
+
+### DISTRIBUTION TARGETS ###
+
+DISTRIBUTION_FILES = \
+Makefile \
+*/Makefile \
+README \
+COPYRIGHT \
+tst/*.java \
+doc/*.doc \
+html/*.html \
+*.[ch] \
+comp/*.[ch] \
+jit/*.[ch] \
+alpha/*.doc \
+alpha/*.[ch] \
+nat/*.[ch] \
+toolbox/*.[ch] \
+threads/*.[ch] \
+mm/*.[ch] \
+# sparc/*.[ch]
+
+tar:
+       rm -f cacao.tgz cacao.tar
+       tar -cvf cacao.tar $(DISTRIBUTION_FILES)
+       ls -l cacao.tar
+       gzip -9 cacao.tar
+       mv cacao.tar.gz cacao.tgz
+       ls -l cacao.tgz
+
+dist:
+       rm -rf cacao-$(VERSION_STRING).tar.gz cacao-$(VERSION_STRING);
+       ( mkdir cacao-$(VERSION_STRING); \
+         tar -cvf cacao-$(VERSION_STRING).tar $(DISTRIBUTION_FILES); \
+         cd cacao-$(VERSION_STRING); \
+         tar -xf ../cacao-$(VERSION_STRING).tar; \
+         cd ..; \
+         rm cacao-$(VERSION_STRING).tar; \
+         tar -cvf cacao-$(VERSION_STRING).tar cacao-$(VERSION_STRING); \
+         rm -rf cacao-$(VERSION_STRING); )
+       gzip -9 cacao-$(VERSION_STRING).tar
+       ls -l cacao-$(VERSION_STRING).tar.gz
+
+########################## supported architectures #############################
+
+config-alpha:
+       rm -f sysdep
+       ln -s alpha sysdep
+       rm -f threads/sysdep
+       ln -s ../sysdep threads/sysdep
+       $(MAKE) clean
+
+config-sparc:
+       rm -f sysdep
+       ln -s sparc sysdep
+       rm -f threads/sysdep
+       ln -s ../sysdep threads/sysdep
+       $(MAKE) clean
+
+config-mips:
+       rm -f sysdep
+       ln -s mips sysdep
+       rm -f threads/sysdep
+       ln -s ../sysdep threads/sysdep
+       $(MAKE) clean
+
+
+##################### generation of NATIVE - header files ######################
+
+sysdep/offsets.h nativetypes.hh nativetable.hh : cacaoh
+       ./cacaoh java.lang.Object \
+       java.lang.String \
+       java.lang.Class \
+       java.lang.ClassLoader \
+       java.lang.Compiler \
+       java.lang.Double \
+       java.lang.Float \
+       java.lang.Math \
+       java.lang.Runtime \
+       java.lang.SecurityManager \
+       java.lang.System \
+       java.lang.Thread \
+       java.lang.ThreadGroup \
+       java.lang.Throwable \
+\
+       java.io.File \
+       java.io.FileDescriptor \
+       java.io.FileInputStream \
+       java.io.FileOutputStream \
+       java.io.PrintStream \
+       java.io.RandomAccessFile \
+\
+       java.util.Properties \
+       java.util.Date
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..7112ea8
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,55 @@
+* About this file
+=================
+
+This file lists the most important changes for each official as well as
+internal release of cacao.  See the "ChangeLog" for a more detailed list of
+all the changes in the code.
+
+* Version 0.40 (released)
+=========================
+
+
+
+* Version 0.35 (experimental)
+=============================
+
+** autoconf, automake support
+-----------------------------
+
+Finally moved the entire distribution to autoconf/automake. This should fix
+some of our problems with supporting different compilers. Thread support and
+the use of the new garbage collector can be enabled/disabled from using
+configure arguments:
+
+       --enable-threads [default]
+       --disable-threads
+
+       --enable-gc2 [default]
+       --disable-gc2
+
+** new garbage collector
+------------------------
+
+Included the new garbage collector as default garbage collector. 
+
+** new just-in-time compiler
+----------------------------
+
+Andi, write something...
+
+* Version 0.30 (released)
+=========================
+
+Andi, write something!!!
+
+* Version 0.20 (released)
+=========================
+
+Andi, write something down here, too!
+
+
+----------------------------------------------------------------------------
+Local variables:
+mode: outline
+fill-column: 76
+End:
diff --git a/acconfig.h b/acconfig.h
new file mode 100644 (file)
index 0000000..61eecfb
--- /dev/null
@@ -0,0 +1,17 @@
+/* Define if mman.h defines MAP_FAILED  */
+#undef HAVE_MAP_FAILED
+
+/* Define if mman.h defines MAP_ANONYMOUS  */
+#undef HAVE_MAP_ANONYMOUS
+
+/* Define to include thread support */
+#undef USE_THREADS
+#undef EXTERNAL_OVERFLOW
+#undef DONT_FREE_FIRST
+
+/* Make automake happy */
+#undef PACKAGE
+#undef VERSION
+
+/* sysdep */
+#undef SYSDEP_DIR
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..f23ba29
--- /dev/null
@@ -0,0 +1,127 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4
+
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# Do all the work for Automake.  This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "[$]*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "[$]*" != "X $srcdir/configure conftestfile" \
+      && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "[$]2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+   $1=$2
+   AC_MSG_RESULT(found)
+else
+   $1="$3/missing $2"
+   AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated.  We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+  case " <<$>>CONFIG_HEADERS " in
+  *" <<$>>am_file "*<<)>>
+    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+    ;;
+  esac
+  am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
diff --git a/alpha/Makefile.am b/alpha/Makefile.am
new file mode 100644 (file)
index 0000000..a48a86a
--- /dev/null
@@ -0,0 +1,3 @@
+EXTRA_DIST = asmpart.c disass.c cray.c gen.c ngen.c \
+            defines.h native-math.h ngen.h sigcontext.h \
+            types.h threads.h 
diff --git a/alpha/Makefile.in b/alpha/Makefile.in
new file mode 100644 (file)
index 0000000..0c2175a
--- /dev/null
@@ -0,0 +1,175 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+EXTRA_DIST = asmpart.c disass.c cray.c gen.c ngen.c         defines.h native-math.h ngen.h sigcontext.h             types.h threads.h 
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps alpha/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = alpha
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
index 16876ad75a342dd0e81a921b3a0f53d874a1415d..bd6d78252523d4872f1bdd0c14b0855f98b3c352 100644 (file)
        Authors: Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
                 Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: 1998/08/10
+       Last Change: $Id: ngen.c 115 1999-01-20 01:52:45Z phil $
 
 *******************************************************************************/
 
-
+#include "jitdef.h"   /* phil */
 
 /* *****************************************************************************
 
index 828f6efa0dc78a9d7743a5ba2b3d9a032e47c046..1eaff9b8b4eb7d59b1c88508e017c748d6936d8c 100644 (file)
@@ -17,7 +17,8 @@
 #ifndef __sysdep_threads_h
 #define __sysdep_threads_h
 
-#include "../threads/thread.h"
+#include "config.h"
+#include "threads/thread.h"
 
 /* Thread handling */
 
index 1d1cf3a01879743db902189415e330d6991efd5d..dd1fa71d6946a918bd58f2bb676a46c8aacc22da 100644 (file)
--- a/builtin.c
+++ b/builtin.c
@@ -28,7 +28,7 @@
 #include "threads/thread.h"
 #include "threads/locks.h"              /* schani */
 
-#include "sysdep/native-math.h"
+#include "native-math.h"
 
 builtin_descriptor builtin_desc[] = {
        {(functionptr) builtin_instanceof,         "instanceof"},
diff --git a/comp/Makefile.am b/comp/Makefile.am
new file mode 100644 (file)
index 0000000..5314dd8
--- /dev/null
@@ -0,0 +1,2 @@
+EXTRA_DIST = block.c local.c parse.c reg.c stack.c var.c \
+            defines.c mcode.c pcmd.c regalloc.c tools.c
diff --git a/comp/Makefile.in b/comp/Makefile.in
new file mode 100644 (file)
index 0000000..85e6980
--- /dev/null
@@ -0,0 +1,175 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+EXTRA_DIST = block.c local.c parse.c reg.c stack.c var.c            defines.c mcode.c pcmd.c regalloc.c tools.c
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps comp/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = comp
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
index 09987a6efd5cf797bfdadd42b9d67f89011ab214..df6ec2401f24137759f675a68c759001abd3ade5 100644 (file)
@@ -14,7 +14,7 @@
 
 *******************************************************************************/
 
-#include "../sysdep/types.h"
+#include "types.h"
 
 /*********************** resolve typedef-cycles *******************************/
 
index 0f6b55e544b564b0bdf8bba4f4608085fb672aec..b1d55bb507781e747ff08d584fb642b1a52b97f8 100644 (file)
@@ -147,8 +147,8 @@ static chain *uninitializedclasses;
 #include "comp/stack.c"    /* Verwaltung des JavaVM-Stacks */
 #include "comp/regalloc.c" /* Registerallokator */
 
-#include "sysdep/gen.c"    /* systemABh"angiger Codegenerator */
-#include "sysdep/disass.c" /* Disassembler (nur zu Debug-Zwecken) */ 
+#include "gen.c"    /* systemABh"angiger Codegenerator */
+#include "disass.c" /* Disassembler (nur zu Debug-Zwecken) */ 
 
 #include "comp/block.c"    /* Verwaltung der basic blocks */ 
 #include "comp/parse.c"    /* JavaVM - parser */
diff --git a/config.guess b/config.guess
new file mode 100755 (executable)
index 0000000..d8c2470
--- /dev/null
@@ -0,0 +1,600 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    alpha:OSF1:*:*)
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
+       exit 0 ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-cbm-sysv4
+       exit 0;;
+    amiga:NetBSD:*:*)
+      echo m68k-cbm-netbsd${UNAME_RELEASE}
+      exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit 0;;
+    Pyramid*:OSx*:*:*)
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit 0 ;;
+    sun4*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit 0 ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit 0 ;;
+    atari*:NetBSD:*:*)
+       echo m68k-atari-netbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sun3*:NetBSD:*:*)
+       echo m68k-sun-netbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mac68k:NetBSD:*:*)
+       echo m68k-apple-netbsd${UNAME_RELEASE}
+       exit 0 ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    mips:*:4*:UMIPS)
+       echo mips-mips-riscos4sysv
+       exit 0 ;;
+    mips:*:5*:RISCos)
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit 0 ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit 0 ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit 0 ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88100 ] ; then
+       if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+            -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+       else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+       fi
+        else echo i586-dg-dgux${UNAME_RELEASE}
+        fi
+       exit 0 ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit 0 ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit 0 ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit 0 ;;
+   ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+       exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i[34]86:AIX:*:*)
+       echo i386-ibm-aix
+       exit 0 ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               sed 's/^                //' << EOF >dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+               rm -f dummy.c dummy
+               echo rs6000-ibm-aix3.2.5
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit 0 ;;
+    *:AIX:*:4)
+       if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=4.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit 0 ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to 
+       exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit 0 ;;
+    9000/[3478]??:HP-UX:*:*)
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/7?? | 9000/8?[679] ) HP_ARCH=hppa1.1 ;;
+           9000/8?? )            HP_ARCH=hppa1.0 ;;
+       esac
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit 0 ;;
+    3050*:HI-UX:*:*)
+       sed 's/^        //' << EOF >dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+       rm -f dummy.c dummy
+       echo unknown-hitachi-hiuxwe2
+       exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit 0 ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit 0 ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*X-MP:*:*:*)
+       echo xmp-cray-unicos
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE}
+       exit 0 ;;
+    CRAY*C90:*:*:*)
+       echo c90-cray-unicos${UNAME_RELEASE}
+       exit 0 ;;
+    CRAY-2:*:*:*)
+       echo cray2-cray-unicos
+        exit 0 ;;
+    hp3[0-9][05]:NetBSD:*:*)
+       echo m68k-hp-netbsd${UNAME_RELEASE}
+       exit 0 ;;
+    i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    *:FreeBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit 0 ;;
+    *:NetBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+       exit 0 ;;
+    i*:CYGWIN*:*)
+       echo i386-unknown-cygwin32
+       exit 0 ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin32
+       exit 0 ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    *:GNU:*:*)
+       echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit 0 ;;
+    *:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us.
+       ld_help_string=`ld --help 2>&1`
+       if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
+         echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
+       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
+         echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
+       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
+         echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
+       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
+         echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
+       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
+         echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
+       elif test "${UNAME_MACHINE}" = "alpha" ; then
+         echo alpha-unknown-linux ; exit 0
+       else
+         # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
+         # useful --help.  Gcc wants to distinguish between linuxoldld and linuxaout.
+         test ! -d /usr/lib/ldscripts/. \
+           && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0
+         # Determine whether the default compiler is a.out or elf
+         cat >dummy.c <<EOF
+main(argc, argv)
+int argc;
+char *argv[];
+{
+#ifdef __ELF__
+  printf ("%s-unknown-linux\n", argv[1]);
+#else
+  printf ("%s-unknown-linuxaout\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+         ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+         rm -f dummy.c dummy
+       fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+    i[34]86:DYNIX/ptx:4*:*)
+       echo i386-sequent-sysv4
+       exit 0 ;;
+    i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*)
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+       else
+               echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
+       fi
+       exit 0 ;;
+    i[34]86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-unknown-sysv32
+       fi
+       exit 0 ;;
+    Intel:Mach:3*:*)
+       echo i386-unknown-mach3
+       exit 0 ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit 0 ;;
+    M680[234]0:*:R3V[567]*:*)
+       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
+        uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4.3 && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m680[234]0:LynxOS:2.[23]*:*)
+       echo m68k-lynx-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit 0 ;;
+    i[34]86:LynxOS:2.[23]*:*)
+       echo i386-lynx-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    TSUNAMI:LynxOS:2.[23]*:*)
+       echo sparc-lynx-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    rs6000:LynxOS:2.[23]*:*)
+       echo rs6000-lynx-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit 0 ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit 0 ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit 0 ;;
+    R3000:*System_V*:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  printf ("%s-next-nextstep%s\n", __ARCHITECTURE__,  version==2 ? "2" : "3");
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-unknown-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+  printf ("vax-dec-bsd\n"); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
+rm -f dummy.c dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit 0 ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit 0 ;;
+    c34*)
+       echo c34-convex-bsd
+       exit 0 ;;
+    c38*)
+       echo c38-convex-bsd
+       exit 0 ;;
+    c4*)
+       echo c4-convex-bsd
+       exit 0 ;;
+    esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/config.h.in b/config.h.in
new file mode 100644 (file)
index 0000000..8ae45f1
--- /dev/null
@@ -0,0 +1,94 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define to empty if the keyword does not work.  */
+#undef const
+
+/* Define if you have a working `mmap' system call.  */
+#undef HAVE_MMAP
+
+/* Define as __inline if that's what the C compiler calls it.  */
+#undef inline
+
+/* Define to `long' if <sys/types.h> doesn't define.  */
+#undef off_t
+
+/* Define as the return type of signal handlers (int or void).  */
+#undef RETSIGTYPE
+
+/* Define to `unsigned' if <sys/types.h> doesn't define.  */
+#undef size_t
+
+/* Define if you have the ANSI C header files.  */
+#undef STDC_HEADERS
+
+/* Define if you can safely include both <sys/time.h> and <time.h>.  */
+#undef TIME_WITH_SYS_TIME
+
+/* Define if your <sys/time.h> declares struct tm.  */
+#undef TM_IN_SYS_TIME
+
+/* Define if mman.h defines MAP_FAILED  */
+#undef HAVE_MAP_FAILED
+
+/* Define if mman.h defines MAP_ANONYMOUS  */
+#undef HAVE_MAP_ANONYMOUS
+
+/* Define to include thread support */
+#undef USE_THREADS
+#undef EXTERNAL_OVERFLOW
+#undef DONT_FREE_FIRST
+
+/* sysdep */
+#undef SYSDEP_DIR
+
+/* Define if you have the getcwd function.  */
+#undef HAVE_GETCWD
+
+/* Define if you have the getpagesize function.  */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the gettimeofday function.  */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define if you have the mkdir function.  */
+#undef HAVE_MKDIR
+
+/* Define if you have the mktime function.  */
+#undef HAVE_MKTIME
+
+/* Define if you have the select function.  */
+#undef HAVE_SELECT
+
+/* Define if you have the socket function.  */
+#undef HAVE_SOCKET
+
+/* Define if you have the <dirent.h> header file.  */
+#undef HAVE_DIRENT_H
+
+/* Define if you have the <fcntl.h> header file.  */
+#undef HAVE_FCNTL_H
+
+/* Define if you have the <ndir.h> header file.  */
+#undef HAVE_NDIR_H
+
+/* Define if you have the <sys/dir.h> header file.  */
+#undef HAVE_SYS_DIR_H
+
+/* Define if you have the <sys/ndir.h> header file.  */
+#undef HAVE_SYS_NDIR_H
+
+/* Define if you have the <sys/time.h> header file.  */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <unistd.h> header file.  */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the m library (-lm).  */
+#undef HAVE_LIBM
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
diff --git a/config.sub b/config.sub
new file mode 100755 (executable)
index 0000000..3b5aeaf
--- /dev/null
@@ -0,0 +1,954 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+#   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+       echo Configuration name missing. 1>&2
+       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+       echo "or     $0 ALIAS" 1>&2
+       echo where ALIAS is a recognized configuration type. 1>&2
+       exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+       *local*)
+               echo $1
+               exit 0
+               ;;
+       *)
+       ;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  linux-gnu*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple)
+               os=
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco5)
+               os=sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+               | arme[lb] | pyramid | mn10200 | mn10300 \
+               | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
+               | alpha | alphaev5 | alphaev56 | alphapca56 \
+               | we32k | ns16k | clipper \
+               | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+               | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
+               | mipstx39 | mipstx39el \
+               | sparc | sparclet | sparclite | sparc64 | v850)
+               basic_machine=$basic_machine-unknown
+               ;;
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i[34567]86)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+             | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+             | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+             | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
+             | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
+             | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
+             | we32k-* | cydra-* \
+             | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+             | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+             | sparc64-* | mips64-* | mipsel-* \
+             | mips64el-* | mips64orion-* | mips64orionel-*  \
+             | mipstx39-* | mipstx39el-* \
+             | f301-*)
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-cbm
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-cbm
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-cbm
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       cray2)
+               basic_machine=cray2-cray
+               os=-unicos
+               ;;
+       [ctj]90-cray)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i[34567]86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i[34567]86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i[34567]86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i[34567]86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       mipsel*-linux*)
+               basic_machine=mipsel-unknown
+               os=-linux-gnu
+               ;;
+       mips*-linux*)
+               basic_machine=mips-unknown
+               os=-linux-gnu
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+        pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pentium | p5 | k5 | nexen)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | k6 | 6x86)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | nexen-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | k6-* | 6x86-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=rs6000-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       xmp)
+               basic_machine=xmp-cray
+               os=-unicos
+               ;;
+        xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       mips)
+               if [ x$os = x-linux-gnu ]; then
+                       basic_machine=mips-unknown
+               else
+                       basic_machine=mips-mips
+               fi
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sparc)
+               basic_machine=sparc-sun
+               ;;
+        cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -uxpv*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+        pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+        *-gould)
+               os=-sysv
+               ;;
+        *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+        *-sgi)
+               os=-irix
+               ;;
+        *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f301-fujitsu)
+               os=-uxpv
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -aix*)
+                               vendor=ibm
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -vxsim* | -vxworks*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..3e73151
--- /dev/null
+++ b/configure
@@ -0,0 +1,2701 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# 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:
+ac_default_prefix=/usr/local/cacao
+ac_help="$ac_help
+  --enable-threads        enable threads support"
+ac_help="$ac_help
+  --enable-gc2            enable new garbage collector"
+
+# 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=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# 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.13"
+    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=compiler.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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+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 ${CONFIG_SHELL-/bin/sh} $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:556: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $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=`${CONFIG_SHELL-/bin/sh} $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
+
+
+# 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
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# 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:589: 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=":"
+  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.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall 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.
+           :
+         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_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:642: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "$*" != "X $srcdir/configure conftestfile" \
+      && test "$*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+   fi
+
+   test "$2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+  program_transform_name=
+else
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+  rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:699: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+       @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=cacao
+
+VERSION=0.40
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:745: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+   ACLOCAL=aclocal
+   echo "$ac_t""found" 1>&6
+else
+   ACLOCAL="$missing_dir/missing aclocal"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:758: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+   AUTOCONF=autoconf
+   echo "$ac_t""found" 1>&6
+else
+   AUTOCONF="$missing_dir/missing autoconf"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:771: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+   AUTOMAKE=automake
+   echo "$ac_t""found" 1>&6
+else
+   AUTOMAKE="$missing_dir/missing automake"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:784: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+   AUTOHEADER=autoheader
+   echo "$ac_t""found" 1>&6
+else
+   AUTOHEADER="$missing_dir/missing autoheader"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:797: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+   MAKEINFO=makeinfo
+   echo "$ac_t""found" 1>&6
+else
+   MAKEINFO="$missing_dir/missing makeinfo"
+   echo "$ac_t""missing" 1>&6
+fi
+
+
+
+
+
+
+
+
+
+case "$host_cpu" in
+alpha* )
+       SYSDEP_DIR="alpha" 
+       CFLAGS="-ieee -O2 -g3" ;;
+
+mips* )
+       SYSDEP_DIR="mips" 
+        CFLAGS="-g -DMAP_ANONYMOUS=0 -woff 1048,1110,1164,1515"
+       LIBS="-lelfutil" ;;
+
+sparc* | powerpc* | ppc* | * )
+       { echo "configure: error: $host-cpu systems are not supported at this time" 1>&2; exit 1; } ;;
+
+esac
+
+cat >> confdefs.h <<EOF
+#define SYSDEP_DIR "$SYSDEP_DIR"
+EOF
+
+
+
+# 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:841: 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=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; 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:871: 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=":"
+  ac_prog_rejected=no
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; 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
+
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:922: 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=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      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
+ ;;
+    esac
+  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:954: 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 965 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    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*
+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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+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:996: 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:1001: 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 <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+
+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:1029: 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
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+
+# 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:1063: 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=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; 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 sin in -lm""... $ac_c" 1>&6
+echo "configure:1092: checking for sin in -lm" >&5
+ac_lib_var=`echo m'_'sin | 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 <<EOF
+#line 1100 "configure"
+#include "confdefs.h"
+/* 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 sin();
+
+int main() {
+sin()
+; return 0; }
+EOF
+if { (eval echo configure:1111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  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 <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lm $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
+echo "configure:1144: checking for $ac_hdr that defines DIR" >&5
+if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1149 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_hdr>
+int main() {
+DIR *dirp = 0;
+; return 0; }
+EOF
+if { (eval echo configure:1157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "ac_cv_header_dirent_$ac_safe=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_dirent_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_header_dirent=$ac_hdr; break
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
+echo "configure:1182: checking for opendir in -ldir" >&5
+ac_lib_var=`echo dir'_'opendir | 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="-ldir  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1190 "configure"
+#include "confdefs.h"
+/* 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 opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:1201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  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
+  LIBS="$LIBS -ldir"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+echo "configure:1223: checking for opendir in -lx" >&5
+ac_lib_var=`echo x'_'opendir | 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="-lx  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1231 "configure"
+#include "confdefs.h"
+/* 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 opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  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
+  LIBS="$LIBS -lx"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1265: 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 <<EOF
+#line 1280 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+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 <<EOF
+#line 1297 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 1314 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+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*
+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
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1345: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1350 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1375 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1393 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1414 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+for ac_hdr in fcntl.h sys/time.h unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1452: 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
+#line 1457 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  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 <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1490: 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 <<EOF
+#line 1495 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:1544: \"$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 for inline""... $ac_c" 1>&6
+echo "configure:1565: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat > conftest.$ac_ext <<EOF
+#line 1572 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:1579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+  inline | yes) ;;
+  no) cat >> confdefs.h <<\EOF
+#define inline 
+EOF
+ ;;
+  *)  cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:1605: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1610 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_off_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+  cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:1638: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1643 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_size_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:1671: checking whether time.h and sys/time.h may both be included" >&5
+if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1676 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_time=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+  cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+
+echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
+echo "configure:1706: checking whether struct tm is in sys/time.h or time.h" >&5
+if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1711 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <time.h>
+int main() {
+struct tm *tp; tp->tm_sec;
+; return 0; }
+EOF
+if { (eval echo configure:1719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_struct_tm=time.h
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_struct_tm" 1>&6
+if test $ac_cv_struct_tm = sys/time.h; then
+  cat >> confdefs.h <<\EOF
+#define TM_IN_SYS_TIME 1
+EOF
+
+fi
+
+
+if test $ac_cv_prog_gcc = yes; then
+    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
+echo "configure:1742: checking whether ${CC-cc} needs -traditional" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    ac_pattern="Autoconf.*'x'"
+  cat > conftest.$ac_ext <<EOF
+#line 1748 "configure"
+#include "confdefs.h"
+#include <sgtty.h>
+Autoconf TIOCGETP
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "$ac_pattern" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_prog_gcc_traditional=yes
+else
+  rm -rf conftest*
+  ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+  if test $ac_cv_prog_gcc_traditional = no; then
+    cat > conftest.$ac_ext <<EOF
+#line 1766 "configure"
+#include "confdefs.h"
+#include <termio.h>
+Autoconf TCGETA
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "$ac_pattern" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+  fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
+  if test $ac_cv_prog_gcc_traditional = yes; then
+    CC="$CC -traditional"
+  fi
+fi
+
+echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
+echo "configure:1788: checking for 8-bit clean memcmp" >&5
+if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_memcmp_clean=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1796 "configure"
+#include "confdefs.h"
+
+main()
+{
+  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
+}
+
+EOF
+if { (eval echo configure:1806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_memcmp_clean=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_memcmp_clean=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
+test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1827: 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
+#line 1832 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  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 <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1866: 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 <<EOF
+#line 1871 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* 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:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  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 <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:1919: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1927 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+       mmap private not fixed
+       mmap private fixed at somewhere currently unmapped
+       mmap private fixed at somewhere already mapped
+       mmap shared not fixed
+       mmap shared fixed at somewhere currently unmapped
+       mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the filesystem buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propogated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h.  */
+# ifndef HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192  /* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+       char *data, *data2, *data3;
+       int i, pagesize;
+       int fd;
+
+       pagesize = getpagesize();
+
+       /*
+        * First, make a file with some known garbage in it.
+        */
+       data = malloc(pagesize);
+       if (!data)
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               *(data + i) = rand();
+       umask(0);
+       fd = creat("conftestmmap", 0600);
+       if (fd < 0)
+               exit(1);
+       if (write(fd, data, pagesize) != pagesize)
+               exit(1);
+       close(fd);
+
+       /*
+        * Next, try to mmap the file at a fixed address which
+        * already has something else allocated at it.  If we can,
+        * also make sure that we see the same garbage.
+        */
+       fd = open("conftestmmap", O_RDWR);
+       if (fd < 0)
+               exit(1);
+       data2 = malloc(2 * pagesize);
+       if (!data2)
+               exit(1);
+       data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+       if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+           MAP_PRIVATE | MAP_FIXED, fd, 0L))
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               if (*(data + i) != *(data2 + i))
+                       exit(1);
+
+       /*
+        * Finally, make sure that changes to the mapped area
+        * do not percolate back to the file as seen by read().
+        * (This is a bug on some variants of i386 svr4.0.)
+        */
+       for (i = 0; i < pagesize; ++i)
+               *(data2 + i) = *(data2 + i) + 1;
+       data3 = malloc(pagesize);
+       if (!data3)
+               exit(1);
+       if (read(fd, data3, pagesize) != pagesize)
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               if (*(data + i) != *(data3 + i))
+                       exit(1);
+       close(fd);
+       unlink("conftestmmap");
+       exit(0);
+}
+
+EOF
+if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:2090: 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 <<EOF
+#line 2095 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#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:2112: \"$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 <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+
+for ac_func in getcwd gettimeofday mkdir mktime select socket
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2133: 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 <<EOF
+#line 2138 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* 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:2161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  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 <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+       echo $ac_n "checking whether MAP_FAILED is defined""... $ac_c" 1>&6
+echo "configure:2188: checking whether MAP_FAILED is defined" >&5
+if eval "test \"`echo '$''{'ac_cv_map_failed'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2193 "configure"
+#include "confdefs.h"
+#include <sys/mman.h>
+                                    #ifdef MAP_FAILED
+                                       yes
+                                    #endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_map_failed=yes
+else
+  rm -rf conftest*
+  ac_cv_map_failed=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_map_failed" 1>&6
+
+       echo $ac_n "checking whether MAP_ANONYMOUS is defined""... $ac_c" 1>&6
+echo "configure:2215: checking whether MAP_ANONYMOUS is defined" >&5
+if eval "test \"`echo '$''{'ac_cv_map_anonymous'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2220 "configure"
+#include "confdefs.h"
+#include <sys/mman.h>
+                                    #ifdef MAP_ANONYMOUS
+                                       yes
+                                    #endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_map_anonymous=yes
+else
+  rm -rf conftest*
+  ac_cv_map_anonymous=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_map_anonymous" 1>&6
+
+       if test $ac_cv_map_failed = yes; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_MAP_FAILED 1
+EOF
+       fi
+
+       if test $ac_cv_map_failed = yes; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_MAP_ANONYMOUS 1
+EOF
+       fi
+fi
+
+
+
+# Check whether --enable-threads or --disable-threads was given.
+if test "${enable_threads+set}" = set; then
+  enableval="$enable_threads"
+  :
+fi
+
+# Check whether --enable-gc2 or --disable-gc2 was given.
+if test "${enable_gc2+set}" = set; then
+  enableval="$enable_gc2"
+  :
+fi
+
+
+echo $ac_n "checking whether to include threads support""... $ac_c" 1>&6
+echo "configure:2272: checking whether to include threads support" >&5
+if test x"$enable_threads" = "xno"; then
+       echo "$ac_t""no" 1>&6
+else
+       echo "$ac_t""yes" 1>&6
+
+       cat >> confdefs.h <<\EOF
+#define USE_THREADS 1
+EOF
+
+       cat >> confdefs.h <<\EOF
+#define EXTERNAL_OVERFLOW 1
+EOF
+
+       cat >> confdefs.h <<\EOF
+#define DONT_FREE_FIRST 1
+EOF
+
+
+       LIBTHREAD="libthreads.a"
+       THREAD_OBJ="threads/libthreads.a"
+       
+       
+fi
+
+echo $ac_n "checking which garbage collector to use""... $ac_c" 1>&6
+echo "configure:2298: checking which garbage collector to use" >&5
+if test x"$enable_gc2" = "xno"; then
+       echo "$ac_t""old garbage collector" 1>&6
+       GC_OBJ="mm/libmm_old.a"
+else
+       echo "$ac_t""new garbage collector" 1>&6
+       GC_OBJ="mm/libmm_new.a"
+fi
+
+
+
+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 | grep ac_space) 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 <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/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.13"
+    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 \
+         toolbox/Makefile \
+          mm/Makefile \
+         threads/Makefile \
+         jit/Makefile \
+          alpha/Makefile \
+          mips/Makefile \
+          nat/Makefile \
+          comp/Makefile  config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@SYSDEP_DIR@%$SYSDEP_DIR%g
+s%@CC@%$CC%g
+s%@RANLIB@%$RANLIB%g
+s%@CPP@%$CPP%g
+s%@LIBOBJS@%$LIBOBJS%g
+s%@LIBTHREAD@%$LIBTHREAD%g
+s%@THREAD_OBJ@%$THREAD_OBJ%g
+s%@GC_OBJ@%$GC_OBJ%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 <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile \
+         toolbox/Makefile \
+          mm/Makefile \
+         threads/Makefile \
+         jit/Makefile \
+          alpha/Makefile \
+          mips/Makefile \
+          nat/Makefile \
+          comp/Makefile "}
+EOF
+cat >> $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 <<EOF
+  CONFIG_HEADERS="config.h"
+EOF
+cat >> $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 <<CEOF' >> $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 <<EOF
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+
+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
+
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..d360647
--- /dev/null
@@ -0,0 +1,134 @@
+dnl autoconf; autoheader; automake
+
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(compiler.c)
+AC_CANONICAL_HOST
+
+AM_INIT_AUTOMAKE(cacao, 0.40)
+AM_CONFIG_HEADER(config.h)
+
+AC_PREFIX_DEFAULT(/usr/local/cacao)
+
+dnl system type
+
+case "$host_cpu" in
+alpha* )
+       SYSDEP_DIR="alpha" 
+       CFLAGS="-ieee -O2 -g3" ;;
+
+mips* )
+       SYSDEP_DIR="mips" 
+        CFLAGS="-g -DMAP_ANONYMOUS=0 -woff 1048,1110,1164,1515"
+       LIBS="-lelfutil" ;;
+
+sparc* | powerpc* | ppc* | * )
+       AC_MSG_ERROR($host-cpu systems are not supported at this time) ;;
+
+esac
+
+AC_DEFINE_UNQUOTED(SYSDEP_DIR, "$SYSDEP_DIR")
+AC_SUBST(SYSDEP_DIR)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_RANLIB
+
+dnl Checks for libraries.
+AC_CHECK_LIB(m, sin)
+
+dnl Checks for header files.
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+
+dnl Checks for library functions.
+AC_PROG_GCC_TRADITIONAL
+AC_FUNC_MEMCMP
+AC_FUNC_MMAP
+AC_TYPE_SIGNAL
+AC_CHECK_FUNCS(getcwd gettimeofday mkdir mktime select socket)
+
+dnl Check for mmap header anomalies (missing MAP_FAILED, etc.)
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+       AC_CACHE_CHECK(whether MAP_FAILED is defined,
+                      ac_cv_map_failed,
+                      AC_EGREP_CPP(yes, 
+                                   [#include <sys/mman.h>
+                                    #ifdef MAP_FAILED
+                                       yes
+                                    #endif],
+                                   ac_cv_map_failed=yes,
+                                   ac_cv_map_failed=no))
+
+       AC_CACHE_CHECK(whether MAP_ANONYMOUS is defined,
+                      ac_cv_map_anonymous,
+                      AC_EGREP_CPP(yes, 
+                                   [#include <sys/mman.h>
+                                    #ifdef MAP_ANONYMOUS
+                                       yes
+                                    #endif],
+                                   ac_cv_map_anonymous=yes,
+                                   ac_cv_map_anonymous=no))
+
+       if test $ac_cv_map_failed = yes; then
+               AC_DEFINE(HAVE_MAP_FAILED) 
+       fi
+
+       if test $ac_cv_map_failed = yes; then
+               AC_DEFINE(HAVE_MAP_ANONYMOUS) 
+       fi
+fi
+
+
+dnl Features
+
+dnl check arguments
+AC_ARG_ENABLE(threads, [  --enable-threads        enable threads support])
+AC_ARG_ENABLE(gc2, [  --enable-gc2            enable new garbage collector])
+
+dnl threads
+AC_MSG_CHECKING(whether to include threads support)
+if test x"$enable_threads" = "xno"; then
+       AC_MSG_RESULT(no)
+else
+       AC_MSG_RESULT(yes)
+
+       AC_DEFINE(USE_THREADS)
+       AC_DEFINE(EXTERNAL_OVERFLOW)
+       AC_DEFINE(DONT_FREE_FIRST)
+
+       LIBTHREAD="libthreads.a"
+       THREAD_OBJ="threads/libthreads.a"
+       AC_SUBST(LIBTHREAD)
+       AC_SUBST(THREAD_OBJ)
+fi
+
+dnl garbage collector version
+AC_MSG_CHECKING(which garbage collector to use)
+if test x"$enable_gc2" = "xno"; then
+       AC_MSG_RESULT(old garbage collector)
+       GC_OBJ="mm/libmm_old.a"
+else
+       AC_MSG_RESULT(new garbage collector)
+       GC_OBJ="mm/libmm_new.a"
+fi
+AC_SUBST(GC_OBJ)
+
+
+AC_OUTPUT(Makefile \
+         toolbox/Makefile \
+          mm/Makefile \
+         threads/Makefile \
+         jit/Makefile \
+          alpha/Makefile \
+          mips/Makefile \
+          nat/Makefile \
+          comp/Makefile )
diff --git a/doc/cacao.1 b/doc/cacao.1
new file mode 100644 (file)
index 0000000..64b0445
--- /dev/null
@@ -0,0 +1,126 @@
+.TH CACAO 1 "January 12, 1999"
+.UC
+.SH NAME
+cacao \- a java just-in-time compiler
+.SH SYNOPSIS
+.B cacao 
+[\-ieee][options] classname [program arguments]
+.br
+.SH DESCRIPTION
+The method \fBmain\fP of the class \fIclassname\fP is executed.
+Method \fBmain\fP must have the signature \fBpublic static void
+main(String[] argv)\fP. The program arguments are passed to method
+\fBmain\fP in the string array \fBargv\fP. The environment variable
+\fICLASSPATH\fP must contain the directory of the Java class files.
+Class archives in \fBzip\fP format are not supported. The option
+\fI\-ieee\fP is needed for a compliant implementation, the default
+behaviour of CACAO (aborting in case of floating point exeptions) is both
+faster and more desirable. The other options for \fBcacao\fP are in most
+cases identical to the options of the \fBjava\fP interpreter of SUN's
+JDK, with some additions and minor changes.
+.SH OPTIONS
+Currently recognized options are:
+.TP
+.B -classpath \fIpath\fP
+Defines the search path for class files. Usually the environment variable
+CLASSPATH specifies the search path, but this option overides the
+value of the environment variable.
+.TP
+.B -propertyname=\fIvalue\fP
+Assigns a value to an entry of the system property list.
+.TP
+.B -ms \fIinitmem\fP { k | m }
+Specicfies the heap size at program start. If this size has been used
+garbage collection is started.
+.TP    
+.B -mx \fImaxmem\fP { k | m }
+Specifies maximal heap size. Default size is 16 MB.
+.TP    
+.B -oss \fIstacksize\fP { k | m }
+no effect, compatibility option
+.TP
+.B -ss \fIstacksize\fP { k | m }
+no effect, compatibility option
+.TP
+.B -noasyncgc
+no effect, compatibility option
+.TP
+.B -noverify
+no effect, compatibility option
+.TP
+.B -v, -verbose
+CACAO prints a log message of every class loaded.
+.TP
+.B -verbosegc
+CACAO prints a log message for each garbage collection.
+.TP
+.B -verbosecall
+CACAO prints a log message for each method call.
+.TP
+.B -ieee
+Enables IEEE compliant floating point arithmetic as specified in the
+JVM specification. The default behavior is aborting CACAO with a
+floating point exception on overflows.
+.TP
+.B -softnull
+Software null pointer check is used instead of hardware null pointer
+check. Needed for debugging of CACAO.
+.TP    
+.B -time
+Gives statistics about run time after the program has completed.
+.TP    
+.B -stat
+Gives detailed statistics about the compiled program.
+.TP    
+.B -log \fIlogfile\fP
+Specifies the logfile. Default is \fIstdout\fP.
+.TP
+.B -c(heck){[b][s]}]
+Disables different run time checks.
+These options improves the run time of programs. But instead of throwing
+an exception the program crashes. These options should only be used for
+completely debugged programs.
+.B b(ounds)
+Disables array bound checks. Works well for \fBjavac\fP.
+.B s(ync) 
+Disables synchronization. Only useful for single threaded programs like
+\fBjavac\fP or \fBjBYTEmark\fP
+.B -l
+Loads the class files into the CACAO system without calling method
+\fBmain\fP. Used for debugging of CACAO.
+.B -old
+Use the old JIT compiler instead the new one. Used for debugging and comparison
+of the two JIT compilers.
+.TP    
+.B -all
+Compiles all methods without calling them.
+Used for cross compilation and debugging of CACAO.
+.TP
+.B -m \fImethodname\fP
+Compiles the specified method without calling it.
+Used for debugging of CACAO.
+.TP    
+.B -sig \fIsignature\fP
+specifies the signature of the method specified with the -m option.
+Used for debugging of CACAO.
+.TP
+.B -s(how){[a][c][i][m][s][u]}
+The following options are used for debugging of the CACAO system. The
+compiler gives the values of internal data structures in readable form:
+.B a(ssembler)
+Gives an assembles listing of all compiled methods.
+.B c(onstant)
+Gives a listing of all constant pool entries.
+.B i(ntermediate)
+Gives the intermediate code of all compiled methods.
+.B m(ethod)
+Gives a description of all fields and methods of a class.
+.B s(tack)
+Gives the JavaVM stack for every compiled instruction.
+.B u(nicode)
+Gives the complete hash table with all unicode symbols.
+
+.SH AUTHOR
+Andreas Krall, Mark Probst, Philipp Tomsich, Reinhard Grafl, Markus Gschwind
+
+Send mail to cacao@complang.tuwien.ac.at
index 5469563feea363fc27f9d2f8d9e59faa055ae0af..ecc9de4282637417d3049b0105c27b77b902e849 100644 (file)
--- a/global.h
+++ b/global.h
@@ -12,7 +12,7 @@
        Changes: Mark     Probst  (schani)   EMAIL: cacao@complang.tuwien.ac.at
                         Philipp  Tomsich (phil)     EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: $Id: global.h 91 1998-11-25 11:47:42Z phil $
+       Last Change: $Id: global.h 115 1999-01-20 01:52:45Z phil $
 
 *******************************************************************************/
 
 #include "toolbox/list.h"
 #include "toolbox/loging.h"
 
-
 /* system dependent types *****************************************************/
 
-#include "sysdep/types.h"
+#include "types.h"
 
 
 /* additional data types ******************************************************/
index 6184efb09a71f83c23f00fb58a504e4ff1ae81e4..76f6d510c7b178c0869b8b379c57057232f3007c 100644 (file)
--- a/headers.c
+++ b/headers.c
 
        Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
        Changes: Mark Probst         EMAIL: cacao@complang.tuwien.ac.at
+                Philipp Tomsich     EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: 1997/05/23
+       Last Change: $Id: headers.c 115 1999-01-20 01:52:45Z phil $
 
 *******************************************************************************/
 
+#include "config.h" /* phil */
+
 #include "global.h"
 
 #include "tables.h"
@@ -389,6 +392,7 @@ int main(int argc, char **argv)
    /********** interne (nur fuer main relevante Optionen) **************/
    
        char classpath[500] = "";
+       char offsets_filename[1024] = ""; /* phil */
        u4 heapsize = 100000;
 
    /*********** Optionen, damit wirklich nur headers generiert werden ***/
@@ -415,9 +419,12 @@ int main(int argc, char **argv)
        log_init (NULL);
        log_text ("Java - header-generator started");
        
-       file = fopen("sysdep/offsets.h", "w");
-       if (file == NULL)
-               panic ("Can not open file 'sysdep/offsets.h' for write");
+       sprintf(offsets_filename, "%s/offsets.h", SYSDEP_DIR); /* phil */
+       file = fopen(offsets_filename, "w");
+       if (file == NULL) {
+               fprintf (stderr, "Can not open file '%s' for write", offsets_filename);
+               exit(-1);
+       }
        
        fprintf (file, "/* This file is machine generated, don't edit it !*/\n\n"); 
 
diff --git a/install-sh b/install-sh
new file mode 100755 (executable)
index 0000000..e843669
--- /dev/null
@@ -0,0 +1,250 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+       -c) instcmd="$cpprog"
+           shift
+           continue;;
+
+       -d) dir_arg=true
+           shift
+           continue;;
+
+       -m) chmodcmd="$chmodprog $2"
+           shift
+           shift
+           continue;;
+
+       -o) chowncmd="$chownprog $2"
+           shift
+           shift
+           continue;;
+
+       -g) chgrpcmd="$chgrpprog $2"
+           shift
+           shift
+           continue;;
+
+       -s) stripcmd="$stripprog"
+           shift
+           continue;;
+
+       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+           shift
+           continue;;
+
+       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+           shift
+           continue;;
+
+       *)  if [ x"$src" = x ]
+           then
+               src=$1
+           else
+               # this colon is to work around a 386BSD /bin/sh bug
+               :
+               dst=$1
+           fi
+           shift
+           continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+       echo "install:  no input file specified"
+       exit 1
+else
+       true
+fi
+
+if [ x"$dir_arg" != x ]; then
+       dst=$src
+       src=""
+       
+       if [ -d $dst ]; then
+               instcmd=:
+       else
+               instcmd=mkdir
+       fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+       if [ -f $src -o -d $src ]
+       then
+               true
+       else
+               echo "install:  $src does not exist"
+               exit 1
+       fi
+       
+       if [ x"$dst" = x ]
+       then
+               echo "install:  no destination specified"
+               exit 1
+       else
+               true
+       fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+       if [ -d $dst ]
+       then
+               dst="$dst"/`basename $src`
+       else
+               true
+       fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='   
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+       pathcomp="${pathcomp}${1}"
+       shift
+
+       if [ ! -d "${pathcomp}" ] ;
+        then
+               $mkdirprog "${pathcomp}"
+       else
+               true
+       fi
+
+       pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+       $doit $instcmd $dst &&
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+       if [ x"$transformarg" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               dstfile=`basename $dst $transformbasename | 
+                       sed $transformarg`$transformbasename
+       fi
+
+# don't allow the sed command to completely eliminate the filename
+
+       if [ x"$dstfile" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               true
+       fi
+
+# Make a temp file name in the proper directory.
+
+       dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+       $doit $instcmd $src $dsttmp &&
+
+       trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+       $doit $rmcmd -f $dstdir/$dstfile &&
+       $doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/jit.c b/jit.c
index a290bc0645b33ce619c80357762eb8a2ec3775f2..989f4b741589a5d795ab6998eb42b9487f0794e8 100644 (file)
--- a/jit.c
+++ b/jit.c
@@ -15,9 +15,9 @@
 
 *******************************************************************************/
 
-#include "signal.h"
-#include "global.h"
+#include <signal.h>
 
+#include "global.h"
 #include "tables.h"
 #include "loader.h"
 #include "jit.h"
@@ -148,13 +148,13 @@ static chain *uninitializedclasses;
 
 /* include compiler subsystems ************************************************/
 
-#include "sysdep/ngen.h"        /* code generator header file                 */ 
-#include "sysdep/disass.c"      /* disassembler (for debug purposes only)     */ 
+#include "ngen.h"        /* code generator header file                 */ 
+#include "disass.c"      /* disassembler (for debug purposes only)     */ 
 #include "jit/mcode.c"          /* code generation tool functions             */ 
 #include "jit/parse.c"          /* parsing of JavaVM code                     */ 
 #include "jit/reg.c"            /* register allocation and support routines   */ 
 #include "jit/stack.c"          /* analysing the stack operations             */ 
-#include "sysdep/ngen.c"        /* code generator                             */ 
+#include "ngen.c"        /* code generator                             */ 
 
 
 
diff --git a/jit.h b/jit.h
index 236b0bdbed96977aec998668677384cf5f7c41ab..aa52b03c7ca696f7e342d7263c52ec53ae12afbb 100644 (file)
--- a/jit.h
+++ b/jit.h
@@ -13,6 +13,9 @@
 
 *******************************************************************************/
 
+#ifndef __jit__
+#define __jit__
+
 /* compiler switches (set by main function) ***********************************/
 
 extern bool runverbose;         /* trace all method invocation                */
@@ -92,6 +95,7 @@ u1 *createnativestub (functionptr f, methodinfo *m);
 void removecompilerstub (u1 *stub);
 void removenativestub (u1 *stub);
 
+#endif
 
 /*
  * These are local overrides for various environment variables in Emacs.
diff --git a/jit/Makefile.am b/jit/Makefile.am
new file mode 100644 (file)
index 0000000..a37f961
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_DIST = mcode.c parse.c reg.c stack.c jitdef.h
diff --git a/jit/Makefile.in b/jit/Makefile.in
new file mode 100644 (file)
index 0000000..29e39a4
--- /dev/null
@@ -0,0 +1,174 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+EXTRA_DIST = mcode.c parse.c reg.c stack.c jitdef.h
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps jit/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = jit
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
index 0a69c868ea0ff6852990d81cc178d55e8dd679e0..c55fc994fd0bfa7fc87a898cbbb5b52dbee32d35 100644 (file)
@@ -12,7 +12,8 @@
 
 *******************************************************************************/
 
-#include "../sysdep/types.h"
+#ifndef __jitdef__
+#define __jitdef__
 
 /**************************** resolve typedef-cycles **************************/
 
@@ -1119,3 +1120,5 @@ void asm_handle_nat_exception();
 
 static void disassinstr (int c, int pos);       /* disassemble an instruction */
 static void disassemble (int *code, int len);   /* disassemble a code block   */
+
+#endif
index ea00cfae13b90e365ca43754783acb36e9c3d37c..f9860e08c02f9c737d343207e8016537f0dd14c6 100644 (file)
@@ -8,13 +8,12 @@
        
        Author: Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: 1998/05/07
+       Last Change: $Id: parse.c 115 1999-01-20 01:52:45Z phil $
 
 *******************************************************************************/
 
 #include "math.h"
 
-
 /* macros for byte code fetching ***********************************************
 
        fetch a byte code of given size from position p in code array jcode
diff --git a/mips/Makefile.am b/mips/Makefile.am
new file mode 100644 (file)
index 0000000..fb4c0b2
--- /dev/null
@@ -0,0 +1,2 @@
+EXTRA_DIST = asmpart.c calling.doc defines.h disass.c \
+            native-math.h ngen.c ngen.h threads.h types.h
diff --git a/mips/Makefile.in b/mips/Makefile.in
new file mode 100644 (file)
index 0000000..3c48c52
--- /dev/null
@@ -0,0 +1,175 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+EXTRA_DIST = asmpart.c calling.doc defines.h disass.c       native-math.h ngen.c ngen.h threads.h types.h
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps mips/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = mips
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
index f3c31a7e36843e53be369f10fba938b360f925f8..898788038d7bf4148e061dea07e50b5890eb44ea 100644 (file)
@@ -10,7 +10,7 @@
 
        Authors: Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: 1998/11/118
+       Last Change: 1998/11/18
 
 *******************************************************************************/
 
index 828f6efa0dc78a9d7743a5ba2b3d9a032e47c046..1eaff9b8b4eb7d59b1c88508e017c748d6936d8c 100644 (file)
@@ -17,7 +17,8 @@
 #ifndef __sysdep_threads_h
 #define __sysdep_threads_h
 
-#include "../threads/thread.h"
+#include "config.h"
+#include "threads/thread.h"
 
 /* Thread handling */
 
diff --git a/missing b/missing
new file mode 100755 (executable)
index 0000000..7789652
--- /dev/null
+++ b/missing
@@ -0,0 +1,190 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing - GNU libit 0.0"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`configure.in'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`configure.in'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`configure.in'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+       case "$LASTARG" in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if [ ! -f y.tab.h ]; then
+       echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+       case "$LASTARG" in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if [ -f "$SRCFILE" ]; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/mm/Makefile b/mm/Makefile
deleted file mode 100644 (file)
index 69f8f49..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# cacao/mm/Makefile
-# $Id: Makefile 96 1998-11-30 14:53:53Z phil $
-
-AR = ar
-COMBINE = $(AR) rcs mm.o
-
-mm.o: actualtarget Makefile
-
-clean:
-       rm -rf *.o *~
-
-disassemble:
-       objdump --disassemble --source heap2.o >heap2.s
-       objdump --disassemble --source allocator2.o >allocator2.s
-       objdump --disassemble --source bitmap2.o >bitmap2.s
-
-# choose gc1 for the old collector, gc2 for the new one
-actualtarget: gc2
-
-
-
-
-gc1: heap.old.o
-       rm -f mm.o; $(COMBINE) heap.old.o
-
-heap.old.o: heap.old.c ../tables.h ../global.h
-
-
-# Targets below this point are experimental and may not work reliably
-
-
-gc2: heap2.o allocator2.o bitmap2.o lifespan.o
-       rm -f mm.o; $(COMBINE) heap2.o allocator2.o bitmap2.o lifespan.o
-
-heap2.o: heap2.c allocator.h mm.h bitmap2.h lifespan.h
-
-bitmap2.o: bitmap2.c bitmap2.h allocator.h mm.h
-
-allocator2.o: allocator.h allocator2.c 
-
-lifespan.o: lifespan.h lifespan.c
-
-#
-# These are local overrides for various environment variables in Emacs.
-# Please do not remove this and leave it at the end of the file, where
-# Emacs will automagically detect them.
-# ---------------------------------------------------------------------
-# Local variables:
-# mode: Makefile
-# indent-tabs-mode: t
-# tab-width: 4
-# End:
-#
-
diff --git a/mm/Makefile.am b/mm/Makefile.am
new file mode 100644 (file)
index 0000000..b217625
--- /dev/null
@@ -0,0 +1,10 @@
+noinst_LIBRARIES = libmm_new.a libmm_old.a
+
+libmm_new_a_SOURCES = allocator2.c allocator.h \
+                     bitmap2.c bitmap2.h \
+                     heap2.c \
+                     lifespan.c lifespan.h \
+                     mm.h
+libmm_old_a_SOURCES = heap.old.c
+
+INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
diff --git a/mm/Makefile.in b/mm/Makefile.in
new file mode 100644 (file)
index 0000000..9fd7888
--- /dev/null
@@ -0,0 +1,273 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+noinst_LIBRARIES = libmm_new.a libmm_old.a
+
+libmm_new_a_SOURCES = allocator2.c allocator.h                       bitmap2.c bitmap2.h                     heap2.c                 lifespan.c lifespan.h                   mm.h
+
+libmm_old_a_SOURCES = heap.old.c
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+LIBRARIES =  $(noinst_LIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libmm_new_a_LIBADD = 
+libmm_new_a_OBJECTS =  allocator2.o bitmap2.o heap2.o lifespan.o
+libmm_old_a_LIBADD = 
+libmm_old_a_OBJECTS =  heap.old.o
+AR = ar
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+SOURCES = $(libmm_new_a_SOURCES) $(libmm_old_a_SOURCES)
+OBJECTS = $(libmm_new_a_OBJECTS) $(libmm_old_a_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps mm/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLIBRARIES:
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+distclean-noinstLIBRARIES:
+
+maintainer-clean-noinstLIBRARIES:
+
+.c.o:
+       $(COMPILE) -c $<
+
+.s.o:
+       $(COMPILE) -c $<
+
+.S.o:
+       $(COMPILE) -c $<
+
+mostlyclean-compile:
+       -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+       -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+libmm_new.a: $(libmm_new_a_OBJECTS) $(libmm_new_a_DEPENDENCIES)
+       -rm -f libmm_new.a
+       $(AR) cru libmm_new.a $(libmm_new_a_OBJECTS) $(libmm_new_a_LIBADD)
+       $(RANLIB) libmm_new.a
+
+libmm_old.a: $(libmm_old_a_OBJECTS) $(libmm_old_a_DEPENDENCIES)
+       -rm -f libmm_old.a
+       $(AR) cru libmm_old.a $(libmm_old_a_OBJECTS) $(libmm_old_a_LIBADD)
+       $(RANLIB) libmm_old.a
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+       -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = mm
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile $(LIBRARIES)
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
+               mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
+               mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-noinstLIBRARIES distclean-compile \
+               distclean-tags distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
+               maintainer-clean-compile maintainer-clean-tags \
+               maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mm/Makefile.pre-automake b/mm/Makefile.pre-automake
new file mode 100644 (file)
index 0000000..ebefb39
--- /dev/null
@@ -0,0 +1,54 @@
+# cacao/mm/Makefile
+# $Id: Makefile.pre-automake 115 1999-01-20 01:52:45Z phil $
+
+AR = ar
+COMBINE = $(AR) rcs mm.o
+
+mm.o: actualtarget Makefile
+
+clean:
+       rm -rf *.o *~
+
+disassemble:
+       objdump --disassemble --source heap2.o >heap2.s
+       objdump --disassemble --source allocator2.o >allocator2.s
+       objdump --disassemble --source bitmap2.o >bitmap2.s
+
+# choose gc1 for the old collector, gc2 for the new one
+actualtarget: gc2
+
+
+
+
+gc1: heap.old.o
+       rm -f mm.o; $(COMBINE) heap.old.o
+
+heap.old.o: heap.old.c ../tables.h ../global.h
+
+
+# Targets below this point are experimental and may not work reliably
+
+
+gc2: heap2.o allocator2.o bitmap2.o lifespan.o
+       rm -f mm.o; $(COMBINE) heap2.o allocator2.o bitmap2.o lifespan.o
+
+heap2.o: heap2.c allocator.h mm.h bitmap2.h lifespan.h
+
+bitmap2.o: bitmap2.c bitmap2.h allocator.h mm.h
+
+allocator2.o: allocator.h allocator2.c 
+
+lifespan.o: lifespan.h lifespan.c
+
+#
+# These are local overrides for various environment variables in Emacs.
+# Please do not remove this and leave it at the end of the file, where
+# Emacs will automagically detect them.
+# ---------------------------------------------------------------------
+# Local variables:
+# mode: Makefile
+# indent-tabs-mode: t
+# tab-width: 4
+# End:
+#
+
index d3e402c0a720f32fcc2342243446e63ea6d48723..b46ac47320e66288131e87f455ba5d042878446d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * cacao/mm/allocator.h
- * $Id: allocator.h 105 1998-12-10 17:48:53Z phil $
+ * $Id: allocator.h 115 1999-01-20 01:52:45Z phil $
  */
 
 #ifndef __allocator_h_
@@ -32,6 +32,7 @@
 #  define SIZE unsigned long
 #endif
 
+#undef ALIGN
 #define ALIGN  3       /* 64bit alignment */
 //#define ALIGN        2       /* 32bit allignment */
 
@@ -106,7 +107,7 @@ void allocator_reset(void);
 
 void allocator_mark_free_kludge(BITBLOCK* bitmap);
 
-unsigned char find_highest(SIZE bits);
+/* unsigned char find_highest(SIZE bits); */
 
 #endif /* !defined(__allocator_h_) */
 
diff --git a/mm/allocator3.c b/mm/allocator3.c
new file mode 100644 (file)
index 0000000..e810559
--- /dev/null
@@ -0,0 +1,117 @@
+/* First Fit FIFO */
+
+#include "allocator3.h"
+#include <stdlib.h>
+
+typedef struct cacao_freeblock_t { 
+  cacao_size_t               size;
+  struct cacao_freeblock_t*  next;
+  struct cacao_freeblock_t*  prev; /* now a double-linked list */
+} *cacao_freeblock_ptr_t;
+
+static cacao_freeblock_ptr_t first = NULL;
+static cacao_freeblock_ptr_t last  = NULL;
+
+void allocator_init()
+{
+}
+
+void allocator_close()
+{
+}
+
+void allocator_reset()
+{
+}
+
+void* allocator_alloc(cacao_size_t size)
+{
+  /* first fit */
+  cacao_freeblock_ptr_t curr = first;
+
+  while (curr) {
+    cacao_size_t  curr_size = curr->size & ~0x3;
+
+    if (curr_size > size) {
+      /* split */
+      cacao_freeblock_ptr_t  next = curr + size;
+      cacao_size_t           new_size = curr_size - size;
+
+      if (new_size >= sizeof(cacao_freeblock_ptr_t)) {
+       /* free block */
+       next->size = new_size | 0x3;
+       next->next = curr->next;
+       next->prev = curr;
+       curr->next = next;
+      } else {
+       /* small block */
+       next->size = curr->size - size | 0x1;
+      }
+    }
+
+    if (curr->size == size) {
+      curr->prev->next = curr->next;
+      curr->next->prev = curr->prev;
+      return curr;
+    }
+  }
+
+  return NULL;
+}
+
+void allocator_free_block(cacao_ptr_t block_addr, cacao_size_t size)
+{
+  cacao_freeblock_ptr_t  freeblock = (cacao_freeblock_ptr_t)block_addr;
+
+  /* reject small free blocks */
+  if (size < sizeof(struct cacao_freeblock_t))
+    return;
+
+  /* store size in freeblock & flag it as free (2 least sign. bits) */
+  freeblock->size = size | 0x3;
+  /* prepend to list */
+  freeblock->next = NULL;
+  freeblock->prev = last;
+  if (last)
+    last->next = freeblock;
+
+  /* append (fifo) */
+  last = freeblock;
+  if (!first)
+    first = last;
+}
+
+void allocator_free_prejoin (cacao_ptr_t block_addr, cacao_ptr_t pre_addr, cacao_size_t pre_size)
+{
+  cacao_freeblock_ptr_t  freeblock = (cacao_freeblock_ptr_t)block_addr;
+  cacao_freeblock_ptr_t  preblock = (cacao_freeblock_ptr_t)pre_addr;
+
+  preblock->size = freeblock->size + pre_size;
+  preblock->next = freeblock->next;
+  preblock->prev = freeblock->prev;
+  
+  if (preblock->next)
+    preblock->next->prev = preblock;
+  if (preblock->prev)
+    preblock->prev->next = preblock;
+}
+
+void allocator_free_postjoin(cacao_ptr_t block_addr, cacao_ptr_t post_addr, cacao_size_t post_size)
+{
+  cacao_freeblock_ptr_t  freeblock = (cacao_freeblock_ptr_t)block_addr;
+
+  freeblock->size += post_size;
+}
+
+void allocator_free_blockjoin (cacao_ptr_t first_addr, cacao_ptr_t last_addr, cacao_size_t extra_size)
+{
+  cacao_freeblock_ptr_t  freeblock = (cacao_freeblock_ptr_t)first_addr;
+  cacao_freeblock_ptr_t  endblock  = (cacao_freeblock_ptr_t)end_addr;
+  
+  freeblock->size += (endblock->size & ~0x3) + extra_size;
+
+  if (endblock->next)
+    endblock->next->prev = endblock->prev;
+  if (endblock->prev)
+    endblock->prev->next = endblock->next;
+}
diff --git a/mm/allocator3.h b/mm/allocator3.h
new file mode 100644 (file)
index 0000000..cb442ed
--- /dev/null
@@ -0,0 +1,18 @@
+#include "mm3.h"
+
+#ifndef __allocator_protocol__
+#define __allocator_protocol__
+
+void   allocator_init();
+void   allocator_close();
+void   allocator_reset();
+
+void*  allocator_alloc(cacao_size_t size);
+
+void   allocator_free_block(cacao_ptr_t block_addr, cacao_size_t size);
+
+void   allocator_free_prejoin   (cacao_ptr_t block_addr, cacao_ptr_t pre_addr,  cacao_size_t pre_size);
+void   allocator_free_postjoin  (cacao_ptr_t block_addr, cacao_ptr_t post_addr, cacao_size_t post_size);
+void   allocator_free_blockjoin (cacao_ptr_t first_addr, cacao_ptr_t last_addr, cacao_size_t extra_size);
+
+#endif
index 8605566a68fa739ed203f48e0d46338749dea530..cdb8314aa26761b0345ae0b8e6ea957d273fb228 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Authors: Philipp Tomsich     EMAIL: cacao@complang.tuwien.ac.at
  *
- * $Id: bitmap2.c 93 1998-11-25 11:49:36Z phil $
+ * $Id: bitmap2.c 115 1999-01-20 01:52:45Z phil $
  */
 
 /*
@@ -51,7 +51,7 @@
 
 #include "bitmap2.h"
 
-#warning "bitmap2.c untested in 32-bit mode -- phil."
+/* #warning "bitmap2.c untested in 32-bit mode -- phil." */
 
 /* FIXME: I haven't decided, whether to keep these macro definitions here or 
  *        move them to the header file; they are implementation details, so 
  */
 
 
-__inline__
+inline
 void bitmap_setbit(BITBLOCK* bitmap, 
                                   void* addr)
 { 
        SETBIT(bitmap, addr); 
 }
 
-__inline__
+inline
 void bitmap_clearbit(BITBLOCK* bitmap, 
                                         void* addr)
 { 
        CLEARBIT(bitmap, addr); 
 }
 
-__inline__
+inline
 bool bitmap_testbit(BITBLOCK* bitmap, 
                                        void* addr)
 { 
        return TESTBIT(bitmap, addr); 
 }
 
-__inline__
+inline
 static
 void bitmap_boundscheck(bitmap_t* bitmap,
                                                void*     addr)
@@ -148,7 +148,7 @@ void bitmap_boundscheck(bitmap_t* bitmap,
        assert(addr < bitmap->bitmap_beyond_addr); /* a stricter way to check the upper bound */
 }
 
-__inline__
+inline
 void bitmap_checking_setbit(bitmap_t* bitmap,
                                                        void*     addr)
 {
@@ -156,7 +156,7 @@ void bitmap_checking_setbit(bitmap_t* bitmap,
        bitmap_setbit(bitmap->bitmap, addr);
 }
 
-__inline__
+inline
 void bitmap_checking_clearbit(bitmap_t* bitmap,
                                                          void*   addr)
 {
@@ -164,7 +164,7 @@ void bitmap_checking_clearbit(bitmap_t* bitmap,
        bitmap_clearbit(bitmap->bitmap, addr);
 }
 
-__inline__
+inline
 bool bitmap_checking_testbit(bitmap_t* bitmap,
                                                         void*    addr)
 {
@@ -172,13 +172,13 @@ bool bitmap_checking_testbit(bitmap_t* bitmap,
        return bitmap_testbit(bitmap->bitmap, addr);
 }
 
-__inline__
+inline
 void bitmap_clear(bitmap_t* bitmap)    
 {
        memset(bitmap->bitmap_memory, 0, bitmap->bytesize);
 }
 
-__inline__
+inline
 bitmap_t* bitmap_allocate(void*        zero_addr, 
                                                  OFFSET_T      size)
 {
@@ -207,7 +207,7 @@ bitmap_t* bitmap_allocate(void*     zero_addr,
        return bitmap;
 }
 
-__inline__
+inline
 void bitmap_release(bitmap_t* bitmap)
 {
        if (bitmap) {
@@ -218,7 +218,7 @@ void bitmap_release(bitmap_t* bitmap)
 }
 
 
-__inline__
+inline
 static 
 int offset_for_lowest(BITBLOCK i)
 {
@@ -295,7 +295,7 @@ int offset_for_lowest(BITBLOCK i)
 #endif
 }
 
-__inline__
+inline
 void*
 bitmap_find_next_setbit(bitmap_t* bitmap, 
                                                void*     addr)
@@ -323,7 +323,7 @@ bitmap_find_next_setbit(bitmap_t* bitmap,
        return bitmap->bitmap_beyond_addr;
 }
 
-__inline__
+inline
 void*
 bitmap_find_next_combination_set_unset(bitmap_t* bitmap, 
                                                                           bitmap_t* invertedmap, 
@@ -353,7 +353,7 @@ bitmap_find_next_combination_set_unset(bitmap_t* bitmap,
        return bitmap->bitmap_beyond_addr;
 }
 
-__inline__
+inline
 void
 bitmap_mask_with_bitmap(bitmap_t* bitmap,
                                                bitmap_t* mask)
index f1ec85e2d667485e39e232bdb85391de1b225304..c4e1038ea011a760a5f45a61439698a71069559d 100644 (file)
@@ -1,6 +1,6 @@
 /* 
  * cacao/mm/bitmap.h
- * $Id: bitmap2.h 93 1998-11-25 11:49:36Z phil $ 
+ * $Id: bitmap2.h 115 1999-01-20 01:52:45Z phil $ 
  */
 
 #ifndef __mm_bitmap_h_
@@ -24,22 +24,22 @@ typedef struct {
        void*           bitmap_memory;  /* internal: the real address */
 } bitmap_t;
 
-__inline__ void       bitmap_setbit(BITBLOCK* bitmap, void* addr);
-__inline__ void       bitmap_clearbit(BITBLOCK* bitmap, void* addr);
-__inline__ bool       bitmap_testbit(BITBLOCK* bitmap, void* addr);
+void       bitmap_setbit(BITBLOCK* bitmap, void* addr);
+void       bitmap_clearbit(BITBLOCK* bitmap, void* addr);
+bool       bitmap_testbit(BITBLOCK* bitmap, void* addr);
 
-__inline__ void       bitmap_checking_setbit(bitmap_t* bitmap, void* addr);
-__inline__ void       bitmap_checking_clearbit(bitmap_t* bitmap, void* addr);
-__inline__ bool       bitmap_checking_testbit(bitmap_t* bitmap, void* addr);
+void       bitmap_checking_setbit(bitmap_t* bitmap, void* addr);
+void       bitmap_checking_clearbit(bitmap_t* bitmap, void* addr);
+bool       bitmap_checking_testbit(bitmap_t* bitmap, void* addr);
 
-__inline__ void              bitmap_clear(bitmap_t* bitmap);
-__inline__ bitmap_t*  bitmap_allocate(void* zero_offset, OFFSET_T size);
-__inline__ void       bitmap_release(bitmap_t* bitmap);
+void         bitmap_clear(bitmap_t* bitmap);
+bitmap_t*  bitmap_allocate(void* zero_offset, OFFSET_T size);
+void       bitmap_release(bitmap_t* bitmap);
 
-__inline__ void*      bitmap_find_next_setbit(bitmap_t* bitmap, void* addr);
-__inline__ void*      bitmap_find_next_combination_set_unset(bitmap_t* bitmap, bitmap_t* invertedmap, void* addr);
+void*      bitmap_find_next_setbit(bitmap_t* bitmap, void* addr);
+void*      bitmap_find_next_combination_set_unset(bitmap_t* bitmap, bitmap_t* invertedmap, void* addr);
 
-__inline__ void       bitmap_mask_with_bitmap(bitmap_t* bitmap, bitmap_t* mask);
+void       bitmap_mask_with_bitmap(bitmap_t* bitmap, bitmap_t* mask);
 #endif
 
 /*
diff --git a/mm/bitmap3.c b/mm/bitmap3.c
new file mode 100644 (file)
index 0000000..a0c2c7b
--- /dev/null
@@ -0,0 +1,163 @@
+#define ALIGNMENT  3   /* 64 bit */
+
+/* Sorry, I couldn't use a while loop, because my compiler (gcc) on an
+   Alpha inserts useless "nop" and "unop" instructions into the inner 
+   loop. Additionally it reorders basic blocks such that a block from
+   within the loop is branched to and branched back from (adding to
+   unnecessary branches.
+
+   Could anyone explain me why? 
+   
+   Apparently the later problem is related to using "continue"; if I use
+   explicit "goto"s, I'm left with _only_ the unnecessary "nop" and 
+   "unop"; that isn't acceptable either... */
+
+/* So why did I do this? Well, this can be easily explained... using the 
+   data from one of our test runs we found:
+
+        >> LOG: 9301464 bytes for 196724 objects allocated.
+        >> LOG: 15 garbage collections performed.
+        >> LOG: 6568440 heapblocks visited, 469249 objects marked
+        >> LOG:     1064447 visits to objects already marked.
+        >> LOG:     988270 potential references not aligned.
+        >> LOG:     4049446 out of heap.
+        >> LOG:     5236 not an object.
+
+   So how much did we save? Eliminating the inner loop inefficiencies saves
+   at least 6568440 * 2 instruction (1 nop, 1 unop), folding the test for
+   non-objects and marked objects into one saves about 1000000 array accesses,
+   shifts, compares and untaken branches. The pseudo-recursion saves around
+   15 instructions (mostly load/stores for saved registers) for every one of 
+   the 469249 marked objects. Adding this up we would save about 25000000
+   instructions (and that's a careful estimate), most of them loads or stores.
+*/
+
+/* gc_mark_object_at now contains assembler code: This became necessary
+   to get rid of the register saving overhead (callee-saved registers)
+   involved in calling the recursive functions. -- phil. */
+
+/* Important note (1): 
+   I use the low bit of the "addr" stored on the stack to indicate whether 
+   this is the outermost loop (the actual function and not a pseudo-recursion): 
+   this bit is clear, if this is a recursion, but set when it is the outermost 
+   function. In the latter case the value retrieved is not used, so I don't 
+   need to align it. -- phil. */
+
+/* Rambling (1):
+   Weird... apparently the alpha compiler backend scatters rather useless 
+   instructions throughout the code...
+   
+   "pattern |= (0x3 << offset);" yields:
+
+     54:       01 74 e0 47     mov  0x3,t0
+     58:       21 07 22 48     sll      t0,t1,t0
+     5c:       01 00 3f 40     addl t0,zero,t0
+     60:       04 04 81 44     or   t3,t0,t3
+
+   That's rather depressing... either I am simply dumb, or the "addl" 
+   instruction shouldn't be there. Sigh. -- phil. */
+
+void gc_mark_object_at(void** addr, unsigned long*  bitmap, void* heap_base_reg, void* heap_size_reg)
+{
+       register long   pattern;
+       register long   offset;
+       register long*  pattern_addr;
+       register void*  deref_addr;
+       register void** end;
+       register void*  stack;
+       register long   constant_one;
+
+       if ((unsigned long)addr & ((1 << ALIGNMENT) - 1))
+               return;
+
+       if (((unsigned long)addr - (unsigned long)heap_base_reg) >= (unsigned long)heap_size_reg)
+               return;
+
+       pattern_addr = &bitmap[(unsigned long)addr >> 8];
+       pattern = *pattern_addr;
+       offset = ((unsigned long)addr >> 2) & ((1 << 5) - 2);
+       pattern >> offset;
+
+       if (pattern != 0x2)
+               return;
+
+       constant_one = 1;
+
+       /* grow stack & mark as outermost loop */
+       asm("subq $30, %0, $30" : : "i"(sizeof(void*)) : "$30");
+       asm("stq %0, %1 ($30)" : : "r"(constant_one), "i"(0) : "memory");
+
+ recurse:
+       /* mark */
+       *pattern_addr = pattern | (constant_one << offset);
+       
+       /* detect length */
+       end = addr + *(long*)addr; /* FIXME: insert the real code necessary */
+
+ loop: 
+       if (addr >= end)
+               goto unwind;
+
+       deref_addr = *addr;
+       ++addr;
+               
+       if ((unsigned long)(deref_addr) & ((1 << ALIGNMENT) - 1))
+               goto loop;
+       
+       if (((unsigned long)addr - (unsigned long)heap_base_reg) >= (unsigned long)heap_size_reg)
+               goto loop;
+
+       pattern_addr = &bitmap[(unsigned long)(deref_addr) >> 8];
+       pattern = *pattern_addr;
+       offset = ((unsigned long)addr >> 2) & ((1 << 5) - 2);
+       pattern >> offset;
+               
+       if (pattern != 0x2)
+           goto loop;
+
+       /* grow the stack */
+       asm("subq $30, %0, $30" : : "i"(2 * sizeof(void*)) : "$30");
+
+       /* store the current context on the stack: addr, end */
+       asm("stq %0, %1 ($30)" : : "r"(addr), "i"(0) : "memory" );
+       asm("stq %0, %1 ($30)" : : "r"(end), "i"(sizeof(void*)) : "memory" );
+               
+       addr = deref_addr;
+
+       goto recurse;
+
+ unwind:
+       /* load the addr field of the previous context */
+       asm("ldq %0, %1 ($30)" : "=r"(addr) : "i"(0) : "memory");       
+
+       /* check whether we are returning from the outermost pseudo-recursion */
+       if ((long)addr & 1)
+               goto done;
+
+       /* load the end field of the previous context */
+       asm("ldq %0, %1 ($30)" : "=r"(end) : "i"(sizeof(void*)) : "memory" );
+
+       /* shrink the stack */
+       asm("addq $30, %0, $30" : : "i"(2 * sizeof(void*)) : "$30");
+
+       /* continue the loop in this context */
+       goto loop;
+
+ done:
+       /* pop the no_recursion flag */
+       asm("addq $30, %0, $30" : : "i"(sizeof(void*)) : "$30");
+       return;
+}
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
index dd1feacb97e41ca2b6cf2a9a9cb109af04681ae9..1936c83299375ed4c844f5174ade95d65196d53a 100644 (file)
 #include <assert.h>
 #include <sys/mman.h>
 #include <unistd.h>
-#include "../global.h"
-#include "../tables.h"
-#include "../asmpart.h"
-#include "../callargs.h"
-
-#include "../threads/thread.h"                  /* schani */
-#include "../threads/locks.h"
-#include "../sysdep/threads.h"
+#include "global.h"
+#include "tables.h"
+#include "asmpart.h"
+#include "callargs.h"
+
+#include "threads/thread.h"                  /* schani */
+#include "threads/locks.h"
+#include "threads.h"
 
 
 
index 10ed06bf4515c72bf48068351fee3043c18912a5..2437b861699489314bd59f5764e6641a4ea739ba 100644 (file)
@@ -1,21 +1,24 @@
 #include <stddef.h>
 #include <unistd.h>            /* getpagesize, mmap, ... */
 #include <sys/mman.h>
-#ifndef MAP_FAILED
-#define MAP_FAILED ((void*) -1)
-#endif
+
 #include <sys/types.h>
 #include <stdio.h>
-#include "../asmpart.h"
-#include "../callargs.h"
-#include "../threads/thread.h"
-#include "../threads/locks.h"
-#include "../sysdep/threads.h"
 #include <assert.h>
-#include "lifespan.h"
 
+#include "asmpart.h"
+#include "callargs.h"
+#include "threads/thread.h"
+#include "threads/locks.h"
+
+#include "lifespan.h"
 #include "mm.h"
 
+#if !defined(HAVE_MAP_FAILED)
+#define MAP_FAILED ((void*) -1)
+#endif
+
+
 #define PAGESIZE_MINUS_ONE     (getpagesize() - 1)
 
 #undef ALIGN
@@ -43,6 +46,8 @@
 //#define COLLECT_LIFESPAN
 //#define NEW_COLLECT_LIFESPAN
 //#define COLLECT_FRAGMENTATION
+//#define COLLECT_SIZES
+
 //#define GC_COLLECT_STATISTICS
 //#define FINALIZER_COUNTING
 
@@ -104,6 +109,8 @@ static unsigned long gc_mark_not_object = 0;
 static unsigned long gc_mark_objects_marked = 0;
 static unsigned long gc_mark_already_marked = 0;
 
+static unsigned long gc_mark_null_pointer = 0;
+
 #endif
 
 #ifdef FINALIZER_COUNTING
@@ -139,7 +146,7 @@ heap_init (SIZE size,
        /* 2. Allocate at least (alignment!) size bytes of memory for the heap */
        heap_size = align_size(size + ((1 << ALIGN) - 1));
 
-#ifdef DONT_MMAP
+#if !(defined(HAVE_MAP_ANONYMOUS))
        heap_base = malloc(heap_size);
 #else
        heap_base = (void*) mmap (NULL, 
@@ -210,7 +217,7 @@ heap_init (SIZE size,
        fprintf(tracefile, "heap_top\t0x%lx\n", heap_top);
 #endif
 
-#ifdef NEW_COLLECT_LIFESPAN
+#if defined(NEW_COLLECT_LIFESPAN) || defined(COLLECT_SIZES)
        lifespan_init(heap_base, heap_size);
 #endif
 
@@ -221,7 +228,7 @@ heap_init (SIZE size,
 #endif
 }
 
-__inline__
+inline
 static
 void
 heap_call_finalizer_for_object_at(java_objectheader* object_addr)
@@ -246,7 +253,7 @@ heap_close (void)
 #endif
 #endif
 
-#ifdef NEW_COLLECT_LIFESPAN
+#if defined(NEW_COLLECT_LIFESPAN)
        lifespan_close();
 #endif
 
@@ -288,6 +295,8 @@ heap_close (void)
        sprintf(logtext, "%ld heapblocks visited, %ld objects marked", 
                        gc_mark_heapblocks_visited, gc_mark_objects_marked);
        dolog();
+       sprintf(logtext, "    %ld null pointers.", gc_mark_null_pointer);
+       dolog();
        sprintf(logtext, "    %ld out of heap.", gc_mark_not_inheap);
        dolog();
        sprintf(logtext, "    %ld visits to objects already marked.", gc_mark_already_marked);
@@ -309,12 +318,12 @@ heap_close (void)
        dolog();
 #endif
 
-#ifdef NEW_COLLECT_LIFESPAN
+#if defined(NEW_COLLECT_LIFESPAN) || defined(COLLECT_SIZES)
        lifespan_emit();
 #endif
 }
 
-__inline__
+inline
 static
 void 
 heap_add_address_to_address_list(address_list_node** list, void* address)
@@ -340,7 +349,7 @@ heap_add_address_to_address_list(address_list_node** list, void* address)
 }
 
 
-__inline__
+inline
 static
 void
 heap_add_finalizer_for_object_at(void* addr)
@@ -446,7 +455,7 @@ heap_allocate (SIZE           in_length,
                        free_chunk, (long)free_chunk + length);
 #endif
 
-#ifdef NEW_COLLECT_LIFESPAN
+#if defined(NEW_COLLECT_LIFESPAN) || defined(COLLECT_SIZES)
        lifespan_alloc(free_chunk, length);
 #endif
 
@@ -469,7 +478,7 @@ heap_addreference (void **reflocation)
 }
 
 static
-__inline__
+inline
 void gc_finalize (void)
 {
        /* This will have to be slightly rewritten as soon the JIT-marked heap-based lists are used. -- phil. */
@@ -499,7 +508,7 @@ void gc_finalize (void)
 }
 
 
-__inline__
+inline
 static 
 void gc_reclaim (void)
 {
@@ -634,9 +643,9 @@ void gc_reclaim (void)
                                heap_life,
                                free_size, 
                                free_fragments,
-                               100*(float)free_size/free_fragments,
-                               100*(float)heap_life/heap_full,
-                               100*(float)free_size/heap_full
+                               100*(float)free_size/(free_fragments ? free_fragments : 1),
+                               100*(float)heap_life/(heap_full ? heap_full : 1),
+                               100*(float)free_size/(heap_full ? heap_full : 1)
                                );
        }
        fflush(fragfile);
@@ -658,7 +667,7 @@ void gc_reclaim (void)
 #endif
 }
 
-__inline__
+inline
 static
 void 
 gc_mark_object_at (void** addr)
@@ -718,12 +727,14 @@ gc_mark_object_at (void** addr)
         * property first, should thus improve collection times.
         */
 
-
        /* 1.a. if addr doesn't point into the heap, return. */
        if ((unsigned long)addr - (unsigned long)heap_base >= 
                ((long)heap_top - (long)heap_base)) {
 #ifdef GC_COLLECT_STATISTICS
-               ++gc_mark_not_inheap;
+               if (addr == NULL)
+                       ++gc_mark_null_pointer;
+               else
+                       ++gc_mark_not_inheap;
 #endif
                return;
        }
@@ -789,28 +800,35 @@ gc_mark_object_at (void** addr)
 }
 
 
-__inline__
+inline
 static
 void gc_mark_references (void)
 {
        address_list_node* curr = references;
 
        while (curr) {
+#ifdef GC_COLLECT_STATISTICS
+               ++gc_mark_heapblocks_visited;
+#endif         
                gc_mark_object_at(*((void**)(curr->address)));
                curr = curr->next;
        }
 }
 
-__inline__
+inline
 static
 void 
 markreferences(void** start, void** end)
 {
-       while (start < end)
+       while (start < end) {
+#ifdef GC_COLLECT_STATISTICS
+               ++gc_mark_heapblocks_visited;
+#endif         
                gc_mark_object_at(*(start++));
+       }
 }
 
-__inline__
+inline
 static
 void gc_mark_stack (void)
 {
diff --git a/mm/heap3.c b/mm/heap3.c
new file mode 100644 (file)
index 0000000..99addf5
--- /dev/null
@@ -0,0 +1,979 @@
+#include <stddef.h>
+#include <unistd.h>            /* getpagesize, mmap, ... */
+#include <sys/mman.h>
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <assert.h>
+
+#include "asmpart.h"
+#include "callargs.h"
+#include "threads/thread.h"
+#include "threads/locks.h"
+
+#include "lifespan.h"
+#include "mm.h"
+
+#if !defined(HAVE_MAP_FAILED)
+#define MAP_FAILED ((void*) -1)
+#endif
+
+
+#define PAGESIZE_MINUS_ONE     (getpagesize() - 1)
+
+#undef ALIGN
+#undef OFFSET
+
+#define HEURISTIC_SEL    0
+#define HEURISTIC_PARAM  2UL
+
+
+#define next_collection_heuristic_init()   \
+             (void*)((long)heap_top + (((long)heap_limit - (long)heap_top) >> 4))
+
+#if HEURISTIC_SEL == 0
+#define next_collection_heuristic()   \
+             (void*)((long)heap_top + (((long)heap_limit - (long)heap_top) >> HEURISTIC_PARAM))
+#elif HEURISTIC_SEL == 1
+#define next_collection_heuristic()   \
+             (void*)((long)heap_top + (((long)heap_top - (long)heap_base) << HEURISTIC_PARAM))
+#elif HEURISTIC_SEL == 2
+#define next_collection_heuristic()   \
+             (void*)((long)heap_top + HEURISTIC_PARAM)  
+#endif
+
+//#define COLLECT_LIFESPAN
+//#define NEW_COLLECT_LIFESPAN
+#define COLLECT_FRAGMENTATION
+//#define COLLECT_SIZES
+
+#define GC_COLLECT_STATISTICS
+//#define FINALIZER_COUNTING
+
+#undef STRUCTURES_ON_HEAP
+//#define STRUCTURES_ON_HEAP
+
+#define false 0
+#define true 1
+
+#include "allocator.h" /* rev. 1 allocator */
+#include "bitmap2.h"   /* rev. 2 bitmap management */
+
+bool collectverbose;
+
+void gc_call (void);
+
+/* --- macros */
+
+#define align_size(size)       ((size) & ~((1 << ALIGN) - 1))
+#define MAP_ADDRESS                    (void*) 0x10000000
+
+/* --- file-wide variables */
+
+static void*   heap_base = NULL;
+static SIZE            heap_size = 0;
+static void*   heap_top = NULL;
+static void*   heap_limit = NULL;
+static void*   heap_next_collection = NULL;
+
+static bitmap_t* start_bitmap = NULL;
+static BITBLOCK* start_bits = NULL;
+static bitmap_t* reference_bitmap = NULL;
+static BITBLOCK* reference_bits = NULL;
+static bitmap_t* mark_bitmap = NULL;
+static BITBLOCK* mark_bits = NULL;
+
+static void**  stackbottom = NULL;
+
+typedef struct address_list_node {
+       void* address;
+       struct address_list_node* prev;
+       struct address_list_node* next;
+} address_list_node;
+
+static address_list_node* references = NULL;
+static address_list_node* finalizers = NULL;
+
+#ifdef GC_COLLECT_STATISTICS
+
+static unsigned long gc_collections_count = 0;
+
+static unsigned long gc_alloc_total = 0;
+static unsigned long gc_alloc_count = 0;
+
+static unsigned long gc_mark_heapblocks_visited = 0;
+static unsigned long gc_mark_not_aligned = 0;
+static unsigned long gc_mark_not_inheap = 0;
+static unsigned long gc_mark_not_object = 0;
+static unsigned long gc_mark_objects_marked = 0;
+static unsigned long gc_mark_already_marked = 0;
+
+static unsigned long gc_mark_null_pointer = 0;
+
+#endif
+
+#ifdef FINALIZER_COUNTING
+
+static unsigned long gc_finalizers_executed = 0;
+static unsigned long gc_finalizers_detected = 0;
+
+#endif
+
+#ifdef USE_THREADS
+static iMux  alloc_mutex;
+#endif
+
+#ifdef COLLECT_LIFESPAN
+static FILE* tracefile;
+#endif
+
+#ifdef COLLECT_FRAGMENTATION
+static FILE* fragfile;
+static FILE* fragsizefile;
+#endif
+
+/* --- implementation */
+
+void 
+heap_init (SIZE size, 
+                  SIZE startsize, /* when should we collect for the first time ? */
+                  void **in_stackbottom)
+{
+       /* 1. Initialise the freelists & reset the allocator's state */
+       allocator_init(); 
+
+       /* 2. Allocate at least (alignment!) size bytes of memory for the heap */
+       heap_size = align_size(size + ((1 << ALIGN) - 1));
+
+#if !(defined(HAVE_MAP_ANONYMOUS))
+       heap_base = malloc(heap_size);
+#else
+       heap_base = (void*) mmap (NULL, 
+                                                         ((size_t)heap_size + PAGESIZE_MINUS_ONE) & ~PAGESIZE_MINUS_ONE,
+                                                         PROT_READ | PROT_WRITE, 
+                                                         MAP_PRIVATE | MAP_ANONYMOUS, 
+                                                         -1, 
+                                                         (off_t) 0);
+#endif
+
+       if (heap_base == (void*)MAP_FAILED) {
+               /* unable to allocate the requested amount of memory */
+               fprintf(stderr, "heap2.c: The queen, mylord, is dead! (mmap failed)\n");
+               exit(-1);
+       }
+
+       /* 3. Allocate the bitmaps */
+       start_bitmap = bitmap_allocate(heap_base, heap_size);
+       reference_bitmap = bitmap_allocate(heap_base, heap_size);
+       mark_bitmap = bitmap_allocate(heap_base, heap_size);
+
+       start_bits = start_bitmap->bitmap;
+    reference_bits = reference_bitmap->bitmap;
+    mark_bits = mark_bitmap->bitmap;
+
+       /* 4. Mark the first free-area as an object-start */
+       bitmap_setbit(start_bits, heap_base);
+
+       /* 5. Initialise the heap's state (heap_top, etc.) */
+       stackbottom = in_stackbottom; /* copy the stackbottom */
+
+       heap_top = heap_base; /* the current end of the heap (just behind the last allocated object) */
+       heap_limit = (void*)((long)heap_base + heap_size); /* points just behind the last accessible block of the heap */
+
+       /* 6. calculate a useful first collection limit */
+       /* This is extremly primitive at this point... 
+          we should replace it with something more useful -- phil. */
+       heap_next_collection = next_collection_heuristic_init();
+
+       /* 7. Init the global reference lists & finalizer addresses */
+       references = NULL;
+       finalizers = NULL;
+
+#ifdef STRUCTURES_ON_HEAP
+       heap_addreference(&references);
+       heap_addreference(&finalizers);
+#endif
+
+#ifdef USE_THREADS
+       /* 8. Init the mutexes for synchronization */
+       alloc_mutex.holder = 0;
+#endif
+
+       /* 9. Set up collection of lifespan data */
+#ifdef COLLECT_LIFESPAN
+#if 0
+       tracefile = fopen("heap.trace", "w");
+#else
+       tracefile = popen("gzip -9 >heap.trace.gz", "w");
+#endif
+       if (!tracefile) {
+               fprintf(stderr, "heap2.c: Radio Ga Ga! (fopen failed)\n");
+               exit(-2);
+       }
+
+       fprintf(tracefile, "heap_base\t0x%lx\n", heap_base);    
+       fprintf(tracefile, "heap_limit\t0x%lx\n", heap_limit);
+       fprintf(tracefile, "heap_top\t0x%lx\n", heap_top);
+#endif
+
+#if defined(NEW_COLLECT_LIFESPAN) || defined(COLLECT_SIZES)
+       lifespan_init(heap_base, heap_size);
+#endif
+
+       /* 10. Set up collection of fragmentation data */
+#ifdef COLLECT_FRAGMENTATION
+       fragfile = popen("gzip -9 >fragmentation.gz", "w");
+       fragsizefile = popen("gzip -9 >freeblocks.gz", "w");
+#endif
+}
+
+inline
+static
+void
+heap_call_finalizer_for_object_at(java_objectheader* object_addr)
+{
+       asm_calljavamethod(object_addr->vftbl->class->finalizer, object_addr, NULL, NULL, NULL);
+#ifdef FINALIZER_COUNTING
+       ++gc_finalizers_executed;
+#endif
+}
+
+void 
+heap_close (void)
+{
+       address_list_node* curr = finalizers;
+
+       /* 0. clean up lifespan module */
+#ifdef COLLECT_LIFESPAN
+#if 0
+       fclose(tracefile);
+#else
+       pclose(tracefile);
+#endif
+#endif
+
+#if defined(NEW_COLLECT_LIFESPAN)
+       lifespan_close();
+#endif
+
+#ifdef COLLECT_FRAGMENTATION
+       pclose(fragfile);
+       pclose(fragsizefile);
+#endif
+
+       /* 1. Clean up on the heap... finalize all remaining objects */
+#if 1
+       while (curr) {
+               address_list_node* prev = curr;
+               java_objectheader* addr = (java_objectheader*)(curr->address);
+               
+               if (addr && bitmap_testbit(start_bits, addr))
+                       heap_call_finalizer_for_object_at(addr);
+               
+               curr = curr->next;
+               free(prev);
+       }
+#endif
+
+       /* 2. Release the bitmaps */
+       bitmap_release(start_bitmap);
+       bitmap_release(reference_bitmap);
+       bitmap_release(mark_bitmap);
+
+       /* 3. Release the memory allocated to the heap */
+       if (heap_base)
+               munmap(heap_base, heap_size);
+
+       /* 4. emit statistical data */
+#ifdef GC_COLLECT_STATISTICS
+       sprintf(logtext, "%ld bytes for %ld objects allocated.", 
+                       gc_alloc_total, gc_alloc_count); 
+       dolog();
+       sprintf(logtext, "%ld garbage collections performed.", gc_collections_count);
+       dolog();
+       sprintf(logtext, "%ld heapblocks visited, %ld objects marked", 
+                       gc_mark_heapblocks_visited, gc_mark_objects_marked);
+       dolog();
+       sprintf(logtext, "    %ld null pointers.", gc_mark_null_pointer);
+       dolog();
+       sprintf(logtext, "    %ld out of heap.", gc_mark_not_inheap);
+       dolog();
+       sprintf(logtext, "    %ld visits to objects already marked.", gc_mark_already_marked);
+       dolog();
+       sprintf(logtext, "    %ld not an object.", gc_mark_not_object);
+       dolog();
+       sprintf(logtext, "    %ld potential references not aligned.", gc_mark_not_aligned);
+       dolog();
+#endif
+
+#ifdef FINALIZER_COUNTING
+       sprintf(logtext, "%ld objects with a finalizer", gc_finalizers_detected);
+       dolog();
+
+       if (gc_finalizers_detected == gc_finalizers_executed)
+               sprintf(logtext, "    all finalizers executed.");
+       else
+               sprintf(logtext, "    only %ld finalizers executed.", gc_finalizers_executed);
+       dolog();
+#endif
+
+#if defined(NEW_COLLECT_LIFESPAN) || defined(COLLECT_SIZES)
+       lifespan_emit();
+#endif
+}
+
+inline
+static
+void 
+heap_add_address_to_address_list(address_list_node** list, void* address)
+{
+       /* Note: address lists are kept sorted to simplify finalization */
+
+       address_list_node* new_node = malloc(sizeof(address_list_node));
+       new_node->address = address;
+       new_node->next = NULL;
+
+       while (*list && (*list)->next) {
+               if ((*list)->next->address < address)
+                       list = &(*list)->next;
+               else {
+                       new_node->next = *list;
+                       *list = new_node;
+                       return;
+               }                       
+       }
+
+       new_node->next = *list;
+       *list = new_node;
+}
+
+
+inline
+static
+void
+heap_add_finalizer_for_object_at(void* addr)
+{
+       /* Finalizers seem to be very rare... for this reason, I keep a linked
+          list of object addresses, which have a finalizer attached. This list
+          is kept in ascending order according to the order garbage is freed.
+          This list is currently kept separate from the heap, but should be 
+          moved onto it, but some JIT-marker code to handle these special
+          objects will need to be added first. -- phil. */
+
+       heap_add_address_to_address_list(&finalizers, addr);
+
+#ifdef COLLECT_LIFESPAN
+       fprintf(tracefile, "finalizer\t0x%lx\n", addr);
+#endif
+}
+
+void* 
+heap_allocate (SIZE              in_length, 
+                          bool           references, 
+                          methodinfo *finalizer)
+{
+       SIZE    length = align_size(in_length + ((1 << ALIGN) - 1)); 
+       void*   free_chunk = NULL;
+
+#if 0
+       /* check for misaligned in_length parameter */
+       if (length != in_length)
+               fprintf(stderr,
+                               "heap2.c: heap_allocate was passed unaligned in_length parameter: %ld, \n         aligned to %ld. (mistrust)\n",
+                               in_length, length);
+#endif
+
+#ifdef FINALIZER_COUNTING
+       if (finalizer)
+               ++gc_finalizers_detected;
+#endif
+
+#if defined(COLLECT_LIFESPAN) || defined(NEW_COLLECT_LIFESPAN)
+       /* perform garbage collection to collect data for lifespan analysis */
+       if (heap_top > heap_base)
+               gc_call();
+#endif
+
+#ifdef USE_THREADS
+       lock_mutex(&alloc_mutex);
+#endif 
+ retry:
+       /* 1. attempt to get a free block with size >= length from the freelists */
+       free_chunk = allocator_alloc(length);
+
+       /* 2. if unsuccessful, try alternative allocation strategies */
+       if (!free_chunk) {
+               /* 2.a if the collection threshold would be exceeded, collect the heap */
+               if ((long)heap_top + length > (long)heap_next_collection) {
+                       /* 2.a.1. collect if the next_collection threshold would be exceeded */
+                       gc_call();
+
+                       /* 2.a.2. we just ran a collection, recheck the freelists */
+                       free_chunk = allocator_alloc(length);
+                       if (free_chunk)
+                               goto success;
+
+                       /* 2.a.3. we can't satisfy the request from the freelists, check
+                                 against the heap_limit whether growing the heap is possible */
+                       if ((long)heap_top + length > (long)heap_limit)
+                               goto failure;
+               }
+
+               /* 2.b. grow the heap */
+               free_chunk = heap_top;
+               heap_top = (void*)((long)heap_top + length);
+       }
+
+ success:
+       /* 3.a. mark all necessary bits, store the finalizer & return the newly allocated block */
+
+       /* I don't mark the object-start anymore, as it always is at the beginning of a free-block,
+          which already is marked (Note: The first free-block gets marked in heap_init). -- phil. */
+       bitmap_setbit(start_bits, free_chunk); /* mark the new object */
+
+#ifndef SIZE_FROM_CLASSINFO
+       bitmap_setbit(start_bits, (void*)((long)free_chunk + (long)length)); /* mark the freespace behind the new object */
+#endif
+
+       if (references)
+               bitmap_setbit(reference_bits, free_chunk);
+       else 
+               bitmap_clearbit(reference_bits, free_chunk);
+
+       /* store a hint, that there's a finalizer for this address */
+       if (finalizer)
+               heap_add_finalizer_for_object_at(free_chunk);
+
+#ifdef GC_COLLECT_STATISTICS
+       gc_alloc_total += length;
+       ++gc_alloc_count;
+#endif
+
+#ifdef COLLECT_LIFESPAN
+       fprintf(tracefile, "alloc\t0x%lx\t0x%lx\n", 
+                       free_chunk, (long)free_chunk + length);
+#endif
+
+#if defined(NEW_COLLECT_LIFESPAN) || defined(COLLECT_SIZES)
+       lifespan_alloc(free_chunk, length);
+#endif
+
+ failure:
+#ifdef USE_THREADS
+       unlock_mutex(&alloc_mutex);
+#endif 
+       return free_chunk;
+}
+
+void 
+heap_addreference (void **reflocation)
+{
+       /* I currently use a separate linked list (as in the original code) to hold
+          the global reference locations, but I'll change this to allocate these
+          in blocks on the heap; we'll have to add JIT-Marker code for those Java
+          objects then. -- phil. */
+
+       heap_add_address_to_address_list(&references, reflocation);
+}
+
+static
+inline
+void gc_finalize (void)
+{
+       /* This will have to be slightly rewritten as soon the JIT-marked heap-based lists are used. -- phil. */
+
+       address_list_node*  curr = finalizers;
+       address_list_node*  prev;
+
+#if 0
+       /* FIXME: new code, please! */
+#else
+       while (curr) {
+               if (curr->address) {
+                       if (!bitmap_testbit(mark_bits, curr->address)) {
+
+#ifdef FINALIZER_COUNTING
+                               ++gc_finalizers_executed;
+#endif
+                               asm_calljavamethod(((java_objectheader*)curr->address)->vftbl->class->finalizer, 
+                                                                  curr->address, NULL, NULL, NULL);
+                               curr->address = 0;
+                       }
+               }
+
+               curr = curr->next;
+       }
+#endif
+}
+
+
+inline
+static
+void* advance_address(void* addr)
+{
+       if (*(u8*)addr & 0x1)
+               return addr + (*(u8)addr & ~0x3);
+               
+       if (((java_objectheader*)addr)->vftbl == class_array->vftbl)
+               addr = (void**)((long)addr + (long)((java_arrayheader*)addr)->alignedsize);
+       else
+               addr = (void**)((long)addr + (long)((java_objectheader*)addr)->vftbl->class->alignedsize);
+}
+
+#define FREE     0
+#define USED     1
+#define UNMARKED 2
+
+inline
+static
+int get_type(void* addr)
+{
+       if (bitmap_testbit(markbits, addr))
+               return USED;
+
+       if (*(u8*)addr & 0x2)
+               return FREE;
+
+       return UNMARKED;
+}
+
+inline
+static 
+void gc_reclaim (void)
+{
+       void* free_start;
+       void* free_end = heap_base;
+
+       void* addr;
+       void* addr1 = NULL;
+       void* addr2 = NULL;
+       u8    size = 0;
+       int   type;
+
+       BITBLOCK* temp_bits;
+       bitmap_t* temp_bitmap;
+
+#ifdef COLLECT_FRAGMENTATION
+       unsigned long  free_size = 0;
+       unsigned long  free_fragments = 0;
+#endif
+
+       /* 2. reclaim unmarked objects */
+
+       addr = heap_start;
+
+ state0:
+       switch (get_type(addr)) {
+       UNMARKED:
+               addr1 = addr;
+               size = *(u8*)addr & ~0x3;
+               addr = advance_address(addr);
+               goto state1;
+
+       FREE:
+               addr1 = addr;
+               addr = advance_address(addr);
+               goto state2;
+
+       USED:
+               addr = advance_address(addr);
+               goto state0;
+       }
+
+ state1:
+       switch (get_type(addr)) {
+       UNMARKED:
+               size += *(u8*)addr & ~0x3;
+               addr = advance_address(addr);
+               goto state1;
+
+       FREE:
+               allocator_free_prejoin(addr1, addr, size);
+               addr = advance_address(addr);
+               goto state2;
+
+       USED:
+               allocator_free(addr1, size);
+               size = 0;
+               addr = advance_address(addr);
+               goto state0;
+       }
+
+ state2:
+       switch (get_type(addr)) {
+       UNMARKED:
+               size = *(u8*)addr & ~0x3;
+               addr2 = addr;
+               addr = advance_address(addr);
+               goto state3;
+
+       FREE:
+               fprintf(stderr, "error!");
+               exit(-2);
+
+       USED:
+               addr = advance_address(addr);
+               goto state0;
+       }
+
+ state3:
+       switch (get_type(addr)) {
+       UNMARKED:
+               size += *(u8*)addr & ~0x3;
+               addr = advance_address(addr);
+               goto state3;
+
+       FREE:
+               allocator_free_blockjoin(addr1, addr, size);
+               addr = advance_address(addr);
+               goto state2;
+
+       USED:
+               allocator_free_postjoin(addr1, addr, size);
+               addr = advance_address(addr);
+               goto state0;
+       }
+
+       /* 3.1. swap mark & start bitmaps */
+       temp_bits = mark_bits;
+       mark_bits = start_bits;
+       start_bits = temp_bits;
+
+       temp_bitmap = mark_bitmap;
+       mark_bitmap = start_bitmap;
+       start_bitmap = temp_bitmap;
+
+       /* 3.3. update heap_top */
+       if (free_start < heap_top) {
+               heap_top = free_start;
+#ifdef NEW_COLLECT_LIFESPAN
+                       lifespan_free(free_start, free_end);
+#endif
+       }
+
+#if 0
+       if (heap_top < heap_limit)
+               bitmap_setbit(start_bits, heap_top);
+#endif
+
+       /* 3.4. emit fragmentation info */
+#ifdef COLLECT_FRAGMENTATION
+       {
+               unsigned long heap_full = (unsigned long)heap_top - (unsigned long)heap_base;
+               unsigned long heap_life = (unsigned long)heap_top - (unsigned long)heap_base - free_size;
+
+               fprintf(fragfile, 
+                               "%ld\t%ld\t%ld\t%ld\t%f\t%f\t%f\n", 
+                               heap_full,
+                               heap_life,
+                               free_size, 
+                               free_fragments,
+                               100*(float)free_size/(free_fragments ? free_fragments : 1),
+                               100*(float)heap_life/(heap_full ? heap_full : 1),
+                               100*(float)free_size/(heap_full ? heap_full : 1)
+                               );
+       }
+       fflush(fragfile);
+
+       allocator_dump_to_file(fragsizefile);
+#endif
+
+       /* 4. adjust the collection threshold */
+       heap_next_collection = next_collection_heuristic();
+       if (heap_next_collection > heap_limit)
+               heap_next_collection = heap_limit;
+
+#ifdef COLLECT_LIFESPAN
+       fprintf(tracefile, "heap_top\t0x%lx\n", heap_top);
+#endif
+}
+
+inline
+static
+void 
+gc_mark_object_at (void** addr)
+{
+       /*
+        * A note concerning the order of the tests:
+        *
+        * Statistics collected during a test run, where alignment
+        * was tested before checking whether the addr points into 
+        * the heap:
+        * >> LOG: 9301464 bytes for 196724 objects allocated.
+        * >> LOG: 15 garbage collections performed.
+        * >> LOG: 6568440 heapblocks visited, 469249 objects marked
+        * >> LOG:     1064447 visits to objects already marked.
+        * >> LOG:     988270 potential references not aligned.
+        * >> LOG:     4049446 out of heap.
+        * >> LOG:     5236 not an object.
+        *
+        * These results show, that only about 1/4 of all heapblocks 
+        * point to objects; The single most important reason why a 
+        * heapblock can not point at an object is, that it's value 
+        * doesn't fall within the heap area (this test was performed
+        * with a 3MB heap).
+        *
+        * From the results, the various tests have to be conducted 
+        * in the following order for maximum efficiency:
+        *    1. addr in heap?
+        *    2. already marked ?
+        *    3. aligned ?
+        *    4. object ?
+        *
+        * The results after reordering:
+        * >> LOG: 9301464 bytes for 196724 objects allocated.
+        * >> LOG: 15 garbage collections performed.
+        * >> LOG: 6568440 heapblocks visited, 469249 objects marked
+        * >> LOG:     1064447 visits to objects already marked.
+        * >> LOG:     350 potential references not aligned.
+        * >> LOG:     5037366 out of heap.
+        * >> LOG:     5236 not an object.
+        *
+        * And using:
+        *    1. addr in heap?
+        *    2. already marked ?
+        *    3. object ?
+        *    4. aligned ?
+        * 
+        * >> LOG: 9301464 bytes for 196724 objects allocated.
+        * >> LOG: 15 garbage collections performed.
+        * >> LOG: 6568440 heapblocks visited, 469249 objects marked
+        * >> LOG:     5037366 out of heap.
+        * >> LOG:     1064456 visits to objects already marked.
+        * >> LOG:     5539 not an object.
+        * >> LOG:     38 potential references not aligned.
+        *
+        * Apparently, most unaligned values will already be eliminated
+        * when checking against the bounds of the heap. Checking this
+        * property first, should thus improve collection times.
+        */
+
+       /* 1.a. if addr doesn't point into the heap, return. */
+       if ((unsigned long)addr - (unsigned long)heap_base >= 
+               ((long)heap_top - (long)heap_base)) {
+#ifdef GC_COLLECT_STATISTICS
+               if (addr == NULL)
+                       ++gc_mark_null_pointer;
+               else
+                       ++gc_mark_not_inheap;
+#endif
+               return;
+       }
+
+       /* 1.b. if align(addr) has already been marked during this collection, return. */
+       if (bitmap_testbit(mark_bits, (void*)addr)) {
+#ifdef GC_COLLECT_STATISTICS
+               ++gc_mark_already_marked;
+#endif
+               return;
+       }
+
+       /* 1.c. if align(addr) doesn't point to the start of an object, return. */
+       if (!bitmap_testbit(start_bits, (void*)addr)) {
+#ifdef GC_COLLECT_STATISTICS
+               ++gc_mark_not_object;
+#endif
+               return;
+       }
+
+       /* 1.d. if addr is not properly aligned, return. */
+       if ((long)addr & ((1 << ALIGN) - 1)) {
+#ifdef GC_COLLECT_STATISTICS
+               ++gc_mark_not_aligned;
+#endif
+               return;
+       }
+
+       /* 2. Mark the object at addr */
+       bitmap_setbit(mark_bits, (void*)addr); 
+#ifdef GC_COLLECT_STATISTICS
+       ++gc_mark_objects_marked;
+#endif
+
+#ifdef JIT_MARKER_SUPPORT
+       asm_calljavamethod(addr->vftbl->class->marker, addr, NULL, NULL, NULL);
+#else
+
+       /* 3. mark the references contained within the extents of the object at addr */
+       if (bitmap_testbit(reference_bits, addr)) {
+               /* 3.1. find the end of the object */
+               void** end;
+
+#ifdef SIZE_FROM_CLASSINFO
+               if (((java_objectheader*)addr)->vftbl == class_array->vftbl)
+                       end = (void**)((long)addr + (long)((java_arrayheader*)addr)->alignedsize);
+               else
+                       end = (void**)((long)addr + (long)((java_objectheader*)addr)->vftbl->class->alignedsize);
+#else
+               end = (void**)bitmap_find_next_setbit(start_bitmap, addr + 1); /* points just behind the object */
+#endif
+
+               /* 3.2. mark the references within the object at addr */
+#ifdef GC_COLLECT_STATISTICS
+               gc_mark_heapblocks_visited += ((long)end - (long)addr) >> ALIGN;
+#endif
+               while (addr < end)
+                       gc_mark_object_at(*(addr++));
+#endif 
+       }
+       
+       return;
+}
+
+
+inline
+static
+void gc_mark_references (void)
+{
+       address_list_node* curr = references;
+
+       while (curr) {
+#ifdef GC_COLLECT_STATISTICS
+               ++gc_mark_heapblocks_visited;
+#endif         
+               gc_mark_object_at(*((void**)(curr->address)));
+               curr = curr->next;
+       }
+}
+
+inline
+static
+void 
+markreferences(void** start, void** end)
+{
+       while (start < end) {
+#ifdef GC_COLLECT_STATISTICS
+               ++gc_mark_heapblocks_visited;
+#endif         
+               gc_mark_object_at(*(start++));
+       }
+}
+
+inline
+static
+void gc_mark_stack (void)
+{
+       void *dummy;
+
+#ifdef USE_THREADS 
+    thread *aThread;
+       
+       if (currentThread == NULL) {
+               void **top_of_stack = &dummy;
+               
+               if (top_of_stack > stackbottom)
+                       markreferences(stackbottom, top_of_stack);
+               else
+                       markreferences(top_of_stack, stackbottom);
+       }
+       else {
+               for (aThread = liveThreads; aThread != 0;
+                        aThread = CONTEXT(aThread).nextlive) {
+                       gc_mark_object_at((void*)aThread);
+                       if (CONTEXT(aThread).usedStackTop > CONTEXT(aThread).stackEnd)
+                               markreferences((void**)CONTEXT(aThread).stackEnd,
+                                                          (void**)CONTEXT(aThread).usedStackTop);
+                       else    
+                               markreferences((void**)CONTEXT(aThread).usedStackTop,
+                                                          (void**)CONTEXT(aThread).stackEnd);
+           }
+
+               markreferences((void**)&threadQhead[0],
+                                          (void**)&threadQhead[MAX_THREAD_PRIO]);
+       }
+#else
+    void **top_of_stack = &dummy;
+
+    if (top_of_stack > stackbottom)
+        markreferences(stackbottom, top_of_stack);
+       else
+        markreferences(top_of_stack, stackbottom);
+#endif
+}
+
+
+static 
+void gc_run (void)
+{
+       static int armageddon_is_near = 0;
+
+       if (armageddon_is_near) {
+               /* armageddon_is_here! */
+               fprintf(stderr, "Oops, seems like there's a slight problem here: gc_run() called while still running?!\n");
+               return;
+       }
+
+       armageddon_is_near = true;
+       heap_next_collection = heap_limit;  /* try to avoid finalizer-induced collections */
+
+       bitmap_clear(mark_bitmap);
+
+       asm_dumpregistersandcall(gc_mark_stack);
+       gc_mark_references();
+       gc_finalize();
+       gc_reclaim();
+
+       armageddon_is_near = false;
+
+#ifdef GC_COLLECT_STATISTICS
+       ++gc_collections_count;
+#endif
+}
+
+
+/************************* Function: gc_init **********************************
+
+  Initializes anything that must be initialized to call the gc on the right
+  stack.
+
+******************************************************************************/
+
+void
+gc_init (void)
+{
+}
+
+/************************** Function: gc_call ********************************
+
+  Calls the garbage collector. The garbage collector should always be called
+  using this function since it ensures that enough stack space is available.
+
+******************************************************************************/
+
+void
+gc_call (void)
+{
+#ifdef USE_THREADS
+       u1 dummy;
+
+       assert(blockInts == 0);
+
+       intsDisable();
+       if (currentThread == NULL || currentThread == mainThread) {
+               CONTEXT(mainThread).usedStackTop = &dummy;
+               gc_run();
+               }
+       else
+               asm_switchstackandcall(CONTEXT(mainThread).usedStackTop, gc_run,
+                                                          (void**)&(CONTEXT(currentThread).usedStackTop));
+       intsRestore();
+#else
+       gc_run();
+#endif
+}
+
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
+
index c246373449d9e2ac3104b51cfeaf590813195566..e2667f5466837937f95b024b40e089c29746f490 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * cacao/mm/lifespan.c
- * $Id: lifespan.c 110 1999-01-05 19:26:33Z phil $
+ * $Id: lifespan.c 115 1999-01-20 01:52:45Z phil $
  */
 
 #include "mm.h"
@@ -42,7 +42,7 @@ void lifespan_init(void* heap_base, unsigned long heap_size)
        memset(lifespan_objects, 0, heap_size);
 }
 
-static __inline__ void lifespan_free_object(lifespan_object** o)
+static inline void lifespan_free_object(lifespan_object** o)
 {
        int size, high = 0;
        /* file format: alloc time, size, lifespan */
@@ -99,10 +99,15 @@ void lifespan_emit()
        int i;
 
        for (i = 4; i < 32; ++i)
+#if 0
                fprintf(stderr, "%Lu-%Lu\t%Lu\n", 
                                (1LL << (i-1)), 
                                (1LL << i) - 1,
                                lifespan_histo_size[i]);
+#else
+               fprintf(stderr, "%Lu\n", 
+                               lifespan_histo_size[i]);
+#endif
 
        fprintf(stderr, "\n\n\n");
 
@@ -126,6 +131,7 @@ void lifespan_free(void** from, void** limit)
 
 void lifespan_alloc(void* addr, unsigned long size) 
 {
+       int high = 0;
        lifespan_object**  object;
        object = (lifespan_object**)((unsigned long)addr + (unsigned long)lifespan_objects_off);
 
@@ -137,6 +143,12 @@ void lifespan_alloc(void* addr, unsigned long size)
        (*object)->time = current_time;
        (*object)->size = size;
        (*object)->number = ++current_number;
+
+       while (size) {
+               ++high;
+               size = size >> 1;
+       }
+       ++lifespan_histo_size[high];
        
        current_time += size;
 }
diff --git a/mm/mm.h b/mm/mm.h
index d3cb08e1c1ba7657ec05f339717b332f3b0f6653..7c2579e189aa7b4c56faeafd9d297125427e39c9 100644 (file)
--- a/mm/mm.h
+++ b/mm/mm.h
@@ -1,21 +1,9 @@
 #ifndef __mm_h_
 #define __mm_h_
 
-#include "../sysdep/types.h"
-#include "../global.h"
-
-#ifndef CACAO_NO_INLINE
-#define __cacao_inline__  inline
-#else
-#define __cacao_inline__
-#endif
-
-#ifdef __GNUC__
-#define __inline__  __cacao_inline__
-#else
-#define __inline__
-#endif
-
+#include "config.h"  /* takes care of "inline" */
+#include "types.h"
+#include "global.h"
 
 #endif
 
diff --git a/mm/mm3.h b/mm/mm3.h
new file mode 100644 (file)
index 0000000..e94c197
--- /dev/null
+++ b/mm/mm3.h
@@ -0,0 +1,15 @@
+#ifndef __mm_constants__
+#define __mm_constants__
+
+
+#endif
+
+#ifndef __mm_types__
+#define __mm_types__
+
+#include "types.h"
+
+typedef u8    cacao_size_t;
+typedef void* cacao_ptr_t;
+
+#endif
diff --git a/nat/Makefile.am b/nat/Makefile.am
new file mode 100644 (file)
index 0000000..1ecb5bf
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_DIST = io.c lang.c util.c
diff --git a/nat/Makefile.in b/nat/Makefile.in
new file mode 100644 (file)
index 0000000..9a3c9ae
--- /dev/null
@@ -0,0 +1,174 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+EXTRA_DIST = io.c lang.c util.c
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps nat/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nat
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
index 3de4d0dc67fcd48ad1fdb603cc6a012ee6ec167e..3f760e4a190d4cda3467203bc986c5226869ebc5 100644 (file)
@@ -9,8 +9,9 @@
 
        Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
                 Mark Probst         EMAIL: cacao@complang.tuwien.ac.at
+                        Philipp Tomsich         EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: 1997/06/10
+       Last Change: $Id: lang.c 115 1999-01-20 01:52:45Z phil $
 
 *******************************************************************************/
 
@@ -452,8 +453,7 @@ double java_lang_Math_floor (double par1)
 
 double java_lang_Math_rint (double par1)
 {
-       panic ("native Methode java_lang_rint not implemented yet");
-       return 0.0;
+       return rint(par1); /* phil, 1998/12/12 */
 }
 
 double java_lang_Math_atan2 (double par1, double par2)
index 771ec540673f4dda2ab69f6f942ee78d412b30cb..98594cf5e52c81b1a289ad367a675ab30af89d2b 100644 (file)
--- a/native.c
+++ b/native.c
@@ -18,7 +18,6 @@
 #include <unistd.h>
 #include <time.h>
 
-
 #include "global.h"
 #include "native.h"
 
index 6184efb09a71f83c23f00fb58a504e4ff1ae81e4..76f6d510c7b178c0869b8b379c57057232f3007c 100644 (file)
 
        Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
        Changes: Mark Probst         EMAIL: cacao@complang.tuwien.ac.at
+                Philipp Tomsich     EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: 1997/05/23
+       Last Change: $Id: headers.c 115 1999-01-20 01:52:45Z phil $
 
 *******************************************************************************/
 
+#include "config.h" /* phil */
+
 #include "global.h"
 
 #include "tables.h"
@@ -389,6 +392,7 @@ int main(int argc, char **argv)
    /********** interne (nur fuer main relevante Optionen) **************/
    
        char classpath[500] = "";
+       char offsets_filename[1024] = ""; /* phil */
        u4 heapsize = 100000;
 
    /*********** Optionen, damit wirklich nur headers generiert werden ***/
@@ -415,9 +419,12 @@ int main(int argc, char **argv)
        log_init (NULL);
        log_text ("Java - header-generator started");
        
-       file = fopen("sysdep/offsets.h", "w");
-       if (file == NULL)
-               panic ("Can not open file 'sysdep/offsets.h' for write");
+       sprintf(offsets_filename, "%s/offsets.h", SYSDEP_DIR); /* phil */
+       file = fopen(offsets_filename, "w");
+       if (file == NULL) {
+               fprintf (stderr, "Can not open file '%s' for write", offsets_filename);
+               exit(-1);
+       }
        
        fprintf (file, "/* This file is machine generated, don't edit it !*/\n\n"); 
 
diff --git a/src/mm/Makefile.am b/src/mm/Makefile.am
new file mode 100644 (file)
index 0000000..b217625
--- /dev/null
@@ -0,0 +1,10 @@
+noinst_LIBRARIES = libmm_new.a libmm_old.a
+
+libmm_new_a_SOURCES = allocator2.c allocator.h \
+                     bitmap2.c bitmap2.h \
+                     heap2.c \
+                     lifespan.c lifespan.h \
+                     mm.h
+libmm_old_a_SOURCES = heap.old.c
+
+INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
index 2cc8e9437df9973d16daf3e3bca6e64c7b8173c4..c15c4011aa31c82086442211bae95b4a398dd105 100644 (file)
@@ -19,7 +19,7 @@
 #include <sys/mman.h>
 #include <unistd.h>
 
-#include "../callargs.h"
+#include "callargs.h"
 #include "loging.h"
 #include "memory.h"
 
index 771ec540673f4dda2ab69f6f942ee78d412b30cb..98594cf5e52c81b1a289ad367a675ab30af89d2b 100644 (file)
@@ -18,7 +18,6 @@
 #include <unistd.h>
 #include <time.h>
 
-
 #include "global.h"
 #include "native.h"
 
diff --git a/src/native/vm/Makefile.am b/src/native/vm/Makefile.am
new file mode 100644 (file)
index 0000000..1ecb5bf
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_DIST = io.c lang.c util.c
diff --git a/src/threads/green/Makefile.am b/src/threads/green/Makefile.am
new file mode 100644 (file)
index 0000000..2d820ff
--- /dev/null
@@ -0,0 +1,8 @@
+noinst_LIBRARIES = @LIBTHREAD@
+EXTRA_LIBRARIES = libthreads.a
+
+libthreads_a_SOURCES = locks.c locks.h \
+                      thread.c thread.h \
+                      threadio.c threadio.h
+
+INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
index f921f47b7241f3853e7de07a6070aa3ec4b4f78e..e9a766e250d1b28f1458562454e111007053ac0d 100644 (file)
  * Written by Tim Wilkinson <tim@tjwassoc.demon.co.uk>, 1996.
  */
 
+#include "config.h"
+
 #include <assert.h>
 #include <stdio.h>
 
 #include "thread.h"
 #include "locks.h"
 
-#include "../tables.h"
-#include "../native.h"
-#include "../loader.h"
+#include "tables.h"
+#include "native.h"
+#include "loader.h"
 
 static classinfo *class_java_lang_IllegalMonitorStateException;
 
index e5224677e8b21249fe49a4fb6298b91ac0b947a2..59e80581f1e1910138794ed69e55e4c9dc4e1e97 100644 (file)
@@ -16,8 +16,8 @@
 
 #ifdef USE_THREADS
 
-#include "../global.h"
-#include "sysdep/defines.h"
+#include "global.h"
+#include "defines.h"
 
 #define        WAITFOREVER     -1
 
index 1e7c44a5ae2d225550afc23df1ecd453b62103b2..fed33a70bfc0e140a8f5ea4e9b73d5ec0005a8de 100644 (file)
@@ -12,7 +12,9 @@
 
 #define        DBG(s)                    
 
-#include "sysdep/defines.h"
+#include "config.h"
+
+#include "defines.h"
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -207,7 +209,7 @@ threadedAccept(int fd, struct sockaddr* addr, int* len)
 #if defined(BLOCKING_CALLS)
        blockOnFile(fd, TH_ACCEPT);
 #endif
-       r = accept(fd, addr, len);
+       r = accept(fd, addr, (size_t*)len);
        if (r >= 0
            || !(errno == EINPROGRESS || errno == EALREADY
                 || errno == EWOULDBLOCK))
index 622718b2f4141bb98698e48a4d1cc22dad63c19c..a473fb9653a6d13ebeb2ddfeaa399f85ef684282 100644 (file)
@@ -11,6 +11,8 @@
  * Written by Tim Wilkinson <tim@tjwassoc.demon.co.uk>, 1996.
  */
 
+#include "config.h"
+
 #include <assert.h>
 
 #include <sys/types.h>
 
 #include "thread.h"
 #include "locks.h"
-#include "sysdep/defines.h"
-#include "sysdep/threads.h"
-
-#include "../tables.h"
-#include "../native.h"
-#include "../loader.h"
-#include "../builtin.h"
-#include "../asmpart.h"
+#include "defines.h"
+#include "threads.h"
+
+#include "tables.h"
+#include "native.h"
+#include "loader.h"
+#include "builtin.h"
+#include "asmpart.h"
 
 static classinfo *class_java_lang_ThreadDeath;
 
index 5a8f1359a76996ec49d06d47de6f134a101f6ad0..862960a10aa1e3c2b0a202320e7b7e38f09deb7d 100644 (file)
 #ifndef __thread_h
 #define __thread_h
 
+#include "config.h"
+
 #ifdef USE_THREADS
 
-#include "../global.h"
+#include "global.h"
 
 #define MAXTHREADS              256          /* schani */
 
diff --git a/src/toolbox/Makefile.am b/src/toolbox/Makefile.am
new file mode 100644 (file)
index 0000000..c50a3e6
--- /dev/null
@@ -0,0 +1,9 @@
+noinst_LIBRARIES = libtoolbox.a
+
+libtoolbox_a_SOURCES = memory.c memory.h \
+                      loging.c loging.h \
+                      chain.c chain.h \
+                      tree.c tree.h \
+                      list.c list.h
+
+INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
index 1d1cf3a01879743db902189415e330d6991efd5d..dd1fa71d6946a918bd58f2bb676a46c8aacc22da 100644 (file)
@@ -28,7 +28,7 @@
 #include "threads/thread.h"
 #include "threads/locks.h"              /* schani */
 
-#include "sysdep/native-math.h"
+#include "native-math.h"
 
 builtin_descriptor builtin_desc[] = {
        {(functionptr) builtin_instanceof,         "instanceof"},
index 5469563feea363fc27f9d2f8d9e59faa055ae0af..ecc9de4282637417d3049b0105c27b77b902e849 100644 (file)
@@ -12,7 +12,7 @@
        Changes: Mark     Probst  (schani)   EMAIL: cacao@complang.tuwien.ac.at
                         Philipp  Tomsich (phil)     EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: $Id: global.h 91 1998-11-25 11:47:42Z phil $
+       Last Change: $Id: global.h 115 1999-01-20 01:52:45Z phil $
 
 *******************************************************************************/
 
 #include "toolbox/list.h"
 #include "toolbox/loging.h"
 
-
 /* system dependent types *****************************************************/
 
-#include "sysdep/types.h"
+#include "types.h"
 
 
 /* additional data types ******************************************************/
diff --git a/src/vm/jit/Makefile.am b/src/vm/jit/Makefile.am
new file mode 100644 (file)
index 0000000..a37f961
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_DIST = mcode.c parse.c reg.c stack.c jitdef.h
index ea00cfae13b90e365ca43754783acb36e9c3d37c..f9860e08c02f9c737d343207e8016537f0dd14c6 100644 (file)
@@ -8,13 +8,12 @@
        
        Author: Andreas  Krall      EMAIL: cacao@complang.tuwien.ac.at
 
-       Last Change: 1998/05/07
+       Last Change: $Id: parse.c 115 1999-01-20 01:52:45Z phil $
 
 *******************************************************************************/
 
 #include "math.h"
 
-
 /* macros for byte code fetching ***********************************************
 
        fetch a byte code of given size from position p in code array jcode
index 80f789328662b205b4a2b169feb54672d6586ac2..4726a3a295ae20f155053a6b8c430556cee27c35 100644 (file)
@@ -10,6 +10,8 @@
 
 *******************************************************************************/
 
+#include "global.h" /* for unicode. -- phil */
+
 extern bool collectverbose;
 
 
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644 (file)
index 0000000..9788f70
--- /dev/null
@@ -0,0 +1 @@
+timestamp
index 80f789328662b205b4a2b169feb54672d6586ac2..4726a3a295ae20f155053a6b8c430556cee27c35 100644 (file)
--- a/tables.h
+++ b/tables.h
@@ -10,6 +10,8 @@
 
 *******************************************************************************/
 
+#include "global.h" /* for unicode. -- phil */
+
 extern bool collectverbose;
 
 
diff --git a/threads/Makefile b/threads/Makefile
deleted file mode 100755 (executable)
index 8c1e733..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-
-#######################################################################
-#          Makefile f"ur meine programmunabh"angige Toolbox           #
-#######################################################################
-
-OBJECTS = locks.o thread.o threadio.o
-CC = gcc
-
-ifeq ($(USE_THREADS),YES)
-THREAD_CFLAGS = -DUSE_THREADS -DEXTERNAL_OVERFLOW -DDONT_FREE_FIRST
-else
-THREAD_CFLAGS =
-endif
-
-CFLAGS = $(THREAD_CFLAGS)
-
-threads.a: $(OBJECTS) Makefile
-       rm -f threads.a
-       ar qcs threads.a $(OBJECTS)
-#      ranlib threads.a
-
-locks.o : locks.c thread.h sysdep/threads.h ../tables.h ../native.h\
-           ../loader.h ../builtin.h ../asmpart.h
-thread.o : thread.c thread.h sysdep/threads.h ../tables.h ../native.h\
-           ../loader.h ../builtin.h ../asmpart.h
-threadio.o : threadio.c thread.h sysdep/threads.h ../tables.h ../native.h\
-           ../loader.h ../builtin.h ../asmpart.h
-
-clean: 
-       rm -f *.o *.a
diff --git a/threads/Makefile.am b/threads/Makefile.am
new file mode 100644 (file)
index 0000000..2d820ff
--- /dev/null
@@ -0,0 +1,8 @@
+noinst_LIBRARIES = @LIBTHREAD@
+EXTRA_LIBRARIES = libthreads.a
+
+libthreads_a_SOURCES = locks.c locks.h \
+                      thread.c thread.h \
+                      threadio.c threadio.h
+
+INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
diff --git a/threads/Makefile.in b/threads/Makefile.in
new file mode 100644 (file)
index 0000000..ddff4ff
--- /dev/null
@@ -0,0 +1,266 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+noinst_LIBRARIES = @LIBTHREAD@
+EXTRA_LIBRARIES = libthreads.a
+
+libthreads_a_SOURCES = locks.c locks.h                        thread.c thread.h                       threadio.c threadio.h
+
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+LIBRARIES =  $(noinst_LIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libthreads_a_LIBADD = 
+libthreads_a_OBJECTS =  locks.o thread.o threadio.o
+AR = ar
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+SOURCES = $(libthreads_a_SOURCES)
+OBJECTS = $(libthreads_a_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps threads/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLIBRARIES:
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+distclean-noinstLIBRARIES:
+
+maintainer-clean-noinstLIBRARIES:
+
+.c.o:
+       $(COMPILE) -c $<
+
+.s.o:
+       $(COMPILE) -c $<
+
+.S.o:
+       $(COMPILE) -c $<
+
+mostlyclean-compile:
+       -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+       -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+libthreads.a: $(libthreads_a_OBJECTS) $(libthreads_a_DEPENDENCIES)
+       -rm -f libthreads.a
+       $(AR) cru libthreads.a $(libthreads_a_OBJECTS) $(libthreads_a_LIBADD)
+       $(RANLIB) libthreads.a
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+       -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = threads
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile $(LIBRARIES)
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
+               mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
+               mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-noinstLIBRARIES distclean-compile \
+               distclean-tags distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
+               maintainer-clean-compile maintainer-clean-tags \
+               maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/threads/Makefile.pre-automake b/threads/Makefile.pre-automake
new file mode 100755 (executable)
index 0000000..8c1e733
--- /dev/null
@@ -0,0 +1,30 @@
+
+#######################################################################
+#          Makefile f"ur meine programmunabh"angige Toolbox           #
+#######################################################################
+
+OBJECTS = locks.o thread.o threadio.o
+CC = gcc
+
+ifeq ($(USE_THREADS),YES)
+THREAD_CFLAGS = -DUSE_THREADS -DEXTERNAL_OVERFLOW -DDONT_FREE_FIRST
+else
+THREAD_CFLAGS =
+endif
+
+CFLAGS = $(THREAD_CFLAGS)
+
+threads.a: $(OBJECTS) Makefile
+       rm -f threads.a
+       ar qcs threads.a $(OBJECTS)
+#      ranlib threads.a
+
+locks.o : locks.c thread.h sysdep/threads.h ../tables.h ../native.h\
+           ../loader.h ../builtin.h ../asmpart.h
+thread.o : thread.c thread.h sysdep/threads.h ../tables.h ../native.h\
+           ../loader.h ../builtin.h ../asmpart.h
+threadio.o : threadio.c thread.h sysdep/threads.h ../tables.h ../native.h\
+           ../loader.h ../builtin.h ../asmpart.h
+
+clean: 
+       rm -f *.o *.a
index f921f47b7241f3853e7de07a6070aa3ec4b4f78e..e9a766e250d1b28f1458562454e111007053ac0d 100644 (file)
  * Written by Tim Wilkinson <tim@tjwassoc.demon.co.uk>, 1996.
  */
 
+#include "config.h"
+
 #include <assert.h>
 #include <stdio.h>
 
 #include "thread.h"
 #include "locks.h"
 
-#include "../tables.h"
-#include "../native.h"
-#include "../loader.h"
+#include "tables.h"
+#include "native.h"
+#include "loader.h"
 
 static classinfo *class_java_lang_IllegalMonitorStateException;
 
index e5224677e8b21249fe49a4fb6298b91ac0b947a2..59e80581f1e1910138794ed69e55e4c9dc4e1e97 100644 (file)
@@ -16,8 +16,8 @@
 
 #ifdef USE_THREADS
 
-#include "../global.h"
-#include "sysdep/defines.h"
+#include "global.h"
+#include "defines.h"
 
 #define        WAITFOREVER     -1
 
index 622718b2f4141bb98698e48a4d1cc22dad63c19c..a473fb9653a6d13ebeb2ddfeaa399f85ef684282 100644 (file)
@@ -11,6 +11,8 @@
  * Written by Tim Wilkinson <tim@tjwassoc.demon.co.uk>, 1996.
  */
 
+#include "config.h"
+
 #include <assert.h>
 
 #include <sys/types.h>
 
 #include "thread.h"
 #include "locks.h"
-#include "sysdep/defines.h"
-#include "sysdep/threads.h"
-
-#include "../tables.h"
-#include "../native.h"
-#include "../loader.h"
-#include "../builtin.h"
-#include "../asmpart.h"
+#include "defines.h"
+#include "threads.h"
+
+#include "tables.h"
+#include "native.h"
+#include "loader.h"
+#include "builtin.h"
+#include "asmpart.h"
 
 static classinfo *class_java_lang_ThreadDeath;
 
index 5a8f1359a76996ec49d06d47de6f134a101f6ad0..862960a10aa1e3c2b0a202320e7b7e38f09deb7d 100644 (file)
 #ifndef __thread_h
 #define __thread_h
 
+#include "config.h"
+
 #ifdef USE_THREADS
 
-#include "../global.h"
+#include "global.h"
 
 #define MAXTHREADS              256          /* schani */
 
index 1e7c44a5ae2d225550afc23df1ecd453b62103b2..fed33a70bfc0e140a8f5ea4e9b73d5ec0005a8de 100644 (file)
@@ -12,7 +12,9 @@
 
 #define        DBG(s)                    
 
-#include "sysdep/defines.h"
+#include "config.h"
+
+#include "defines.h"
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -207,7 +209,7 @@ threadedAccept(int fd, struct sockaddr* addr, int* len)
 #if defined(BLOCKING_CALLS)
        blockOnFile(fd, TH_ACCEPT);
 #endif
-       r = accept(fd, addr, len);
+       r = accept(fd, addr, (size_t*)len);
        if (r >= 0
            || !(errno == EINPROGRESS || errno == EALREADY
                 || errno == EWOULDBLOCK))
diff --git a/toolbox/Makefile b/toolbox/Makefile
deleted file mode 100755 (executable)
index 191d8a2..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-################################################################################
-#                 Makefile for the program independent toolbox                 #
-################################################################################
-#
-# Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
-#
-# See the file COPYRIGHT for information on usage and disclaimer of warranties
-#
-# Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
-#
-# Last Change: 1997/10/30
-#
-################################################################################
-
-OBJECTS = memory.o loging.o chain.o tree.o list.o
-
-toolbox.a: $(OBJECTS) Makefile
-       rm -f toolbox.a
-       ar qcs toolbox.a $(OBJECTS)
-       
-memory.o: memory.c memory.h loging.h
-loging.o: loging.c loging.h
-chain.o: chain.c chain.h memory.h
-tree.o: tree.c tree.h memory.h
-list.o: list.c list.h
-
-clean: 
-       rm -f *.o *.a
diff --git a/toolbox/Makefile.am b/toolbox/Makefile.am
new file mode 100644 (file)
index 0000000..c50a3e6
--- /dev/null
@@ -0,0 +1,9 @@
+noinst_LIBRARIES = libtoolbox.a
+
+libtoolbox_a_SOURCES = memory.c memory.h \
+                      loging.c loging.h \
+                      chain.c chain.h \
+                      tree.c tree.h \
+                      list.c list.h
+
+INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
diff --git a/toolbox/Makefile.in b/toolbox/Makefile.in
new file mode 100644 (file)
index 0000000..f012137
--- /dev/null
@@ -0,0 +1,265 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+GC_OBJ = @GC_OBJ@
+LIBTHREAD = @LIBTHREAD@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+SYSDEP_DIR = @SYSDEP_DIR@
+THREAD_OBJ = @THREAD_OBJ@
+VERSION = @VERSION@
+
+noinst_LIBRARIES = libtoolbox.a
+
+libtoolbox_a_SOURCES = memory.c memory.h                      loging.c loging.h                       chain.c chain.h                 tree.c tree.h                   list.c list.h
+
+
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+LIBRARIES =  $(noinst_LIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libtoolbox_a_LIBADD = 
+libtoolbox_a_OBJECTS =  memory.o loging.o chain.o tree.o list.o
+AR = ar
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+SOURCES = $(libtoolbox_a_SOURCES)
+OBJECTS = $(libtoolbox_a_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+       cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps toolbox/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+       cd $(top_builddir) \
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLIBRARIES:
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+distclean-noinstLIBRARIES:
+
+maintainer-clean-noinstLIBRARIES:
+
+.c.o:
+       $(COMPILE) -c $<
+
+.s.o:
+       $(COMPILE) -c $<
+
+.S.o:
+       $(COMPILE) -c $<
+
+mostlyclean-compile:
+       -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+       -rm -f *.tab.c
+
+maintainer-clean-compile:
+
+libtoolbox.a: $(libtoolbox_a_OBJECTS) $(libtoolbox_a_DEPENDENCIES)
+       -rm -f libtoolbox.a
+       $(AR) cru libtoolbox.a $(libtoolbox_a_OBJECTS) $(libtoolbox_a_LIBADD)
+       $(RANLIB) libtoolbox.a
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+       -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = toolbox
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         d=$(srcdir); \
+         if test -d $$d/$$file; then \
+           cp -pr $$/$$file $(distdir)/$$file; \
+         else \
+           test -f $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile $(LIBRARIES)
+all-redirect: all-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
+               mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
+               mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-noinstLIBRARIES distclean-compile \
+               distclean-tags distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
+               maintainer-clean-compile maintainer-clean-tags \
+               maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/toolbox/Makefile.pre-automake b/toolbox/Makefile.pre-automake
new file mode 100755 (executable)
index 0000000..191d8a2
--- /dev/null
@@ -0,0 +1,28 @@
+################################################################################
+#                 Makefile for the program independent toolbox                 #
+################################################################################
+#
+# Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
+#
+# See the file COPYRIGHT for information on usage and disclaimer of warranties
+#
+# Authors: Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
+#
+# Last Change: 1997/10/30
+#
+################################################################################
+
+OBJECTS = memory.o loging.o chain.o tree.o list.o
+
+toolbox.a: $(OBJECTS) Makefile
+       rm -f toolbox.a
+       ar qcs toolbox.a $(OBJECTS)
+       
+memory.o: memory.c memory.h loging.h
+loging.o: loging.c loging.h
+chain.o: chain.c chain.h memory.h
+tree.o: tree.c tree.h memory.h
+list.o: list.c list.h
+
+clean: 
+       rm -f *.o *.a
index 2cc8e9437df9973d16daf3e3bca6e64c7b8173c4..c15c4011aa31c82086442211bae95b4a398dd105 100644 (file)
@@ -19,7 +19,7 @@
 #include <sys/mman.h>
 #include <unistd.h>
 
-#include "../callargs.h"
+#include "callargs.h"
 #include "loging.h"
 #include "memory.h"