Replace the build process. The new one requires GNU Make, Autoconf
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 20 Dec 2005 20:25:35 +0000 (20:25 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 20 Dec 2005 20:25:35 +0000 (20:25 +0000)
and Autoconf macros that come with Automake.  It supports multiple
separate builds of the same source tree, and updates dependencies
automatically.  Targets info, html, install, install-html, uninstall
and dist are not yet implemented.

System configuration is now automatic.  Previously, you had to choose
one of several canned system configurations, defined in Make.sysdefs.
Currently, system configuration always uses UCONTEXT for LWP, and
chooses LWP only if its requirements are met.

Feature configuration changed: instead of editing build.conf (further
processed by doconfig), you pass arguments to configure.  Note that
build.conf settings that can be overridden in econfig have no
configure equivalent; just edit econfig instead.

Because generated headers complicate makefiles, fold gamesdef.h into
its users: path.c and ipglob.c become path.c.in and ipglob.c.in,
constants.c, vers.c, options.h simply hardcode defaults (most of them
are run-time configurable).

Call the client empire instead of emp_client.  This matches what the
old standalone build did.

68 files changed:
.cvsignore
GNUmakefile.in [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Make.mk [new file with mode: 0644]
Make.sysdefs [deleted file]
Makefile [deleted file]
README
build.conf [deleted file]
compile [new file with mode: 0755]
config.guess [new file with mode: 0755]
config.sub [new file with mode: 0755]
configure.ac [new file with mode: 0644]
depcomp [new file with mode: 0755]
include/options.h
info/Commands/.cvsignore [deleted file]
info/Commands/Makefile [deleted file]
info/Concepts/.cvsignore [deleted file]
info/Concepts/Makefile [deleted file]
info/Introduction/.cvsignore [deleted file]
info/Introduction/Makefile [deleted file]
info/Makefile [deleted file]
info/Server/.cvsignore [deleted file]
info/Server/Makefile [deleted file]
info/Subjects/.cvsignore [deleted file]
info/Subjects/Makefile [deleted file]
install-sh [new file with mode: 0755]
m4/acx_pthread.m4 [new file with mode: 0644]
m4/lib_socket_nsl.m4 [new file with mode: 0644]
m4/my_func_makecontext.m4 [new file with mode: 0644]
src/.cvsignore [deleted file]
src/client/.cvsignore
src/client/Makefile [deleted file]
src/client/Makefile.standalone [deleted file]
src/client/ipglob.c.in [new file with mode: 0644]
src/doconfig/.cvsignore [deleted file]
src/doconfig/Makefile [deleted file]
src/doconfig/doconfig.c [deleted file]
src/lib/as/.cvsignore [deleted file]
src/lib/as/Makefile [deleted file]
src/lib/commands/.cvsignore [deleted file]
src/lib/commands/Makefile [deleted file]
src/lib/commands/vers.c
src/lib/common/.cvsignore [deleted file]
src/lib/common/Makefile [deleted file]
src/lib/empthread/.cvsignore [deleted file]
src/lib/empthread/Makefile [deleted file]
src/lib/gen/.cvsignore [deleted file]
src/lib/gen/Makefile [deleted file]
src/lib/global/.cvsignore [deleted file]
src/lib/global/Makefile [deleted file]
src/lib/global/constants.c
src/lib/global/path.c [deleted file]
src/lib/global/path.c.in [new file with mode: 0644]
src/lib/lwp/.cvsignore [deleted file]
src/lib/lwp/Makefile [deleted file]
src/lib/player/.cvsignore [deleted file]
src/lib/player/Makefile [deleted file]
src/lib/subs/.cvsignore [deleted file]
src/lib/subs/Makefile [deleted file]
src/lib/update/.cvsignore [deleted file]
src/lib/update/Makefile [deleted file]
src/make.defs [deleted file]
src/make.rules [deleted file]
src/scripts/cvsfiles.awk [new file with mode: 0755]
src/server/.cvsignore
src/server/Makefile [deleted file]
src/util/.cvsignore
src/util/Makefile [deleted file]

index c85bca1caf5f03654e5afa45928cca00074e98e6..7dd17cf4872ae47d8dc29cb765da8df0c0b748ea 100644 (file)
@@ -1,5 +1,16 @@
+GNUmakefile
+aclocal.m4
+autom4te.cache
 bin
+config.h
+config.h.in
+config.log
+config.status
+configure
 data
 info.html
 info.nr
 lib
+sources.mk
+stamp-h
+stamp-h.in
diff --git a/GNUmakefile.in b/GNUmakefile.in
new file mode 100644 (file)
index 0000000..ce418f1
--- /dev/null
@@ -0,0 +1,90 @@
+# 
+#   Empire - A multi-player, client/server Internet based war game.
+#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
+#                            Ken Stevens, Steve McClure
+# 
+#   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 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
+# 
+#   ---
+# 
+#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
+#   related information and legal notices. It is expected that any future
+#   projects/authors will amend these files as needed.
+# 
+#   ---
+# 
+#   @configure_input@
+#   GNUmakefile.in: Makefile template for configure
+#  
+#   Known contributors to this file:
+#      Markus Armbruster, 2005
+# 
+
+# The real meat is in Make.mk, which see.
+
+CC := @CC@
+have_gcc := @GCC@
+CFLAGS := @CFLAGS@
+CPPFLAGS := @CPPFLAGS@ @DEFS@
+LDFLAGS := @LDFLAGS@
+LIBOBJS := @LIBOBJS@
+LDLIBS := @LIBS@
+empthread := @empthread@
+ifeq ($(empthread),POSIX)
+CC := @PTHREAD_CC@
+CFLAGS := $(CFLAGS) @PTHREAD_CFLAGS@ -D_EMPTH_POSIX=1
+LDFLAGS := $(LDFLAGS) @PTHREAD_CFLAGS@
+LDLIBS := @PTHREAD_LIBS@ $(LDLIBS)
+endif
+ifeq ($(empthread),LWP)
+# TODO use config.h
+CPPFLAGS += -DUCONTEXT
+endif
+termlibs := @termlibs@
+CCDEPMODE := @CCDEPMODE@
+@am__fastdepCC_TRUE@how_to_dep := fast
+@am__fastdepCC_FALSE@@AMDEP_TRUE@how_to_dep := depcomp
+
+AWK := @AWK@
+INSTALL := @INSTALL@
+INSTALL_DATA := @INSTALL_DATA@
+INSTALL_PROGRAM := @INSTALL_PROGRAM@
+# TODO autoconf NROFF
+NROFF := groff -Tascii -P-c -U
+RANLIB := @RANLIB@
+
+prefix := @prefix@
+exec_prefix := @exec_prefix@
+bindir := @bindir@
+datadir := @datadir@
+localstatedir := @localstatedir@
+mandir := @mandir@
+sysconfdir := @sysconfdir@
+
+srcdir := @srcdir@
+VPATH := @srcdir@
+
+cvs_controlled := @cvs_controlled@
+
+# Recursively expanded so that $@ and $< work.
+subst.in = sed \
+       -e 's?@configure_input\@?$(notdir $@).  Generated from $(notdir $<) by GNUmakefile.?g' \
+       -e 's?@econfig\@?$(sysconfdir)/empire/econfig?g' \
+       -e 's?@edatadir\@?$(localstatedir)/empire?g' \
+       -e 's?@einfodir\@?$(datadir)/empire/info.nr?g' \
+       -e 's/@EMPIREHOST\@/@EMPIREHOST@/g' \
+       -e 's/@EMPIREPORT\@/@EMPIREPORT@/g'
+
+include $(srcdir)/Make.mk
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..56b077d
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+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, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   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 you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' 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.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+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 support 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=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PREFIX', the package will
+use PREFIX 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=DIR' 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' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   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 machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+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.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).  Here is a another example:
+
+     /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--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.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Make.mk b/Make.mk
new file mode 100644 (file)
index 0000000..e627bc0
--- /dev/null
+++ b/Make.mk
@@ -0,0 +1,193 @@
+# 
+#   Empire - A multi-player, client/server Internet based war game.
+#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
+#                            Ken Stevens, Steve McClure
+# 
+#   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 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
+# 
+#   ---
+# 
+#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
+#   related information and legal notices. It is expected that any future
+#   projects/authors will amend these files as needed.
+# 
+#   ---
+# 
+#   Make.mk: 
+#  
+#   Known contributors to this file:
+#      Markus Armbruster, 2005
+# 
+
+# This makefile was inspired by `Recursive Make Considered Harmful',
+# Peter Miller, 1997.
+# http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html
+
+# Recursively expanded variables are occasionally useful, but can be
+# slow and tricky.  Do not use them gratuitously.  If you don't
+# understand this, always use `:=' rather than `='.
+
+# Delete target on error.  Every Makefile should have this.
+.DELETE_ON_ERROR:
+
+# Source files
+-include sources.mk
+dirs := $(sort $(dir $(src)))
+csrc := $(filter %.c, $(src))
+
+# Generated files
+mk := sources.mk
+ac := autom4te.cache config.h config.status config.log stamp-h \
+$(basename $(filter %.in, $(src)))
+obj := $(csrc:.c=.o) $(filter %.o, $(ac:.c=.o))
+# TODO AIX needs lwpInit.o lwpRestore.o lwpSave.o unless UCONTEXT
+deps := $(obj:.o=.d)
+libs := $(addprefix lib/, libcommon.a libgen.a libglobal.a)
+util := $(addprefix src/util/, fairland files pconfig)
+progs := $(util) src/client/empire src/server/emp_server
+
+ifeq ($(empthread),POSIX)
+empth_obj := src/lib/empthread/pthread.o
+empth_lib :=
+else
+empth_obj := src/lib/empthread/lwp.o
+empth_lib := lib/liblwp.a
+endif
+
+# Abbreviations
+scripts = $(srcdir)/src/scripts
+clean := $(obj) $(deps) $(libs) $(progs) $(empth_lib)
+distclean := $(ac)
+
+# Compiler flags
+CPPFLAGS += -I$(srcdir)/include -Iinclude
+ifeq ($(have_gcc),yes)
+CFLAGS += -fno-common
+CFLAGS += -Wall -W -Wno-unused -Wpointer-arith -Wstrict-prototypes     \
+-Wmissing-prototypes -Wnested-externs -Wredundant-decls
+endif
+LDLIBS += -lm
+
+### Advertized goals
+
+.PHONY: all
+all: $(progs) # FIXME info
+
+.PHONY: info html
+info html:
+       false # FIXME
+
+.PHONY: clean
+clean:
+       rm -f $(clean)
+
+.PHONY: distclean
+distclean: clean
+       rm -rf $(distclean)
+
+.PHONY: install install-html
+install: all
+       false # FIXME
+install-html: html
+       false # FIXME
+
+.PHONY: uninstall
+uninstall:
+       false # FIXME
+
+.PHONY: dist
+dist:
+       false # FIXME
+
+
+### Implicit rules
+
+# Compile with dependencies as side effect, i.e. create %.d in
+# addition to %.o.
+ifeq ($(how_to_dep),fast)
+%.o: %.c
+       $(COMPILE.c) -MT $@ -MMD -MP $(OUTPUT_OPTION) $<
+endif
+ifeq ($(how_to_dep),depcomp)
+%.o: %.c
+       source='$<' object='$@' depfile='$(@:.o=.d)' $(CCDEPMODE) $(depcomp) \
+       $(COMPILE.c) $(OUTPUT_OPTION) $<
+endif
+# Cancel the rule to compile %.c straight to %, it interferes with
+# automatic dependency generation
+%: %.c
+
+
+### Explicit rules
+
+src/server/emp_server: $(filter src/server/% src/lib/as/% src/lib/commands/% src/lib/player/% src/lib/subs/% src/lib/update/%, $(obj)) $(empth_obj) $(libs) $(empth_lib)
+       $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+src/client/empire: $(filter src/client/%, $(obj)) $(termlibs)
+       $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+$(util): $(libs)
+
+lib/libcommon.a: $(filter src/lib/common/%, $(obj))
+lib/libgen.a: $(filter src/lib/gen/%, $(obj))
+lib/libglobal.a: $(filter src/lib/global/%, $(obj))
+lib/liblwp.a: $(filter src/lib/lwp/%, $(obj))
+
+$(libs) $(empth_lib): | lib
+       $(AR) rc $@ $?
+       $(RANLIB) $@
+
+lib:
+       mkdir -p $@
+
+ifeq ($(cvs_controlled),yes)
+# Find files and directories under CVS control
+sources.mk: $(scripts)/cvsfiles.awk $(addprefix $(srcdir)/, $(addsuffix CVS/Entries, $(dirs)))
+       echo 'src := ' `cd $(srcdir) && $(AWK) -f src/scripts/cvsfiles.awk` >$@
+endif
+
+ifneq ($(deps),)
+-include $(deps)
+endif
+
+# Automatic remake of configuration
+# See (autoconf)Automatic Remaking.
+# This requires sufficiently recent versions of autoconf and automake
+
+$(srcdir)/configure: configure.ac aclocal.m4
+       cd $(srcdir) && autoconf
+
+# autoheader might not change config.h.in, so touch a stamp file.
+$(srcdir)/config.h.in: stamp-h.in
+$(srcdir)/stamp-h.in: configure.ac aclocal.m4
+       cd $(srcdir) && autoheader
+       >$@
+
+$(srcdir)/aclocal.m4: $(filter m4/%.m4, $(src))
+       cd $(srcdir) && aclocal -I m4
+
+# config.status might not change config.h; use the stamp file.
+config.h: stamp-h
+stamp-h: config.h.in config.status
+       ./config.status config.h stamp-h
+
+GNUmakefile: GNUmakefile.in config.status
+       ./config.status $@
+
+config.status: configure
+       ./config.status --recheck
+
+src/lib/global/path.c src/client/ipglob.c: %: %.in GNUmakefile
+       $(subst.in) <$< >$@
diff --git a/Make.sysdefs b/Make.sysdefs
deleted file mode 100644 (file)
index 5499b58..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-#
-# Make.sysdefs - Wolfpack, 1996-2000
-#
-# To add a new architecture, just copy one of the models below.  Change the
-# CFLAGS as needed, and then put in a target build in the Makefile.  See
-# the examples there on what to do.
-#
-
-# Warning flags appropriate for gcc, unless system headers are severly broken
-GCCWARNFLAGS = -Wall -W -Wno-unused -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wredundant-decls
-
-OSXCFLAGS = -g -fno-common -ansi -D_EMPTH_POSIX=1 $(GCCWARNFLAGS)
-# -O fails on Darwin 5.5, works on 6.6
-OSXLFLAGS = -flat_namespace -lcurses
-OSXMASTER = GLOBALCFLAGS="$(OSXCFLAGS)" GLOBALLFLAGS="$(OSXLFLAGS)"
-
-FREEBSDRANLIB = /usr/bin/ranlib
-FREEBSDCFLAGS = -g -fno-common -DRel4 -DFBSD -ansi -pedantic $(GCCWARNFLAGS)
-FREEBSDLFLAGS = 
-FREEBSDMASTER = GLOBALCFLAGS="$(FREEBSDCFLAGS)" GLOBALLFLAGS="$(FREEBSDLFLAGS)" RANLIB="$(FREEBSDRANLIB)"
-
-APOLLOCFLAGS = -g
-APOLLOLFLAGS = 
-APOLLOMASTER = GLOBALCFLAGS="$(APOLLOCFLAGS)" GLOBALLFLAGS="$(APOLLOLFLAGS)"
-
-NTCFLAGS = /D_WIN32 /Od /G3 /Zp2 /nologo /MT
-NTLFLAGS =
-NTMASTER = CC=CL GLOBALCFLAGS="$(NTCFLAGS)" GLOBALLFLAGS="$(NTLFLAGS)"
-
-INTERIXCFLAGS = -g -fno-common -D_EMPTH_POSIX=1 -U_EMPTH_LWP -DRel4 -D_ALL_SOURCE $(GCCWARNFLAGS)
-INTERIXLFLAGS = -lpthread
-INTERIXMASTER = GLOBALCFLAGS="$(INTERIXCFLAGS)" GLOBALLFLAGS="$(INTERIXLFLAGS)" CLIENTLIBS=-lncurses
-
-NEXTCFLAGS = -bsd -fwritable-strings -traditional -Dconst="" -Dinline=""
-NEXTLFLAGS = -lsys_s
-NEXTMASTER = GLOBALCFLAGS="$(NEXTCFLAGS)" GLOBALLFLAGS="$(NEXTLFLAGS)"
-
-LINUXCFLAGS = -g -fno-common -D__USE_BSD -DRel4 $(GCCWARNFLAGS) 
-LINUXLFLAGS = 
-LINUXMASTER = GLOBALCFLAGS="$(LINUXCFLAGS)" GLOBALLFLAGS="$(LINUXLFLAGS)" CLIENTLIBS=-lncurses
-
-LINUXPTHCFLAGS = -g -fno-common -D_EMPTH_POSIX=1 -U_EMPTH_LWP -DRel4 $(GCCWARNFLAGS)
-LINUXPTHLFLAGS = -lpthread
-LINUXPTHMASTER = GLOBALCFLAGS="$(LINUXPTHCFLAGS)" GLOBALLFLAGS="$(LINUXPTHLFLAGS)" CLIENTLIBS=-lncurses
-
-HPRANLIB = true
-HPCFLAGS = -Aa -Dsys5 -Dhpc -D_HPUX_SOURCE -Dhpux
-HPLFLAGS = 
-HPMASTER = GLOBALCFLAGS="$(HPCFLAGS)" GLOBALLFLAGS="$(HPLFLAGS)" RANLIB="$(HPRANLIB)" CLIENTLIBS=-ltermcap
-
-HPUXRANLIB = true
-HPUXCFLAGS = -Dsys5
-HPUXLFLAGS = 
-HPUXMASTER = GLOBALCFLAGS="$(HPUXCFLAGS)" GLOBALLFLAGS="$(HPUXLFLAGS)" RANLIB="$(HPUXRANLIB)" CLIENTLIBS=-ltermcap
-
-IRIX5RANLIB = echo
-IRIX5CFLAGS = -DSVR4 -DRel4 -DUCONTEXT -DMAKECONTEXT_SP_HIGH -O3 -fullwarn -woff 835,709
-IRIX5LFLAGS = -lnsl
-IRIX5MASTER = GLOBALCFLAGS="$(IRIX5CFLAGS)" GLOBALLFLAGS="$(IRIX5LFLAGS)" RANLIB="$(IRIX5RANLIB)"
-
-IRIXRANLIB = echo
-IRIXCFLAGS = -g -O -cckr -D_BSD_SIGNALS
-IRIXLFLAGS = 
-IRIXMASTER = GLOBALCFLAGS="$(IRIXCFLAGS)" GLOBALLFLAGS="$(IRIXLFLAGS)" RANLIB="$(IRIXRANLIB)"
-
-ISICFLAGS = 
-ISILFLAGS = 
-ISIMASTER = GLOBALCFLAGS="$(ISICFLAGS)" GLOBALLFLAGS="$(ISILFLAGS)"
-
-RTPCCFLAGS = -DBSD_INCLUDES -Daix -Dsys5 $(LOCALCFLAGS) -a
-RTPCLFLAGS = 
-RTPCMASTER = GLOBALCFLAGS="$(RTPCCFLAGS)" GLOBALLFLAGS="$(RTPCLFLAGS)"
-
-# FIXME -DMAKECONTEXT_SP_HIGH is wrong for Solaris 10.
-SOLCFLAGS = -g -DSVR4 -DRel4 -DUCONTEXT -DMAKECONTEXT_SP_HIGH -Dsolaris
-SOLLFLAGS = -lnsl -lsocket -lthread
-SOLMASTER = GLOBALCFLAGS="$(SOLCFLAGS)" GLOBALLFLAGS="$(SOLLFLAGS)"
-
-SEQCFLAGS =   -O -DALLYHARBOR -DSHOWPLANE -DDROPANY -DREJECTS -DBMAP -DAUTONAV -DSCUTTLE -DCONVASAT -DORBIT -DABM -DGRIND -DPINPOINTMISSILE -DFALLOUT -DSAIL -DLOWSTARTMOB -DFIXREALMS -DBUYTAX -DNUKEFAILDETONATE -DMISSINGMISSILES
-SEQLFLAGS = /usr/att/lib/libc.a -lresolv
-SEQIFLAGS =  -I/usr/include -I/usr/att/usr/include
-SEQMASTER = GLOBALCFLAGS="$(SEQCFLAGS)" GLOBALLFLAGS="$(SEQLFLAGS)" LOCALIFLAGS="$(SEQIFLAGS)"
-
-SEQFPACFLAGS = -g
-SEQFPALFLAGS = /usr/att/lib/libfpac.a
-SEQFPAIFLAGS = -I/usr/include -I/usr/att/usr/include -fpa
-SEQFPAMASTER = GLOBALCFLAGS="$(SEQFPACFLAGS)" GLOBALLFLAGS="$(SEQFPALFLAGS)" LOCALIFLAGS="$(SEQFPAIFLAGS)"
-
-SUN3CFLAGS = -g -f68881
-SUN3LFLAGS = 
-SUN3MASTER = GLOBALCFLAGS="$(SUN3CFLAGS)" GLOBALLFLAGS="$(SUN3LFLAGS)"
-
-SUN4CFLAGS = -DSUN4
-SUN4LFLAGS = 
-SUN4MASTER = GLOBALCFLAGS="$(SUN4CFLAGS)" GLOBALLFLAGS="$(SUN4LFLAGS)"
-
-SUN4DBGCFLAGS = -g -DSUN4
-SUN4DBGLFLAGS = 
-SUN4DBGMASTER = GLOBALCFLAGS="$(SUN4DBGCFLAGS)" GLOBALLFLAGS="$(SUN4DBGLFLAGS)"
-
-SUN4OPTCFLAGS = -O -DSUN4
-SUN4OPTLFLAGS = 
-SUN4OPTMASTER = GLOBALCFLAGS="$(SUN4OPTCFLAGS)" GLOBALLFLAGS="$(SUN4OPTLFLAGS)"
-
-AIXCFLAGS = -Daix -Dsys5 $(LOCALCFLAGS) -D_BSD_INCLUDES -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -U__STR__ -DAIX32
-AIXLFLAGS = -lbsd
-AIXMASTER = GLOBALCFLAGS="$(AIXCFLAGS)" GLOBALLFLAGS="$(AIXLFLAGS)" CLIENTLIBS="-lcurses"
-
-ALPHACFLAGS = -DALPHA -g -std1
-ALPHALFLAGS = -non_shared -lots
-ALPHAMASTER = GLOBALCFLAGS="$(ALPHACFLAGS)" GLOBALLFLAGS="$(ALPHALFLAGS)"
-
-ALPHAPOSCFLAGS = -D_EMPTH_POSIX=1 -U_EMPTH_LWP -D_PTHREAD_USE_D4 -D_REENTRANT -DALPHA -g -std1 
-ALPHAPOSLFLAGS = -lpthreads
-ALPHAPOSPFLAGS = 
-ALPHAPOSMASTER = GLOBALCFLAGS="$(ALPHAPOSCFLAGS)" GLOBALLFLAGS="$(ALPHAPOSLFLAGS)" GLOBALPFLAGS="$(ALPHAPOSPFLAGS)"
-
-MACH25CFLAGS = -O
-MACH25LFLAGS =
-MACH25MASTER = GLOBALCFLAGS="$(MACH25CFLAGS)" GLOBALLFLAGS="$(MACH25LFLAGS)"
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 1c46434..0000000
--- a/Makefile
+++ /dev/null
@@ -1,484 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996-2000
-#            Do a generic build just by typing in "make <arch>"
-#
-# Note that the NT builds were done using MSVC 5.0 and using "nmake nt"
-#  So, to build anything on NT, just put an "nt" in front (for example,
-#  "ntclean", "ntinstall", etc.
-
-include build.conf
-include Make.sysdefs
-
-TOBUILD = all
-GENMASTER = $(TOBUILD) GLOBALCFLAGS="$(GLOBALCFLAGS)" GLOBALLFLAGS="$(GLOBALLFLAGS)"
-CLIENTLIBS = -ltermcap
-
-
-#
-# Specific targets - make a new one for each new architecture or
-#                    build environment.
-#
-
-all:
-       @echo 'You must type "make <arch>" to build for a specific system.'
-       @echo 'Currently buildable architectures are:'
-       @echo '   aix'
-       @echo '   alpha'
-       @echo '   alpha-pthreads'
-       @echo '   apollo'
-       @echo '   freebsd'
-       @echo '   hp'
-       @echo '   hpux'
-       @echo '   interix'
-       @echo '   irix'
-       @echo '   irix5'
-       @echo '   isi'
-       @echo '   linux'
-       @echo '   linux-pthreads'
-       @echo '   mach2.5'
-       @echo '   next'
-       @echo '   nt'
-       @echo '   osx'
-       @echo '   rtpc'
-       @echo '   sequent'
-       @echo '   sequent.fpa'
-       @echo '   solaris'
-       @echo '   sun3'
-       @echo '   sun4'
-       @echo '   sun4.debug'
-       @echo '   sun4.opt'
-
-alpha:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(ALPHAMASTER))
-       ($(MAKE) genlibs $(ALPHAMASTER))
-       (cd src/lib/lwp; $(MAKE) $(ALPHAMASTER))
-       ($(MAKE) binaries $(ALPHAMASTER))
-       ($(MAKE) install)
-
-alpha-pthreads:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(ALPHAPOSMASTER))
-       ($(MAKE) genlibs $(ALPHAPOSMASTER))
-       (cd src/lib/lwp; $(MAKE) $(ALPHAPOSMASTER))
-       ($(MAKE) binaries $(ALPHAPOSMASTER))
-       ($(MAKE) install)
-
-apollo:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(APOLLOMASTER))
-       ($(MAKE) genlibs $(APOLLOMASTER))
-       (cd src/lib/lwp; $(MAKE) $(APOLLOMASTER))
-       ($(MAKE) binaries $(APOLLOMASTER))
-       ($(MAKE) install)
-
-freebsd:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(FREEBSDMASTER))
-       ($(MAKE) genlibs $(FREEBSDMASTER))
-       (cd src/lib/lwp; $(MAKE) $(FREEBSDMASTER))
-       ($(MAKE) binaries $(FREEBSDMASTER))
-       ($(MAKE) install)
-
-hp:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(HPMASTER))
-       ($(MAKE) genlibs $(HPMASTER))
-       (cd src/lib/lwp; $(MAKE) $(HPMASTER))
-       ($(MAKE) binaries $(HPMASTER))
-       ($(MAKE) install)
-
-hpux:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(HPUXMASTER))
-       ($(MAKE) genlibs $(HPUXMASTER))
-       (cd src/lib/lwp; $(MAKE) $(HPUXMASTER))
-       ($(MAKE) binaries $(HPUXMASTER) CLIENTLIBS="")
-       ($(MAKE) install)
-
-next:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(NEXTMASTER))
-       ($(MAKE) genlibs $(NEXTMASTER))
-       (cd src/lib/lwp; $(MAKE) $(NEXTMASTER))
-       ($(MAKE) binaries $(NEXTMASTER))
-       ($(MAKE) install)
-
-osx:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(OSXMASTER))
-       ($(MAKE) genlibs $(OSXMASTER))
-       ($(MAKE) binaries TOBUILD=osx $(OSXMASTER) CLIENTLIBS="")
-       ($(MAKE) install)
-
-irix:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(IRIXMASTER))
-       ($(MAKE) genlibs $(IRIXMASTER))
-       (cd src/lib/lwp; $(MAKE) $(IRIXMASTER))
-       ($(MAKE) binaries $(IRIXMASTER))
-       ($(MAKE) install)
-
-irix5:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(IRIX5MASTER))
-       ($(MAKE) genlibs $(IRIX5MASTER))
-       (cd src/lib/lwp; $(MAKE) $(IRIX5MASTER))
-       ($(MAKE) binaries $(IRIX5MASTER))
-       ($(MAKE) install)
-
-isi:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(ISIMASTER))
-       ($(MAKE) genlibs $(ISIMASTER))
-       (cd src/lib/lwp; $(MAKE) $(ISIMASTER))
-       ($(MAKE) binaries $(ISIMASTER))
-       ($(MAKE) install)
-
-linux:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       @echo 'This build is only tested on x86 machines.  Try using'
-       @echo 'linux-pthreads for other architectures.'
-       (cd src/doconfig; $(MAKE) $(LINUXMASTER))
-       ($(MAKE) genlibs $(LINUXMASTER))
-       (cd src/lib/lwp; $(MAKE) $(LINUXMASTER))
-       ($(MAKE) binaries $(LINUXMASTER))
-       ($(MAKE) install)
-
-linux-pthreads:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(LINUXPTHMASTER))
-       ($(MAKE) genlibs $(LINUXPTHMASTER))
-       (cd src/lib/lwp; $(MAKE) $(LINUXPTHMASTER))
-       ($(MAKE) binaries $(LINUXPTHMASTER))
-       ($(MAKE) install)
-
-mach2.5:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(MACH25MASTER))
-       ($(MAKE) genlibs $(MACH25MASTER))
-       (cd src/lib/lwp; $(MAKE) mipsultrix $(MACH25MASTER))
-       ($(MAKE) binaries $(MACH25MASTER))
-       ($(MAKE) install)
-
-nt:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       cd src/doconfig
-       $(MAKE) nt $(NTMASTER)
-       cd ../..
-       $(MAKE) ntgenlibs TOBUILD=nt $(NTMASTER)
-       cd src/lib/lwp
-       $(MAKE) nt $(NTMASTER)
-       cd ../../..
-       $(MAKE) ntbinaries TOBUILD=nt $(NTMASTER)
-       $(MAKE) ntinstall
-
-interix:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(INTERIXMASTER))
-       ($(MAKE) genlibs $(INTERIXMASTER))
-       (cd src/lib/lwp; $(MAKE) $(INTERIXMASTER))
-       ($(MAKE) binaries $(INTERIXMASTER))
-       ($(MAKE) install)
-
-aix:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(AIXMASTER))
-       ($(MAKE) genlibs $(AIXMASTER))
-       (cd src/lib/lwp; $(MAKE) aix $(AIXMASTER))
-       ($(MAKE) binaries $(AIXMASTER))
-       ($(MAKE) install)
-
-rtpc:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(RTPCMASTER))
-       ($(MAKE) genlibs $(RTPCMASTER))
-       (cd src/lib/lwp; $(MAKE) aix $(RTPCMASTER))
-       ($(MAKE) binaries $(RTPCMASTER))
-       ($(MAKE) install)
-
-sequent:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(SEQMASTER))
-       ($(MAKE) genlibs $(SEQMASTER))
-       (cd src/lib/lwp; $(MAKE) $(SEQMASTER))
-       ($(MAKE) binaries $(SEQMASTER))
-       ($(MAKE) install)
-
-sequent.fpa:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(SEQFPAMASTER))
-       ($(MAKE) genlibs $(SEQFPAMASTER))
-       (cd src/lib/lwp; $(MAKE) $(SEQFPAMASTER))
-       ($(MAKE) binaries $(SEQFPAMASTER))
-       ($(MAKE) install)
-
-solaris:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(SOLMASTER))
-       ($(MAKE) genlibs $(SOLMASTER))
-       (cd src/lib/lwp; $(MAKE) $(SOLMASTER))
-       ($(MAKE) binaries $(SOLMASTER))
-       ($(MAKE) install)
-
-sun3:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(SUN3MASTER))
-       ($(MAKE) genlibs $(SUN3MASTER))
-       (cd src/lib/lwp; $(MAKE) $(SUN3MASTER))
-       ($(MAKE) binaries $(SUN3MASTER))
-       ($(MAKE) install)
-
-sun4:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(SUN4MASTER))
-       ($(MAKE) genlibs $(SUN4MASTER))
-       (cd src/lib/lwp; $(MAKE) $(SUN4MASTER))
-       ($(MAKE) binaries $(SUN4MASTER))
-       ($(MAKE) install)
-
-sun4.opt:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(SUN4OPTMASTER))
-       ($(MAKE) genlibs $(SUN4OPTMASTER))
-       (cd src/lib/lwp; $(MAKE) $(SUN4OPTMASTER))
-       ($(MAKE) binaries $(SUN4OPTMASTER))
-       ($(MAKE) install)
-
-sun4.debug:
-       @echo 'building a $(WORLDX) by $(WORLDY) server...'
-       (cd src/doconfig; $(MAKE) $(SUN4DBGMASTER))
-       ($(MAKE) genlibs $(SUN4DBGMASTER))
-       (cd src/lib/lwp; $(MAKE) $(SUN4DBGMASTER))
-       ($(MAKE) binaries $(SUN4DBGMASTER))
-       ($(MAKE) install)
-
-#
-# Generic stuff that is called from the architecture specific stuff.
-#
-
-binaries:
-       @echo 'building the binaries'
-       (cd src/client; $(MAKE) $(GENMASTER) CLIENTLIBS=$(CLIENTLIBS))
-       (cd src/server; $(MAKE) $(GENMASTER))
-       (cd src/util; $(MAKE) $(GENMASTER))
-
-ntbinaries:
-       @echo 'building the binaries'
-       cd src/client
-       $(MAKE) $(GENMASTER) CLIENTLIBS=$(CLIENTLIBS)
-       cd ../..
-       cd src/server
-       $(MAKE) $(GENMASTER)
-       cd ../..
-       cd src/util
-       $(MAKE) $(GENMASTER)
-       cd ../..
-
-genlibs:
-       @echo 'building generic libraries'
-       -mkdir lib
-       (cd src/lib/as; $(MAKE)  $(GENMASTER))
-       (cd src/lib/commands; $(MAKE)  $(GENMASTER))
-       (cd src/lib/common; $(MAKE)  $(GENMASTER))
-       (cd src/lib/empthread; $(MAKE)  $(GENMASTER))
-       (cd src/lib/gen; $(MAKE)  $(GENMASTER))
-       (cd src/lib/global; $(MAKE)  $(GENMASTER))
-       (cd src/lib/player; $(MAKE)  $(GENMASTER))
-       (cd src/lib/subs; $(MAKE)  $(GENMASTER))
-       (cd src/lib/update; $(MAKE)  $(GENMASTER))
-       @echo 'done building generic libraries'
-
-ntgenlibs:
-       @echo 'building generic libraries'
-       -(mkdir lib)
-       cd src/lib/as
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       cd src/lib/commands
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       cd src/lib/common
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       cd src/lib/empthread
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       cd src/lib/gen
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       cd src/lib/global
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       cd src/lib/player
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       cd src/lib/subs
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       cd src/lib/update
-       $(MAKE) $(GENMASTER)
-       cd ../../..
-       @echo 'done building generic libraries'
-
-clean:
-       (cd src/lib/as; $(MAKE) clean)
-       (cd src/lib/commands; $(MAKE) clean)
-       (cd src/lib/common; $(MAKE) clean)
-       (cd src/lib/gen; $(MAKE) clean)
-       (cd src/lib/global; $(MAKE) clean)
-       (cd src/lib/player; $(MAKE) clean)
-       (cd src/lib/subs; $(MAKE) clean)
-       (cd src/lib/update; $(MAKE) clean)
-       (cd src/lib/lwp; $(MAKE) clean)
-       (cd src/lib/empthread; $(MAKE) clean)
-       (cd src/client; $(MAKE) clean)
-       (cd src/server; $(MAKE) clean)
-       (cd src/util; $(MAKE) clean)
-       (cd src/doconfig; $(MAKE) clean)
-       (rm -f lib/*.a)
-
-ntclean:
-       cd src/lib/as
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/commands
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/common
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/gen
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/global
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/player
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/subs
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/update
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/lwp
-       $(MAKE) clean
-       cd ../../../
-       cd src/lib/empthread
-       $(MAKE) clean
-       cd ../../../
-       cd src/client
-       $(MAKE) clean
-       cd ../../
-       cd src/server
-       $(MAKE) clean
-       cd ../../
-       cd src/util
-       $(MAKE) clean
-       cd ../../
-       cd src/doconfig
-       $(MAKE) clean
-       cd ../../
-       cd lib
-       -(del /Q *.lib)
-
-realclean:
-       ($(MAKE) clean)
-       (rm -f bin/*)
-       (rm -rf data/*)
-       -(rm -rf $(EMPDIR)/data/*)
-       -(rm -rf $(EMPDIR)/bin/*)
-       rm -rf lib info.nr info.html
-       rm -f include/gamesdef.h src/client/ipglob.c src/make.src
-
-ntrealclean:
-       $(MAKE) ntclean
-       cd bin
-       -(del /Q *.*)
-       cd ..
-       cd data
-       -(del /Q *.*)
-       cd ..
-       cd $(EMPDIR)\data
-       -(del /Q *.*)
-       -(rmdir tel)
-       cd $(EMPDIR)\bin
-       -(del /Q *.*)
-       cd $(EMPDIR)\data\tel
-       -(del /Q *.*)
-
-depend:
-       (cd src/lib/as; $(MAKE) depend)
-       (cd src/lib/commands; $(MAKE) depend)
-       (cd src/lib/common; $(MAKE) depend)
-       (cd src/lib/gen; $(MAKE) depend)
-       (cd src/lib/global; $(MAKE) depend)
-       (cd src/lib/player; $(MAKE) depend)
-       (cd src/lib/subs; $(MAKE) depend)
-       (cd src/lib/update; $(MAKE) depend)
-       (cd src/lib/lwp; $(MAKE) depend)
-       (cd src/lib/empthread; $(MAKE) depend)
-       (cd src/client; $(MAKE) depend)
-       (cd src/server; $(MAKE) depend)
-       (cd src/util; $(MAKE) depend)
-       (cd src/doconfig; $(MAKE) depend)
-
-# The last three lines here ensure that we don't overwrite an existing
-# econfig file, by moving it first then moving it back.  The '-''s
-# ignore any errors (like if the files don't exist.)
-# So, after an install, you will have an "econfig" file in the
-# data directory if you didn't have one before.
-
-install:
-       (cd src/client; $(MAKE) install)
-       (cd src/server; $(MAKE) install)
-       (cd src/util; $(MAKE) install)
-       -mkdir $(EMPDIR)/data
-       -(mv $(EMPDIR)/data/econfig $(EMPDIR)/data/econfig.bak)
-       ($(EMPDIR)/bin/pconfig > $(EMPDIR)/data/econfig)
-       -(mv $(EMPDIR)/data/econfig.bak $(EMPDIR)/data/econfig)
-
-ntinstall:
-       cd src\client
-       $(MAKE) ntinstall
-       cd ..\..
-       cd src\server
-       $(MAKE) ntinstall
-       cd ..\..
-       cd src\util
-       $(MAKE) ntinstall
-       cd ..\..
-       -mkdir $(NTINSTDIR)\data
-       cd $(NTINSTDIR)\data
-       ($(NTINSTDIR)\bin\pconfig.exe > $(NTINSTDIR)\data\econfig.new)
-       -(move econfig.new econfig)
-       cd ..
-
-dist:
-       src/scripts/mkdist
diff --git a/README b/README
index 7339887096f77abbaa69dc93738b696c115e4a13..03b6fd000631d09709663a03ec53590303c859c7 100644 (file)
--- a/README
+++ b/README
@@ -19,18 +19,13 @@ below to build and start the server.
   server in binary format, go to the next step, "Creating the world."
 
   To build the server, you need to do the following steps:
+FIXME needs work
 
   1) Get a copy of the source.  Since you're reading this, we assume
      you have done that. 
   2) Gunzip the source.  Again, since you're reading this . . . ;-)
-  3) edit the build.conf file in this directory, and answer the questions
-     it asks you.
-  4) type "make" to see what architectures are currently supported.
-  5) choose the architecture that best suits you, and type "make <arch>"
-     where <arch> is the architecture you want to build.
-  6) type "make depend" to build the dependencies (not required, but
-      helps a lot when you want to recompile something again.)
-     Note: "make depend" doesn't work under NT yet.
+  3) Run configure.
+  4) Run make.
 
 (3) Creating the world
   (NOTE: If you received a binary, you must edit the included data/econfig
@@ -63,11 +58,8 @@ is POGO/peter.
 If you get a "You're not a deity!" message and logged off, check the
 "data/server.log" file and look at the end for a "NON-AUTH" entry.
 There should be a "user@host" message in there that failed to log in.
-The user and host that your system is using may be different than the
-one you put in your build.conf file.  So, enter this new user and host
-in the auth file, and you should be able to log into the server as a
-deity now.  Note that if you rebuild the server again, the auth file
-will be overwritten.
+Enter this user and host in the auth file, and you should be able to
+log into the server as a deity now.
 
 For more information on options, programs, files and other general hints
 look in the "doc" directory.  The README there describes the files there and
diff --git a/build.conf b/build.conf
deleted file mode 100644 (file)
index fbb5511..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Below are a list of questions you may or may not need to answer.  They
-# are all one-liner.  Just change the default value if needed, and save
-# the file when done.  Have fun!!!
-#
-
-# Please enter your name:
-MYNAME = Wolfpack
-
-# Please enter your user name:
-# (For NT and the basic emp_client build, use "USERNAME = nobody")
-USERNAME = wolfpack
-
-# Please enter your e-mail address:
-EMAIL = wolfpack@wolfpackempire.com
-
-# Please enter the host name you will be running on:
-# (For NT you can use "HOSTNAME = localhost" as this seems to be what it
-#  always resolves to if you use 127.0.0.1 below)
-HOSTNAME = blitz.wolfpackempire.com
-
-# Please enter the ip address of the host you will be running on:
-# (For NT you can use "IPADDR = 127.0.0.1")
-IPADDR = 216.162.200.183
-
-# Please enter the port you will be running on:
-PORTNUM = 6665
-
-# Please enter the directory where you want the files for the game:
-# (Note: Use a '/' to delimit directories.  For NT, include a
-#  drive letter.)
-EMPDIR = /home/wolfpack/emp4
-
-# Ignore this next value for all builds except NT builds.
-# For NT builds, use the above path, but replace the '/' with a '\'.
-# Note that NTINSTDIR is not used for non-NT builds, and can be ignored.
-# This is needed for the 'copy' comamnds, since they get very confused
-# with the normal path names.
-NTINSTDIR = C:\home\wolfpack\emp4
-
-# Please enter the C-compiler you are using (full path is allowed):
-# (For NT builds using MSVC, use "CC = CL")
-CC = gcc
-
-# Please enter the linker you are using (full path is allowed):
-# (For NT builds using MSVC, using "LD = ld" works fine.)
-LD = ld
-
-# Please enter the maximum number of countries you want:
-MAXNOC = 99
-
-# Please enter the world size you would like (WORLDX must be
-# divisible by 2):
-WORLDX = 64
-WORLDY = 32
-
-# Please enter if you are setting up a blitz (1 - yes, 0 - no)
-BLITZ = 1
-
-# Please enter the number of ETUs per update (must be divisible by 4):
-ETUS = 60
-
-# Please enter the frequency of the updates.  For example:
-#  Once per day - 1d
-#  Once every 20 minutes - 20m
-#  Once every 4 hours - 4h
-ETUFREQ = 10m
-
-# That's it... Save this file, and type "make <arch>" to build the
-# server.  If you are not sure of what architectures are supported,
-# just type "make" and it will tell you. (If you are building the
-# NT port, use "nmake" instead of "make".)
diff --git a/compile b/compile
new file mode 100755 (executable)
index 0000000..ad57e2f
--- /dev/null
+++ b/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-02-03.08
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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.
+
+# 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we strip `-o arg' only if arg is an object.
+       eat=1
+       case $2 in
+         *.o | *.obj)
+           ofile=$2
+           ;;
+         *)
+           set x "$@" -o "$2"
+           shift
+           ;;
+       esac
+       ;;
+      *.c)
+       cfile=$1
+       set x "$@" "$1"
+       shift
+       ;;
+      *)
+       set x "$@" "$1"
+       shift
+       ;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755 (executable)
index 0000000..45bee13
--- /dev/null
@@ -0,0 +1,1465 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-04-22'
+
+# 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.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# 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 build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+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
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit 0 ;;
+    amd64:OpenBSD:*:*)
+       echo x86_64-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    amiga:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    cats:OpenBSD:*:*)
+       echo arm-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    hp300:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    luna88k:OpenBSD:*:*)
+       echo m88k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mac68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    macppc:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+       echo m88k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sgi:OpenBSD:*:*)
+       echo mips64-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sun3:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    *:OpenBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit 0 ;;
+    macppc:MirBSD:*:*)
+       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       exit 0 ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit 0 ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # 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 ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit 0 ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit 0 ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit 0 ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit 0 ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit 0 ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit 0 ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7 && exit 0 ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-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 ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit 0 ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit 0 ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit 0 ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit 0 ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c \
+         && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+         && exit 0
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       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 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${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*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit 0 ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit 0 ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               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_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+               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:*:[45])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | 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=${UNAME_VERSION}.${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 BSD 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/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           # avoid double evaluation of $set_cc_for_build
+           test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit 0 ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit 0 ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       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_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+       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 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit 0 ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit 0 ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       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*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    *: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 ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit 0 ;;
+    i*:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit 0 ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit 0 ;;
+    x86:Interix*:[34]*)
+       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+       exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit 0 ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit 0 ;;
+    amd64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit 0 ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit 0 ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit 0 ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit 0 ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit 0 ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit 0 ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit 0 ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit 0 ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+       test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+       test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+       ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit 0 ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit 0 ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit 0 ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit 0 ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit 0 ;;
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit 0 ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit 0 ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #ifdef __INTEL_COMPILER
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # 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.
+       echo i386-sequent-sysv4
+       exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit 0 ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit 0 ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit 0 ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit 0 ;;
+       i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit 0 ;;
+    i*86:*:5:[78]*)
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit 0 ;;
+    i*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}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit 0 ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-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 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit 0 ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       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 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit 0 ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit 0 ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit 0 ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit 0 ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit 0 ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit 0 ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit 0 ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit 0 ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit 0 ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           *86) UNAME_PROCESSOR=i686 ;;
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit 0 ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit 0 ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit 0 ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit 0 ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit 0 ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit 0 ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit 0 ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit 0 ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit 0 ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit 0 ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit 0 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit 0 ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit 0 ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms && exit 0 ;;
+           I*) echo ia64-dec-vms && exit 0 ;;
+           V*) echo vax-dec-vms && exit 0 ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       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
+
+eval $set_cc_for_build
+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`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  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-pc-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)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# 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_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# 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
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.sub b/config.sub
new file mode 100755 (executable)
index 0000000..87a1ee4
--- /dev/null
@@ -0,0 +1,1569 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-04-22'
+
+# 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.
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# 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.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+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
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    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 | -axis | -knuth | -cray)
+               os=
+               basic_machine=$1
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               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/'`
+               ;;
+       -udk*)
+               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
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+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.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64vr | mips64vrel \
+       | mips64orion | mips64orionel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | msp430 \
+       | ns16k | ns32k \
+       | openrisc | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b \
+       | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+
+       # 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*86 | x86_64)
+         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.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | msp430-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
+       | ymp-* \
+       | z8k-*)
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       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 | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16c)
+               basic_machine=cr16c-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       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
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-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
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       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
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       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
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       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
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       or32 | or32-*)
+               basic_machine=or32-unknown
+               os=-coff
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       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 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-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/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       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
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
+       tic55x | c55x*)
+               basic_machine=tic55x-unknown
+               os=-coff
+               ;;
+       tic6x | c6x*)
+               basic_machine=tic6x-unknown
+               os=-coff
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       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
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       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.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               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* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -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|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+        -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+        -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -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*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       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
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-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
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               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
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..7783243
--- /dev/null
@@ -0,0 +1,139 @@
+# 
+#   Empire - A multi-player, client/server Internet based war game.
+#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
+#                            Ken Stevens, Steve McClure
+# 
+#   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 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
+# 
+#   ---
+# 
+#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
+#   related information and legal notices. It is expected that any future
+#   projects/authors will amend these files as needed.
+# 
+#   ---
+# 
+#   configure.ac: Autoconf input file
+#  
+#   Known contributors to this file:
+#      Markus Armbruster, 2005
+# 
+# Process this file with autoconf to produce a configure script.
+
+# Autoconf makes checking for and programming around assorted ancient
+# crap relatively painless.  But why bother?  Just rely on C89 and
+# POSIX, and when something breaks on some oddball machine, see
+# whether it's worth fixing.
+
+AC_PREREQ(2.59)
+AC_INIT([Empire], [4.3.0], [wolfpack@wolfpackempire.com])
+AC_CONFIG_SRCDIR([include/combat.h])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADERS([config.h])
+
+
+### Checks for programs
+AC_PROG_AWK
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+AC_PROG_CC
+AC_SUBST(GCC)
+AM_PROG_CC_C_O
+# Private automake macro, tsk, tsk, tsk...
+_AM_DEPENDENCIES(CC)
+
+# not really a check for a program, but close enough
+if test -d $srcdir/CVS; then cvs_controlled=yes; else cvs_controlled=no; fi
+AC_SUBST(cvs_controlled,$cvs_controlled)
+
+
+### Checks for libraries
+ACX_PTHREAD
+LIB_SOCKET_NSL
+
+# TODO turn this into a macro?
+save_LIBS=$LIBS
+AC_SEARCH_LIBS([setupterm], [termlib termcap])
+termlibs=`echo $LIBS | sed s/\`echo $save_LIBS | sed 's/././g'\`'$//'`
+AC_SUBST(termlibs)
+LIBS=$save_LIBS
+
+
+### Checks for header files
+
+
+### Checks for typedefs, structures, and compiler characteristics
+
+
+### Checks for library functions
+
+MY_FUNC_MAKECONTEXT
+
+
+### Site configuration
+
+AC_ARG_VAR([EMPIREHOST], [Default host (client only) [127.0.0.1]])
+test "$EMPIREHOST" || EMPIREHOST=127.0.0.1
+
+AC_ARG_VAR([EMPIREPORT], [Default port (client and server) [6665]])
+test "$EMPIREPORT" || EMPIREPORT=6665
+
+AC_ARG_WITH([pthread],
+           AS_HELP_STRING([--with-pthread],
+                          [use POSIX threads]))
+
+case "$ac_cv_func_makecontext$acx_pthread_ok" in
+yesyes)
+    if test -z "$with_pthread" || test "$with_pthread" = no; then
+        empthread=LWP
+    else
+        empthread=POSIX
+    fi
+    ;;
+yes*)
+    empthread=LWP ;;
+*yes)
+    empthread=POSIX ;;
+*)
+    AC_MSG_ERROR([No usable thread package found])
+esac
+AC_SUBST(empthread)
+AC_MSG_NOTICE([Using $empthread threads])
+
+op=
+if test "$with_pthread" = no; then
+    op='=='
+elif test "$with_pthread"; then
+    op='!='
+fi
+if test "$op" && test "$empthread" $op POSIX; then
+    AC_MSG_WARN([Ignoring --with-pthread=$with_pthread])
+fi
+
+
+### Output
+
+AC_CONFIG_FILES([GNUmakefile])
+AC_CONFIG_COMMANDS([stamp-h],
+       [if test $cvs_controlled = yes; then
+           mkdir -p `cd $srcdir && $AWK -f src/scripts/cvsfiles.awk \
+               | sed -n '/\//s,/@<:@^/@:>@*$,,gp'| uniq`
+       elif test -f $srcdir/sources.mk; then
+           mkdir -p `sed s/.*=// <$srcdir/sources.mk \
+               | sed -n '/\//s,/@<:@^/@:>@*$,,gp'| uniq`
+       fi
+       >stamp-h],
+       [cvs_controlled=$cvs_controlled; AWK=$AWK])
+AC_OUTPUT
diff --git a/depcomp b/depcomp
new file mode 100755 (executable)
index 0000000..ffcd540
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,529 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-02-09.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# 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.
+
+# 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.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
index 159f43038696c8b3f58c02ecd82759d3a8eece3f..e3bb5e8bced91b9b0e6803f875c680916dd0bbd2 100644 (file)
@@ -39,7 +39,8 @@
 #ifndef _OPTIONS_H_
 #define _OPTIONS_H_
 
-#include "gamesdef.h"
+#define MAXNOC 99
+#define BLITZ
 
 /* #define NO_FORT_FIRE *//* Forts cannot fire */
 
diff --git a/info/Commands/.cvsignore b/info/Commands/.cvsignore
deleted file mode 100644 (file)
index 8e2cd2c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MakeSrcs
diff --git a/info/Commands/Makefile b/info/Commands/Makefile
deleted file mode 100644 (file)
index 54f5a5c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-SRCDIR = ../..
-NROFF = nroff
-TROFF = troff
-
-INFOSRCS = empty
-
-INFOOBJS = $(INFOSRCS:.t=)
-
-HTMLOBJS = $(INFOSRCS:.t=.)
-
-include MakeSrcs
-
-.SUFFIXES: .t
-
-all: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make nroffs
-       @echo Done.
-
-html: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make htmlfiles
-       @echo Done.
-
-htmlfiles: $(HTMLOBJS)
-
-nroffs: $(INFOOBJS)
-
-$(INFOOBJS):
-       @$(NROFF) $(SRCDIR)/info/CRT.MAC $@.t | awk -f $(SRCDIR)/info/Blank.awk > $(SRCDIR)/info.nr/$@
-       @echo Created $(SRCDIR)/info.nr/$@
-
-$(HTMLOBJS):
-       @perl $(SRCDIR)/info/emp2html.pl $@t > $(SRCDIR)/info.html/$@html
-       @echo Created $(SRCDIR)/info.html/$@html
-
-
diff --git a/info/Concepts/.cvsignore b/info/Concepts/.cvsignore
deleted file mode 100644 (file)
index 8e2cd2c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MakeSrcs
diff --git a/info/Concepts/Makefile b/info/Concepts/Makefile
deleted file mode 100644 (file)
index 54f5a5c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-SRCDIR = ../..
-NROFF = nroff
-TROFF = troff
-
-INFOSRCS = empty
-
-INFOOBJS = $(INFOSRCS:.t=)
-
-HTMLOBJS = $(INFOSRCS:.t=.)
-
-include MakeSrcs
-
-.SUFFIXES: .t
-
-all: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make nroffs
-       @echo Done.
-
-html: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make htmlfiles
-       @echo Done.
-
-htmlfiles: $(HTMLOBJS)
-
-nroffs: $(INFOOBJS)
-
-$(INFOOBJS):
-       @$(NROFF) $(SRCDIR)/info/CRT.MAC $@.t | awk -f $(SRCDIR)/info/Blank.awk > $(SRCDIR)/info.nr/$@
-       @echo Created $(SRCDIR)/info.nr/$@
-
-$(HTMLOBJS):
-       @perl $(SRCDIR)/info/emp2html.pl $@t > $(SRCDIR)/info.html/$@html
-       @echo Created $(SRCDIR)/info.html/$@html
-
-
diff --git a/info/Introduction/.cvsignore b/info/Introduction/.cvsignore
deleted file mode 100644 (file)
index 8e2cd2c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MakeSrcs
diff --git a/info/Introduction/Makefile b/info/Introduction/Makefile
deleted file mode 100644 (file)
index 54f5a5c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-SRCDIR = ../..
-NROFF = nroff
-TROFF = troff
-
-INFOSRCS = empty
-
-INFOOBJS = $(INFOSRCS:.t=)
-
-HTMLOBJS = $(INFOSRCS:.t=.)
-
-include MakeSrcs
-
-.SUFFIXES: .t
-
-all: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make nroffs
-       @echo Done.
-
-html: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make htmlfiles
-       @echo Done.
-
-htmlfiles: $(HTMLOBJS)
-
-nroffs: $(INFOOBJS)
-
-$(INFOOBJS):
-       @$(NROFF) $(SRCDIR)/info/CRT.MAC $@.t | awk -f $(SRCDIR)/info/Blank.awk > $(SRCDIR)/info.nr/$@
-       @echo Created $(SRCDIR)/info.nr/$@
-
-$(HTMLOBJS):
-       @perl $(SRCDIR)/info/emp2html.pl $@t > $(SRCDIR)/info.html/$@html
-       @echo Created $(SRCDIR)/info.html/$@html
-
-
diff --git a/info/Makefile b/info/Makefile
deleted file mode 100644 (file)
index 593fefd..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-all:
-       -mkdir ../info.nr
-       @echo "Making automated Subjects."
-       @echo "If this fails, you may not have perl5 installed."
-       -perl info.pl
-       @echo "Done making automated Subjects."
-       (cd Commands ; make)
-       (cd Concepts ; make)
-       (cd Introduction ; make)
-       (cd Server ; make)
-       (cd Subjects ; make)
-       -(cd ../info.nr ; ls -CF > all)
-       @echo Done making info files.
-
-html:
-       -mkdir ../info.html
-       @echo "Making automated Subjects."
-       @echo "If this fails, you may not have perl5 installed."
-       -perl info.pl
-       @echo "Done making automated Subjects."
-       @echo "Building HTML info files."
-       (cd Commands ; make html)
-       (cd Concepts ; make html)
-       (cd Introduction ; make html)
-       (cd Server ; make html)
-       (cd Subjects ; make html)
-       (cp ls2html.pl ../info.html)
-       -(cd ../info.html ; ls -CF *.html | expand | perl ls2html.pl > all.html)
-       @echo Done making HTML info files.
diff --git a/info/Server/.cvsignore b/info/Server/.cvsignore
deleted file mode 100644 (file)
index 8e2cd2c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MakeSrcs
diff --git a/info/Server/Makefile b/info/Server/Makefile
deleted file mode 100644 (file)
index 54f5a5c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-SRCDIR = ../..
-NROFF = nroff
-TROFF = troff
-
-INFOSRCS = empty
-
-INFOOBJS = $(INFOSRCS:.t=)
-
-HTMLOBJS = $(INFOSRCS:.t=.)
-
-include MakeSrcs
-
-.SUFFIXES: .t
-
-all: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make nroffs
-       @echo Done.
-
-html: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make htmlfiles
-       @echo Done.
-
-htmlfiles: $(HTMLOBJS)
-
-nroffs: $(INFOOBJS)
-
-$(INFOOBJS):
-       @$(NROFF) $(SRCDIR)/info/CRT.MAC $@.t | awk -f $(SRCDIR)/info/Blank.awk > $(SRCDIR)/info.nr/$@
-       @echo Created $(SRCDIR)/info.nr/$@
-
-$(HTMLOBJS):
-       @perl $(SRCDIR)/info/emp2html.pl $@t > $(SRCDIR)/info.html/$@html
-       @echo Created $(SRCDIR)/info.html/$@html
-
-
diff --git a/info/Subjects/.cvsignore b/info/Subjects/.cvsignore
deleted file mode 100644 (file)
index 37b5eda..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-*.t
-MakeSrcs
diff --git a/info/Subjects/Makefile b/info/Subjects/Makefile
deleted file mode 100644 (file)
index 53499a1..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-SRCDIR = ../..
-NROFF = nroff
-TROFF = troff
-
-INFOSRCS = empty
-
-INFOOBJS = $(INFOSRCS:.t=)
-
-HTMLOBJS = $(INFOSRCS:.t=.)
-
-include MakeSrcs
-
-.SUFFIXES: .t
-
-all: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make nroffs
-       @echo Done.
-
-html: 
-       @echo INFOSRCS=`echo *.t` > MakeSrcs
-       @make htmlfiles
-       @echo Done.
-
-htmlfiles: $(HTMLOBJS)
-
-nroffs: $(INFOOBJS)
-
-$(INFOOBJS):
-       @$(NROFF) $(SRCDIR)/info/CRT.MAC $@.t | awk -f $(SRCDIR)/info/Blank.awk > $(SRCDIR)/info.nr/$@
-       @echo Created $(SRCDIR)/info.nr/$@
-
-$(HTMLOBJS):
-       @perl $(SRCDIR)/info/subj2html.pl $@t > $(SRCDIR)/info.html/$@html
-       @echo Created $(SRCDIR)/info.html/$@html
-
-
diff --git a/install-sh b/install-sh
new file mode 100755 (executable)
index 0000000..1a83534
--- /dev/null
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-02-02.21
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# 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}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+       shift
+       shift
+       continue;;
+
+    -T) no_target_directory=true
+       shift
+       continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+       # When -t is used, the destination is already specified.
+       test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+       for arg
+       do
+          if test -n "$dstarg"; then
+           # $@ is not empty: it contains at least $arg.
+           set fnord "$@" "$dstarg"
+           shift # fnord
+         fi
+         shift # arg
+         dstarg=$arg
+       done
+       break;;
+  esac
+done
+
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dstarg: Is a directory" >&2
+       exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+        '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+       # mkdir can fail with a `File exist' error in case several
+       # install-sh are creating the directory concurrently.  This
+       # is OK.
+       test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # 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 $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+          # The rename failed, perhaps because mv can't rename something else
+          # to itself, or perhaps because mv is so ancient that it does not
+          # support -f.
+
+          # Now remove or move aside any old file at destination location.
+          # We try this two ways since rm can't unlink itself on some
+          # systems and the destination file might be busy for other
+          # reasons.  In this case, the final cleanup might fail but the new
+          # file should still install successfully.
+          {
+            if test -f "$dstdir/$dstfile"; then
+              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+              || {
+                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+                (exit 1); exit 1
+              }
+            else
+              :
+            fi
+          } &&
+
+          # Now rename the file to the real destination.
+          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+        }
+    }
+  fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/m4/acx_pthread.m4 b/m4/acx_pthread.m4
new file mode 100644 (file)
index 0000000..06af842
--- /dev/null
@@ -0,0 +1,238 @@
+dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+dnl
+dnl @summary figure out how to build C programs using POSIX threads
+dnl
+dnl This macro figures out how to build C programs using POSIX threads.
+dnl It sets the PTHREAD_LIBS output variable to the threads library and
+dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
+dnl C compiler flags that are needed. (The user can also force certain
+dnl compiler flags/libs to be tested by setting these environment
+dnl variables.)
+dnl
+dnl Also sets PTHREAD_CC to any special C compiler that is needed for
+dnl multi-threaded programs (defaults to the value of CC otherwise).
+dnl (This is necessary on AIX to use the special cc_r compiler alias.)
+dnl
+dnl NOTE: You are assumed to not only compile your program with these
+dnl flags, but also link it with them as well. e.g. you should link
+dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
+dnl $LIBS
+dnl
+dnl If you are only building threads programs, you may wish to use
+dnl these variables in your default LIBS, CFLAGS, and CC:
+dnl
+dnl        LIBS="$PTHREAD_LIBS $LIBS"
+dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+dnl        CC="$PTHREAD_CC"
+dnl
+dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
+dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
+dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+dnl
+dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
+dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
+dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
+dnl default action will define HAVE_PTHREAD.
+dnl
+dnl Please let the authors know if this macro fails on any platform, or
+dnl if you have any other suggestions or comments. This macro was based
+dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
+dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
+dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
+dnl We are also grateful for the helpful feedback of numerous users.
+dnl
+dnl @category InstalledPackages
+dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
+dnl @version 2005-06-15
+dnl @license GPLWithACException
+
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+               pthread-config)
+               AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+               if test x"$acx_pthread_config" = xno; then continue; fi
+               PTHREAD_CFLAGS="`pthread-config --cflags`"
+               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+               ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_TRY_LINK([#include <pthread.h>],
+                    [pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+                    [acx_pthread_ok=yes])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+       AC_MSG_CHECKING([for joinable pthread attribute])
+       attr_name=unknown
+       for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+           AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
+                        [attr_name=$attr; break])
+       done
+        AC_MSG_RESULT($attr_name)
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+                               [Define to necessary symbol if this constant
+                                uses a non-standard name on your system.])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        flag=no
+        case "${host_cpu}-${host_os}" in
+            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        AC_MSG_RESULT(${flag})
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+else
+        PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        :
+else
+        acx_pthread_ok=no
+        $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
diff --git a/m4/lib_socket_nsl.m4 b/m4/lib_socket_nsl.m4
new file mode 100644 (file)
index 0000000..8b1ea0d
--- /dev/null
@@ -0,0 +1,24 @@
+dnl @synopsis LIB_SOCKET_NSL
+dnl
+dnl This macro figures out what libraries are required on this platform
+dnl to link sockets programs.
+dnl
+dnl The common cases are not to need any extra libraries, or to need
+dnl -lsocket and -lnsl. We need to avoid linking with libnsl unless we
+dnl need it, though, since on some OSes where it isn't necessary it
+dnl will totally break networking. Unisys also includes gethostbyname()
+dnl in libsocket but needs libnsl for socket().
+dnl
+dnl @category Misc
+dnl @author Russ Allbery <rra@stanford.edu>
+dnl @author Stepan Kasal <kasal@ucw.cz>
+dnl @author Warren Young <warren@etr-usa.com>
+dnl @version 2005-09-06
+
+AC_DEFUN([LIB_SOCKET_NSL],
+[
+       AC_SEARCH_LIBS([gethostbyname], [nsl])
+       AC_SEARCH_LIBS([socket], [socket], [], [
+               AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
+               [], [-lnsl])])
+])
diff --git a/m4/my_func_makecontext.m4 b/m4/my_func_makecontext.m4
new file mode 100644 (file)
index 0000000..9327cee
--- /dev/null
@@ -0,0 +1,11 @@
+AC_DEFUN([MY_FUNC_MAKECONTEXT],
+[
+       AC_REQUIRE([AC_CANONICAL_HOST])
+       AC_CHECK_FUNCS(makecontext)
+       case "$host_os" in
+       *irix*|*solaris2.?)
+               AC_DEFINE([MAKECONTEXT_SP_HIGH], 1,
+                       [Define if your makecontext() requires ss_sp at the top of the stack])
+               ;;
+       esac
+])
diff --git a/src/.cvsignore b/src/.cvsignore
deleted file mode 100644 (file)
index 1ad6f5d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-make.src
index b5968d107ac4a7273e068d5c6b6e48645e0314b4..d3f50ae1147066b4903c8a81b8268e769cd78f9d 100644 (file)
@@ -1,3 +1,2 @@
-Makedepend
-emp_client
+empire
 ipglob.c
diff --git a/src/client/Makefile b/src/client/Makefile
deleted file mode 100644 (file)
index 9621f2f..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-#
-# Empire front end Makefile
-# (server mode)
-#
-
-include ../../build.conf
-include ../make.src
-include ../make.defs
-
-CFILES = expect.c handle.c host.c \
-       ioqueue.c ipglob.c login.c main.c queue.c saveargv.c \
-       servcmd.c serverio.c tags.c termio.c termlib.c
-OFILES = expect.o handle.o host.o \
-       ioqueue.o ipglob.o login.o main.o queue.o saveargv.o \
-       servcmd.o serverio.o tags.o termio.o termlib.o
-OBJFILES = expect.obj handle.obj host.obj \
-       ioqueue.obj ipglob.obj login.obj main.obj queue.obj saveargv.obj \
-       servcmd.obj serverio.obj tags.obj termio.obj termlib.obj
-
-CLIENTLIBS= -ltermlib
-
-#
-# Change this line to the compiler you are going to use.
-#
-
-all: emp_client
-
-osx: emp_client
-
-emp_client: $(OFILES) 
-       $(CC) -o emp_client $(OFILES) $(LFLAGS) $(CLIENTLIBS) -lc
-
-nt: emp_client.exe
-
-emp_client.exe: $(OBJFILES) $(CFILES)
-       cl $(CFLAGS) /Feemp_client.exe $(OBJFILES) wsock32.lib advapi32.lib
-
-dgux: $(OFILES) 
-       $(CC) $(CFLAGS) -dn -o emp_client $(OFILES) -lsocket -lnsl -ltermcap -lc
-
-solaris:
-       $(MAKE) emp_client CLIENTLIBS="-lsocket -lnsl -ltermcap -lc"
-
-hpux:
-       $(MAKE) emp_client CLIENTLIBS=-ltermcap
-
-clean:
-       -(rm -f $(OFILES))
-       -(rm -f emp_client)
-       -(del /q $(OBJFILES))
-       -(del /q emp_client.exe)
-       -(del /q emp_client.ilk)
-       -(del /q emp_client.pdb)
-
-install:
-       -(mkdir $(EMPDIR)/bin)
-       cp emp_client $(EMPDIR)/bin
-
-ntinstall:
-       -(mkdir $(NTINSTDIR)\bin)
-       copy emp_client.exe $(NTINSTDIR)\bin
-
-include ../make.rules
-include Makedepend
-
diff --git a/src/client/Makefile.standalone b/src/client/Makefile.standalone
deleted file mode 100644 (file)
index bb9971a..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-#
-# Empire front end Makefile
-# (standalone mode)
-#
-
-CFILES = expect.c handle.c host.c \
-       ioqueue.c ipglob.c login.c main.c queue.c saveargv.c \
-       servcmd.c serverio.c tags.c termio.c termlib.c
-OFILES = expect.o handle.o host.o \
-       ioqueue.o ipglob.o login.o main.o queue.o saveargv.o \
-       servcmd.o serverio.o tags.o termio.o termlib.o
-OBJFILES = expect.obj handle.obj host.obj \
-       ioqueue.obj ipglob.obj login.obj main.obj queue.obj saveargv.obj \
-       servcmd.obj serverio.obj tags.obj termio.obj termlib.obj
-
-CFLAGS= -g
-LIBS= -ltermlib
-
-#
-# Change this line to the compiler you are going to use.
-#
-CC=cc
-
-empire: $(OFILES) 
-       $(CC) -o empire $(OFILES) $(LIBS)
-
-linux: $(OFILES) 
-       $(CC) -o empire $(OFILES) -lcurses
-
-nt:
-       cl /DWIN32 /Feempire.exe $(CFILES) wsock32.lib advapi32.lib
-
-dgux: $(OFILES) 
-       $(CC) $(CFLAGS) -dn -o empire $(OFILES) -lsocket -lnsl -ltermcap -lc
-
-solaris:
-       make empire LIBS="-lsocket -lnsl -ltermcap -lc"
-
-hpux:
-       make empire LIBS=-ltermcap
-
-clean:
-       -(rm -f $(OFILES) empire)
-       -(del /q $(OBJFILES))
-       -(del /q empire.exe)
-
-expect.o: misc.h
-handle.o: misc.h
-host.o: misc.h
-ioqueue.o: misc.h queue.h ioqueue.h
-ipglob.o: misc.h
-login.o: misc.h proto.h
-main.o: misc.h proto.h queue.h ioqueue.h tags.h
-queue.o: misc.h queue.h
-saveargv.o: misc.h
-servcmd.o: misc.h proto.h queue.h ioqueue.h tags.h
-serverio.o: misc.h queue.h ioqueue.h
-tags.o: misc.h tags.h
-termio.o: misc.h tags.h
-termlib.o: misc.h
diff --git a/src/client/ipglob.c.in b/src/client/ipglob.c.in
new file mode 100644 (file)
index 0000000..e271f3a
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ *  Empire - A multi-player, client/server Internet based war game.
+ *  Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                           Ken Stevens, Steve McClure
+ *
+ *  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 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
+ *
+ *  ---
+ *
+ *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
+ *  related information and legal notices. It is expected that any future
+ *  projects/authors will amend these files as needed.
+ *
+ *  ---
+ *
+ *  @configure_input@
+ *  ipglob.c.in: IP globals.
+ * 
+ *  Known contributors to this file:
+ *     Markus Armbruster, 2005
+ */
+
+char empirehost[] = "@EMPIREHOST@";
+char empireport[] = "@EMPIREPORT@";
diff --git a/src/doconfig/.cvsignore b/src/doconfig/.cvsignore
deleted file mode 100644 (file)
index fd5e7ac..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Makedepend
-doconfig
diff --git a/src/doconfig/Makefile b/src/doconfig/Makefile
deleted file mode 100644 (file)
index 7b232da..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-#            build the configuration program, then run it.
-#            Note that this is a stand-alone - it doesn't need anything 
-#            else to build and run, other than build.conf for definitions.
-
-
-include ../../build.conf
-
-DPV = -DPV="\"$(MYNAME)\""
-DHN = -DHN="\"$(HOSTNAME)\""
-DPN = -DPN=$(PORTNUM)
-DEM = -DEM="\"$(EMAIL)\""
-DEP = -DEP="\"$(EMPDIR)\""
-DMC = -DMC=$(MAXNOC)
-DWX = -DWX=$(WORLDX)
-DWY = -DWY=$(WORLDY)
-DBL = -DBL=$(BLITZ)
-DET = -DET=$(ETUS)
-DEF = -DEF="\"$(ETUFREQ)\""
-DIP = -DIP="\"$(IPADDR)\""
-DUN = -DUN="\"$(USERNAME)\""
-
-DALL = $(DPV) $(DHN) $(DPN) $(DEM) $(DEP) $(DMC) $(DWX) $(DWY) $(DBL) $(DET) $(DEF) $(DIP) $(DUN)
-
-all: doconfig
-
-doconfig: ../../build.conf doconfig.c
-       @echo 'globalcflags = $(GLOBALCFLAGS)'
-       @echo 'globallflags = $(GLOBALLFLAGS)'
-       $(CC) $(GLOBALCFLAGS) $(DALL) doconfig.c -o doconfig $(GLOBALLFLAGS)
-       ./doconfig
-
-nt: ntdoconfig
-
-ntdoconfig: ..\..\build.conf doconfig.c
-       @echo 'globalcflags = $(GLOBALCFLAGS)'
-       @echo 'globallflags = $(GLOBALLFLAGS)'
-       $(CC) $(GLOBALCFLAGS) $(DALL) doconfig.c -o doconfig $(GLOBALLFLAGS)
-       doconfig.exe
-
-clean:
-       -(rm -f doconfig)
-       -(del doconfig.exe)
-       -(del *.obj)
-       -(del *.pdb)
-
-include ../make.rules
-include Makedepend
diff --git a/src/doconfig/doconfig.c b/src/doconfig/doconfig.c
deleted file mode 100644 (file)
index ee981bc..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
- *
- *  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 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
- *
- *  ---
- *
- *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- *  related information and legal notices. It is expected that any future
- *  projects/authors will amend these files as needed.
- *
- *  ---
- *
- *  doconfig.c: Generates the gamesdef.h file used to build the game, and
- *              the various make include files needed to build correctly.
- * 
- *  Known contributors to this file:
- *     Steve McClure, 1996-2000
- */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <stdlib.h>
-#if !defined(_WIN32)
-#include <unistd.h>
-#else
-#include <fcntl.h>
-#include <direct.h>
-#include <io.h>
-#define mkdir(dir,perm) _mkdir(dir)
-#endif
-#include <string.h>
-
-static void wrmakesrc(char *pathname);
-static void wripglob(char *filename);
-static void wrauth(char *filename);
-static void wrgamesdef(char *filename);
-
-char *copyright_header =
-"/*\n"
-" *  Empire - A multi-player, client/server Internet based war game.\n"
-" *  Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,\n"
-" *                           Ken Stevens, Steve McClure\n"
-" *\n"
-" *  This program is free software; you can redistribute it and/or modify\n"
-" *  it under the terms of the GNU General Public License as published by\n"
-" *  the Free Software Foundation; either version 2 of the License, or\n"
-" *  (at your option) any later version.\n"
-" *\n"
-" *  This program is distributed in the hope that it will be useful,\n"
-" *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-" *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
-" *  GNU General Public License for more details.\n"
-" *\n"
-" *  You should have received a copy of the GNU General Public License\n"
-" *  along with this program; if not, write to the Free Software\n"
-" *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n"
-" *\n"
-" *  ---\n"
-" *\n"
-" *  See the \"LEGAL\", \"LICENSE\", \"CREDITS\" and \"README\" files for all the\n"
-" *  related information and legal notices. It is expected that any future\n"
-" *  projects/authors will amend these files as needed.\n"
-" *\n"
-" *  ---\n"
-" *\n"
-" *  %s: %s\n"
-" * \n"
-" *  Known contributors to this file:\n"
-" *     Automatically generated by doconfig.c\n"
-" */\n\n";
-
-#if defined(__GLIBC__) || defined(FBSD) || defined(__APPLE_) || defined(_WIN32)
-#define safe_getcwd() getcwd(NULL, 0)
-#else
-static char *
-safe_getcwd(void)
-{
-    size_t size = 256;
-     
-    for (;;) {
-       char *buf = malloc(size);
-       if (!buf)
-           return buf;
-       if (getcwd (buf, size))
-           return buf;
-       free (buf);
-       if (errno != ERANGE)
-           return NULL;
-       size *= 2;
-    }
-}
-#endif
-
-int
-main(void)
-{
-    char buf[256];
-    char *cp;
-    char *pathname;
-
-    if ((pathname = safe_getcwd()) == NULL) {
-       printf("Can't get current path!\n");
-       exit(-1);
-    }
-#if !defined(_WIN32)
-    cp = strrchr(pathname, '/');
-    *cp = '\0';
-    cp = strrchr(pathname, '/');
-    *cp = '\0';
-#else
-    cp = strrchr(pathname, '\\');
-    *cp = '\0';
-    cp = strrchr(pathname, '\\');
-    *cp = '\0';
-#endif
-    printf("Configuring...\n");
-    wrmakesrc(pathname);
-    sprintf(buf, "%s/include/gamesdef.h", pathname);
-    wrgamesdef(buf);
-    sprintf(buf, "%s/src/client/ipglob.c", pathname);
-    wripglob(buf);
-
-    if (access(EP, 0)) {
-       printf("making directory %s\n", EP);
-       if (mkdir(EP, 0755)) {
-           printf("mkdir failed on %s, exiting.\n", EP);
-           exit(-1);
-       }
-    }
-    sprintf(buf, "%s/data", EP);
-    if (access(buf, 0)) {
-       printf("making directory %s\n", buf);
-       if (mkdir(buf, 0755)) {
-           printf("mkdir failed on %s, exiting.\n", buf);
-           exit(-1);
-       }
-    }
-    sprintf(buf, "%s/data/auth", EP);
-    wrauth(buf);
-    exit(0);
-}
-
-static void
-wrmakesrc(char *pathname)
-{
-    FILE *fp;
-    char buf[256];
-
-    sprintf(buf, "%s/src/make.src", pathname);
-    if ((fp = fopen(buf, "wb")) == NULL) {
-       printf("Cannot open %s for writing, exiting.\n", buf);
-       exit(-1);
-    }
-    fprintf(fp,
-           "# make.src: Source tree absolute pathname - auto generated.\n\n");
-    fprintf(fp, "SRCDIR = %s\n", pathname);
-    fclose(fp);
-}
-
-static void
-wripglob(char *filename)
-{
-    FILE *fp;
-
-    printf("Writing %s\n", filename);
-    if ((fp = fopen(filename, "wb")) == NULL) {
-       printf("Cannot open %s for writing, exiting.\n", filename);
-       exit(-1);
-    }
-    fprintf(fp, copyright_header,
-           strrchr(filename, '/')+1, "IP globals.");
-    fprintf(fp, "char empirehost[] = \"%s\";\n", HN);
-    fprintf(fp, "char empireport[] = \"%d\";\n", PN);
-    fclose(fp);
-}
-
-static void
-wrauth(char *filename)
-{
-    FILE *fp;
-
-    printf("Writing %s\n", filename);
-    if ((fp = fopen(filename, "w")) == NULL) {
-       printf("Cannot open %s for writing, exiting.\n", filename);
-       exit(-1);
-    }
-
-    fprintf(fp,
-           "# %s: Empire Authorization File\n"
-           "#       Users listed will be allowed to log in as deities.\n#\n",
-           strrchr(filename, '/')+1);
-    fprintf(fp, "# Format is:\n");
-    fprintf(fp, "# hostname that authorized user uses on a line\n");
-    fprintf(fp, "# username that authorized user uses on a line\n#\n");
-    fprintf(fp, "# REMEMBER TO USE PAIRS OF LINES!\n#\n");
-    fprintf(fp, "# Example:\n#\n");
-    fprintf(fp, "#nowhere.land.edu\n#nowhereman\n");
-    fprintf(fp, "%s\n%s\n", HN, UN);
-    fprintf(fp, "%s\n%s\n", IP, UN);
-    fprintf(fp, "127.0.0.1\n%s\n", UN);
-    fclose(fp);
-}
-
-static void
-wrgamesdef(char *filename)
-{
-    FILE *fp;
-    char path[512];
-    char *cp;
-    unsigned int i;
-    int s_p_etu;
-    char buf[40];
-    char c = 'b';
-
-    cp = &path[0];
-    for (i = 0; i < strlen(EP); i++) {
-       *cp++ = EP[i];
-       if (EP[i] == '\\')
-           *cp++ = '\\';
-    }
-    *cp = 0;
-
-    strcpy(buf, EF);
-    if (strlen(buf) > 0)
-       c = buf[strlen(buf) - 1];
-    if (strchr("dhm", c) && strlen(buf) > 0) {
-       s_p_etu = atoi(buf);
-       if (c == 'd')
-           s_p_etu =
-               (((double)s_p_etu * 60.0 * 60.0 * 24.0) / (double)ET);
-       else if (c == 'h')
-           s_p_etu = (((double)s_p_etu * 60.0 * 60.0) / (double)ET);
-       else if (c == 'm')
-           s_p_etu = (((double)s_p_etu * 60.0) / (double)ET);
-    } else {
-       printf("ETU frequency is bad - using 10 minutes.\n");
-       s_p_etu = 600 / ET;
-    }
-
-    printf("Writing %s\n", filename);
-    if ((fp = fopen(filename, "wb")) == NULL) {
-       printf("Cannot open %s for writing, exiting.\n", filename);
-       exit(-1);
-    }
-    fprintf(fp, copyright_header,
-           strrchr(filename,'/')+1, "Server compile-time configuration");
-    fprintf(fp, "/*\n * Feel free to change these, but if you rerun doconfig this file will\n");
-    fprintf(fp, " * be overwritten again.\n");
-    fprintf(fp, " */\n\n");
-    fprintf(fp, "#ifndef _GAMESDEF_H_\n");
-    fprintf(fp, "#define _GAMESDEF_H_\n\n");
-    fprintf(fp, "#define EMPDIR \"%s\"\n", EP);
-    fprintf(fp, "#define PRVNAM \"%s\"\n", PV);
-    fprintf(fp, "#define PRVLOG \"%s\"\n", EM);
-    fprintf(fp, "#define GET_SOURCE \"using:\\n    http://www.wolfpackempire.com/\"\n");
-    fprintf(fp, "#define EMP_HOST \"%s\"\n", IP);
-    fprintf(fp, "#define EMP_PORT \"%d\"\n\n", PN);
-    fprintf(fp, "#define MAXNOC %d\n\n", MC);
-    fprintf(fp, "#define DEF_WORLD_X %d\n", WX);
-    fprintf(fp, "#define DEF_WORLD_Y %d\n\n", WY);
-    fprintf(fp, "#define DEF_S_P_ETU %d\n", s_p_etu);
-    fprintf(fp, "#define ETUS %d\n\n", ET);
-    if (BL)
-       fprintf(fp, "#define BLITZ  1\n\n");
-    fprintf(fp, "#endif /* _GAMESDEF_H_ */\n");
-    fclose(fp);
-}
diff --git a/src/lib/as/.cvsignore b/src/lib/as/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/as/Makefile b/src/lib/as/Makefile
deleted file mode 100644 (file)
index 9a46090..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libas.a
-NTLIB = $(SRCDIR)\lib\libas.lib
-
-OBJS = as_cache.o as_costcomp.o as_delete.o as_extend.o as_hash.o as_init.o \
-       as_merge.o as_search.o as_stats.o as_winnow.o
-
-NTOBJS = as_cache.obj as_costcomp.obj as_delete.obj as_extend.obj as_hash.obj \
-       as_init.obj as_merge.obj as_search.obj as_stats.obj as_winnow.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
diff --git a/src/lib/commands/.cvsignore b/src/lib/commands/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/commands/Makefile b/src/lib/commands/Makefile
deleted file mode 100644 (file)
index 15a6eee..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libcommands.a
-NTLIB = $(SRCDIR)\lib\libcommands.lib
-
-OBJS =  acce.o add.o anti.o arm.o army.o assa.o atta.o bdes.o best.o boar.o \
-       bomb.o brea.o budg.o buil.o buy.o capi.o carg.o cede.o cens.o chan.o \
-       coas.o coll.o comm.o cons.o conv.o coun.o cuto.o decl.o deli.o demo.o \
-       desi.o disa.o dist.o drop.o dump.o echo.o edit.o enab.o enli.o \
-       expl.o fina.o flash.o flee.o fly.o foll.o forc.o fort.o fuel.o give.o \
-       grin.o hard.o head.o improve.o info.o land.o laun.o lboard.o ldump.o \
-       ledg.o leve.o load.o look.o lost.o lstat.o lten.o map.o marc.o mark.o \
-       mfir.o mine.o miss.o mobq.o mobu.o mora.o move.o name.o nati.o navi.o \
-       ndump.o new.o newe.o news.o nuke.o offe.o offs.o orde.o orig.o para.o \
-       path.o payo.o pboa.o peek.o pdump.o plan.o play.o \
-       powe.o prod.o pstat.o rada.o rang.o rea.o real.o reco.o reje.o rela.o \
-       repa.o repo.o rese.o reso.o retr.o rout.o sabo.o sail.o sate.o scra.o \
-       scut.o sdump.o sect.o sell.o set.o setres.o setsect.o shar.o shark.o \
-       shi.o shoo.o show.o shut.o sinf.o skyw.o sona.o spy.o sstat.o star.o \
-       stop.o stre.o strv.o supp.o surv.o swap.o tele.o tend.o terr.o thre.o \
-       togg.o torp.o trad.o tran.o trea.o turn.o upda.o upgr.o vers.o wai.o \
-       wing.o wipe.o work.o xdump.o zdon.o
-
-NTOBJS = acce.obj add.obj anti.obj arm.obj army.obj assa.obj atta.obj \
-       bdes.obj best.obj boar.obj bomb.obj brea.obj budg.obj buil.obj \
-       buy.obj capi.obj carg.obj cede.obj cens.obj chan.obj coas.obj \
-       coll.obj comm.obj cons.obj conv.obj coun.obj cuto.obj decl.obj \
-       deli.obj demo.obj desi.obj disa.obj dist.obj drop.obj \
-       dump.obj echo.obj edit.obj enab.obj enli.obj expl.obj fina.obj \
-       flash.obj flee.obj fly.obj foll.obj forc.obj fort.obj fuel.obj \
-       give.obj grin.obj hard.obj head.obj improve.obj info.obj \
-       land.obj laun.obj lboard.obj ldump.obj ledg.obj leve.obj load.obj \
-       look.obj lost.obj lstat.obj lten.obj map.obj marc.obj mark.obj \
-       mfir.obj mine.obj miss.obj mobq.obj mobu.obj mora.obj move.obj \
-       name.obj nati.obj navi.obj ndump.obj new.obj newe.obj news.obj \
-       nuke.obj offe.obj offs.obj orde.obj orig.obj para.obj path.obj \
-       payo.obj pboa.obj pdump.obj peek.obj plan.obj play.obj powe.obj \
-       prod.obj pstat.obj rada.obj rang.obj rea.obj real.obj reco.obj \
-       reje.obj rela.obj repa.obj repo.obj rese.obj reso.obj retr.obj \
-       rout.obj sabo.obj sail.obj sate.obj scra.obj scut.obj sdump.obj \
-       sect.obj sell.obj set.obj setres.obj setsect.obj shar.obj shark.obj \
-       shi.obj shoo.obj show.obj shut.obj sinf.obj skyw.obj sona.obj spy.obj \
-       sstat.obj star.obj stop.obj stre.obj strv.obj supp.obj surv.obj \
-       swap.obj tele.obj tend.obj terr.obj thre.obj togg.obj torp.obj \
-       trad.obj tran.obj trea.obj turn.obj upda.obj upgr.obj vers.obj \
-       wai.obj wing.obj wipe.obj work.obj xdump.obj zdon.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
index d3a64f9843f08d575355322c367325b50e12eff6..194cf916d3f31e2f3e4566d2a0710d41a1bab89f 100644 (file)
@@ -37,7 +37,6 @@
 
 #include <stdio.h>
 #include <time.h>
-#include "gamesdef.h"
 #include "misc.h"
 #include "player.h"
 #include "version.h"
@@ -167,7 +166,8 @@ vers(void)
     pr("\n\n");
     pr("The person to annoy if something goes wrong is:\n\t%s\n\t(%s).\n",
        privname, privlog);
-    pr("You can get your own copy of the source %s\n", GET_SOURCE);
+    pr("You can get your own copy of the source from "
+       "http://www.wolfpackempire.com/\n");
     return RET_OK;
 }
 
diff --git a/src/lib/common/.cvsignore b/src/lib/common/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/common/Makefile b/src/lib/common/Makefile
deleted file mode 100644 (file)
index c6802c2..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libcommon.a
-NTLIB = $(SRCDIR)\lib\libcommon.lib
-
-OBJS =  bestpath.o bridgefall.o check.o damage.o ef_load.o ef_verify.o \
-       file.o fsize.o hap_fact.o hours.o land.o log.o mailbox.o \
-       maps.o move.o nat.o path.o res_pop.o sectdamage.o \
-       stmtch.o tfact.o type.o wantupd.o xundump.o xy.o
-
-NTOBJS = bestpath.obj bridgefall.obj check.obj damage.obj \
-       ef_load.obj ef_verify.obj file.obj fsize.obj \
-       hap_fact.obj hours.obj land.obj log.obj \
-       mailbox.obj maps.obj move.obj nat.obj path.obj res_pop.obj \
-       sectdamage.obj stmtch.obj tfact.obj \
-       type.obj wantupd.obj xundump.obj xy.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
diff --git a/src/lib/empthread/.cvsignore b/src/lib/empthread/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/empthread/Makefile b/src/lib/empthread/Makefile
deleted file mode 100644 (file)
index 227450b..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libempth.a
-NTLIB = $(SRCDIR)\lib\libempth.lib
-
-OBJS = lwp.o pthread.o ntthread.o
-
-NTOBJS = lwp.obj pthread.obj ntthread.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
diff --git a/src/lib/gen/.cvsignore b/src/lib/gen/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/gen/Makefile b/src/lib/gen/Makefile
deleted file mode 100644 (file)
index 6c3847a..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libgen.a
-NTLIB = $(SRCDIR)\lib\libgen.lib
-
-OBJS =  chance.o copy.o disassoc.o \
-       emp_config.o getstarg.o getstring.o io.o \
-       ioqueue.o mapdist.o minmax.o numstr.o onearg.o \
-       parse.o plur.o queue.o round.o scthash.o
-
-NTOBJS = chance.obj copy.obj \
-       emp_config.obj getstarg.obj getstring.obj \
-       io.obj ioqueue.obj mapdist.obj minmax.obj \
-       numstr.obj onearg.obj parse.obj plur.obj queue.obj round.obj \
-       scthash.obj getopt.obj service.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
diff --git a/src/lib/global/.cvsignore b/src/lib/global/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/global/Makefile b/src/lib/global/Makefile
deleted file mode 100644 (file)
index 8a3301b..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libglobal.a
-NTLIB = $(SRCDIR)\lib\libglobal.lib
-
-OBJS =  constants.o dir.o file.o init.o item.o land.o news.o nsc.o \
-       nuke.o options.o path.o plane.o product.o sect.o ship.o\
-       treaty.o
-
-NTOBJS = constants.obj dir.obj file.obj init.obj item.obj land.obj \
-       news.obj nsc.obj nuke.obj options.obj path.obj plane.obj \
-       product.obj sect.obj ship.obj treaty.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
index fc9dd78d614051dcc66c3feb50db657eb6d0451a..2db1ca4b50836ffbebd562a5628cadf89b299dc3 100644 (file)
  *     
  */
 
-#include "gamesdef.h"
 #include "misc.h"
 
-char *privname = PRVNAM;       /* name of priv user */
-char *privlog = PRVLOG;        /* logname of priv user */
+char *privname = "Deity forgot to edit econfig"; /* name of priv user */
+char *privlog = "careless@invalid"; /* logname of priv user */
 
-int WORLD_X = DEF_WORLD_X;     /* World size - x */
-int WORLD_Y = DEF_WORLD_Y;     /* World size - y */
+int WORLD_X = 64;              /* World size - x */
+int WORLD_Y = 32;              /* World size - y */
 
 int MARK_DELAY = 7200;         /* Seconds to bid on commodities */
 int TRADE_DELAY = 7200;                /* Seconds to bid on units */
 
 int m_m_p_d = 1440;            /* max mins of play per day (per country) */
-int s_p_etu = DEF_S_P_ETU;     /* seconds per Empire time unit */
-int etu_per_update = ETUS;     /* # of etu's per update, from misc.h */
+int s_p_etu = 10;              /* seconds per Empire time unit */
+int etu_per_update = 60;       /* # of etu's per update */
 int adj_update = 0;            /* update time adjustment */
 int update_window = 0;         /* update window adjustment */
 int hourslop = 5;              /* amount of slop to match update times */
diff --git a/src/lib/global/path.c b/src/lib/global/path.c
deleted file mode 100644 (file)
index d15c169..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
- *
- *  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 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
- *
- *  ---
- *
- *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- *  related information and legal notices. It is expected that any future
- *  projects/authors will amend these files as needed.
- *
- *  ---
- *
- *  path.c: Path initializations needed outside of the file initialization
- *          tables
- * 
- *  Known contributors to this file:
- *     
- */
-
-#include "gamesdef.h"
-
-char dflt_econfig[] = EMPDIR "/data/econfig";
-
-char *infodir  = EMPDIR "/info.nr";
-char *datadir  = EMPDIR "/data";
-
-/* relative to DATADIR */
-char *teldir   = "tel";
-char *motdfil  = "motd";
-char *downfil  = "down";
-char *disablefil = "disable";
-char *telfil   = "tel/tel";
-char *annfil   = "ann";
-char *banfil   = "ban";
-char *authfil  = "auth";
-char *timestampfil = "timestamp";
-
-char *listen_addr = "";
-char *loginport = EMP_PORT;
diff --git a/src/lib/global/path.c.in b/src/lib/global/path.c.in
new file mode 100644 (file)
index 0000000..6b5fc75
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ *  Empire - A multi-player, client/server Internet based war game.
+ *  Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                           Ken Stevens, Steve McClure
+ *
+ *  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 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
+ *
+ *  ---
+ *
+ *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
+ *  related information and legal notices. It is expected that any future
+ *  projects/authors will amend these files as needed.
+ *
+ *  ---
+ *
+ *  @configure_input@
+ *  path.c: Path initializations needed outside of the file initialization
+ *          tables
+ * 
+ *  Known contributors to this file:
+ *     Markus Armbruster, 2005
+ */
+
+char dflt_econfig[] = "@econfig@";
+char *infodir  = "@einfodir@";
+char *datadir  = "@edatadir@";
+
+/* relative to DATADIR */
+char *teldir   = "tel";
+char *motdfil  = "motd";
+char *downfil  = "down";
+char *disablefil = "disable";
+char *telfil   = "tel/tel";
+char *annfil   = "ann";
+char *banfil   = "ban";
+char *authfil  = "auth";
+char *timestampfil = "timestamp";
+
+char *listen_addr = "";
+char *loginport = "@EMPIREPORT@";
diff --git a/src/lib/lwp/.cvsignore b/src/lib/lwp/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/lwp/Makefile b/src/lib/lwp/Makefile
deleted file mode 100644 (file)
index 4b47caf..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/liblwp.a
-
-OBJS = arch.o lwp.o queue.o sel.o sem.o status.o
-
-AIXOBJS = lwpInit.o lwpRestore.o lwpSave.o
-
-GENMASTER = GLOBALCFLAGS="$(GLOBALCFLAGS)" GLOBALLFLAGS="$(GLOBALLFLAGS)"
-
-all: $(LIB)
-
-$(LIB): $(OBJS) $(EXTRAOBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS) $(EXTRAOBJS)
-       $(RANLIB) $(LIB)
-
-nt:
-
-aix:
-       make EXTRAOBJS="$(AIXOBJS)" $(GENMASTER)
-
-clean:
-       -(rm -f $(OBJS) $(AIXOBJS) $(MIPSOBJS))
-
-include ../../make.rules
-include Makedepend
diff --git a/src/lib/player/.cvsignore b/src/lib/player/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/player/Makefile b/src/lib/player/Makefile
deleted file mode 100644 (file)
index 8a0ab61..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libplayer.a
-NTLIB = $(SRCDIR)\lib\libplayer.lib
-
-OBJS = accept.o dispatch.o empdis.o empmod.o init_nats.o login.o nat.o \
-       player.o recvclient.o
-
-NTOBJS = accept.obj dispatch.obj empdis.obj empmod.obj init_nats.obj \
-       login.obj nat.obj player.obj recvclient.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
diff --git a/src/lib/subs/.cvsignore b/src/lib/subs/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/subs/Makefile b/src/lib/subs/Makefile
deleted file mode 100644 (file)
index 5b99b8e..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libsubs.a
-NTLIB = $(SRCDIR)\lib\libsubs.lib
-
-OBJS = aircombat.o askyn.o aswplnsubs.o attsub.o bigmap.o border.o bsanct.o \
-       caploss.o chkmoney.o cnumb.o coastal.o control.o detonate.o disloan.o \
-       distrea.o fileinit.o fortdef.o getbit.o getele.o land.o landgun.o \
-       list.o lndsub.o lostsub.o mission.o move.o mslsub.o mtch.o natarg.o \
-       neigh.o nreport.o nstr.o nuke.o nxtitem.o nxtsct.o paths.o plane.o \
-       plnsub.o pr.o radmap.o rej.o retreat.o sarg.o satmap.o \
-       sect.o ship.o show.o shpsub.o snxtitem.o snxtsct.o supply.o \
-       takeover.o trdsub.o trechk.o whatitem.o wu.o
-
-NTOBJS = aircombat.obj askyn.obj aswplnsubs.obj attsub.obj bigmap.obj \
-       border.obj bsanct.obj caploss.obj chkmoney.obj cnumb.obj coastal.obj \
-       control.obj detonate.obj disloan.obj distrea.obj fileinit.obj fortdef.obj \
-       getbit.obj getele.obj land.obj landgun.obj list.obj lndsub.obj \
-       lostsub.obj mission.obj move.obj mslsub.obj mtch.obj natarg.obj neigh.obj \
-       nreport.obj nstr.obj nuke.obj nxtitem.obj nxtsct.obj paths.obj plane.obj \
-       plnsub.obj pr.obj radmap.obj rej.obj retreat.obj sarg.obj satmap.obj \
-       sect.obj ship.obj show.obj shpsub.obj snxtitem.obj \
-       snxtsct.obj supply.obj takeover.obj trdsub.obj trechk.obj whatitem.obj \
-       wu.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
diff --git a/src/lib/update/.cvsignore b/src/lib/update/.cvsignore
deleted file mode 100644 (file)
index dd35888..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Makedepend
diff --git a/src/lib/update/Makefile b/src/lib/update/Makefile
deleted file mode 100644 (file)
index 4acd749..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../../build.conf
-include ../../make.src
-include ../../make.defs
-
-LIB = $(SRCDIR)/lib/libupdate.a
-NTLIB = $(SRCDIR)\lib\libupdate.lib
-
-OBJS =  age.o anno.o bp.o deliver.o distribute.o finish.o human.o land.o \
-       main.o material.o mobility.o move_sat.o nat.o nav_ship.o nav_util.o \
-       nxtitemp.o plague.o plane.o populace.o prepare.o produce.o \
-       removewants.o revolt.o sail.o sect.o ship.o
-
-NTOBJS = age.obj anno.obj bp.obj deliver.obj distribute.obj finish.obj \
-       human.obj land.obj main.obj material.obj mobility.obj move_sat.obj \
-       nat.obj nav_ship.obj nav_util.obj nxtitemp.obj plague.obj \
-       plane.obj populace.obj prepare.obj produce.obj removewants.obj \
-       revolt.obj sail.obj sect.obj ship.obj
-
-all: $(LIB)
-
-nt: $(NTLIB)
-
-$(NTLIB): $(NTOBJS)
-       -del /q $@
-       lib /OUT:$@ /DEBUGTYPE:CV $(NTOBJS)
-
-$(LIB): $(OBJS)
-       rm -f $(LIB)
-       ar cq $(LIB) $(OBJS)
-       $(RANLIB) $(LIB)
-
-clean:
-       -(rm -f $(OBJS))
-       -(del /q $(NTOBJS))
-
-include ../../make.rules
-include Makedepend
diff --git a/src/make.defs b/src/make.defs
deleted file mode 100644 (file)
index fb583f6..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# make.defs - Wolfpack, 1996
-#
-# Lots of definition stuff common to the makefiles can go here.
-# Make sure that make.src is included before this one (both
-# are in this directory, but make.src is auto-generated.)
-
-GLOBALCFLAGS = 
-GLOBALLFLAGS =
-GLOBALIFLAGS = -I$(SRCDIR)/include
-
-RANLIB = ranlib
-
-CFLAGS = $(LOCALCFLAGS) $(GLOBALCFLAGS)
-IFLAGS = $(LOCALIFLAGS) $(GLOBALIFLAGS)
-LFLAGS = $(LOCALLFLAGS) $(GLOBALLFLAGS)
-
-
diff --git a/src/make.rules b/src/make.rules
deleted file mode 100644 (file)
index 3b31c9b..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# make.rules - Wolfpack, 1996
-#
-# Lots of rules stuff common to the makefiles can go here.
-# Make sure that make.src is included before this one (both
-# are in this directory, but make.src is auto-generated.)
-
-.c.obj: ;
-       $(CC) -c $(IFLAGS) $(CFLAGS) $*.c
-
-.c.o: ;
-       $(CC) -c $(IFLAGS) $(CFLAGS) $*.c
-
-depend:
-       $(CC) -M -I../../include -I../../../include *.c  > Makedepend
diff --git a/src/scripts/cvsfiles.awk b/src/scripts/cvsfiles.awk
new file mode 100755 (executable)
index 0000000..72e9615
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/awk -f
+# Find files under CVS control
+# FIXME Ignores CVS/Entries.log
+
+BEGIN {
+    FS="/";
+    if (ARGC == 1)
+       ARGV[ARGC++] = "CVS/Entries";
+    else {
+       for (i = 1; i < ARGC; i++)
+           ARGV[i] = ARGV[i] "/CVS/Entries";
+    }
+}
+
+{ cwd = FILENAME; sub(/CVS\/Entries$/, "", cwd); }
+
+/^\// {
+    if ($3 !~ /^-/)
+       print cwd $2;
+}
+
+/^D/ && NF > 1 {
+    ARGV[ARGC++] = cwd $2 "/CVS/Entries";
+}
index 5844b02d0cb3b3a19c7f7847be2c64b17083dc11..11dd7514cae537258e4c3084f08e0fe852067e3f 100644 (file)
@@ -1,2 +1 @@
-Makedepend
 emp_server
diff --git a/src/server/Makefile b/src/server/Makefile
deleted file mode 100644 (file)
index 0efb971..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../build.conf
-include ../make.src
-include ../make.defs
-
-OBJS = main.o idle.o lostitem.o marketup.o shutdown.o timestamp.o update.o
-
-NTOBJS = main.obj idle.obj lostitem.obj marketup.obj shutdown.obj \
-       timestamp.obj update.obj
-
-LIBDIR = $(SRCDIR)/lib
-
-LIBS = $(LIBDIR)/libplayer.a \
-       $(LIBDIR)/libupdate.a \
-       $(LIBDIR)/libcommands.a \
-       $(LIBDIR)/libsubs.a \
-       $(LIBDIR)/libcommon.a \
-       $(LIBDIR)/libgen.a \
-       $(LIBDIR)/libglobal.a \
-       $(LIBDIR)/libas.a \
-       $(LIBDIR)/libempth.a \
-       $(LIBDIR)/liblwp.a
-
-OSXLIBS = $(LIBDIR)/libplayer.a \
-       $(LIBDIR)/libupdate.a \
-       $(LIBDIR)/libcommands.a \
-       $(LIBDIR)/libsubs.a \
-       $(LIBDIR)/libcommon.a \
-       $(LIBDIR)/libgen.a \
-       $(LIBDIR)/libglobal.a \
-       $(LIBDIR)/libas.a \
-       $(LIBDIR)/libempth.a
-
-NTLIBS = $(LIBDIR)\libplayer.lib \
-       $(LIBDIR)\libupdate.lib \
-       $(LIBDIR)\libcommands.lib \
-       $(LIBDIR)\libsubs.lib \
-       $(LIBDIR)\libcommon.lib \
-       $(LIBDIR)\libgen.lib \
-       $(LIBDIR)\libglobal.lib \
-       $(LIBDIR)\libas.lib \
-       $(LIBDIR)\libempth.lib
-
-all: emp_server
-
-osx: empX_server
-
-nt: emp_server.exe
-
-emp_server.exe: $(NTOBJS) $(NTLIBS)
-       link /OUT:emp_server.exe \
-        /PDB:emp_server.pdb  /NOLOGO \
-        /NOD /DEBUG:full /DEBUGTYPE:cv /MACHINE:IX86 /NOLOGO \
-        $(NTOBJS) $(NTLIBS) \
-        kernel32.lib \
-        ws2_32.lib \
-        libcmt.lib \
-        oldnames.lib \
-        advapi32.lib
-
-emp_server: $(OBJS) $(LIBS)
-       $(CC) -o emp_server $(OBJS) $(LIBS) $(LFLAGS) $(GLOBALPFLAGS) -lm -lc
-
-empX_server: $(OBJS) $(OSXLIBS)
-       $(CC) -o emp_server $(OBJS) $(OSXLIBS) $(LFLAGS) $(GLOBALPFLAGS) -lm -lc
-
-clean:
-       -(del /q $(NTOBJS))
-       -(del /q emp_server.exe)
-       -(del /q emp_server.ilk)
-       -(del /q emp_server.pdb)
-       -(rm -f $(OBJS))
-       -(rm -f emp_server)
-       -(rm -f $(OSXOBJS))
-       -(rm -f empX_server)
-
-install:
-       -(mkdir $(EMPDIR)/bin)
-       -(cp emp_server $(EMPDIR)/bin)
-
-OSXinstall:
-       -(mkdir $(EMPDIR)/bin)
-       -(cp empX_server $(EMPDIR)/bin)
-
-ntinstall:
-       -(mkdir $(NTINSTDIR)\bin)
-       -(copy emp_server.exe $(NTINSTDIR)\bin)
-
-include ../make.rules
-include Makedepend
index 1e2cb064484ba3ef98f2c4c0b2abd21dbe01b53d..2cc62baa66523f4e7672480d3b44f1034bdf01b0 100644 (file)
@@ -1,4 +1,3 @@
-Makedepend
 fairland
 files
 pconfig
diff --git a/src/util/Makefile b/src/util/Makefile
deleted file mode 100644 (file)
index cedcdbb..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-# 
-#   Empire - A multi-player, client/server Internet based war game.
-#   Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
-#                            Ken Stevens, Steve McClure
-# 
-#   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 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
-# 
-#   ---
-# 
-#   See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
-#   related information and legal notices. It is expected that any future
-#   projects/authors will amend these files as needed.
-# 
-# Makefile - Wolfpack, 1996
-
-# Note that these could have been listed 1 per line, but I chose to just
-# stick them all together this way to shorten the file.
-
-include ../../build.conf
-include ../make.src
-include ../make.defs
-
-LIBDIR = $(SRCDIR)/lib
-
-LIBS = $(LIBDIR)/libcommon.a \
-       $(LIBDIR)/libgen.a \
-       $(LIBDIR)/libglobal.a
-
-NTLIBS = $(LIBDIR)\libcommon.lib \
-       $(LIBDIR)\libgen.lib \
-       $(LIBDIR)\libglobal.lib
-
-OBJS = fairland.o files.o pconfig.o
-
-NTOBJS = fairland.obj files.obj pconfig.obj
-
-nt: ntfairland ntfiles ntpconfig
-
-all: fairland files pconfig
-
-osx: fairland files pconfig
-
-ntfiles: files.obj
-       link /OUT:files.exe \
-        /NOD /DEBUG:full /DEBUGTYPE:cv /MACHINE:IX86 /NOLOGO \
-        files.obj $(NTLIBS) \
-        kernel32.lib \
-        wsock32.lib \
-        libcmt.lib \
-        oldnames.lib
-
-files: files.o
-       $(CC) -o files $(IFLAGS) $(CFLAGS) files.o $(LIBS) $(LFLAGS) -lc
-
-fairland: fairland.o
-       $(CC) -o fairland $(IFLAGS) $(CFLAGS) fairland.o $(LIBS) $(LFLAGS) -lc
-
-ntfairland: fairland.obj
-       link /OUT:fairland.exe \
-        /NOD /DEBUG:full /DEBUGTYPE:cv /MACHINE:IX86 /NOLOGO \
-        fairland.obj $(NTLIBS) \
-        kernel32.lib \
-        wsock32.lib \
-        libcmt.lib \
-        oldnames.lib
-
-pconfig: pconfig.o
-       $(CC) -o pconfig $(IFLAGS) $(CFLAGS) pconfig.o $(LIBS) $(LFLAGS) -lc
-
-ntpconfig: pconfig.obj
-       link /OUT:pconfig.exe \
-        /NOD /DEBUG:full /DEBUGTYPE:cv /MACHINE:IX86 /NOLOGO \
-        pconfig.obj $(NTLIBS) \
-        kernel32.lib \
-        wsock32.lib \
-        libcmt.lib \
-        oldnames.lib
-
-clean:
-       -(rm -f files fairland pconfig $(OBJS))
-       -(del /q *.exe *.pdb *.ilk $(NTOBJS))
-
-install:
-       -(mkdir $(EMPDIR)/bin)
-       -(cp files $(EMPDIR)/bin)
-       -(cp fairland $(EMPDIR)/bin)
-       -(cp pconfig $(EMPDIR)/bin)
-
-ntinstall:
-       -(mkdir $(NTINSTDIR)\bin)
-       -(copy files.exe $(NTINSTDIR)\bin)
-       -(copy fairland.exe $(NTINSTDIR)\bin)
-       -(copy pconfig.exe $(NTINSTDIR)\bin)
-
-include ../make.rules
-include Makedepend