--- armagetronad-0.3.0.orig/debian/rules
+++ armagetronad-0.3.0/debian/rules
@@ -0,0 +1,226 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# (C) 2007 Christine Spang <spang@mit.edu>
+# (C) 2002 Andreas Bombe <aeb@debian.org>
+# (C) 2000 Marcelo E. Magallon <mmagallo@debian.org>
+# Based on sample debhelper rules file, written and released to the
+# Public Domain by Joey Hess.
+
+include /usr/share/quilt/quilt.make
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+#export CXX=g++-4.3
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS := -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+# I'm going to assume that this is still true - armagetron relies on
+# arithmetics with denormals.
+ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),alpha)
+	CFLAGS += -mieee
+endif
+
+# Special options to ./configure for client and server builds.
+SHARED_OPTS := --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc --disable-etc --datadir=/usr/share --disable-games --bindir=/usr/games --enable-binreloc CXXFLAGS="$(CFLAGS)" CFLAGS="$(CFLAGS)"
+SERVER_OPTS := --disable-glout --disable-useradd --disable-init
+CLIENT_OPTS := --enable-glout
+
+INSTALL_EXECUTABLE := install -m 0755 -o root -g root
+
+build: patch build-client build-server
+
+build-client: build-client-stamp
+build-client-stamp: configure-client
+	dh_testdir
+	$(MAKE) -C client 
+	touch $@
+
+configure-client: configure-client-stamp
+configure-client-stamp:
+	dh_testdir
+	mkdir client || true
+	cd client && ../configure $(SHARED_OPTS) $(CLIENT_OPTS)
+	touch $@
+
+build-server: build-server-stamp
+build-server-stamp: configure-server
+	dh_testdir
+	$(MAKE) -C server
+	touch $@
+
+configure-server: configure-server-stamp
+configure-server-stamp:
+	dh_testdir
+	mkdir server || true
+	cd server && ../configure $(SHARED_OPTS) $(SERVER_OPTS)
+	touch $@
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-client-stamp configure-client-stamp
+	rm -f build-server-stamp configure-server-stamp
+	rm -rf client server debian/tmp-client debian/tmp-server
+
+	[ ! -f Makefile ] || $(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+	cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+	cp -f /usr/share/misc/config.guess config.guess
+endif
+
+	dh_clean
+
+install: install-client install-dedicated install-common
+
+install-client: build-client-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs -parmagetronad
+
+	# Add here commands to install the arch part of the package into 
+	# debian/tmp-client.
+	$(MAKE) -C client DESTDIR=$(CURDIR)/debian/tmp-client install
+
+	# Fix weird stuff that can't be corrected in the upstream makefile.
+	test -d debian/tmp-client/usr/share/games || mkdir -p debian/tmp-client/usr/share/games
+	cp -r debian/tmp-client/usr/share/armagetronad debian/tmp-client/usr/share/games/armagetronad
+	cp -r debian/tmp-client/usr/games/armagetronad debian/tmp-client/usr/games/armagetronad.real
+
+install-common: build-client-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs -parmagetronad-common
+
+install-dedicated: build-server-stamp
+	# Commands here to install the server.
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs -parmagetronad-dedicated
+
+	$(MAKE) -C server DESTDIR=$(CURDIR)/debian/tmp-server install
+	mv debian/tmp-server/usr/games/armagetronad-dedicated debian/tmp-server/usr/games/armagetronad-dedicated.real
+
+binary-arch: armagetronad armagetronad-dedicated
+
+binary-indep: armagetronad-common armagetron armagetron-common armagetron-server
+
+armagetronad: DH_OPTIONS = -parmagetronad
+armagetronad: build install
+	dh_testdir
+	dh_testroot
+	$(INSTALL_EXECUTABLE) debian/armagetronad.wrapper debian/armagetronad/usr/games
+	mv debian/armagetronad/usr/games/armagetronad.wrapper debian/armagetronad/usr/games/armagetronad
+	dh_install -parmagetronad --sourcedir=debian/tmp-client
+	# Convert icon to xpm format.
+	convert debian/armagetronad/usr/share/pixmaps/armagetronad/icons/medium/armagetronad.png debian/armagetronad/usr/share/pixmaps/armagetronad.xpm
+	# Fix .desktop file.
+	sed 's/Path=\/usr\/bin/Path=\/usr\/games/' -i debian/armagetronad/usr/share/applications/armagetronad.desktop
+	sed 's/Icon=armagetronad.png/Icon=\/usr\/share\/pixmaps\/armagetronad\/icons\/large\/armagetronad.png/' -i debian/armagetronad/usr/share/applications/armagetronad.desktop
+	sed 's/Categories=Application\;Game\;ActionGame\;GameAction\;ActionGames\;GamesAction\;/Categories=Game\;ActionGame;/' -i debian/armagetronad/usr/share/applications/armagetronad.desktop
+	# Clean up cruft.
+	rm -rf debian/armagetronad/usr/share/games/armagetronad/desktop
+	dh_installchangelogs ChangeLog
+	dh_installdocs
+	dh_installmenu
+	dh_installman debian/armagetronad.6
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+armagetronad-common: DH_OPTIONS = -parmagetronad-common
+armagetronad-common: build install
+	dh_testdir
+	dh_testroot
+	dh_install -parmagetronad-common --sourcedir=debian/tmp-client
+	# There's no reason to ship this script.
+	rm debian/armagetronad-common/usr/share/games/armagetronad/language/update.py
+	dh_installchangelogs ChangeLog
+	dh_installdocs
+	dh_installmenu
+	dh_installman
+	rm debian/armagetronad-common/etc/armagetronad/rc.config
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+armagetronad-dedicated: DH_OPTIONS = -parmagetronad-dedicated
+armagetronad-dedicated: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs ChangeLog
+	$(INSTALL_EXECUTABLE) debian/armagetronad-dedicated.wrapper debian/armagetronad-dedicated/usr/games
+	mv debian/armagetronad-dedicated/usr/games/armagetronad-dedicated.wrapper debian/armagetronad-dedicated/usr/games/armagetronad-dedicated
+	dh_install --sourcedir=debian/tmp-server -parmagetronad-dedicated
+	dh_installdocs
+	dh_installmenu
+	dh_installman debian/armagetronad-dedicated.6
+	dh_installinit
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+dummy:
+	dh_testdir
+	dh_testroot
+	dh_installdirs
+	dh_installdocs
+	dh_installchangelogs
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+armagetron:
+	$(MAKE) -f debian/rules dummy DH_OPTIONS=-parmagetron
+
+armagetron-server:
+	$(MAKE) -f debian/rules dummy DH_OPTIONS=-parmagetron-server
+
+armagetron-common:
+	$(MAKE) -f debian/rules dummy DH_OPTIONS=-parmagetron-common
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch armagetronad armagetronad-dedicated armagetronad-common binary install install-common install-client install-dedicated dummy
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.default
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.default
@@ -0,0 +1,17 @@
+# 0 = don't start, 1 = start
+ARMAGETRONAD_SERVER_START=0
+# User to run as.
+ARMAGETRONAD_USER=armagetronad
+# Directories for variable data.
+VARDIR=/var/games/armagetronad
+# Directories for pid and log files.
+PIDDIR=/var/games/armagetronad
+LOGDIR=/var/log
+# pidfile names.
+NAME=armagetronad-dedicated
+STARTERPIDFILE=$PIDDIR/$NAME-starter.pid
+MAINPIDFILE=$PIDDIR/$NAME.pid
+# Logfile.
+LOGFILE=$LOGDIR/$NAME.log
+# Niceness level of the server.
+NICENESS="-5"
--- armagetronad-0.3.0.orig/debian/armagetronad.install
+++ armagetronad-0.3.0/debian/armagetronad.install
@@ -0,0 +1,6 @@
+usr/games/armagetronad.real usr/games/
+usr/share/games/armagetronad/desktop/icons usr/share/pixmaps/armagetronad
+usr/share/games/armagetronad/desktop/armagetronad.desktop usr/share/applications
+usr/share/games/armagetronad/models
+usr/share/games/armagetronad/sound
+usr/share/games/armagetronad/textures
--- armagetronad-0.3.0.orig/debian/watch
+++ armagetronad-0.3.0/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+http://sf.net/armagetronad/armagetronad-(.*)\.src\.tar\.gz
--- armagetronad-0.3.0.orig/debian/armagetron-server.links
+++ armagetronad-0.3.0/debian/armagetron-server.links
@@ -0,0 +1,2 @@
+usr/games/armagetronad-dedicated usr/games/armagetron-dedicated
+usr/share/man/man6/armagetronad-dedicated.6.gz usr/share/man/man6/armagetron-dedicated.6.gz
--- armagetronad-0.3.0.orig/debian/armagetronad-common.docs
+++ armagetronad-0.3.0/debian/armagetronad-common.docs
@@ -0,0 +1 @@
+debian/tmp-client/usr/share/doc/armagetronad/html
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.links
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.links
@@ -0,0 +1,2 @@
+usr/share/man/man6/armagetronad-dedicated.6 usr/share/man/man6/armagetronad-dedicated.real.6
+etc/armagetronad etc/armagetronad-dedicated
--- armagetronad-0.3.0.orig/debian/armagetron-common.postrm
+++ armagetronad-0.3.0/debian/armagetron-common.postrm
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ "$1" = "purge" ] ; then
+    # make sure that old conffiles from before this was a dummy package
+    # get removed too
+    OLD_CONFDIR=/etc/armagetron
+    if [ -d $OLD_CONFDIR ] ; then
+        rm -r $OLD_CONFDIR
+    fi
+fi
+
+#DEBHELPER#
--- armagetronad-0.3.0.orig/debian/README.Debian
+++ armagetronad-0.3.0/debian/README.Debian
@@ -0,0 +1,19 @@
+armagetron for Debian
+---------------------
+
+Armagetron is hosted at http://sourceforge.net/projects/armagetronad/
+
+There are several mailing lists available.  Subscription information and
+archives are available via http://sourceforge.net/mail/?group_id=6185.
+The available lists are:
+
+    armagetron-announce: new major releases are announced here.
+
+    armagetron-users: meetings, technical questions, etc.
+
+    armagetron-devel: helping with the development of the game.
+
+And, btw, ArmageTron *does* have online help (a rather cool one).  Just wait
+for a bit without changing the selected option.
+
+ -- Andreas Bombe <aeb@debian.org>, Wed Jun 25 22:31:05 2003
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.6
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.6
@@ -0,0 +1,67 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.TH ARMAGETRONAD-DEDICATED 6 "February 08, 2007"
+.SH NAME
+armagetronad-dedicated \- an Armagetron Advanced dedicated game server 
+.SH SYNOPSIS
+.B /etc/init.d/armagetronad-dedicated \{start|stop|restart|force-reload|status\}
+.PP
+\fBarmagetronad-dedicated\fP [\fB\-h, \-\-help\fP] [\fB\-v, \-\-version\fP] [\fB\-\-doc\fP] [\fB\-\-fastforward\fP] [\fB\-\-benchmark\fP] [\fB\-\-record\fP] [\fB\-\-playback\fP]
+.SH DESCRIPTION
+.PP
+The Armagetron Advanced dedicated server runs from an initscript --
+to enable running it on boot, edit \fB/etc/default/armagetronad-dedicated\fP.
+.PP
+The server program will read default settings from
+\fB/etc/armagetronad/settings_dedicated.cfg\fP. Modifications and custom
+server settings should be implemented in the file
+\fB/etc/armagetronad/settings_custom.cfg\fP.
+.PP
+To edit configuration on-the-fly or make time-sensitive temporary
+changes, it's best to log onto the server from the armagetronad
+client and log on as an administrator (using the password set in
+the server configuration). Console input is not available when
+running the server as a daemon.
+.PP
+Before each round is started, the file \fB/etc/armagetronad/everytime.cfg\fP
+is read; it may be useful to use this for things like randomly
+changing maps or other quickly changing settings.
+.SH OPTIONS
+Note: Only options that are relevant for invoking armagetron-dedicated
+via the command line (and not the initscript) are documented here. See
+\fBarmagetronad-dedicated --help\fP for a complete reference.
+.IP "\fB\-h, \-\-help\fP" 10
+Show help message.
+.IP "\fB\-v, \-\-version\fP" 10
+Print version number.
+.IP "\fB\-\-doc\fP" 10
+Print documentation for all console commands. These are also configuration
+settings for config files.
+.IP "\fB\-\-fastforward \fITIME\fR\fP" 10
+Lets time run very fast until the given time is reached.
+.IP "\fB\-\-benchmark\fP" 10
+Renders frames as they were recorded.
+.IP "\fB\-\-record \fIFILENAME\fP" 10
+Creates a DEBUG recording while running.
+.IP "\fB\-\-playback \fIFILENAME\fP" 10
+Plays back a DEBUG recording.
+.SH FILES
+.TP 3n
+\fI/etc/armagetronad/settings_dedicated.cfg\fP
+.SH SEE ALSO
+armagetronad(6)
+.PP
+Armagetron Advanced is documented fully by the provided HTML docs, found
+under /usr/share/doc/armagetronad-common/html/.
+.PP
+A thorough guide to running a server can be found on the Armagetron
+Advanced wiki:
+http:\/\/wiki.armagetronad.net\/index.php\/Server_Administration_Guide
+and:
+http:\/\/wiki.armagetronad.net\/index.php\/Advanced_Server_Administration_Guide
+.SH AUTHOR
+Armagetron Advanced was written by Manuel Moos <z-man@users.sourceforge.net>
+and the Armagetron Advanced development team.
+.PP
+This manual page was adapted from the original HTML version by Marcelo
+E. Magallon <mmagallo@debian.org> (and later Christine Spang <spang@mit.edu>),
+for the Debian GNU/Linux system (but may be used by others).
--- armagetronad-0.3.0.orig/debian/armagetronad-common.doc-base
+++ armagetronad-0.3.0/debian/armagetronad-common.doc-base
@@ -0,0 +1,9 @@
+Document: armagetronad
+Title: Armagetron Manual - A 3D Tron-like high speed game
+Author: Manuel Moss
+Abstract: Users manual for Armagetron, A 3D Tron-like high speed game.
+Section: Games/Arcade
+
+Format: HTML
+Index: /usr/share/doc/armagetronad-common/html/index.html
+Files: /usr/share/doc/armagetronad-common/html/*.html
--- armagetronad-0.3.0.orig/debian/changelog
+++ armagetronad-0.3.0/debian/changelog
@@ -0,0 +1,401 @@
+armagetronad (0.3.0-4) experimental; urgency=low
+
+  * Remove a few extraneous #includes from 00_gcc-4.3 patch.
+  * Make armagetron-common remove old conffiles on purge. (Closes: #454398)
+
+ -- Christine Spang <christine@debian.org>  Fri, 01 Feb 2008 12:58:01 -0500
+
+armagetronad (0.3.0-3) experimental; urgency=low
+
+  * Move homepage from package description to the Homepage: field.
+  * Make a few minor cleanups in debian/rules and added configure
+    targets.
+  * Bump to Standards-Version 3.7.3.
+  * Update patch 00_gcc-4.3 so that compiling with gcc 4.3 actually
+    works. (Closes: #454857)
+  * Fix formatting of debian NEWS file.
+
+ -- Christine Spang <christine@debian.org>  Sun, 27 Jan 2008 18:34:32 -0500
+
+armagetronad (0.3.0-2) experimental; urgency=low
+
+  * Really fix .desktop file and double-check with desktop-file-validate.
+    (Closes: #433372)
+
+ -- Christine Spang <christine@debian.org>  Tue, 09 Oct 2007 00:27:07 +0000
+
+armagetronad (0.3.0-1) experimental; urgency=low
+
+  * New upstream beta release.
+    - Refresh 00_gcc-4.3 patch.
+  * Build-Depend on ftgl-dev.
+  * Remove userconf upgrade-related code from armagetronad.wrapper;
+    upgrades from < 0.2 are no longer supported.
+  * Fix .desktop file's categories to comply with the Freedesktop.org
+    spec. (Closes: #433372)
+  * Make Debian menu file compliant with the new Debian menu structure. 
+
+ -- Christine Spang <christine@debian.org>  Wed, 08 Aug 2007 15:40:33 +0000
+
+armagetronad (0.2.8.2.1-5) unstable; urgency=low
+
+  * Added debian/watch.
+
+ -- Christine Spang <christine@debian.org>  Tue, 01 May 2007 16:04:25 -0400
+
+armagetronad (0.2.8.2.1-4) unstable; urgency=low
+
+  * Remove bashism in armagetronad-dedicated initscript. (Closes: #420715)
+  * Really fix the .desktop file's icon path. No, really. (Closes: #420730)
+  * Remove some cruft from debian/
+  * Build-Depend on quilt (>= 0.40). Thanks, lintian.
+
+ -- Christine Spang <christine@debian.org>  Tue, 24 Apr 2007 11:38:26 -0400
+
+armagetronad (0.2.8.2.1-3) unstable; urgency=low
+
+  * Set the armagetronad user's shell to /bin/false in the
+    armagetronad-dedicated package's postinst.
+  * Fix .desktop icon path.
+  * Fix /etc/armagetronad-dedicated symlink in armagetronad-dedicated.links
+    (Closes: #420453)
+  * Use quilt to manage patches.
+  * Incorporate patch to fix building with gcc 4.3, thanks to Martin
+    Michlmayr. (Closes: #417103)
+
+ -- Christine Spang <christine@debian.org>  Sun, 22 Apr 2007 15:28:54 -0400
+
+armagetronad (0.2.8.2.1-2) unstable; urgency=low
+
+  * Change my maintainer e-mail address.
+  * Upload to unstable.
+
+ -- Christine Spang <christine@debian.org>  Tue, 10 Apr 2007 11:25:58 -0400
+
+armagetronad (0.2.8.2.1-1) experimental; urgency=low
+
+  * New maintainer. (Closes: #402225)
+  * Acknowledge NMU. Thanks Petter! (Closes: #325110, #318998, #311736)
+  * Updated to Standards-Version 3.7.2.2.
+  * Fixed minor grammar mistake in manpage.
+  * armagetron.menu updates:
+    - made more readable
+    - properly update menus in armagetron.{postinst,postrm}
+    - added menu hints (Closes: #312905)
+  * New upstream version. (Closes: #325101)
+    - Fixes security bugs:
+        - CAN-2005-0371 (Closes: #296840)
+        - CVE-2006-3673 (Closes: #379062)
+        - CVE-2006-3674
+  * Updated dependencies.
+  * Remove now-unnecessary g++ 4.0 patch and remove dependency
+    on dpatch.
+  * Almost completely rewrite debian/rules since so many changes
+    have occurred since last release.
+    - Add {armagetron,armagetron-common,armagetron-server}.install
+      and use dh_install to install files into separate tmpdirs.
+    - Add armagetron-common.docs and use dh_installdocs.
+    - Use dh_link and add appropriate files.
+  * Clean up debian/copyright.
+  * Upstream has changed names. Renamed packages.
+  * Removed old armagetron.xpm in debian/ and instead use the shipped
+    medium PNG file for the Debian menu (converted to XPM during build).
+  * Added lsb-compliant initscript and default file for armagetronad-server.
+  * Removed cruft from pre/post-inst scripts.
+  * Improved package descriptions.
+  * Migrated old armagetron packages to dummy upgrade packages.
+  * Almost completely rewrote manpages for both armagetronad and
+    armagetronad-dedicated.
+  * Fix bug in server initscript so startup honours setting in
+    /etc/default/armagetronad-dedicated.
+  * Don't start the server if it's already running.
+
+ -- Christine Spang <spang@mit.edu>  Mon,  5 Mar 2007 10:25:44 -0500
+
+armagetron (0.2.7.0-1.1) unstable; urgency=low
+
+  * Non-maintainer upload with approval from the maintainer to move
+    this package to the new C++ ABI.
+  * Convert to use dpatch for use by the new patch, add build-depend
+    on dpatch.
+  * Fix C++ build problem. (Closes: #318998)
+  * Correct grammar in package description. (Closes: #311736)
+  * Add quotes to needs, section and icon field in the menu file to
+    avoid lintian/linda warning.
+  * Avoid multiline build-depend, move it all to one long line to
+    avoid lintian warning.
+  * Updated config.sub and config.guess to make sure it build on as
+    many platforms as possible.
+  * Correct the upstream URL in README.Debian to match the one in the
+    copyright file.
+
+ -- Petter Reinholdtsen <pere@debian.org>  Fri, 26 Aug 2005 08:55:46 +0200
+
+armagetron (0.2.7.0-1) unstable; urgency=high
+
+  * Apply security patch from upstream to fix out-of-bounds array access
+    (CAN-2005-0369) and DOS by empty UDP packets (CAN-2005-0370).
+    (closes: #295294)
+  * Acknowledge NMU. (closes: #263331)
+  * New upstream is Armagetron Advanced, change all references.
+    (closes: #275838)
+  * Fix contents of copyright file.  Also fix upgrade from 0.1 versions of the
+    package by moving the /usr/share/doc directories out of the way to allow
+    them to be replaced with symlinks.  (closes: #290051)
+  * Use absolute path in armagetron menu entry. (closes: #243538)
+  * Make the wrappers more robust with respect to directory creation.
+    (closes: #250070)
+
+ -- Andreas Bombe <aeb@debian.org>  Fri, 25 Feb 2005 01:48:20 +0100
+
+armagetron (0.2.5.2-3.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Urgency=high because it fixes an RC bug affecting sarge.
+  * Install the missing shell wrapper for armagetron-dedicated
+    (closes: #263331).
+
+ -- Steve Langasek <vorlon@debian.org>  Mon, 16 Aug 2004 12:28:25 -0700
+
+armagetron (0.2.5.2-3) unstable; urgency=low
+
+  * Compile with -mieee for Alpha to fix floating point exception
+    there. (closes: #97720)
+  * Add menu icon converted from textures/icon.png. (closes: #209047)
+  * Bump Standards-Version to 3.6.1 (no changes necessary).
+
+ -- Andreas Bombe <aeb@debian.org>  Mon,  9 Feb 2004 01:59:46 +0100
+
+armagetron (0.2.5.2-2) unstable; urgency=low
+
+  * src/network/net_udp.cpp: Change typedef NET_SIZE from size_t to proper
+    type socklen_t.  Fixes compilation error on 64 bit platforms.
+    (closes: #208484)
+
+ -- Andreas Bombe <aeb@debian.org>  Wed,  3 Sep 2003 15:04:51 +0200
+
+armagetron (0.2.5.2-1) unstable; urgency=low
+
+  * New upstream release. (closes: #205077)
+  * Give general description of the game in the common and dedicated
+    server package descriptions too. (closes: #202025)
+  * Fix all calculations where pointers were cast to int to use long int
+    instead, should hopefully fix 64 bit issues. (closes: #201638)
+  * Bump Standards-Version to 3.6.0 (no changes necessary).
+
+ -- Andreas Bombe <aeb@debian.org>  Wed,  3 Sep 2003 04:09:02 +0200
+
+armagetron (0.2.2-1) unstable; urgency=low
+
+  * New upstream release.  (And there I was wondering that nobody reported
+    "new version" wishlist bugs, but just wait a few days, and here it is;
+    closes: #199572)
+  * Upstream updated to current C++ standards, now compiles with the
+    current default compiler gcc 3.3. (closes: #196990)
+  * Fix the reported spelling error in the man pages as well as a few
+    others and change the web page link to the current address.
+    (closes:#194966)
+  * Default config is now in /etc/armagetron.
+  * Added new armagetron-common package to hold the configuration and
+    documentation files.
+  * Bump Standards-Version to 3.5.10 (no changes necessary).
+  * Do not repeat synopsis in long description of package and change
+    homepage link to DD Reference's recommended format.
+  * Remove --keep-going flags from recursive make invocations in
+    Makefile.in.
+  * Wrapper script uses new armagetron options to point it to its data
+    instead of symlink kludge and changing directories.
+  * Wrapper script creates ~/.armagetron directory for user if it doesn't
+    exist.
+  * Removed the obsolete example rc files.
+  * Changed build dependencies to seperate GL/GLU packages.
+  * Changed dedicated server binary name to armagetron-dedicated to be
+    consistent with upstream.
+
+ -- Andreas Bombe <aeb@debian.org>  Thu,  3 Jul 2003 03:51:38 +0200
+
+armagetron (0.1.4.9-9) unstable; urgency=low
+
+  * Fix null dereference in src/render/rScreen.cpp (thanks David Fries,
+    closes: #174870).
+  * Bump Debian Standards-Version to 3.5.8 (no changes neccessary).
+
+ -- Andreas Bombe <aeb@debian.org>  Wed,  8 Jan 2003 01:15:07 +0100
+
+armagetron (0.1.4.9-8) unstable; urgency=low
+
+  * New maintainer. (closes: #158975)
+  * Installing files explicitly to get rid of unwanted files (like
+    .cvsignore, closes: #159962).
+  * Wrapper script now execs armagetron instead of running it as a child.
+  * Moved real armagetron from /usr/lib/armagetron/armagetron to
+    /usr/games/armagetron.real.
+  * Moved armagetron-server from /usr/lib/armagetron/armagetron-server to
+    /usr/games/.
+  * Added missing build dependency on libsdl1.2-dev (this was usually
+    pulled in by libsdl-image1.2-dev and therefore unnoticed).
+  * Bump Standards-Version to 3.5.7.0.
+  * Setting debhelper compatibility level to 4, removing dh_testversion
+    call, changing dh_installmanpages to dh_installman.
+  * Honor $DEB_BUILD_OPTIONS in debian/rules.
+  * Make armagetron-server description less ambiguous.
+
+ -- Andreas Bombe <aeb@debian.org>  Fri, 20 Sep 2002 05:22:50 +0200
+
+armagetron (0.1.4.9-7) unstable; urgency=low
+
+  * debian/control: update URL in description
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Sat, 31 Aug 2002 11:49:40 +0200
+
+armagetron (0.1.4.9-6) unstable; urgency=low
+
+  * debian/copyright: update URL (thanks Leonardo) (closes: bug#157978)
+  * src/tron/gGame.cpp: typo (thanks Stephen Williams, sorry about the
+    delay, I can't remember why I didn't apply this right away) (closes:
+    bug#130164)
+  * debian/control: weee! dependency ping-pong! libpng2... no, libpng3...
+    no, libpng2... actually, remove Build-Conflicts, -4 should have taken
+    care of this.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Sat, 31 Aug 2002 10:06:05 +0200
+
+armagetron (0.1.4.9-5) unstable; urgency=low
+
+  * debian/rules: post-operative fixes on the Makefile to remove -lpng and -lz
+    from the link line.  Prevents future breakage.
+  * debian/control: bump dependency on libsdl-image1.2-dev to 1.2.2-1.
+    Build-Depend on xlibmesa-dev | libgl1-dev
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Mon, 22 Jul 2002 08:29:36 +0200
+
+armagetron (0.1.4.9-4) unstable; urgency=low
+
+  * recompile with current libsdl-image1.2-dev (someone's got a rather
+    creative approach to team coordination)
+  * debian/control: Build-Conflicts libpng2-dev.  libsdl-image1.2-dev is
+    fubar.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Sun, 21 Jul 2002 00:57:07 +0200
+
+armagetron (0.1.4.9-3) unstable; urgency=low
+
+  * Acknowledge NMU from Martin (thanks!) (closes: bug#132051, bug#123131)
+  * debian/rules: remove .cvsignore files (closes: bug#124164)
+  * debian/contro: fix typo (closes: bug#124418)
+  * Fixed typos (thanks Stephen Williams)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Sun,  3 Feb 2002 17:29:40 +0100
+
+armagetron (0.1.4.9-2.1) unstable; urgency=low
+
+  * NMU
+  * Applied patch from Jamie Wilkinson to fix build errors on
+    alpha (Closes: #123131).
+
+ -- Martin Michlmayr <tbm@cyrius.com>  Sun, 03 Feb 2002 14:06:47 +0100
+
+armagetron (0.1.4.9-2) unstable; urgency=low
+
+  * configure: s/==/=/, won't build correctly if /bin/sh is ash 
+    (closes: bug#121709)
+  * src/network/net_udp.cpp: use socklen_t insatead of size_t (closes:
+    bug#121829)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Sat,  8 Dec 2001 17:43:52 +0100
+
+armagetron (0.1.4.9-1) unstable; urgency=low
+
+  * New upstream version.
+  * Tweaked Michael's patch a bit to get it to apply to the current sources.
+    (closes: bug#115209)
+  * Rebuild with current SDL.
+  * src/tools/memmanager.h: new operator takes size_t as first argument,
+    not unsigned int. (thanks Robert) (closes: bug#85968, bug#112660,
+    bug#114036)
+  * Build-depend on newest libsdl-image1.2-dev to pick up correct
+    libsdl-image1.2 dependency. (closes: bug#115523)
+  * HTML files shipped as HTML. (closes: bug#104016)
+  * debian/control: add b-dep on autotools-dev
+  * debian/rules: use config.guess and config.sub from autotools-dev
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Sun, 11 Nov 2001 18:38:10 +0100
+
+armagetron (0.1.4.3-5) unstable; urgency=low
+
+  * debian/control: play arround with build dependencies.  Use SDL 1.2.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Thu,  7 Jun 2001 20:56:09 +0200
+
+armagetron (0.1.4.3-4) unstable; urgency=low
+
+  * ARGH! Forgot to include the proper replaces in debian/control because
+    of the fix for #84373
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Sat,  3 Feb 2001 23:02:07 +0100
+
+armagetron (0.1.4.3-3) unstable; urgency=low
+
+  * debian/rules: get dh_installmanpages syntax right (closes: bug#84373)
+  * *sigh*, more size_t bugs (thanks Paul) (closes: bug#84358)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Thu,  1 Feb 2001 21:22:59 +0100
+
+armagetron (0.1.4.3-2) unstable; urgency=low
+
+  * src/network/net_udp.cpp: s/size_t/socklen_t/ (closes: bug#84012)
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Mon, 29 Jan 2001 21:41:29 +0100
+
+armagetron (0.1.4.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/rules: use src/tron/armagetron instead of src/armagetron for
+    the binary.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Wed, 24 Jan 2001 01:24:55 +0100
+
+armagetron (0.1.3.20000730-4) unstable; urgency=low
+
+  * Recompiled with new libsdl-image1.1 (did I forget to upload the last
+    one?) (closes: bug#79564)
+  * Fixed extra space in doc-help section
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Wed, 18 Oct 2000 23:10:20 +0200
+
+armagetron (0.1.3.20000730-3) unstable; urgency=low
+
+  * Recompiled with new libsdl-image1.1 from CTS
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Wed, 18 Oct 2000 23:10:20 +0200
+
+armagetron (0.1.3.20000730-2) unstable; urgency=low
+
+  * The great blooper fixup.
+  * Recompiled with new libsdl-image1.1 (thanks cts!) (closes: bug#75069)
+  * Hmmm... libsdl-image1.1 removed the inversion of alpha.  Remove here
+    likewise.
+  * src/textures.cpp: accept 8 bpp images (GL_LUMINANCE)
+  * Oops.  Armagetron's server manpage is not there.  Make one. (closes:
+    bug#74505)
+  * debian/rules: add armagetron-server.6 manpage.
+  * debian/rules: Moved data files to /usr/share/games/armagetron/ (closes:
+    bug#74517)
+  * debian/menu: zap /usr/bin (closes: bug#74576)
+  * debian/armagetron.6: added link to website.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Wed, 18 Oct 2000 23:10:20 +0200
+
+armagetron (0.1.3.20000730-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Tue,  3 Oct 2000 09:43:25 +0200
+
+armagetron (0.1.3-0) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Marcelo E. Magallon <mmagallo@debian.org>  Sun, 30 Jul 2000 21:46:08 +0200
+
+
--- armagetronad-0.3.0.orig/debian/armagetronad.dirs
+++ armagetronad-0.3.0/debian/armagetronad.dirs
@@ -0,0 +1,4 @@
+usr/share/pixmaps/armagetronad
+usr/share/games
+usr/share/applications
+usr/games
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.postinst
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.postinst
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+# Create armagetronad user if it isn't already there.
+if [ ! `getent passwd armagetronad` > /dev/null ]; then
+    echo "Adding armagetronad system user..."
+    adduser --system --quiet --disabled-password --shell /bin/false --home /var/games/armagetronad --ingroup games armagetronad
+fi
+
+#DEBHELPER#
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.init
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.init
@@ -0,0 +1,93 @@
+#! /bin/sh
+#
+# start/stop armagatronad dedicated server.
+
+### BEGIN INIT INFO
+# Provides:          armagetronad-server
+# Required-Start:    $local_fs $network
+# Required-Stop:     $local_fs $network
+# Should-Start:
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Armagetron Advanced dedicated server
+# Description:       Runs the Armagetron Advanced dedicated game
+#                    server.
+### END INIT INFO
+
+# Author: Christine Spang <spang@mit.edu>
+
+NAME=armagetronad-dedicated
+
+ARMAGETRONAD_SERVER_START=1
+
+# Include armagetronad configuration variables if present.
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+PATH=/usr/games:/usr/bin:/usr/sbin:/sbin:/bin
+
+DAEMON="/usr/games/$NAME"
+DESC="Armagetron Advanced dedicated server"
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package has been removed.
+[ -x "$DAEMON" ] || exit 0
+
+# Load the VERBOSE setting and other rcS variables.
+. /lib/init/vars.sh
+
+# Define LSB functions.
+. /lib/lsb/init-functions
+
+# Don't start if /etc/default/armagetronad-server says not to.
+if [ "$ARMAGETRONAD_SERVER_START" != "1" -a "$1" != "stop" ]; then
+    echo "Not starting $DESC $NAME, disabled via /etc/default/$NAME"
+    exit 0
+fi
+
+run()
+{
+    /sbin/start-stop-daemon --start --quiet --chuid $ARMAGETRONAD_USER --oknodo --pidfile $STARTERPIDFILE --nicelevel $NICENESS --exec $DAEMON >$LOGFILE &
+}
+
+case "$1" in
+  start)
+    if [ -r $MAINPIDFILE ]; then
+        log_warning_msg "$DESC is already running; not starting."
+    else
+	    log_daemon_msg "Starting $DESC" "$NAME"
+        run
+        log_end_msg $?
+    fi
+	;;
+  stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+    # Kill both the starter keepalive script and server.
+    /sbin/start-stop-daemon --stop --pidfile $STARTERPIDFILE --quiet --oknodo $DAEMON
+    /sbin/start-stop-daemon --stop --pidfile $MAINPIDFILE --quiet --oknodo $DAEMON.real
+	log_end_msg $?
+    rm -f $STARTERPIDFILE $MAINPIDFILE
+	;;
+  restart|force-reload)
+    $0 stop
+    $0 start
+	;;
+  reload)
+    exit 3
+    ;;
+  status)
+    [ -e $MAINPIDFILE ]
+    status=$?
+    if [ $status -eq 0 ]; then
+        log_success_msg "$DESC is running."
+    else
+        log_failure_msg "$DESC is not running."
+    fi
+    exit $status
+    ;;
+  *)
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
--- armagetronad-0.3.0.orig/debian/NEWS
+++ armagetronad-0.3.0/debian/NEWS
@@ -0,0 +1,11 @@
+armagetronad (0.2.8.2.1-1) unstable; urgency=low
+
+  * Incompatible Changes in 0.2.8.2.1
+    - This latest version of Armagetron Advanced doesn't support migrating
+      user-specific configuration (from $HOME/.armagetron). New config files
+      are found in $HOME/.armagetronad; changes like controls and video
+      card settings must be done again.
+    - Also, the old armagetron packages have been converted to dummy
+      packages for upgrade purposes.
+
+ -- Christine Spang <spang@mit.edu>  Sun, 04 Feb 2007 15:41:14 -0500
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.dirs
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.dirs
@@ -0,0 +1,2 @@
+usr/games
+etc
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.wrapper
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.wrapper
@@ -0,0 +1,60 @@
+#!/bin/bash -e
+
+REALTRON=/usr/games/armagetronad-dedicated.real
+
+DATADIR=/usr/share/games/armagetronad
+CONFDIR=/etc/armagetronad
+
+CMDLINE="--datadir $DATADIR --configdir $CONFDIR -d"
+
+# Source configuration variables.
+. /etc/default/armagetronad-dedicated
+
+# Array for keeping track of start times.
+declare -a STARTDATE_LOG
+
+
+function run()
+{
+    exec $REALTRON $CMDLINE $* &
+    echo `jobs -p` > $MAINPIDFILE
+    wait
+    echo Terminated
+}
+
+function run_continuous()
+{
+  echo $$ > $STARTERPIDFILE
+  while true; do
+    STARTDATE=`date +%s`
+    run
+
+    # Give up if restarts come too quickly; ten per minute is suspicious.
+    OLDESTART=${STARTDATE_LOG[1]}
+    if [ ! -z "$OLDESTSTART" ]; then
+        TIMESPENT=$(($STARTDATE - $OLDESTSTART))
+        if [ ${TIMESPENT} -lt 60]; then
+            echo "Stopping server, it is restarting too quickly."
+            rm -f $STARTERPIDFILE
+            rm -f $MAINPIDFILE
+            exit
+        fi
+    fi
+
+    # Keep log of past start dates.
+    for f in 1 2 3 4 5 6 7 8 9; do
+        next=$(( $f + 1))
+        STARDATE_LOG[$f]=${STARTDATE_LOG[$next]}
+    done
+    STARTDATE_LOG[10]=${STARTDATE}
+  done
+}
+
+# Still allow other arguments to be executed, e.g. --doc
+if [ "$1" != "" ]; then
+    exec $REALTRON $CMDLINE $1 $2 $3
+    exit 0
+fi
+
+# Run and keep-alive in case of crashes.
+run_continuous
--- armagetronad-0.3.0.orig/debian/armagetron.links
+++ armagetronad-0.3.0/debian/armagetron.links
@@ -0,0 +1,2 @@
+usr/games/armagetronad usr/games/armagetron
+usr/share/man/man6/armagetronad.6.gz usr/share/man/man6/armagetron.6.gz
--- armagetronad-0.3.0.orig/debian/armagetronad.menu
+++ armagetronad-0.3.0/debian/armagetronad.menu
@@ -0,0 +1,7 @@
+?package(armagetronad):\
+        needs="X11"\
+        section="Games/Action"\
+        title="Armagetron Advanced"\
+        command="/usr/games/armagetronad"\
+        icon="/usr/share/pixmaps/armagetronad.xpm"\
+        hints="3D,Racing,Multiplayer,Tron"
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.install
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.install
@@ -0,0 +1 @@
+usr/games/armagetronad-dedicated.real
--- armagetronad-0.3.0.orig/debian/armagetronad.links
+++ armagetronad-0.3.0/debian/armagetronad.links
@@ -0,0 +1 @@
+usr/share/man/man6/armagetronad.6 usr/share/man/man6/armagetronad.real.6
--- armagetronad-0.3.0.orig/debian/armagetronad-common.install
+++ armagetronad-0.3.0/debian/armagetronad-common.install
@@ -0,0 +1,3 @@
+usr/share/games/armagetronad/language
+usr/share/games/armagetronad/resource
+etc
--- armagetronad-0.3.0.orig/debian/armagetronad.6
+++ armagetronad-0.3.0/debian/armagetronad.6
@@ -0,0 +1,56 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.TH ARMAGETRONAD 6 "February 07, 2007"
+.SH NAME
+armagetronad \- a 3D Tron-like high speed game
+.SH SYNOPSIS
+\fBarmagetronad\fP [\fB\-h, \-\-help\fP] [\fB\-v, \-\-version\fP] [\fB\-\-doc\fP] [\fB\-f, \-\-fullscreen\fP] [\fB\-w, \-\-window, \-\-windowed\fP] [\fB\-\-fastforward\fP] [\fB\-\-benchmark\fP] [\fB\-\-record\fP] [\fB\-\-playback\fP]
+.SH DESCRIPTION
+The rules are simple: you ride a lightcycle (a kind of motorbike that
+can only turn 90 degrees at a time, leaves a wall behind and cannot be
+stopped). Avoid running into a wall. Make your opponent run into a
+wall.  This idea comes from the 1982 Disney movie "Tron".
+.PP
+One thing is different than in other Tron clones: you can accelerate.
+However, there is a catch. The only way to accelerate is to drive close
+to player walls. This allows for some interesting tactics. Every time you
+make a turn, you lose 5% of your speed -- so don't be too nervous, speed
+is your only resource against other players!
+.PP
+First thing you shold do is go into the "Player Menu" to set your name and
+your keyboard and mouse configuration. Then, go into the "Game Menu" and
+start a single player game against one AI opponent (the game mode does
+not really matter here). Then, get some friends together and try the
+multiplayer modes!
+.PP
+\fBSHIFT-ESC\fP is the "boss key" and quits Armagetron as fast as
+possible.
+.SH OPTIONS
+.IP "\fB\-h, \-\-help\fP" 10
+Show help message.
+.IP "\fB\-v, \-\-version\fP" 10
+Print version number.
+.IP "\fB\-\-doc\fP" 10
+Print documentation for all console commands. These are also configuration
+settings for config files.
+.IP "\fB\-f \-\-fullscreen\fP" 10
+Start in fullscreen mode.
+.IP "\fB\-w \-\-window, \-\-windowed\fP" 10
+Start in windowed mode.
+.IP "\fB\-\-fastforward \fITIME\fR\fP" 10
+Lets time run very fast until the given time is reached.
+.IP "\fB\-\-benchmark\fP" 10
+Renders frames as they were recorded.
+.IP "\fB\-\-record \fIFILENAME\fP" 10
+Creates a DEBUG recording while running.
+.IP "\fB\-\-playback \fIFILENAME\fP" 10
+Plays back a DEBUG recording.
+.SH SEE ALSO
+Armagetron Advanced is documented fully by the provided HTML docs, found under
+/usr/share/doc/armagetronad-common/html/.
+.SH AUTHOR
+Armagetron Advanced was written by Manuel Moos <z-man@users.sourceforge.net>
+and the Armagetron Advanced development team.
+.P
+This manual page was adapted from the original HTML version by Marcelo
+E. Magallon <mmagallo@debian.org>, (and later Christine Spang
+<spang@mit.edu>) for the Debian GNU/Linux system (but may be used by others).
--- armagetronad-0.3.0.orig/debian/armagetronad-dedicated.prerm
+++ armagetronad-0.3.0/debian/armagetronad-dedicated.prerm
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+if [ $1 = "purge" ]; then
+    if [ `getent passwd armagetronad` > /dev/null ]; then
+        echo "Removing armagetronad system user..."
+        deluser --quiet armagetronad
+        rm -rf /var/games/armagetronad
+    fi
+fi
+
+#DEBHELPER#
--- armagetronad-0.3.0.orig/debian/patches/series
+++ armagetronad-0.3.0/debian/patches/series
@@ -0,0 +1 @@
+00_gcc-4.3
--- armagetronad-0.3.0.orig/debian/patches/00_gcc-4.3
+++ armagetronad-0.3.0/debian/patches/00_gcc-4.3
@@ -0,0 +1,315 @@
+Index: armagetronad-0.3.0/src/tools/tError.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tError.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tError.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -26,6 +26,7 @@
+ */
+ 
+ #include "config.h"
++#include <cstdlib>
+ #include <iostream>
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+Index: armagetronad-0.3.0/src/tools/tRandom.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tRandom.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tRandom.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -34,6 +34,8 @@
+ #include    <stdlib.h>
+ #endif
+ 
++#include <cstdlib>
++
+ #include    "tError.h"
+ #include    "tRecorder.h"
+ 
+Index: armagetronad-0.3.0/src/tron/gAIBase.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tron/gAIBase.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/tron/gAIBase.cpp	2008-01-28 10:00:05.000000000 -0500
+@@ -43,6 +43,7 @@
+ #include "tRandom.h"
+ #include "tRecorder.h"
+ #include <stdlib.h>
++#include <memory>
+ 
+ #define AI_REACTION          0 
+ #define AI_EMERGENCY         1 
+Index: armagetronad-0.3.0/src/tron/gCycle.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tron/gCycle.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/tron/gCycle.cpp	2008-01-28 09:59:51.000000000 -0500
+@@ -55,6 +55,8 @@
+ #include "tMath.h"
+ #include <stdlib.h>
+ #include <fstream>
++#include <memory>
++#include <cstdlib>
+ 
+ #ifndef DEDICATED
+ #define DONTDOIT
+Index: armagetronad-0.3.0/src/thirdparty/particles/pVec.h
+===================================================================
+--- armagetronad-0.3.0.orig/src/thirdparty/particles/pVec.h	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/thirdparty/particles/pVec.h	2008-01-28 09:59:13.000000000 -0500
+@@ -19,6 +19,7 @@
+ #endif
+ 
+ #ifdef unix
++#include <cstdlib>
+ #define pRandf() drand48()
+ #define pSRandf(x) srand48(x)
+ #else
+Index: armagetronad-0.3.0/src/thirdparty/particles/ParticleDLL/actions.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/thirdparty/particles/ParticleDLL/actions.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/thirdparty/particles/ParticleDLL/actions.cpp	2008-01-28 10:01:16.000000000 -0500
+@@ -13,6 +13,7 @@
+ #include <algorithm>
+ // For dumping errors
+ #include <sstream>
++#include <typeinfo>
+ 
+ // Compute the inverse matrix of the plane basis.
+ static inline void NewBasis(const pVec &u, const pVec &v, pVec &s1, pVec &s2)
+Index: armagetronad-0.3.0/src/thirdparty/particles/ParticleDLL/ParticleState.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/thirdparty/particles/ParticleDLL/ParticleState.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/thirdparty/particles/ParticleDLL/ParticleState.cpp	2008-01-28 10:01:53.000000000 -0500
+@@ -15,6 +15,7 @@
+ #include "papi.h"
+ 
+ #include <iostream>
++#include <typeinfo>
+ 
+ // This is global just as a cheezy way to change dt for all actions easily.
+ float PActionBase::dt;
+Index: armagetronad-0.3.0/src/network/nNetObject.h
+===================================================================
+--- armagetronad-0.3.0.orig/src/network/nNetObject.h	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/network/nNetObject.h	2008-01-28 10:03:24.000000000 -0500
+@@ -28,6 +28,8 @@
+ #ifndef ArmageTron_NETOBJECT_H
+ #define ArmageTron_NETOBJECT_H
+ 
++#include <cstring>
++
+ #include "nNetwork.h"
+ #include "tArray.h"
+ #include "tConsole.h"
+Index: armagetronad-0.3.0/src/render/rModel.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/render/rModel.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/render/rModel.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -29,6 +29,7 @@
+ #include <string>
+ #include <fstream>
+ #include <stdlib.h>
++#include <cstring>
+ #include "rScreen.h"
+ #include "tString.h"
+ #include "tDirectories.h"
+Index: armagetronad-0.3.0/src/tools/tXmlParser.h
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tXmlParser.h	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tXmlParser.h	2008-01-28 09:59:13.000000000 -0500
+@@ -40,6 +40,7 @@
+ #include "tConsole.h"
+ 
+ #include <map>
++#include <typeinfo>
+ 
+ namespace tXmlParserNamespace {
+ 
+Index: armagetronad-0.3.0/src/network/md5.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/network/md5.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/network/md5.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -78,6 +78,7 @@
+ 
+ #include <string>
+ #include <memory>
++#include <cstring>
+ 
+ #ifdef TEST
+ /*
+Index: armagetronad-0.3.0/src/network/nKrawall.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/network/nKrawall.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/network/nKrawall.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -44,6 +44,7 @@
+ 
+ #include <stdlib.h>
+ #include <string>
++#include <cstring>
+ 
+ bool nKrawall::MayRequirePassword(tString& adress, unsigned int port)
+ {
+Index: armagetronad-0.3.0/src/network/nNetwork.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/network/nNetwork.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/network/nNetwork.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -39,6 +39,7 @@
+ #include "tRandom.h"
+ #include <stdlib.h>
+ #include <fstream>
++#include <cstring>
+ #include "tMath.h"
+ 
+ #ifndef WIN32
+Index: armagetronad-0.3.0/src/network/nSocket.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/network/nSocket.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/network/nSocket.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -40,6 +40,7 @@
+ 
+ #include <string>
+ #include <stdio.h>
++#include <cstring>
+ 
+ #include <sys/types.h>
+ 
+Index: armagetronad-0.3.0/src/tools/tArray.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tArray.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tArray.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -32,6 +32,7 @@
+ #include <iostream>
+ #include <stdlib.h>
+ #include <string>
++#include <cstring>
+ #include "tArray.h"
+ 
+ void GrowingArrayBase::ComplainIfFull(){
+Index: armagetronad-0.3.0/src/tools/tConfiguration.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tConfiguration.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tConfiguration.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -33,6 +33,7 @@
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <string>
++#include <cstring>
+ #include <sstream>
+ #include "tString.h"
+ #include "tToDo.h"
+Index: armagetronad-0.3.0/src/tools/tCrypt.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tCrypt.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tCrypt.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -29,6 +29,7 @@
+ #include "tMemManager.h"
+ 
+ #include <string>
++#include <cstring>
+ 
+ class tCryptDummy: public tCrypt
+ {
+Index: armagetronad-0.3.0/src/tools/tDirectories.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tDirectories.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tDirectories.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -32,6 +32,7 @@
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <cstring>
+ 
+ #include "tLocale.h"
+ #include "tDirectories.h"
+Index: armagetronad-0.3.0/src/tools/tLocale.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tLocale.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tLocale.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -34,6 +34,7 @@
+ #include <fstream>
+ #include <string>
+ #include <map>
++#include <cstring>
+ 
+ class tLocaleSubItem; // identifies a single string in a single language
+ 
+Index: armagetronad-0.3.0/src/tools/tString.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tString.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tString.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -33,6 +33,7 @@
+ #include <ctype.h>
+ #include <string>
+ #include <iostream>
++#include <cstring>
+ 
+ // *******************************************************************************
+ // *
+Index: armagetronad-0.3.0/src/tools/tCommandLine.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tCommandLine.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tCommandLine.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -34,6 +34,7 @@
+ #include    "tLocale.h"
+ #include    "tConfiguration.h"
+ #include    "tException.h"
++#include    <cstring>
+ 
+ #ifdef WIN32
+ #include    <windows.h>
+Index: armagetronad-0.3.0/src/tools/tXmlParser.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tXmlParser.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tXmlParser.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -31,6 +31,7 @@
+ #include "tDirectories.h"
+ #include "tConsole.h"
+ #include "tArray.h"
++#include <cstring>
+ 
+ #ifdef WIN32
+ #define vsnprintf _vsnprintf
+Index: armagetronad-0.3.0/src/render/rScreen.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/render/rScreen.cpp	2008-01-28 09:55:45.000000000 -0500
++++ armagetronad-0.3.0/src/render/rScreen.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -30,6 +30,7 @@
+ #include "defs.h"
+ 
+ #include <string>
++#include <cstring>
+ #include "rTexture.h"
+ #include "rScreen.h"
+ #include "rSysdep.h"
+Index: armagetronad-0.3.0/src/tools/tMemManager.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/tools/tMemManager.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/tools/tMemManager.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -33,6 +33,7 @@
+ #include <iostream>
+ #include <sstream>
+ #include <stdio.h>  // need basic C IO since STL IO does memory management
++#include <cstring>
+ #include "tMemManager.h"
+ #include "tError.h"
+ 
+Index: armagetronad-0.3.0/src/ui/uInput.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/ui/uInput.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/ui/uInput.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -26,6 +26,7 @@
+ */
+ 
+ #include <stdarg.h>
++#include <cstring>
+ #include "uInput.h"
+ #include "tMemManager.h"
+ #include "rScreen.h"
+Index: armagetronad-0.3.0/src/ui/uInputQueue.cpp
+===================================================================
+--- armagetronad-0.3.0.orig/src/ui/uInputQueue.cpp	2008-01-28 09:55:44.000000000 -0500
++++ armagetronad-0.3.0/src/ui/uInputQueue.cpp	2008-01-28 09:59:13.000000000 -0500
+@@ -29,6 +29,7 @@
+ #include "rScreen.h"
+ #include "tConfiguration.h"
+ #include <iostream>
++#include <cstring>
+ 
+ #ifndef DEDICATED
+ #include "rSDL.h"
--- armagetronad-0.3.0.orig/debian/armagetron.dirs
+++ armagetronad-0.3.0/debian/armagetron.dirs
@@ -0,0 +1,2 @@
+usr/games
+usr/share/man/man6
--- armagetronad-0.3.0.orig/debian/armagetron-server.dirs
+++ armagetronad-0.3.0/debian/armagetron-server.dirs
@@ -0,0 +1,2 @@
+usr/games
+usr/share/man/man6
--- armagetronad-0.3.0.orig/debian/copyright
+++ armagetronad-0.3.0/debian/copyright
@@ -0,0 +1,22 @@
+This package was debianized by Marcelo E. Magallon <mmagallo@debian.org> on
+Sun, 30 Jul 2000 21:46:08 +0200.
+
+It was downloaded from http://sourceforge.net/projects/armagetronad/.
+
+Upstream Author: Manual Moos <z-man@users.sourceforge.net> and the
+Armagetron Advanced development team.
+
+Copyright: (C) 2000-2007, Manual Moos and the Armagetron Advanced
+development team.
+
+License:
+
+This software is distributed under the GNU General Public License, version
+2 or later. On Debian GNU/Linux systems, the complete text of the GNU
+GPL can be found in `/usr/share/common-licenses/GPL'.
+
+
+The Debian packaging is (C) 2000, Marcelo E. Magallon <mmagallo@debian.org>,
+(C) 2002 Andreas Bombe <aeb@debian.org>, (C) 2007 Christine Spang
+<spang@mit.edu>. It is licensed under the GPL, see
+`/usr/share/common-licenses/GPL'.
--- armagetronad-0.3.0.orig/debian/armagetronad-common.dirs
+++ armagetronad-0.3.0/debian/armagetronad-common.dirs
@@ -0,0 +1,3 @@
+etc
+usr/share/doc
+usr/share/games/armagetronad/language
--- armagetronad-0.3.0.orig/debian/armagetronad.wrapper
+++ armagetronad-0.3.0/debian/armagetronad.wrapper
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+REALTRON=/usr/games/armagetronad.real
+
+DATADIR=/usr/share/games/armagetronad
+CONFDIR=/etc/armagetronad
+USERCONFDIR=$HOME/.armagetronad
+USERDATADIR=$USERCONFDIR/data
+VARDIR=$USERCONFDIR/var
+
+CMDLINE="--datadir $DATADIR --configdir $CONFDIR --userconfigdir $USERCONFDIR --vardir $VARDIR"
+if [ -d $USERDATADIR ]; then
+    CMDLINE="$CMDLINE --userdatadir $USERDATADIR"
+fi
+
+exec $REALTRON $CMDLINE "$@"
--- armagetronad-0.3.0.orig/debian/compat
+++ armagetronad-0.3.0/debian/compat
@@ -0,0 +1 @@
+5
--- armagetronad-0.3.0.orig/debian/control
+++ armagetronad-0.3.0/debian/control
@@ -0,0 +1,80 @@
+Source: armagetronad
+Section: games
+Priority: optional
+Maintainer: Christine Spang <christine@debian.org>
+Standards-Version: 3.7.3
+Build-Depends: quilt (>= 0.40), debhelper (>= 5), imagemagick, pkg-config, ftgl-dev, libgl1-mesa-dev, libglu1-mesa-dev, libsdl-image1.2-dev (>= 1.2.2), libsdl1.2-dev (>= 1.2.2), libsdl-mixer1.2-dev, autotools-dev, libpng12-dev, zlib1g-dev, libxml2-dev
+Homepage: http://armagetronad.sourceforge.net/
+
+Package: armagetronad-common
+Replaces: armagetron-common
+Recommends: armagetronad | armagetronad-dedicated
+Architecture: all
+Description: Common files for the Armagetron Advanced packages
+ Armagetron Advanced is a 3D game based on the light cycle racing in the 80s-
+ era movie "Tron".
+ .
+ You have to control a light cycle that can only turn in steps of 90 degrees,
+ leaves a solid wall behind and can not be stopped.  The aim is to survive the
+ longest of all players by not crashing into any walls.
+ .
+ This package contains the common configuration files and documentation shared
+ between the armagetronad and armagetronad-server packages.
+
+Package: armagetronad
+Architecture: any
+Depends: armagetronad-common (= ${source:Version}), ${shlibs:Depends}
+Replaces: armagetron
+Description: 3D Tron-like high speed game
+ The rules are simple: you ride a light cycle (a kind of motorbike that can only
+ turn 90 degrees at a time, leaves a wall behind and cannot be stopped) and have
+ to avoid running into walls while at the same time you have to try to get your
+ opponent to run into them.
+ .
+ The idea is based on the Disney movie from 1982 called "Tron".  If you ever
+ wanted to take a try at one of those speed demons features in the movie, this
+ is your chance.
+ .
+ Armagetron Advanced can be played against AI opponents, against other humans
+ over the network, or a mixture of both.
+ .
+ This is a BETA release provided for users who would like to use the
+ bleeding edge branch. It's preferred that bugs be reported upstream.
+
+Package: armagetronad-dedicated
+Architecture: any
+Depends: armagetronad-common (= ${source:Version}), adduser, bash (>= 3), ${shlibs:Depends}, lsb-base (>= 3.0-6)
+Replaces: armagetron-server
+Description: dedicated game server for Armagetron Advanced
+ Armagetron Advanced is a 3D game based on the light cycle racing in the movie
+ "Tron". You have to control a light cycle that can only turn in steps of 90
+ degrees, leaves a solid wall behind and can not be stopped.  The aim is to
+ survive the longest of all players by not crashing into any walls.
+ .
+ This version of Armagetron Advanced can only be used as a network game server.
+ It does not have graphical output and can be controlled via the text console.
+ .
+ The normal Armagetron Advanced used for playing is also capable to serve games,
+ but will require X to display its graphics, will provide a player and is
+ therefore unsuited for permanent game servers.
+
+Package: armagetron
+Architecture: all
+Depends: armagetronad
+Description: Dummy upgrade package for Armagetron
+ This is a transitional package and can safely be removed; see the
+ armagetronad package instead.
+
+Package: armagetron-common
+Architecture: all
+Depends: armagetronad-common
+Description: Dummy upgrade package for Armagetron
+ This is a transitional package and can safely be removed; see the
+ armagetronad-common package instead.
+
+Package: armagetron-server
+Architecture: all
+Depends: armagetronad-dedicated
+Description: Dummy upgrade package for Armagetron
+ This is a transitional package and can safely be removed; see the
+ armagetronad-server package instead.
--- armagetronad-0.3.0.orig/config.guess
+++ armagetronad-0.3.0/config.guess
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
 
-timestamp='2001-08-21'
+timestamp='2007-07-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
@@ -17,15 +18,18 @@
 #
 # 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Written by Per Bothner <bothner@cygnus.com>.
-# Please send patches to <config-patches@gnu.org>.
+
+# 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
@@ -52,7 +56,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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
@@ -65,11 +69,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -87,30 +91,42 @@
   exit 1
 fi
 
+trap 'exit 1' 1 2 15
 
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; 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.
 
-# CC_FOR_BUILD -- compiler used by this script.
 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
 # use `HOST_CC' if defined, but it is deprecated.
 
-set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int dummy(){}" > $dummy.c ;
-	for c in cc gcc c89 ; do
-	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
-	  if test $? = 0 ; then
+# 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 "$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 ;
-	rm -f $dummy.c $dummy.o $dummy.rel ;
 	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'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -123,43 +139,35 @@
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_MACHINE}" in
-    i?86)
-	test -z "$VENDOR" && VENDOR=pc
-	;;
-    *)
-	test -z "$VENDOR" && VENDOR=unknown
-	;;
-esac
-test -f /etc/SuSE-release && VENDOR=suse
-
 # 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
+	# 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.
-	# Determine the machine/vendor (is the vendor relevant).
-	case "${UNAME_MACHINE}" in
-	    amiga) machine=m68k-unknown ;;
-	    arm32) machine=arm-unknown ;;
-	    atari*) machine=m68k-atari ;;
-	    sun3*) machine=m68k-sun ;;
-	    mac68k) machine=m68k-apple ;;
-	    macppc) machine=powerpc-apple ;;
-	    hp3[0-9][05]) machine=m68k-hp ;;
-	    ibmrt|romp-ibm) machine=romp-ibm ;;
-	    *) machine=${UNAME_MACHINE}-unknown ;;
+	#
+	# 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 ;;
+	    sh5el) machine=sh5le-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}" in
-	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+	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
@@ -176,120 +184,128 @@
 		;;
 	esac
 	# The OS release
-	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	# 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 ;;
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
+	case $UNAME_RELEASE in
+	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
+		;;
+	*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.
-	cat <<EOF >$dummy.s
-	.data
-\$Lformat:
-	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
-
-	.text
-	.globl main
-	.align 4
-	.ent main
-main:
-	.frame \$30,16,\$26,0
-	ldgp \$29,0(\$27)
-	.prologue 1
-	.long 0x47e03d80 # implver \$0
-	lda \$2,-1
-	.long 0x47e20c21 # amask \$2,\$1
-	lda \$16,\$Lformat
-	mov \$0,\$17
-	not \$1,\$18
-	jsr \$26,printf
-	ldgp \$29,0(\$26)
-	mov 0,\$16
-	jsr \$26,exit
-	.end main
-EOF
-	eval $set_cc_for_build
-	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
-	if test "$?" = 0 ; then
-		case `./$dummy` in
-			0-0)
-				UNAME_MACHINE="alpha"
-				;;
-			1-0)
-				UNAME_MACHINE="alphaev5"
-				;;
-			1-1)
-				UNAME_MACHINE="alphaev56"
-				;;
-			1-101)
-				UNAME_MACHINE="alphapca56"
-				;;
-			2-303)
-				UNAME_MACHINE="alphaev6"
-				;;
-			2-307)
-				UNAME_MACHINE="alphaev67"
-				;;
-			2-1307)
-				UNAME_MACHINE="alphaev68"
-				;;
-		esac
-	fi
-	rm -f $dummy.s $dummy
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
     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 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
-    arc64:OpenBSD:*:*)
-	echo mips64el-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hkmips:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mips-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     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
@@ -297,25 +313,32 @@
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    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 ;;
+	esac ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     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 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -324,12 +347,12 @@
 	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 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	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)
@@ -339,16 +362,10 @@
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    sparc*:NetBSD:*)
-	echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    atari*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # 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
@@ -359,50 +376,42 @@
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
-    sun3*:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-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 ;;
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
@@ -424,28 +433,33 @@
 	  exit (-1);
 	}
 EOF
-	eval $set_cc_for_build
-	$CC_FOR_BUILD $dummy.c -o $dummy \
-	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -461,29 +475,29 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+ 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????: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 '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -491,9 +505,10 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *: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>
 
@@ -505,18 +520,20 @@
 			exit(0);
 			}
 EOF
-		eval $set_cc_for_build
-		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-		rm -f $dummy.c $dummy
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	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 ;;
+	exit ;;
     *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	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
@@ -528,38 +545,36 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     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
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     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])
-              case "${HPUX_REV}" in
-                11.[0-9][0-9])
-                  if [ -x /usr/bin/getconf ]; then
-                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		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
@@ -568,12 +583,13 @@
                         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 ;;
-              esac
-              if [ "${HP_ARCH}" = "" ]; then
-              sed 's/^              //' << EOF >$dummy.c
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
 
               #define _HPUX_SOURCE
               #include <stdlib.h>
@@ -606,19 +622,39 @@
                   exit (0);
               }
 EOF
-	eval $set_cc_for_build
-	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
-	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
-	rm -f $dummy.c $dummy
-	fi ;;
+		    (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
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     3050*:HI-UX:*:*)
+	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#include <unistd.h>
 	int
@@ -644,162 +680,237 @@
 	  exit (0);
 	}
 EOF
-	eval $set_cc_for_build
-	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
+	exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit 0 ;;
+	exit ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit 0 ;;
+	exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit 0 ;;
+	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit 0 ;;
+	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit 0 ;;
+	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit 0 ;;
+	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit 0 ;;
-    hppa*:OpenBSD:*:*)
-	echo hppa-unknown-openbsd
-	exit 0 ;;
+	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit 0 ;;
+        exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit 0 ;;
+        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit 0 ;;
+        exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit 0 ;;
+        exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
+        exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     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 ;;
+	exit ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY*T3D:*:*:*)
-	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     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 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+        exit ;;
+    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 ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
-    *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
-    i*:MINGW*:*)
+	exit ;;
+    *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
+	exit ;;
+    *:Interix*:[3456]*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    EM64T | authenticamd)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
     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 i386-pc-interix
-	exit 0 ;;
+	echo i586-pc-interix
+	exit ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit 0 ;;
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     *:GNU:*:*)
+	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
+	exit ;;
+    *: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 ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
+	exit ;;
     arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-${VENDOR}-linux
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-${VENDOR}-linux
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-${VENDOR}-linux
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     mips:Linux:*:*)
-	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
-	  big)    echo mips-${VENDOR}-linux && exit 0 ;;
-	  little) echo mipsel-${VENDOR}-linux && exit 0 ;;
-	esac
-	case `sed -n '/^system type/s/^.*: \([^ ]*\).*/\1/p' < /proc/cpuinfo` in
-	  SGI|sgi)    echo mips-${VENDOR}-linux-gnu && exit 0 ;;
-	esac
+	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 | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
-    ppc:Linux:*:*|ppc64:Linux:*:*)
-	echo powerpc-${VENDOR}-linux
-	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 | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
     ppc64:Linux:*:*)
 	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -812,36 +923,46 @@
         esac
 	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
     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-${VENDOR}-linux ;;
-	  PA8*) echo hppa2.0-${VENDOR}-linux ;;
-	  *)    echo hppa-${VENDOR}-linux ;;
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
-	exit 0 ;;
+	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-${VENDOR}-linux
-	exit 0 ;;
+	echo hppa64-unknown-linux-gnu
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-${VENDOR}-linux
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-${VENDOR}-linux
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-${VENDOR}-linux
-	exit 0 ;;
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    xtensa:Linux:*:*)
+    	echo xtensa-unknown-linux-gnu
+	exit ;;
     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.
-	ld_supported_targets=`cd /; ld --help 2>&1 \
+	# 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: *//
@@ -849,56 +970,62 @@
 				    p'`
         case "$ld_supported_targets" in
 	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
 		;;
 	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
-		exit 0 ;;		
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
 	  coff-i386)
-		echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
-		exit 0 ;;
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
 	  "")
-		# Either a pre-BFD a.out linker (linuxoldld) or
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
 		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld"
-		exit 0 ;;
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
 	esac
 	# Determine whether the default compiler is a.out or elf
-	cat >$dummy.c <<EOF
-#include <features.h>
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __ELF__
-# ifdef __GLIBC__
-#  if __GLIBC__ >= 2
-    printf ("%s-${VENDOR}-linux\n", argv[1]);
-#  else
-    printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]);
-#  endif
-# else
-   printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]);
-# endif
-#else
-  printf ("%s-${VENDOR}-linuxaout\n", argv[1]);
-#endif
-  return 0;
-}
-EOF
 	eval $set_cc_for_build
-	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
-	rm -f $dummy.c $dummy
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	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
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
 	;;
     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 ;;
+	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -906,7 +1033,27 @@
 	# I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
+    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 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
     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
@@ -914,99 +1061,100 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	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 ;;
+	exit ;;
     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|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+		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|egrep '^Machine.*Pent ?II' >/dev/null) \
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+		(/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 ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
+	exit ;;
     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 ;;
+        exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit 0 ;;
+	exit ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit 0 ;;
+	exit ;;
     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 ;;
+	exit ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    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
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+          && { echo i486-ncr-sysv4; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1014,82 +1162,107 @@
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit 0 ;;
+	exit ;;
     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                       # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
-        exit 0 ;;
+        exit ;;
     *: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 ;;
+	exit ;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
-	exit 0 ;;
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
 	echo hppa1.1-stratus-vos
-	exit 0 ;;
+	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit 0 ;;
+	exit ;;
     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 ;;
+        exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit 0 ;;
+	exit ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit 0 ;;
+	exit ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit 0 ;;
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Darwin:*:*)
-	echo `uname -p`-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	if test "${UNAME_MACHINE}" = "x86pc"; then
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
-	exit 0 ;;
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[KW]:NONSTOP_KERNEL:*:*)
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit 0 ;;
+	exit ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit 0 ;;
+	exit ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1100,38 +1273,53 @@
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	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 ;;
+	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit 0 ;;
+	exit ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit 0 ;;
+	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit 0 ;;
+	exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit 0 ;;
+	exit ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit 0 ;;
+	exit ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit 0 ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
 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>
@@ -1157,7 +1345,7 @@
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1246,13 +1434,12 @@
 }
 EOF
 
-eval $set_cc_for_build
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
-rm -f $dummy.c $dummy
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1261,22 +1448,22 @@
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit 0 ;;
+	exit ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     c34*)
 	echo c34-convex-bsd
-	exit 0 ;;
+	exit ;;
     c38*)
 	echo c38-convex-bsd
-	exit 0 ;;
+	exit ;;
     c4*)
 	echo c4-convex-bsd
-	exit 0 ;;
+	exit ;;
     esac
 fi
 
@@ -1287,7 +1474,9 @@
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  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
--- armagetronad-0.3.0.orig/config.sub
+++ armagetronad-0.3.0/config.sub
@@ -1,9 +1,10 @@
 #! /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.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
 
-timestamp='2005-12-23'
+timestamp='2007-06-28'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -240,15 +241,16 @@
 	| 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 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
 	| bfin \
 	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx | dvp \
-	| fr30 | frv \
+	| d10v | d30v | dlx | dsp16xx \
+	| fido | 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 | mb | microblaze | mcore \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
@@ -268,26 +270,25 @@
 	| mn10200 | mn10300 \
 	| mt \
 	| msp430 \
+	| nios | nios2 \
 	| ns16k | ns32k \
 	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b \
-	| strongarm \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu | strongarm \
 	| tahoe | thumb | tic4x | tic80 | tron \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
 	| z8k)
 		basic_machine=$basic_machine-unknown
 		;;
-	m32c)
-		basic_machine=$basic_machine-unknown
-		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
 		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
@@ -298,10 +299,6 @@
 	ms1)
 		basic_machine=mt-unknown
 		;;
-	nios2 | nios2-* | nios2 | nios2-*)
-		basic_machine=nios2-altera
-		os=-none
-		;;
 
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -321,18 +318,18 @@
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
+	| avr-* | avr32-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
 	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
-	| m32r-* | m32rle-* \
+	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
 	| m88110-* | m88k-* | maxq-* | mcore-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -354,29 +351,28 @@
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
+	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
 	| xstormy16-* | xtensa-* \
 	| ymp-* \
 	| z8k-*)
 		;;
-	m32c-*)
-		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
 	386bsd)
@@ -479,8 +475,8 @@
 		basic_machine=craynv-cray
 		os=-unicosmp
 		;;
-	cr16c)
-		basic_machine=cr16c-unknown
+	cr16)
+		basic_machine=cr16-unknown
 		os=-elf
 		;;
 	crds | unos)
@@ -687,6 +683,10 @@
 		basic_machine=i386-pc
 		os=-mingw32
 		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
@@ -694,24 +694,6 @@
 		basic_machine=m68k-atari
 		os=-mint
 		;;
-	mipsEE* | ee | ps2)
-		basic_machine=mips64r5900el-scei
-		case $os in
-		    -linux*)
-			;;
-		    *)
-			os=-elf
-			;;
-		esac
-		;;
-	iop)
-		basic_machine=mipsel-scei
-		os=-irx
-		;;
-	dvp)
-		basic_machine=dvp-scei
-		os=-elf
-		;;
 	mips3*-*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
 		;;
@@ -932,6 +914,10 @@
 	sb1el)
 		basic_machine=mipsisa64sb1el-unknown
 		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
 	sei)
 		basic_machine=mips-sei
 		os=-seiux
@@ -943,6 +929,9 @@
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
 	sh64)
 		basic_machine=sh64-unknown
 		;;
@@ -1148,7 +1137,7 @@
 	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b)
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
 		basic_machine=sparc-sun
 		;;
 	cydra)
@@ -1221,7 +1210,8 @@
 	      | -aos* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
@@ -1236,7 +1226,7 @@
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -irx*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1388,6 +1378,12 @@
 # system, and we'll never get to this point.
 
 case $basic_machine in
+        score-*)
+		os=-elf
+		;;
+        spu-*)
+		os=-elf
+		;;
 	*-acorn)
 		os=-riscix1.2
 		;;
@@ -1397,9 +1393,9 @@
 	arm*-semi)
 		os=-aout
 		;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
+        c4x-* | tic4x-*)
+        	os=-coff
+		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
@@ -1425,6 +1421,9 @@
 	m68*-cisco)
 		os=-aout
 		;;
+        mep-*)
+		os=-elf
+		;;
 	mips*-cisco)
 		os=-elf
 		;;
