6ccfd1
diff -urN libwmf-0.2.8.4/config.guess libwmf-0.2.8.4-aarch64/config.guess
6ccfd1
--- libwmf-0.2.8.4/config.guess	2005-07-27 16:47:06.000000000 -0500
6ccfd1
+++ libwmf-0.2.8.4-aarch64/config.guess	2013-03-03 06:14:17.618248035 -0600
6ccfd1
@@ -1,9 +1,10 @@
6ccfd1
 #! /bin/sh
6ccfd1
 # Attempt to guess a canonical system name.
6ccfd1
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
6ccfd1
-#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
6ccfd1
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
6ccfd1
+#   2011, 2012 Free Software Foundation, Inc.
6ccfd1
 
6ccfd1
-timestamp='2004-09-07'
6ccfd1
+timestamp='2012-09-25'
6ccfd1
 
6ccfd1
 # This file is free software; you can redistribute it and/or modify it
6ccfd1
 # under the terms of the GNU General Public License as published by
6ccfd1
@@ -16,24 +17,24 @@
6ccfd1
 # General Public License for more details.
6ccfd1
 #
6ccfd1
 # You should have received a copy of the GNU General Public License
6ccfd1
-# along with this program; if not, write to the Free Software
6ccfd1
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6ccfd1
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
6ccfd1
 #
6ccfd1
 # As a special exception to the GNU General Public License, if you
6ccfd1
 # distribute this file as part of a program that contains a
6ccfd1
 # configuration script generated by Autoconf, you may include it under
6ccfd1
 # the same distribution terms that you use for the rest of that program.
6ccfd1
 
6ccfd1
-# Originally written by Per Bothner <per@bothner.com>.
6ccfd1
-# Please send patches to <config-patches@gnu.org>.  Submit a context
6ccfd1
-# diff and a properly formatted ChangeLog entry.
6ccfd1
+
6ccfd1
+# Originally written by Per Bothner.  Please send patches (context
6ccfd1
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
6ccfd1
+# entry.
6ccfd1
 #
6ccfd1
 # This script attempts to guess a canonical system name similar to
6ccfd1
 # config.sub.  If it succeeds, it prints the system name on stdout, and
6ccfd1
 # exits with 0.  Otherwise, it exits with 1.
6ccfd1
 #
6ccfd1
-# The plan is that this can be called by configure scripts if you
6ccfd1
-# don't specify an explicit build system type.
6ccfd1
+# You can get the latest version of this script from:
6ccfd1
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
6ccfd1
 
6ccfd1
 me=`echo "$0" | sed -e 's,.*/,,'`
6ccfd1
 
6ccfd1
@@ -53,7 +54,8 @@
6ccfd1
 GNU config.guess ($timestamp)
6ccfd1
 
6ccfd1
 Originally written by Per Bothner.
6ccfd1
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
6ccfd1
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
6ccfd1
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
6ccfd1
 Free Software Foundation, Inc.
6ccfd1
 
6ccfd1
 This is free software; see the source for copying conditions.  There is NO
6ccfd1
@@ -66,11 +68,11 @@
6ccfd1
 while test $# -gt 0 ; do
6ccfd1
   case $1 in
6ccfd1
     --time-stamp | --time* | -t )
6ccfd1
-       echo "$timestamp" ; exit 0 ;;
6ccfd1
+       echo "$timestamp" ; exit ;;
6ccfd1
     --version | -v )
6ccfd1
-       echo "$version" ; exit 0 ;;
6ccfd1
+       echo "$version" ; exit ;;
6ccfd1
     --help | --h* | -h )
6ccfd1
-       echo "$usage"; exit 0 ;;
6ccfd1
+       echo "$usage"; exit ;;
6ccfd1
     -- )     # Stop option processing
6ccfd1
        shift; break ;;
6ccfd1
     - )	# Use stdin as input.
6ccfd1
@@ -104,7 +106,7 @@
6ccfd1
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
6ccfd1
 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
6ccfd1
 : ${TMPDIR=/tmp} ;
6ccfd1
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
6ccfd1
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
6ccfd1
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
6ccfd1
  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
6ccfd1
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
6ccfd1
@@ -123,7 +125,7 @@
6ccfd1
 	;;
6ccfd1
  ,,*)   CC_FOR_BUILD=$CC ;;
6ccfd1
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
6ccfd1
-esac ;'
6ccfd1
+esac ; set_cc_for_build= ;'
6ccfd1
 
6ccfd1
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
6ccfd1
 # (ghazi@noc.rutgers.edu 1994-08-24)
6ccfd1
@@ -141,7 +143,7 @@
6ccfd1
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
6ccfd1
     *:NetBSD:*:*)
6ccfd1
 	# NetBSD (nbsd) targets should (where applicable) match one or
6ccfd1
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
6ccfd1
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
6ccfd1
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
6ccfd1
 	# switched to ELF, *-*-netbsd* would select the old
6ccfd1
 	# object file format.  This provides both forward
6ccfd1
@@ -158,6 +160,7 @@
6ccfd1
 	    arm*) machine=arm-unknown ;;
6ccfd1
 	    sh3el) machine=shl-unknown ;;
6ccfd1
 	    sh3eb) machine=sh-unknown ;;
6ccfd1
+	    sh5el) machine=sh5le-unknown ;;
6ccfd1
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
6ccfd1
 	esac
6ccfd1
 	# The Operating System including object format, if it has switched
6ccfd1
@@ -166,7 +169,7 @@
6ccfd1
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
6ccfd1
 		eval $set_cc_for_build
6ccfd1
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
6ccfd1
-			| grep __ELF__ >/dev/null
6ccfd1
+			| grep -q __ELF__
6ccfd1
 		then
6ccfd1
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
6ccfd1
 		    # Return netbsd for either.  FIX?
6ccfd1
@@ -176,7 +179,7 @@
6ccfd1
 		fi
6ccfd1
 		;;
6ccfd1
 	    *)
6ccfd1
-	        os=netbsd
6ccfd1
+		os=netbsd
6ccfd1
 		;;
6ccfd1
 	esac
6ccfd1
 	# The OS release
6ccfd1
@@ -196,62 +199,34 @@
6ccfd1
 	# contains redundant information, the shorter form:
6ccfd1
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
6ccfd1
 	echo "${machine}-${os}${release}"
6ccfd1
-	exit 0 ;;
6ccfd1
-    amd64:OpenBSD:*:*)
6ccfd1
-	echo x86_64-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    amiga:OpenBSD:*:*)
6ccfd1
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    cats:OpenBSD:*:*)
6ccfd1
-	echo arm-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    hp300:OpenBSD:*:*)
6ccfd1
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    luna88k:OpenBSD:*:*)
6ccfd1
-    	echo m88k-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    mac68k:OpenBSD:*:*)
6ccfd1
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    macppc:OpenBSD:*:*)
6ccfd1
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    mvme68k:OpenBSD:*:*)
6ccfd1
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    mvme88k:OpenBSD:*:*)
6ccfd1
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    mvmeppc:OpenBSD:*:*)
6ccfd1
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    sgi:OpenBSD:*:*)
6ccfd1
-	echo mips64-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    sun3:OpenBSD:*:*)
6ccfd1
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    *:Bitrig:*:*)
6ccfd1
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
6ccfd1
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     *:OpenBSD:*:*)
6ccfd1
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
6ccfd1
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     *:ekkoBSD:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    *:SolidBSD:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     macppc:MirBSD:*:*)
6ccfd1
-	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     *:MirBSD:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     alpha:OSF1:*:*)
6ccfd1
 	case $UNAME_RELEASE in
6ccfd1
 	*4.0)
6ccfd1
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
6ccfd1
 		;;
6ccfd1
 	*5.*)
6ccfd1
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
6ccfd1
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
6ccfd1
 		;;
6ccfd1
 	esac
6ccfd1
 	# According to Compaq, /usr/sbin/psrinfo has been available on
6ccfd1
@@ -297,37 +272,46 @@
6ccfd1
 	# A Xn.n version is an unreleased experimental baselevel.
6ccfd1
 	# 1.2 uses "1.2" for uname -r.
6ccfd1
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
6ccfd1
+	exitcode=$?
6ccfd1
+	trap '' 0
6ccfd1
+	exit $exitcode ;;
6ccfd1
     Alpha\ *:Windows_NT*:*)
6ccfd1
 	# How do we know it's Interix rather than the generic POSIX subsystem?
6ccfd1
 	# Should we change UNAME_MACHINE based on the output of uname instead
6ccfd1
 	# of the specific Alpha model?
6ccfd1
 	echo alpha-pc-interix
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     21064:Windows_NT:50:3)
6ccfd1
 	echo alpha-dec-winnt3.5
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     Amiga*:UNIX_System_V:4.0:*)
6ccfd1
 	echo m68k-unknown-sysv4
6ccfd1
-	exit 0;;
6ccfd1
+	exit ;;
6ccfd1
     *:[Aa]miga[Oo][Ss]:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-amigaos
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:[Mm]orph[Oo][Ss]:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-morphos
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:OS/390:*:*)
6ccfd1
 	echo i370-ibm-openedition
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    *:z/VM:*:*)
6ccfd1
+	echo s390-ibm-zvmoe
6ccfd1
+	exit ;;
6ccfd1
     *:OS400:*:*)
6ccfd1
-        echo powerpc-ibm-os400
6ccfd1
-	exit 0 ;;
6ccfd1
+	echo powerpc-ibm-os400
6ccfd1
+	exit ;;
6ccfd1
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
6ccfd1
 	echo arm-acorn-riscix${UNAME_RELEASE}
6ccfd1
-	exit 0;;
6ccfd1
+	exit ;;
6ccfd1
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
6ccfd1
+	echo arm-unknown-riscos
6ccfd1
+	exit ;;
6ccfd1
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
6ccfd1
 	echo hppa1.1-hitachi-hiuxmpp
6ccfd1
-	exit 0;;
6ccfd1
+	exit ;;
6ccfd1
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
6ccfd1
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
6ccfd1
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
6ccfd1
@@ -335,32 +319,51 @@
6ccfd1
 	else
6ccfd1
 		echo pyramid-pyramid-bsd
6ccfd1
 	fi
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     NILE*:*:*:dcosx)
6ccfd1
 	echo pyramid-pyramid-svr4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     DRS?6000:unix:4.0:6*)
6ccfd1
 	echo sparc-icl-nx6
6ccfd1
-	exit 0 ;;
6ccfd1
-    DRS?6000:UNIX_SV:4.2*:7*)
6ccfd1
+	exit ;;
6ccfd1
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
6ccfd1
 	case `/usr/bin/uname -p` in
6ccfd1
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
6ccfd1
+	    sparc) echo sparc-icl-nx7; exit ;;
6ccfd1
 	esac ;;
6ccfd1
+    s390x:SunOS:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
6ccfd1
+	exit ;;
6ccfd1
     sun4H:SunOS:5.*:*)
6ccfd1
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
6ccfd1
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
6ccfd1
-	exit 0 ;;
6ccfd1
-    i86pc:SunOS:5.*:*)
6ccfd1
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
6ccfd1
+	echo i386-pc-auroraux${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
6ccfd1
+	eval $set_cc_for_build
6ccfd1
+	SUN_ARCH="i386"
6ccfd1
+	# If there is a compiler, see if it is configured for 64-bit objects.
6ccfd1
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
6ccfd1
+	# This test works for both compilers.
6ccfd1
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
6ccfd1
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
6ccfd1
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
6ccfd1
+		grep IS_64BIT_ARCH >/dev/null
6ccfd1
+	    then
6ccfd1
+		SUN_ARCH="x86_64"
6ccfd1
+	    fi
6ccfd1
+	fi
6ccfd1
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
6ccfd1
+	exit ;;
6ccfd1
     sun4*:SunOS:6*:*)
6ccfd1
 	# According to config.sub, this is the proper way to canonicalize
6ccfd1
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
6ccfd1
 	# it's likely to be more like Solaris than SunOS4.
6ccfd1
 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     sun4*:SunOS:*:*)
6ccfd1
 	case "`/usr/bin/arch -k`" in
6ccfd1
 	    Series*|S4*)
6ccfd1
@@ -369,10 +372,10 @@
6ccfd1
 	esac
6ccfd1
 	# Japanese Language versions have a version number like `4.1.3-JL'.
6ccfd1
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     sun3*:SunOS:*:*)
6ccfd1
 	echo m68k-sun-sunos${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     sun*:*:4.2BSD:*)
6ccfd1
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
6ccfd1
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
6ccfd1
@@ -384,10 +387,10 @@
6ccfd1
 		echo sparc-sun-sunos${UNAME_RELEASE}
6ccfd1
 		;;
6ccfd1
 	esac
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     aushp:SunOS:*:*)
6ccfd1
 	echo sparc-auspex-sunos${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     # The situation for MiNT is a little confusing.  The machine name
6ccfd1
     # can be virtually everything (everything which is not
6ccfd1
     # "atarist" or "atariste" at least should have a processor
6ccfd1
@@ -397,41 +400,41 @@
6ccfd1
     # MiNT.  But MiNT is downward compatible to TOS, so this should
6ccfd1
     # be no problem.
6ccfd1
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
6ccfd1
-        echo m68k-atari-mint${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	echo m68k-atari-mint${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
6ccfd1
 	echo m68k-atari-mint${UNAME_RELEASE}
6ccfd1
-        exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
6ccfd1
-        echo m68k-atari-mint${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	echo m68k-atari-mint${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
6ccfd1
-        echo m68k-milan-mint${UNAME_RELEASE}
6ccfd1
-        exit 0 ;;
6ccfd1
+	echo m68k-milan-mint${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
6ccfd1
-        echo m68k-hades-mint${UNAME_RELEASE}
6ccfd1
-        exit 0 ;;
6ccfd1
+	echo m68k-hades-mint${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
6ccfd1
-        echo m68k-unknown-mint${UNAME_RELEASE}
6ccfd1
-        exit 0 ;;
6ccfd1
+	echo m68k-unknown-mint${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     m68k:machten:*:*)
6ccfd1
 	echo m68k-apple-machten${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     powerpc:machten:*:*)
6ccfd1
 	echo powerpc-apple-machten${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     RISC*:Mach:*:*)
6ccfd1
 	echo mips-dec-mach_bsd4.3
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     RISC*:ULTRIX:*:*)
6ccfd1
 	echo mips-dec-ultrix${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     VAX*:ULTRIX*:*:*)
6ccfd1
 	echo vax-dec-ultrix${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     2020:CLIX:*:* | 2430:CLIX:*:*)
6ccfd1
 	echo clipper-intergraph-clix${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     mips:*:*:UMIPS | mips:*:*:RISCos)
6ccfd1
 	eval $set_cc_for_build
6ccfd1
 	sed 's/^	//' << EOF >$dummy.c
6ccfd1
@@ -455,35 +458,36 @@
6ccfd1
 	  exit (-1);
6ccfd1
 	}
6ccfd1
 EOF
6ccfd1
-	$CC_FOR_BUILD -o $dummy $dummy.c \
6ccfd1
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
6ccfd1
-	  && exit 0
6ccfd1
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
6ccfd1
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
6ccfd1
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
6ccfd1
+	    { echo "$SYSTEM_NAME"; exit; }
6ccfd1
 	echo mips-mips-riscos${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     Motorola:PowerMAX_OS:*:*)
6ccfd1
 	echo powerpc-motorola-powermax
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     Motorola:*:4.3:PL8-*)
6ccfd1
 	echo powerpc-harris-powermax
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
6ccfd1
 	echo powerpc-harris-powermax
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     Night_Hawk:Power_UNIX:*:*)
6ccfd1
 	echo powerpc-harris-powerunix
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     m88k:CX/UX:7*:*)
6ccfd1
 	echo m88k-harris-cxux7
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     m88k:*:4*:R4*)
6ccfd1
 	echo m88k-motorola-sysv4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     m88k:*:3*:R3*)
6ccfd1
 	echo m88k-motorola-sysv3
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     AViiON:dgux:*:*)
6ccfd1
-        # DG/UX returns AViiON for all architectures
6ccfd1
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
6ccfd1
+	# DG/UX returns AViiON for all architectures
6ccfd1
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
6ccfd1
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
6ccfd1
 	then
6ccfd1
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
6ccfd1
@@ -496,29 +500,29 @@
6ccfd1
 	else
6ccfd1
 	    echo i586-dg-dgux${UNAME_RELEASE}
6ccfd1
 	fi
6ccfd1
- 	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
6ccfd1
 	echo m88k-dolphin-sysv3
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     M88*:*:R3*:*)
6ccfd1
 	# Delta 88k system running SVR3
6ccfd1
 	echo m88k-motorola-sysv3
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
6ccfd1
 	echo m88k-tektronix-sysv3
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
6ccfd1
 	echo m68k-tektronix-bsd
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:IRIX*:*:*)
6ccfd1
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
6ccfd1
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
6ccfd1
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
6ccfd1
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
6ccfd1
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
6ccfd1
     i*86:AIX:*:*)
6ccfd1
 	echo i386-ibm-aix
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     ia64:AIX:*:*)
6ccfd1
 	if [ -x /usr/bin/oslevel ] ; then
6ccfd1
 		IBM_REV=`/usr/bin/oslevel`
6ccfd1
@@ -526,7 +530,7 @@
6ccfd1
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
6ccfd1
 	fi
6ccfd1
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:AIX:2:3)
6ccfd1
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
6ccfd1
 		eval $set_cc_for_build
6ccfd1
@@ -541,15 +545,19 @@
6ccfd1
 			exit(0);
6ccfd1
 			}
6ccfd1
 EOF
6ccfd1
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
6ccfd1
-		echo rs6000-ibm-aix3.2.5
6ccfd1
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
6ccfd1
+		then
6ccfd1
+			echo "$SYSTEM_NAME"
6ccfd1
+		else
6ccfd1
+			echo rs6000-ibm-aix3.2.5
6ccfd1
+		fi
6ccfd1
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
6ccfd1
 		echo rs6000-ibm-aix3.2.4
6ccfd1
 	else
6ccfd1
 		echo rs6000-ibm-aix3.2
6ccfd1
 	fi
6ccfd1
-	exit 0 ;;
6ccfd1
-    *:AIX:*:[45])
6ccfd1
+	exit ;;
6ccfd1
+    *:AIX:*:[4567])
6ccfd1
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
6ccfd1
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
6ccfd1
 		IBM_ARCH=rs6000
6ccfd1
@@ -562,28 +570,28 @@
6ccfd1
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
6ccfd1
 	fi
6ccfd1
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:AIX:*:*)
6ccfd1
 	echo rs6000-ibm-aix
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
6ccfd1
 	echo romp-ibm-bsd4.4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
6ccfd1
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
6ccfd1
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
6ccfd1
+	exit ;;                             # report: romp-ibm BSD 4.3
6ccfd1
     *:BOSX:*:*)
6ccfd1
 	echo rs6000-bull-bosx
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     DPX/2?00:B.O.S.:*:*)
6ccfd1
 	echo m68k-bull-sysv3
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     9000/[34]??:4.3bsd:1.*:*)
6ccfd1
 	echo m68k-hp-bsd
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
6ccfd1
 	echo m68k-hp-bsd4.4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     9000/[34678]??:HP-UX:*:*)
6ccfd1
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
6ccfd1
 	case "${UNAME_MACHINE}" in
6ccfd1
@@ -592,52 +600,52 @@
6ccfd1
 	    9000/[678][0-9][0-9])
6ccfd1
 		if [ -x /usr/bin/getconf ]; then
6ccfd1
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
6ccfd1
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
6ccfd1
-                    case "${sc_cpu_version}" in
6ccfd1
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
6ccfd1
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
6ccfd1
-                      532)                      # CPU_PA_RISC2_0
6ccfd1
-                        case "${sc_kernel_bits}" in
6ccfd1
-                          32) HP_ARCH="hppa2.0n" ;;
6ccfd1
-                          64) HP_ARCH="hppa2.0w" ;;
6ccfd1
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
6ccfd1
+		    case "${sc_cpu_version}" in
6ccfd1
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
6ccfd1
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
6ccfd1
+		      532)                      # CPU_PA_RISC2_0
6ccfd1
+			case "${sc_kernel_bits}" in
6ccfd1
+			  32) HP_ARCH="hppa2.0n" ;;
6ccfd1
+			  64) HP_ARCH="hppa2.0w" ;;
6ccfd1
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
6ccfd1
-                        esac ;;
6ccfd1
-                    esac
6ccfd1
+			esac ;;
6ccfd1
+		    esac
6ccfd1
 		fi
6ccfd1
 		if [ "${HP_ARCH}" = "" ]; then
6ccfd1
 		    eval $set_cc_for_build
6ccfd1
-		    sed 's/^              //' << EOF >$dummy.c
6ccfd1
+		    sed 's/^		//' << EOF >$dummy.c
6ccfd1
 
6ccfd1
-              #define _HPUX_SOURCE
6ccfd1
-              #include <stdlib.h>
6ccfd1
-              #include <unistd.h>
6ccfd1
-
6ccfd1
-              int main ()
6ccfd1
-              {
6ccfd1
-              #if defined(_SC_KERNEL_BITS)
6ccfd1
-                  long bits = sysconf(_SC_KERNEL_BITS);
6ccfd1
-              #endif
6ccfd1
-                  long cpu  = sysconf (_SC_CPU_VERSION);
6ccfd1
-
6ccfd1
-                  switch (cpu)
6ccfd1
-              	{
6ccfd1
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
6ccfd1
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
6ccfd1
-              	case CPU_PA_RISC2_0:
6ccfd1
-              #if defined(_SC_KERNEL_BITS)
6ccfd1
-              	    switch (bits)
6ccfd1
-              		{
6ccfd1
-              		case 64: puts ("hppa2.0w"); break;
6ccfd1
-              		case 32: puts ("hppa2.0n"); break;
6ccfd1
-              		default: puts ("hppa2.0"); break;
6ccfd1
-              		} break;
6ccfd1
-              #else  /* !defined(_SC_KERNEL_BITS) */
6ccfd1
-              	    puts ("hppa2.0"); break;
6ccfd1
-              #endif
6ccfd1
-              	default: puts ("hppa1.0"); break;
6ccfd1
-              	}
6ccfd1
-                  exit (0);
6ccfd1
-              }
6ccfd1
+		#define _HPUX_SOURCE
6ccfd1
+		#include <stdlib.h>
6ccfd1
+		#include <unistd.h>
6ccfd1
+
6ccfd1
+		int main ()
6ccfd1
+		{
6ccfd1
+		#if defined(_SC_KERNEL_BITS)
6ccfd1
+		    long bits = sysconf(_SC_KERNEL_BITS);
6ccfd1
+		#endif
6ccfd1
+		    long cpu  = sysconf (_SC_CPU_VERSION);
6ccfd1
+
6ccfd1
+		    switch (cpu)
6ccfd1
+			{
6ccfd1
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
6ccfd1
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
6ccfd1
+			case CPU_PA_RISC2_0:
6ccfd1
+		#if defined(_SC_KERNEL_BITS)
6ccfd1
+			    switch (bits)
6ccfd1
+				{
6ccfd1
+				case 64: puts ("hppa2.0w"); break;
6ccfd1
+				case 32: puts ("hppa2.0n"); break;
6ccfd1
+				default: puts ("hppa2.0"); break;
6ccfd1
+				} break;
6ccfd1
+		#else  /* !defined(_SC_KERNEL_BITS) */
6ccfd1
+			    puts ("hppa2.0"); break;
6ccfd1
+		#endif
6ccfd1
+			default: puts ("hppa1.0"); break;
6ccfd1
+			}
6ccfd1
+		    exit (0);
6ccfd1
+		}
6ccfd1
 EOF
6ccfd1
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
6ccfd1
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
6ccfd1
@@ -645,9 +653,19 @@
6ccfd1
 	esac
6ccfd1
 	if [ ${HP_ARCH} = "hppa2.0w" ]
6ccfd1
 	then
6ccfd1
-	    # avoid double evaluation of $set_cc_for_build
6ccfd1
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
6ccfd1
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
6ccfd1
+	    eval $set_cc_for_build
6ccfd1
+
6ccfd1
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
6ccfd1
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
6ccfd1
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
6ccfd1
+	    #
6ccfd1
+	    # $ CC_FOR_BUILD=cc ./config.guess
6ccfd1
+	    # => hppa2.0w-hp-hpux11.23
6ccfd1
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
6ccfd1
+	    # => hppa64-hp-hpux11.23
6ccfd1
+
6ccfd1
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
6ccfd1
+		grep -q __LP64__
6ccfd1
 	    then
6ccfd1
 		HP_ARCH="hppa2.0w"
6ccfd1
 	    else
6ccfd1
@@ -655,11 +673,11 @@
6ccfd1
 	    fi
6ccfd1
 	fi
6ccfd1
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     ia64:HP-UX:*:*)
6ccfd1
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
6ccfd1
 	echo ia64-hp-hpux${HPUX_REV}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     3050*:HI-UX:*:*)
6ccfd1
 	eval $set_cc_for_build
6ccfd1
 	sed 's/^	//' << EOF >$dummy.c
6ccfd1
@@ -687,216 +705,269 @@
6ccfd1
 	  exit (0);
6ccfd1
 	}
6ccfd1
 EOF
6ccfd1
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
6ccfd1
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
6ccfd1
+		{ echo "$SYSTEM_NAME"; exit; }
6ccfd1
 	echo unknown-hitachi-hiuxwe2
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
6ccfd1
 	echo hppa1.1-hp-bsd
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     9000/8??:4.3bsd:*:*)
6ccfd1
 	echo hppa1.0-hp-bsd
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
6ccfd1
 	echo hppa1.0-hp-mpeix
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
6ccfd1
 	echo hppa1.1-hp-osf
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     hp8??:OSF1:*:*)
6ccfd1
 	echo hppa1.0-hp-osf
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:OSF1:*:*)
6ccfd1
 	if [ -x /usr/sbin/sysversion ] ; then
6ccfd1
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
6ccfd1
 	else
6ccfd1
 	    echo ${UNAME_MACHINE}-unknown-osf1
6ccfd1
 	fi
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     parisc*:Lites*:*:*)
6ccfd1
 	echo hppa1.1-hp-lites
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
6ccfd1
 	echo c1-convex-bsd
6ccfd1
-        exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
6ccfd1
 	if getsysinfo -f scalar_acc
6ccfd1
 	then echo c32-convex-bsd
6ccfd1
 	else echo c2-convex-bsd
6ccfd1
 	fi
6ccfd1
-        exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
6ccfd1
 	echo c34-convex-bsd
6ccfd1
-        exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
6ccfd1
 	echo c38-convex-bsd
6ccfd1
-        exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
6ccfd1
 	echo c4-convex-bsd
6ccfd1
-        exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     CRAY*Y-MP:*:*:*)
6ccfd1
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     CRAY*[A-Z]90:*:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
6ccfd1
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
6ccfd1
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
6ccfd1
 	      -e 's/\.[^.]*$/.X/'
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     CRAY*TS:*:*:*)
6ccfd1
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     CRAY*T3E:*:*:*)
6ccfd1
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     CRAY*SV1:*:*:*)
6ccfd1
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:UNICOS/mp:*:*)
6ccfd1
 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
6ccfd1
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
6ccfd1
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
6ccfd1
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
6ccfd1
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
6ccfd1
-        exit 0 ;;
6ccfd1
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
6ccfd1
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
6ccfd1
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
6ccfd1
+	exit ;;
6ccfd1
     5000:UNIX_System_V:4.*:*)
6ccfd1
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
6ccfd1
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
6ccfd1
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
6ccfd1
-	exit 0 ;;
6ccfd1
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
6ccfd1
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
6ccfd1
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
6ccfd1
+	exit ;;
6ccfd1
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     sparc*:BSD/OS:*:*)
6ccfd1
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:BSD/OS:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:FreeBSD:*:*)
6ccfd1
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
6ccfd1
+	case ${UNAME_PROCESSOR} in
6ccfd1
+	    amd64)
6ccfd1
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
6ccfd1
+	    *)
6ccfd1
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
6ccfd1
+	esac
6ccfd1
+	exit ;;
6ccfd1
     i*:CYGWIN*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-pc-cygwin
6ccfd1
-	exit 0 ;;
6ccfd1
-    i*:MINGW*:*)
6ccfd1
+	exit ;;
6ccfd1
+    *:MINGW64*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-pc-mingw64
6ccfd1
+	exit ;;
6ccfd1
+    *:MINGW*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-pc-mingw32
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    i*:MSYS*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-pc-msys
6ccfd1
+	exit ;;
6ccfd1
+    i*:windows32*:*)
6ccfd1
+	# uname -m includes "-pc" on this system.
6ccfd1
+	echo ${UNAME_MACHINE}-mingw32
6ccfd1
+	exit ;;
6ccfd1
     i*:PW*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-pc-pw32
6ccfd1
-	exit 0 ;;
6ccfd1
-    x86:Interix*:[34]*)
6ccfd1
-	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    *:Interix*:*)
6ccfd1
+	case ${UNAME_MACHINE} in
6ccfd1
+	    x86)
6ccfd1
+		echo i586-pc-interix${UNAME_RELEASE}
6ccfd1
+		exit ;;
6ccfd1
+	    authenticamd | genuineintel | EM64T)
6ccfd1
+		echo x86_64-unknown-interix${UNAME_RELEASE}
6ccfd1
+		exit ;;
6ccfd1
+	    IA64)
6ccfd1
+		echo ia64-unknown-interix${UNAME_RELEASE}
6ccfd1
+		exit ;;
6ccfd1
+	esac ;;
6ccfd1
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
6ccfd1
 	echo i${UNAME_MACHINE}-pc-mks
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    8664:Windows_NT:*)
6ccfd1
+	echo x86_64-pc-mks
6ccfd1
+	exit ;;
6ccfd1
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
6ccfd1
 	# How do we know it's Interix rather than the generic POSIX subsystem?
6ccfd1
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
6ccfd1
 	# UNAME_MACHINE based on the output of uname instead of i386?
6ccfd1
 	echo i586-pc-interix
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*:UWIN*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-pc-uwin
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
6ccfd1
+	echo x86_64-unknown-cygwin
6ccfd1
+	exit ;;
6ccfd1
     p*:CYGWIN*:*)
6ccfd1
 	echo powerpcle-unknown-cygwin
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     prep*:SunOS:5.*:*)
6ccfd1
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:GNU:*:*)
6ccfd1
 	# the GNU system
6ccfd1
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:GNU/*:*:*)
6ccfd1
 	# other systems with GNU libc and userland
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:Minix:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-pc-minix
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    aarch64:Linux:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    aarch64_be:Linux:*:*)
6ccfd1
+	UNAME_MACHINE=aarch64_be
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    alpha:Linux:*:*)
6ccfd1
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
6ccfd1
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
6ccfd1
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
6ccfd1
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
6ccfd1
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
6ccfd1
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
6ccfd1
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
6ccfd1
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
6ccfd1
+	esac
6ccfd1
+	objdump --private-headers /bin/sh | grep -q ld.so.1
6ccfd1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
6ccfd1
+	exit ;;
6ccfd1
     arm*:Linux:*:*)
6ccfd1
+	eval $set_cc_for_build
6ccfd1
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
6ccfd1
+	    | grep -q __ARM_EABI__
6ccfd1
+	then
6ccfd1
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	else
6ccfd1
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
6ccfd1
+		| grep -q __ARM_PCS_VFP
6ccfd1
+	    then
6ccfd1
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
6ccfd1
+	    else
6ccfd1
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
6ccfd1
+	    fi
6ccfd1
+	fi
6ccfd1
+	exit ;;
6ccfd1
+    avr32*:Linux:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     cris:Linux:*:*)
6ccfd1
-	echo cris-axis-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
+	echo ${UNAME_MACHINE}-axis-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
     crisv32:Linux:*:*)
6ccfd1
-	echo crisv32-axis-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
+	echo ${UNAME_MACHINE}-axis-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
     frv:Linux:*:*)
6ccfd1
-    	echo frv-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
-    ia64:Linux:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
-    m32r*:Linux:*:*)
6ccfd1
+	exit ;;
6ccfd1
+    hexagon:Linux:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
-    m68*:Linux:*:*)
6ccfd1
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
-    mips:Linux:*:*)
6ccfd1
+	exit ;;
6ccfd1
+    i*86:Linux:*:*)
6ccfd1
+	LIBC=gnu
6ccfd1
 	eval $set_cc_for_build
6ccfd1
 	sed 's/^	//' << EOF >$dummy.c
6ccfd1
-	#undef CPU
6ccfd1
-	#undef mips
6ccfd1
-	#undef mipsel
6ccfd1
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
6ccfd1
-	CPU=mipsel
6ccfd1
-	#else
6ccfd1
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
6ccfd1
-	CPU=mips
6ccfd1
-	#else
6ccfd1
-	CPU=
6ccfd1
-	#endif
6ccfd1
+	#ifdef __dietlibc__
6ccfd1
+	LIBC=dietlibc
6ccfd1
 	#endif
6ccfd1
 EOF
6ccfd1
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
6ccfd1
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
6ccfd1
-	;;
6ccfd1
-    mips64:Linux:*:*)
6ccfd1
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
6ccfd1
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
6ccfd1
+	exit ;;
6ccfd1
+    ia64:Linux:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    m32r*:Linux:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    m68*:Linux:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    mips:Linux:*:* | mips64:Linux:*:*)
6ccfd1
 	eval $set_cc_for_build
6ccfd1
 	sed 's/^	//' << EOF >$dummy.c
6ccfd1
 	#undef CPU
6ccfd1
-	#undef mips64
6ccfd1
-	#undef mips64el
6ccfd1
+	#undef ${UNAME_MACHINE}
6ccfd1
+	#undef ${UNAME_MACHINE}el
6ccfd1
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
6ccfd1
-	CPU=mips64el
6ccfd1
+	CPU=${UNAME_MACHINE}el
6ccfd1
 	#else
6ccfd1
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
6ccfd1
-	CPU=mips64
6ccfd1
+	CPU=${UNAME_MACHINE}
6ccfd1
 	#else
6ccfd1
 	CPU=
6ccfd1
 	#endif
6ccfd1
 	#endif
6ccfd1
 EOF
6ccfd1
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
6ccfd1
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
6ccfd1
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
6ccfd1
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
6ccfd1
 	;;
6ccfd1
-    ppc:Linux:*:*)
6ccfd1
-	echo powerpc-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
-    ppc64:Linux:*:*)
6ccfd1
-	echo powerpc64-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
-    alpha:Linux:*:*)
6ccfd1
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
6ccfd1
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
6ccfd1
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
6ccfd1
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
6ccfd1
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
6ccfd1
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
6ccfd1
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
6ccfd1
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
6ccfd1
-        esac
6ccfd1
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
6ccfd1
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
6ccfd1
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
6ccfd1
-	exit 0 ;;
6ccfd1
+    or32:Linux:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    padre:Linux:*:*)
6ccfd1
+	echo sparc-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
6ccfd1
+	echo hppa64-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
     parisc:Linux:*:* | hppa:Linux:*:*)
6ccfd1
 	# Look for CPU level
6ccfd1
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
6ccfd1
@@ -904,115 +975,71 @@
6ccfd1
 	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
6ccfd1
 	  *)    echo hppa-unknown-linux-gnu ;;
6ccfd1
 	esac
6ccfd1
-	exit 0 ;;
6ccfd1
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
6ccfd1
-	echo hppa64-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    ppc64:Linux:*:*)
6ccfd1
+	echo powerpc64-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    ppc:Linux:*:*)
6ccfd1
+	echo powerpc-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
     s390:Linux:*:* | s390x:Linux:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-ibm-linux
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     sh64*:Linux:*:*)
6ccfd1
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
     sh*:Linux:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     sparc:Linux:*:* | sparc64:Linux:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    tile*:Linux:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    vax:Linux:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-dec-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
     x86_64:Linux:*:*)
6ccfd1
-	echo x86_64-unknown-linux-gnu
6ccfd1
-	exit 0 ;;
6ccfd1
-    i*86:Linux:*:*)
6ccfd1
-	# The BFD linker knows what the default object file format is, so
6ccfd1
-	# first see if it will tell us. cd to the root directory to prevent
6ccfd1
-	# problems with other programs or directories called `ld' in the path.
6ccfd1
-	# Set LC_ALL=C to ensure ld outputs messages in English.
6ccfd1
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
6ccfd1
-			 | sed -ne '/supported targets:/!d
6ccfd1
-				    s/[ 	][ 	]*/ /g
6ccfd1
-				    s/.*supported targets: *//
6ccfd1
-				    s/ .*//
6ccfd1
-				    p'`
6ccfd1
-        case "$ld_supported_targets" in
6ccfd1
-	  elf32-i386)
6ccfd1
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
6ccfd1
-		;;
6ccfd1
-	  a.out-i386-linux)
6ccfd1
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
6ccfd1
-		exit 0 ;;
6ccfd1
-	  coff-i386)
6ccfd1
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
6ccfd1
-		exit 0 ;;
6ccfd1
-	  "")
6ccfd1
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
6ccfd1
-		# one that does not give us useful --help.
6ccfd1
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
6ccfd1
-		exit 0 ;;
6ccfd1
-	esac
6ccfd1
-	# Determine whether the default compiler is a.out or elf
6ccfd1
-	eval $set_cc_for_build
6ccfd1
-	sed 's/^	//' << EOF >$dummy.c
6ccfd1
-	#include <features.h>
6ccfd1
-	#ifdef __ELF__
6ccfd1
-	# ifdef __GLIBC__
6ccfd1
-	#  if __GLIBC__ >= 2
6ccfd1
-	LIBC=gnu
6ccfd1
-	#  else
6ccfd1
-	LIBC=gnulibc1
6ccfd1
-	#  endif
6ccfd1
-	# else
6ccfd1
-	LIBC=gnulibc1
6ccfd1
-	# endif
6ccfd1
-	#else
6ccfd1
-	#ifdef __INTEL_COMPILER
6ccfd1
-	LIBC=gnu
6ccfd1
-	#else
6ccfd1
-	LIBC=gnuaout
6ccfd1
-	#endif
6ccfd1
-	#endif
6ccfd1
-	#ifdef __dietlibc__
6ccfd1
-	LIBC=dietlibc
6ccfd1
-	#endif
6ccfd1
-EOF
6ccfd1
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
6ccfd1
-	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
6ccfd1
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
6ccfd1
-	;;
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
+    xtensa*:Linux:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
6ccfd1
+	exit ;;
6ccfd1
     i*86:DYNIX/ptx:4*:*)
6ccfd1
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
6ccfd1
 	# earlier versions are messed up and put the nodename in both
6ccfd1
 	# sysname and nodename.
6ccfd1
 	echo i386-sequent-sysv4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:UNIX_SV:4.2MP:2.*)
6ccfd1
-        # Unixware is an offshoot of SVR4, but it has its own version
6ccfd1
-        # number series starting with 2...
6ccfd1
-        # I am not positive that other SVR4 systems won't match this,
6ccfd1
+	# Unixware is an offshoot of SVR4, but it has its own version
6ccfd1
+	# number series starting with 2...
6ccfd1
+	# I am not positive that other SVR4 systems won't match this,
6ccfd1
 	# I just have to hope.  -- rms.
6ccfd1
-        # Use sysv4.2uw... so that sysv4* matches it.
6ccfd1
+	# Use sysv4.2uw... so that sysv4* matches it.
6ccfd1
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:OS/2:*:*)
6ccfd1
 	# If we were able to find `uname', then EMX Unix compatibility
6ccfd1
 	# is probably installed.
6ccfd1
 	echo ${UNAME_MACHINE}-pc-os2-emx
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:XTS-300:*:STOP)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-stop
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:atheos:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-atheos
6ccfd1
-	exit 0 ;;
6ccfd1
-	i*86:syllable:*:*)
6ccfd1
+	exit ;;
6ccfd1
+    i*86:syllable:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-pc-syllable
6ccfd1
-	exit 0 ;;
6ccfd1
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
6ccfd1
+	exit ;;
6ccfd1
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
6ccfd1
 	echo i386-unknown-lynxos${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:*DOS:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
6ccfd1
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
6ccfd1
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
6ccfd1
@@ -1020,15 +1047,16 @@
6ccfd1
 	else
6ccfd1
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
6ccfd1
 	fi
6ccfd1
-	exit 0 ;;
6ccfd1
-    i*86:*:5:[78]*)
6ccfd1
+	exit ;;
6ccfd1
+    i*86:*:5:[678]*)
6ccfd1
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
6ccfd1
 	case `/bin/uname -X | grep "^Machine"` in
6ccfd1
 	    *486*)	     UNAME_MACHINE=i486 ;;
6ccfd1
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
6ccfd1
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
6ccfd1
 	esac
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i*86:*:3.2:*)
6ccfd1
 	if test -f /usr/options/cb.name; then
6ccfd1
 		UNAME_REL=`sed -n 's/.*Version //p' 
6ccfd1
@@ -1046,73 +1074,86 @@
6ccfd1
 	else
6ccfd1
 		echo ${UNAME_MACHINE}-pc-sysv32
6ccfd1
 	fi
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     pc:*:*:*)
6ccfd1
 	# Left here for compatibility:
6ccfd1
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
6ccfd1
-        # the processor, so we play safe by assuming i386.
6ccfd1
-	echo i386-pc-msdosdjgpp
6ccfd1
-        exit 0 ;;
6ccfd1
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
6ccfd1
+	# the processor, so we play safe by assuming i586.
6ccfd1
+	# Note: whatever this is, it MUST be the same as what config.sub
6ccfd1
+	# prints for the "djgpp" host, or else GDB configury will decide that
6ccfd1
+	# this is a cross-build.
6ccfd1
+	echo i586-pc-msdosdjgpp
6ccfd1
+	exit ;;
6ccfd1
     Intel:Mach:3*:*)
6ccfd1
 	echo i386-pc-mach3
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     paragon:*:*:*)
6ccfd1
 	echo i860-intel-osf1
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     i860:*:4.*:*) # i860-SVR4
6ccfd1
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
6ccfd1
 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
6ccfd1
 	else # Add other i860-SVR4 vendors below as they are discovered.
6ccfd1
 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
6ccfd1
 	fi
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     mini*:CTIX:SYS*5:*)
6ccfd1
 	# "miniframe"
6ccfd1
 	echo m68010-convergent-sysv
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     mc68k:UNIX:SYSTEM5:3.51m)
6ccfd1
 	echo m68k-convergent-sysv
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     M680?0:D-NIX:5.3:*)
6ccfd1
 	echo m68k-diab-dnix
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     M68*:*:R3V[5678]*:*)
6ccfd1
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
6ccfd1
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
6ccfd1
     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)
6ccfd1
 	OS_REL=''
6ccfd1
 	test -r /etc/.relid \
6ccfd1
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
6ccfd1
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
6ccfd1
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
6ccfd1
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
6ccfd1
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
6ccfd1
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
6ccfd1
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
6ccfd1
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
6ccfd1
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
6ccfd1
-          && echo i486-ncr-sysv4 && exit 0 ;;
6ccfd1
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
6ccfd1
+	  && { echo i486-ncr-sysv4; exit; } ;;
6ccfd1
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
6ccfd1
+	OS_REL='.3'
6ccfd1
+	test -r /etc/.relid \
6ccfd1
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
6ccfd1
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
6ccfd1
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
6ccfd1
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
6ccfd1
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
6ccfd1
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
6ccfd1
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
6ccfd1
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
6ccfd1
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     mc68030:UNIX_System_V:4.*:*)
6ccfd1
 	echo m68k-atari-sysv4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     TSUNAMI:LynxOS:2.*:*)
6ccfd1
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     rs6000:LynxOS:2.*:*)
6ccfd1
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
6ccfd1
+	exit ;;
6ccfd1
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
6ccfd1
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     SM[BE]S:UNIX_SV:*:*)
6ccfd1
 	echo mips-dde-sysv${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     RM*:ReliantUNIX-*:*:*)
6ccfd1
 	echo mips-sni-sysv4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     RM*:SINIX-*:*:*)
6ccfd1
 	echo mips-sni-sysv4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:SINIX-*:*:*)
6ccfd1
 	if uname -p 2>/dev/null >/dev/null ; then
6ccfd1
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
6ccfd1
@@ -1120,69 +1161,97 @@
6ccfd1
 	else
6ccfd1
 		echo ns32k-sni-sysv
6ccfd1
 	fi
6ccfd1
-	exit 0 ;;
6ccfd1
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
6ccfd1
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
6ccfd1
-        echo i586-unisys-sysv4
6ccfd1
-        exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
6ccfd1
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
6ccfd1
+	echo i586-unisys-sysv4
6ccfd1
+	exit ;;
6ccfd1
     *:UNIX_System_V:4*:FTX*)
6ccfd1
 	# From Gerald Hewes <hewes@openmarket.com>.
6ccfd1
 	# How about differentiating between stratus architectures? -djm
6ccfd1
 	echo hppa1.1-stratus-sysv4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:*:*:FTX*)
6ccfd1
 	# From seanf@swdc.stratus.com.
6ccfd1
 	echo i860-stratus-sysv4
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    i*86:VOS:*:*)
6ccfd1
+	# From Paul.Green@stratus.com.
6ccfd1
+	echo ${UNAME_MACHINE}-stratus-vos
6ccfd1
+	exit ;;
6ccfd1
     *:VOS:*:*)
6ccfd1
 	# From Paul.Green@stratus.com.
6ccfd1
 	echo hppa1.1-stratus-vos
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     mc68*:A/UX:*:*)
6ccfd1
 	echo m68k-apple-aux${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     news*:NEWS-OS:6*:*)
6ccfd1
 	echo mips-sony-newsos6
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
6ccfd1
 	if [ -d /usr/nec ]; then
6ccfd1
-	        echo mips-nec-sysv${UNAME_RELEASE}
6ccfd1
+		echo mips-nec-sysv${UNAME_RELEASE}
6ccfd1
 	else
6ccfd1
-	        echo mips-unknown-sysv${UNAME_RELEASE}
6ccfd1
+		echo mips-unknown-sysv${UNAME_RELEASE}
6ccfd1
 	fi
6ccfd1
-        exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
6ccfd1
 	echo powerpc-be-beos
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
6ccfd1
 	echo powerpc-apple-beos
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
6ccfd1
 	echo i586-pc-beos
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
6ccfd1
+	echo i586-pc-haiku
6ccfd1
+	exit ;;
6ccfd1
+    x86_64:Haiku:*:*)
6ccfd1
+	echo x86_64-unknown-haiku
6ccfd1
+	exit ;;
6ccfd1
     SX-4:SUPER-UX:*:*)
6ccfd1
 	echo sx4-nec-superux${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     SX-5:SUPER-UX:*:*)
6ccfd1
 	echo sx5-nec-superux${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     SX-6:SUPER-UX:*:*)
6ccfd1
 	echo sx6-nec-superux${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    SX-7:SUPER-UX:*:*)
6ccfd1
+	echo sx7-nec-superux${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
+    SX-8:SUPER-UX:*:*)
6ccfd1
+	echo sx8-nec-superux${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
+    SX-8R:SUPER-UX:*:*)
6ccfd1
+	echo sx8r-nec-superux${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     Power*:Rhapsody:*:*)
6ccfd1
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:Rhapsody:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:Darwin:*:*)
6ccfd1
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
6ccfd1
 	case $UNAME_PROCESSOR in
6ccfd1
-	    *86) UNAME_PROCESSOR=i686 ;;
6ccfd1
+	    i386)
6ccfd1
+		eval $set_cc_for_build
6ccfd1
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
6ccfd1
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
6ccfd1
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
6ccfd1
+		      grep IS_64BIT_ARCH >/dev/null
6ccfd1
+		  then
6ccfd1
+		      UNAME_PROCESSOR="x86_64"
6ccfd1
+		  fi
6ccfd1
+		fi ;;
6ccfd1
 	    unknown) UNAME_PROCESSOR=powerpc ;;
6ccfd1
 	esac
6ccfd1
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
6ccfd1
 	UNAME_PROCESSOR=`uname -p`
6ccfd1
 	if test "$UNAME_PROCESSOR" = "x86"; then
6ccfd1
@@ -1190,22 +1259,28 @@
6ccfd1
 		UNAME_MACHINE=pc
6ccfd1
 	fi
6ccfd1
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:QNX:*:4*)
6ccfd1
 	echo i386-pc-qnx
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
+    NEO-?:NONSTOP_KERNEL:*:*)
6ccfd1
+	echo neo-tandem-nsk${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
+    NSE-*:NONSTOP_KERNEL:*:*)
6ccfd1
+	echo nse-tandem-nsk${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     NSR-?:NONSTOP_KERNEL:*:*)
6ccfd1
 	echo nsr-tandem-nsk${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:NonStop-UX:*:*)
6ccfd1
 	echo mips-compaq-nonstopux
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     BS2000:POSIX*:*:*)
6ccfd1
 	echo bs2000-siemens-sysv
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     DS/*:UNIX_System_V:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:Plan9:*:*)
6ccfd1
 	# "uname -m" is not consistent, so use $cputype instead. 386
6ccfd1
 	# is converted to i386 for consistency with other x86
6ccfd1
@@ -1216,43 +1291,55 @@
6ccfd1
 	    UNAME_MACHINE="$cputype"
6ccfd1
 	fi
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-plan9
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:TOPS-10:*:*)
6ccfd1
 	echo pdp10-unknown-tops10
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:TENEX:*:*)
6ccfd1
 	echo pdp10-unknown-tenex
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
6ccfd1
 	echo pdp10-dec-tops20
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
6ccfd1
 	echo pdp10-xkl-tops20
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:TOPS-20:*:*)
6ccfd1
 	echo pdp10-unknown-tops20
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:ITS:*:*)
6ccfd1
 	echo pdp10-unknown-its
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     SEI:*:*:SEIUX)
6ccfd1
-        echo mips-sei-seiux${UNAME_RELEASE}
6ccfd1
-	exit 0 ;;
6ccfd1
+	echo mips-sei-seiux${UNAME_RELEASE}
6ccfd1
+	exit ;;
6ccfd1
     *:DragonFly:*:*)
6ccfd1
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     *:*VMS:*:*)
6ccfd1
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
6ccfd1
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
6ccfd1
 	case "${UNAME_MACHINE}" in
6ccfd1
-	    A*) echo alpha-dec-vms && exit 0 ;;
6ccfd1
-	    I*) echo ia64-dec-vms && exit 0 ;;
6ccfd1
-	    V*) echo vax-dec-vms && exit 0 ;;
6ccfd1
-	esac
6ccfd1
+	    A*) echo alpha-dec-vms ; exit ;;
6ccfd1
+	    I*) echo ia64-dec-vms ; exit ;;
6ccfd1
+	    V*) echo vax-dec-vms ; exit ;;
6ccfd1
+	esac ;;
6ccfd1
+    *:XENIX:*:SysV)
6ccfd1
+	echo i386-pc-xenix
6ccfd1
+	exit ;;
6ccfd1
+    i*86:skyos:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
6ccfd1
+	exit ;;
6ccfd1
+    i*86:rdos:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-pc-rdos
6ccfd1
+	exit ;;
6ccfd1
+    i*86:AROS:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-pc-aros
6ccfd1
+	exit ;;
6ccfd1
+    x86_64:VMkernel:*:*)
6ccfd1
+	echo ${UNAME_MACHINE}-unknown-esx
6ccfd1
+	exit ;;
6ccfd1
 esac
6ccfd1
 
6ccfd1
-#echo '(No uname command or uname output not recognized.)' 1>&2
6ccfd1
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
6ccfd1
-
6ccfd1
 eval $set_cc_for_build
6ccfd1
 cat >$dummy.c <
6ccfd1
 #ifdef _SEQUENT_
6ccfd1
@@ -1270,16 +1357,16 @@
6ccfd1
 #include <sys/param.h>
6ccfd1
   printf ("m68k-sony-newsos%s\n",
6ccfd1
 #ifdef NEWSOS4
6ccfd1
-          "4"
6ccfd1
+	"4"
6ccfd1
 #else
6ccfd1
-	  ""
6ccfd1
+	""
6ccfd1
 #endif
6ccfd1
-         ); exit (0);
6ccfd1
+	); exit (0);
6ccfd1
 #endif
6ccfd1
 #endif
6ccfd1
 
6ccfd1
 #if defined (__arm) && defined (__acorn) && defined (__unix)
6ccfd1
-  printf ("arm-acorn-riscix"); exit (0);
6ccfd1
+  printf ("arm-acorn-riscix\n"); exit (0);
6ccfd1
 #endif
6ccfd1
 
6ccfd1
 #if defined (hp300) && !defined (hpux)
6ccfd1
@@ -1368,11 +1455,12 @@
6ccfd1
 }
6ccfd1
 EOF
6ccfd1
 
6ccfd1
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
6ccfd1
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
6ccfd1
+	{ echo "$SYSTEM_NAME"; exit; }
6ccfd1
 
6ccfd1
 # Apollos put the system type in the environment.
6ccfd1
 
6ccfd1
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
6ccfd1
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
6ccfd1
 
6ccfd1
 # Convex versions that predate uname can use getsysinfo(1)
6ccfd1
 
6ccfd1
@@ -1381,22 +1469,22 @@
6ccfd1
     case `getsysinfo -f cpu_type` in
6ccfd1
     c1*)
6ccfd1
 	echo c1-convex-bsd
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     c2*)
6ccfd1
 	if getsysinfo -f scalar_acc
6ccfd1
 	then echo c32-convex-bsd
6ccfd1
 	else echo c2-convex-bsd
6ccfd1
 	fi
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     c34*)
6ccfd1
 	echo c34-convex-bsd
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     c38*)
6ccfd1
 	echo c38-convex-bsd
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     c4*)
6ccfd1
 	echo c4-convex-bsd
6ccfd1
-	exit 0 ;;
6ccfd1
+	exit ;;
6ccfd1
     esac
6ccfd1
 fi
6ccfd1
 
6ccfd1
@@ -1407,7 +1495,9 @@
6ccfd1
 the operating system you are using. It is advised that you
6ccfd1
 download the most up to date version of the config scripts from
6ccfd1
 
6ccfd1
-    ftp://ftp.gnu.org/pub/gnu/config/
6ccfd1
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
6ccfd1
+and
6ccfd1
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
6ccfd1
 
6ccfd1
 If the version you run ($0) is already up to date, please
6ccfd1
 send the following data and any information you think might be
6ccfd1
diff -urN libwmf-0.2.8.4/config.sub libwmf-0.2.8.4-aarch64/config.sub
6ccfd1
--- libwmf-0.2.8.4/config.sub	2005-07-27 16:47:06.000000000 -0500
6ccfd1
+++ libwmf-0.2.8.4-aarch64/config.sub	2013-03-03 06:14:17.646244797 -0600
6ccfd1
@@ -1,9 +1,10 @@
6ccfd1
 #! /bin/sh
6ccfd1
 # Configuration validation subroutine script.
6ccfd1
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
6ccfd1
-#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
6ccfd1
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
6ccfd1
+#   2011, 2012 Free Software Foundation, Inc.
6ccfd1
 
6ccfd1
-timestamp='2004-08-29'
6ccfd1
+timestamp='2012-10-10'
6ccfd1
 
6ccfd1
 # This file is (in principle) common to ALL GNU software.
6ccfd1
 # The presence of a machine in this file suggests that SOME GNU software
6ccfd1
@@ -20,23 +21,25 @@
6ccfd1
 # GNU General Public License for more details.
6ccfd1
 #
6ccfd1
 # You should have received a copy of the GNU General Public License
6ccfd1
-# along with this program; if not, write to the Free Software
6ccfd1
-# Foundation, Inc., 59 Temple Place - Suite 330,
6ccfd1
-# Boston, MA 02111-1307, USA.
6ccfd1
-
6ccfd1
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
6ccfd1
+#
6ccfd1
 # As a special exception to the GNU General Public License, if you
6ccfd1
 # distribute this file as part of a program that contains a
6ccfd1
 # configuration script generated by Autoconf, you may include it under
6ccfd1
 # the same distribution terms that you use for the rest of that program.
6ccfd1
 
6ccfd1
+
6ccfd1
 # Please send patches to <config-patches@gnu.org>.  Submit a context
6ccfd1
-# diff and a properly formatted ChangeLog entry.
6ccfd1
+# diff and a properly formatted GNU ChangeLog entry.
6ccfd1
 #
6ccfd1
 # Configuration subroutine to validate and canonicalize a configuration type.
6ccfd1
 # Supply the specified configuration type as an argument.
6ccfd1
 # If it is invalid, we print an error message on stderr and exit with code 1.
6ccfd1
 # Otherwise, we print the canonical config type on stdout and succeed.
6ccfd1
 
6ccfd1
+# You can get the latest version of this script from:
6ccfd1
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
6ccfd1
+
6ccfd1
 # This file is supposed to be the same for all GNU packages
6ccfd1
 # and recognize all the CPU types, system types and aliases
6ccfd1
 # that are meaningful with *any* GNU software.
6ccfd1
@@ -70,7 +73,8 @@
6ccfd1
 version="\
6ccfd1
 GNU config.sub ($timestamp)
6ccfd1
 
6ccfd1
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
6ccfd1
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
6ccfd1
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
6ccfd1
 Free Software Foundation, Inc.
6ccfd1
 
6ccfd1
 This is free software; see the source for copying conditions.  There is NO
6ccfd1
@@ -83,11 +87,11 @@
6ccfd1
 while test $# -gt 0 ; do
6ccfd1
   case $1 in
6ccfd1
     --time-stamp | --time* | -t )
6ccfd1
-       echo "$timestamp" ; exit 0 ;;
6ccfd1
+       echo "$timestamp" ; exit ;;
6ccfd1
     --version | -v )
6ccfd1
-       echo "$version" ; exit 0 ;;
6ccfd1
+       echo "$version" ; exit ;;
6ccfd1
     --help | --h* | -h )
6ccfd1
-       echo "$usage"; exit 0 ;;
6ccfd1
+       echo "$usage"; exit ;;
6ccfd1
     -- )     # Stop option processing
6ccfd1
        shift; break ;;
6ccfd1
     - )	# Use stdin as input.
6ccfd1
@@ -99,7 +103,7 @@
6ccfd1
     *local*)
6ccfd1
        # First pass through any local machine types.
6ccfd1
        echo $1
6ccfd1
-       exit 0;;
6ccfd1
+       exit ;;
6ccfd1
 
6ccfd1
     * )
6ccfd1
        break ;;
6ccfd1
@@ -118,11 +122,18 @@
6ccfd1
 # Here we must recognize all the valid KERNEL-OS combinations.
6ccfd1
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
6ccfd1
 case $maybe_os in
6ccfd1
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
6ccfd1
-  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
6ccfd1
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
6ccfd1
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
6ccfd1
+  knetbsd*-gnu* | netbsd*-gnu* | \
6ccfd1
+  kopensolaris*-gnu* | \
6ccfd1
+  storm-chaos* | os2-emx* | rtmk-nova*)
6ccfd1
     os=-$maybe_os
6ccfd1
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
6ccfd1
     ;;
6ccfd1
+  android-linux)
6ccfd1
+    os=-linux-android
6ccfd1
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
6ccfd1
+    ;;
6ccfd1
   *)
6ccfd1
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
6ccfd1
     if [ $basic_machine != $1 ]
6ccfd1
@@ -145,10 +156,13 @@
6ccfd1
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
6ccfd1
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
6ccfd1
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
6ccfd1
-	-apple | -axis | -knuth | -cray)
6ccfd1
+	-apple | -axis | -knuth | -cray | -microblaze*)
6ccfd1
 		os=
6ccfd1
 		basic_machine=$1
6ccfd1
 		;;
6ccfd1
+	-bluegene*)
6ccfd1
+		os=-cnk
6ccfd1
+		;;
6ccfd1
 	-sim | -cisco | -oki | -wec | -winbond)
6ccfd1
 		os=
6ccfd1
 		basic_machine=$1
6ccfd1
@@ -163,13 +177,17 @@
6ccfd1
 		os=-chorusos
6ccfd1
 		basic_machine=$1
6ccfd1
 		;;
6ccfd1
- 	-chorusrdb)
6ccfd1
- 		os=-chorusrdb
6ccfd1
+	-chorusrdb)
6ccfd1
+		os=-chorusrdb
6ccfd1
 		basic_machine=$1
6ccfd1
- 		;;
6ccfd1
+		;;
6ccfd1
 	-hiux*)
6ccfd1
 		os=-hiuxwe2
6ccfd1
 		;;
6ccfd1
+	-sco6)
6ccfd1
+		os=-sco5v6
6ccfd1
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
6ccfd1
+		;;
6ccfd1
 	-sco5)
6ccfd1
 		os=-sco3.2v5
6ccfd1
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
6ccfd1
@@ -186,6 +204,10 @@
6ccfd1
 		# Don't forget version if it is 3.2v4 or newer.
6ccfd1
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
6ccfd1
 		;;
6ccfd1
+	-sco5v6*)
6ccfd1
+		# Don't forget version if it is 3.2v4 or newer.
6ccfd1
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
6ccfd1
+		;;
6ccfd1
 	-sco*)
6ccfd1
 		os=-sco3.2v2
6ccfd1
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
6ccfd1
@@ -203,6 +225,12 @@
6ccfd1
 	-isc*)
6ccfd1
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
6ccfd1
 		;;
6ccfd1
+	-lynx*178)
6ccfd1
+		os=-lynxos178
6ccfd1
+		;;
6ccfd1
+	-lynx*5)
6ccfd1
+		os=-lynxos5
6ccfd1
+		;;
6ccfd1
 	-lynx*)
6ccfd1
 		os=-lynxos
6ccfd1
 		;;
6ccfd1
@@ -227,25 +255,36 @@
6ccfd1
 	# Some are omitted here because they have special meanings below.
6ccfd1
 	1750a | 580 \
6ccfd1
 	| a29k \
6ccfd1
+	| aarch64 | aarch64_be \
6ccfd1
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
6ccfd1
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
6ccfd1
 	| am33_2.0 \
6ccfd1
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
6ccfd1
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
6ccfd1
+        | be32 | be64 \
6ccfd1
+	| bfin \
6ccfd1
 	| c4x | clipper \
6ccfd1
 	| d10v | d30v | dlx | dsp16xx \
6ccfd1
-	| fr30 | frv \
6ccfd1
+	| epiphany \
6ccfd1
+	| fido | fr30 | frv \
6ccfd1
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
6ccfd1
+	| hexagon \
6ccfd1
 	| i370 | i860 | i960 | ia64 \
6ccfd1
 	| ip2k | iq2000 \
6ccfd1
-	| m32r | m32rle | m68000 | m68k | m88k | mcore \
6ccfd1
+	| le32 | le64 \
6ccfd1
+	| lm32 \
6ccfd1
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
6ccfd1
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
6ccfd1
 	| mips | mipsbe | mipseb | mipsel | mipsle \
6ccfd1
 	| mips16 \
6ccfd1
 	| mips64 | mips64el \
6ccfd1
-	| mips64vr | mips64vrel \
6ccfd1
+	| mips64octeon | mips64octeonel \
6ccfd1
 	| mips64orion | mips64orionel \
6ccfd1
+	| mips64r5900 | mips64r5900el \
6ccfd1
+	| mips64vr | mips64vrel \
6ccfd1
 	| mips64vr4100 | mips64vr4100el \
6ccfd1
 	| mips64vr4300 | mips64vr4300el \
6ccfd1
 	| mips64vr5000 | mips64vr5000el \
6ccfd1
+	| mips64vr5900 | mips64vr5900el \
6ccfd1
 	| mipsisa32 | mipsisa32el \
6ccfd1
 	| mipsisa32r2 | mipsisa32r2el \
6ccfd1
 	| mipsisa64 | mipsisa64el \
6ccfd1
@@ -254,30 +293,65 @@
6ccfd1
 	| mipsisa64sr71k | mipsisa64sr71kel \
6ccfd1
 	| mipstx39 | mipstx39el \
6ccfd1
 	| mn10200 | mn10300 \
6ccfd1
+	| moxie \
6ccfd1
+	| mt \
6ccfd1
 	| msp430 \
6ccfd1
+	| nds32 | nds32le | nds32be \
6ccfd1
+	| nios | nios2 \
6ccfd1
 	| ns16k | ns32k \
6ccfd1
-	| openrisc | or32 \
6ccfd1
+	| open8 \
6ccfd1
+	| or32 \
6ccfd1
 	| pdp10 | pdp11 | pj | pjl \
6ccfd1
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
6ccfd1
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
6ccfd1
 	| pyramid \
6ccfd1
-	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
6ccfd1
+	| rl78 | rx \
6ccfd1
+	| score \
6ccfd1
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
6ccfd1
 	| sh64 | sh64le \
6ccfd1
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
6ccfd1
-	| strongarm \
6ccfd1
-	| tahoe | thumb | tic4x | tic80 | tron \
6ccfd1
-	| v850 | v850e \
6ccfd1
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
6ccfd1
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
6ccfd1
+	| spu \
6ccfd1
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
6ccfd1
+	| ubicom32 \
6ccfd1
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
6ccfd1
 	| we32k \
6ccfd1
-	| x86 | xscale | xstormy16 | xtensa \
6ccfd1
-	| z8k)
6ccfd1
+	| x86 | xc16x | xstormy16 | xtensa \
6ccfd1
+	| z8k | z80)
6ccfd1
 		basic_machine=$basic_machine-unknown
6ccfd1
 		;;
6ccfd1
-	m6811 | m68hc11 | m6812 | m68hc12)
6ccfd1
-		# Motorola 68HC11/12.
6ccfd1
+	c54x)
6ccfd1
+		basic_machine=tic54x-unknown
6ccfd1
+		;;
6ccfd1
+	c55x)
6ccfd1
+		basic_machine=tic55x-unknown
6ccfd1
+		;;
6ccfd1
+	c6x)
6ccfd1
+		basic_machine=tic6x-unknown
6ccfd1
+		;;
6ccfd1
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
6ccfd1
 		basic_machine=$basic_machine-unknown
6ccfd1
 		os=-none
6ccfd1
 		;;
6ccfd1
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
6ccfd1
 		;;
6ccfd1
+	ms1)
6ccfd1
+		basic_machine=mt-unknown
6ccfd1
+		;;
6ccfd1
+
6ccfd1
+	strongarm | thumb | xscale)
6ccfd1
+		basic_machine=arm-unknown
6ccfd1
+		;;
6ccfd1
+	xgate)
6ccfd1
+		basic_machine=$basic_machine-unknown
6ccfd1
+		os=-none
6ccfd1
+		;;
6ccfd1
+	xscaleeb)
6ccfd1
+		basic_machine=armeb-unknown
6ccfd1
+		;;
6ccfd1
+
6ccfd1
+	xscaleel)
6ccfd1
+		basic_machine=armel-unknown
6ccfd1
+		;;
6ccfd1
 
6ccfd1
 	# We use `pc' rather than `unknown'
6ccfd1
 	# because (1) that's what they normally are, and
6ccfd1
@@ -293,32 +367,41 @@
6ccfd1
 	# Recognize the basic CPU types with company name.
6ccfd1
 	580-* \
6ccfd1
 	| a29k-* \
6ccfd1
+	| aarch64-* | aarch64_be-* \
6ccfd1
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
6ccfd1
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
6ccfd1
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
6ccfd1
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
6ccfd1
-	| avr-* \
6ccfd1
-	| bs2000-* \
6ccfd1
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
6ccfd1
+	| avr-* | avr32-* \
6ccfd1
+	| be32-* | be64-* \
6ccfd1
+	| bfin-* | bs2000-* \
6ccfd1
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
6ccfd1
 	| clipper-* | craynv-* | cydra-* \
6ccfd1
 	| d10v-* | d30v-* | dlx-* \
6ccfd1
 	| elxsi-* \
6ccfd1
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
6ccfd1
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
6ccfd1
 	| h8300-* | h8500-* \
6ccfd1
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
6ccfd1
+	| hexagon-* \
6ccfd1
 	| i*86-* | i860-* | i960-* | ia64-* \
6ccfd1
 	| ip2k-* | iq2000-* \
6ccfd1
-	| m32r-* | m32rle-* \
6ccfd1
+	| le32-* | le64-* \
6ccfd1
+	| lm32-* \
6ccfd1
+	| m32c-* | m32r-* | m32rle-* \
6ccfd1
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
6ccfd1
-	| m88110-* | m88k-* | mcore-* \
6ccfd1
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
6ccfd1
+	| microblaze-* | microblazeel-* \
6ccfd1
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
6ccfd1
 	| mips16-* \
6ccfd1
 	| mips64-* | mips64el-* \
6ccfd1
-	| mips64vr-* | mips64vrel-* \
6ccfd1
+	| mips64octeon-* | mips64octeonel-* \
6ccfd1
 	| mips64orion-* | mips64orionel-* \
6ccfd1
+	| mips64r5900-* | mips64r5900el-* \
6ccfd1
+	| mips64vr-* | mips64vrel-* \
6ccfd1
 	| mips64vr4100-* | mips64vr4100el-* \
6ccfd1
 	| mips64vr4300-* | mips64vr4300el-* \
6ccfd1
 	| mips64vr5000-* | mips64vr5000el-* \
6ccfd1
+	| mips64vr5900-* | mips64vr5900el-* \
6ccfd1
 	| mipsisa32-* | mipsisa32el-* \
6ccfd1
 	| mipsisa32r2-* | mipsisa32r2el-* \
6ccfd1
 	| mipsisa64-* | mipsisa64el-* \
6ccfd1
@@ -327,26 +410,38 @@
6ccfd1
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
6ccfd1
 	| mipstx39-* | mipstx39el-* \
6ccfd1
 	| mmix-* \
6ccfd1
+	| mt-* \
6ccfd1
 	| msp430-* \
6ccfd1
+	| nds32-* | nds32le-* | nds32be-* \
6ccfd1
+	| nios-* | nios2-* \
6ccfd1
 	| none-* | np1-* | ns16k-* | ns32k-* \
6ccfd1
+	| open8-* \
6ccfd1
 	| orion-* \
6ccfd1
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
6ccfd1
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
6ccfd1
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
6ccfd1
 	| pyramid-* \
6ccfd1
-	| romp-* | rs6000-* \
6ccfd1
-	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
6ccfd1
+	| rl78-* | romp-* | rs6000-* | rx-* \
6ccfd1
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
6ccfd1
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
6ccfd1
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
6ccfd1
-	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
6ccfd1
-	| tahoe-* | thumb-* \
6ccfd1
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
6ccfd1
+	| sparclite-* \
6ccfd1
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
6ccfd1
+	| tahoe-* \
6ccfd1
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
6ccfd1
+	| tile*-* \
6ccfd1
 	| tron-* \
6ccfd1
-	| v850-* | v850e-* | vax-* \
6ccfd1
+	| ubicom32-* \
6ccfd1
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
6ccfd1
+	| vax-* \
6ccfd1
 	| we32k-* \
6ccfd1
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
6ccfd1
-	| xtensa-* \
6ccfd1
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
6ccfd1
+	| xstormy16-* | xtensa*-* \
6ccfd1
 	| ymp-* \
6ccfd1
-	| z8k-*)
6ccfd1
+	| z8k-* | z80-*)
6ccfd1
+		;;
6ccfd1
+	# Recognize the basic CPU types without company name, with glob match.
6ccfd1
+	xtensa*)
6ccfd1
+		basic_machine=$basic_machine-unknown
6ccfd1
 		;;
6ccfd1
 	# Recognize the various machine names and aliases which stand
6ccfd1
 	# for a CPU type and a company and sometimes even an OS.
6ccfd1
@@ -364,7 +459,7 @@
6ccfd1
 		basic_machine=a29k-amd
6ccfd1
 		os=-udi
6ccfd1
 		;;
6ccfd1
-    	abacus)
6ccfd1
+	abacus)
6ccfd1
 		basic_machine=abacus-unknown
6ccfd1
 		;;
6ccfd1
 	adobe68k)
6ccfd1
@@ -410,6 +505,10 @@
6ccfd1
 		basic_machine=m68k-apollo
6ccfd1
 		os=-bsd
6ccfd1
 		;;
6ccfd1
+	aros)
6ccfd1
+		basic_machine=i386-pc
6ccfd1
+		os=-aros
6ccfd1
+		;;
6ccfd1
 	aux)
6ccfd1
 		basic_machine=m68k-apple
6ccfd1
 		os=-aux
6ccfd1
@@ -418,10 +517,35 @@
6ccfd1
 		basic_machine=ns32k-sequent
6ccfd1
 		os=-dynix
6ccfd1
 		;;
6ccfd1
+	blackfin)
6ccfd1
+		basic_machine=bfin-unknown
6ccfd1
+		os=-linux
6ccfd1
+		;;
6ccfd1
+	blackfin-*)
6ccfd1
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+		os=-linux
6ccfd1
+		;;
6ccfd1
+	bluegene*)
6ccfd1
+		basic_machine=powerpc-ibm
6ccfd1
+		os=-cnk
6ccfd1
+		;;
6ccfd1
+	c54x-*)
6ccfd1
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+		;;
6ccfd1
+	c55x-*)
6ccfd1
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+		;;
6ccfd1
+	c6x-*)
6ccfd1
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+		;;
6ccfd1
 	c90)
6ccfd1
 		basic_machine=c90-cray
6ccfd1
 		os=-unicos
6ccfd1
 		;;
6ccfd1
+	cegcc)
6ccfd1
+		basic_machine=arm-unknown
6ccfd1
+		os=-cegcc
6ccfd1
+		;;
6ccfd1
 	convex-c1)
6ccfd1
 		basic_machine=c1-convex
6ccfd1
 		os=-bsd
6ccfd1
@@ -450,8 +574,8 @@
6ccfd1
 		basic_machine=craynv-cray
6ccfd1
 		os=-unicosmp
6ccfd1
 		;;
6ccfd1
-	cr16c)
6ccfd1
-		basic_machine=cr16c-unknown
6ccfd1
+	cr16 | cr16-*)
6ccfd1
+		basic_machine=cr16-unknown
6ccfd1
 		os=-elf
6ccfd1
 		;;
6ccfd1
 	crds | unos)
6ccfd1
@@ -489,6 +613,14 @@
6ccfd1
 		basic_machine=m88k-motorola
6ccfd1
 		os=-sysv3
6ccfd1
 		;;
6ccfd1
+	dicos)
6ccfd1
+		basic_machine=i686-pc
6ccfd1
+		os=-dicos
6ccfd1
+		;;
6ccfd1
+	djgpp)
6ccfd1
+		basic_machine=i586-pc
6ccfd1
+		os=-msdosdjgpp
6ccfd1
+		;;
6ccfd1
 	dpx20 | dpx20-*)
6ccfd1
 		basic_machine=rs6000-bull
6ccfd1
 		os=-bosx
6ccfd1
@@ -600,7 +732,6 @@
6ccfd1
 	i370-ibm* | ibm*)
6ccfd1
 		basic_machine=i370-ibm
6ccfd1
 		;;
6ccfd1
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
6ccfd1
 	i*86v32)
6ccfd1
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
6ccfd1
 		os=-sysv32
6ccfd1
@@ -639,6 +770,14 @@
6ccfd1
 		basic_machine=m68k-isi
6ccfd1
 		os=-sysv
6ccfd1
 		;;
6ccfd1
+	m68knommu)
6ccfd1
+		basic_machine=m68k-unknown
6ccfd1
+		os=-linux
6ccfd1
+		;;
6ccfd1
+	m68knommu-*)
6ccfd1
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+		os=-linux
6ccfd1
+		;;
6ccfd1
 	m88k-omron*)
6ccfd1
 		basic_machine=m88k-omron
6ccfd1
 		;;
6ccfd1
@@ -650,10 +789,21 @@
6ccfd1
 		basic_machine=ns32k-utek
6ccfd1
 		os=-sysv
6ccfd1
 		;;
6ccfd1
+	microblaze*)
6ccfd1
+		basic_machine=microblaze-xilinx
6ccfd1
+		;;
6ccfd1
+	mingw64)
6ccfd1
+		basic_machine=x86_64-pc
6ccfd1
+		os=-mingw64
6ccfd1
+		;;
6ccfd1
 	mingw32)
6ccfd1
 		basic_machine=i386-pc
6ccfd1
 		os=-mingw32
6ccfd1
 		;;
6ccfd1
+	mingw32ce)
6ccfd1
+		basic_machine=arm-unknown
6ccfd1
+		os=-mingw32ce
6ccfd1
+		;;
6ccfd1
 	miniframe)
6ccfd1
 		basic_machine=m68000-convergent
6ccfd1
 		;;
6ccfd1
@@ -679,10 +829,21 @@
6ccfd1
 		basic_machine=i386-pc
6ccfd1
 		os=-msdos
6ccfd1
 		;;
6ccfd1
+	ms1-*)
6ccfd1
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
6ccfd1
+		;;
6ccfd1
+	msys)
6ccfd1
+		basic_machine=i386-pc
6ccfd1
+		os=-msys
6ccfd1
+		;;
6ccfd1
 	mvs)
6ccfd1
 		basic_machine=i370-ibm
6ccfd1
 		os=-mvs
6ccfd1
 		;;
6ccfd1
+	nacl)
6ccfd1
+		basic_machine=le32-unknown
6ccfd1
+		os=-nacl
6ccfd1
+		;;
6ccfd1
 	ncr3000)
6ccfd1
 		basic_machine=i486-ncr
6ccfd1
 		os=-sysv4
6ccfd1
@@ -747,6 +908,12 @@
6ccfd1
 	np1)
6ccfd1
 		basic_machine=np1-gould
6ccfd1
 		;;
6ccfd1
+	neo-tandem)
6ccfd1
+		basic_machine=neo-tandem
6ccfd1
+		;;
6ccfd1
+	nse-tandem)
6ccfd1
+		basic_machine=nse-tandem
6ccfd1
+		;;
6ccfd1
 	nsr-tandem)
6ccfd1
 		basic_machine=nsr-tandem
6ccfd1
 		;;
6ccfd1
@@ -754,9 +921,8 @@
6ccfd1
 		basic_machine=hppa1.1-oki
6ccfd1
 		os=-proelf
6ccfd1
 		;;
6ccfd1
-	or32 | or32-*)
6ccfd1
+	openrisc | openrisc-*)
6ccfd1
 		basic_machine=or32-unknown
6ccfd1
-		os=-coff
6ccfd1
 		;;
6ccfd1
 	os400)
6ccfd1
 		basic_machine=powerpc-ibm
6ccfd1
@@ -778,6 +944,14 @@
6ccfd1
 		basic_machine=i860-intel
6ccfd1
 		os=-osf
6ccfd1
 		;;
6ccfd1
+	parisc)
6ccfd1
+		basic_machine=hppa-unknown
6ccfd1
+		os=-linux
6ccfd1
+		;;
6ccfd1
+	parisc-*)
6ccfd1
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+		os=-linux
6ccfd1
+		;;
6ccfd1
 	pbd)
6ccfd1
 		basic_machine=sparc-tti
6ccfd1
 		;;
6ccfd1
@@ -787,6 +961,12 @@
6ccfd1
 	pc532 | pc532-*)
6ccfd1
 		basic_machine=ns32k-pc532
6ccfd1
 		;;
6ccfd1
+	pc98)
6ccfd1
+		basic_machine=i386-pc
6ccfd1
+		;;
6ccfd1
+	pc98-*)
6ccfd1
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+		;;
6ccfd1
 	pentium | p5 | k5 | k6 | nexgen | viac3)
6ccfd1
 		basic_machine=i586-pc
6ccfd1
 		;;
6ccfd1
@@ -816,9 +996,10 @@
6ccfd1
 		;;
6ccfd1
 	power)	basic_machine=power-ibm
6ccfd1
 		;;
6ccfd1
-	ppc)	basic_machine=powerpc-unknown
6ccfd1
+	ppc | ppcbe)	basic_machine=powerpc-unknown
6ccfd1
 		;;
6ccfd1
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+	ppc-* | ppcbe-*)
6ccfd1
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
 		;;
6ccfd1
 	ppcle | powerpclittle | ppc-le | powerpc-little)
6ccfd1
 		basic_machine=powerpcle-unknown
6ccfd1
@@ -843,6 +1024,10 @@
6ccfd1
 		basic_machine=i586-unknown
6ccfd1
 		os=-pw32
6ccfd1
 		;;
6ccfd1
+	rdos)
6ccfd1
+		basic_machine=i386-pc
6ccfd1
+		os=-rdos
6ccfd1
+		;;
6ccfd1
 	rom68k)
6ccfd1
 		basic_machine=m68k-rom68k
6ccfd1
 		os=-coff
6ccfd1
@@ -869,6 +1054,10 @@
6ccfd1
 	sb1el)
6ccfd1
 		basic_machine=mipsisa64sb1el-unknown
6ccfd1
 		;;
6ccfd1
+	sde)
6ccfd1
+		basic_machine=mipsisa32-sde
6ccfd1
+		os=-elf
6ccfd1
+		;;
6ccfd1
 	sei)
6ccfd1
 		basic_machine=mips-sei
6ccfd1
 		os=-seiux
6ccfd1
@@ -880,6 +1069,9 @@
6ccfd1
 		basic_machine=sh-hitachi
6ccfd1
 		os=-hms
6ccfd1
 		;;
6ccfd1
+	sh5el)
6ccfd1
+		basic_machine=sh5le-unknown
6ccfd1
+		;;
6ccfd1
 	sh64)
6ccfd1
 		basic_machine=sh64-unknown
6ccfd1
 		;;
6ccfd1
@@ -901,6 +1093,9 @@
6ccfd1
 		basic_machine=i860-stratus
6ccfd1
 		os=-sysv4
6ccfd1
 		;;
6ccfd1
+	strongarm-* | thumb-*)
6ccfd1
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
6ccfd1
+		;;
6ccfd1
 	sun2)
6ccfd1
 		basic_machine=m68000-sun
6ccfd1
 		;;
6ccfd1
@@ -957,17 +1152,9 @@
6ccfd1
 		basic_machine=t90-cray
6ccfd1
 		os=-unicos
6ccfd1
 		;;
6ccfd1
-	tic54x | c54x*)
6ccfd1
-		basic_machine=tic54x-unknown
6ccfd1
-		os=-coff
6ccfd1
-		;;
6ccfd1
-	tic55x | c55x*)
6ccfd1
-		basic_machine=tic55x-unknown
6ccfd1
-		os=-coff
6ccfd1
-		;;
6ccfd1
-	tic6x | c6x*)
6ccfd1
-		basic_machine=tic6x-unknown
6ccfd1
-		os=-coff
6ccfd1
+	tile*)
6ccfd1
+		basic_machine=$basic_machine-unknown
6ccfd1
+		os=-linux-gnu
6ccfd1
 		;;
6ccfd1
 	tx39)
6ccfd1
 		basic_machine=mipstx39-unknown
6ccfd1
@@ -1029,9 +1216,16 @@
6ccfd1
 		basic_machine=hppa1.1-winbond
6ccfd1
 		os=-proelf
6ccfd1
 		;;
6ccfd1
+	xbox)
6ccfd1
+		basic_machine=i686-pc
6ccfd1
+		os=-mingw32
6ccfd1
+		;;
6ccfd1
 	xps | xps100)
6ccfd1
 		basic_machine=xps100-honeywell
6ccfd1
 		;;
6ccfd1
+	xscale-* | xscalee[bl]-*)
6ccfd1
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
6ccfd1
+		;;
6ccfd1
 	ymp)
6ccfd1
 		basic_machine=ymp-cray
6ccfd1
 		os=-unicos
6ccfd1
@@ -1040,6 +1234,10 @@
6ccfd1
 		basic_machine=z8k-unknown
6ccfd1
 		os=-sim
6ccfd1
 		;;
6ccfd1
+	z80-*-coff)
6ccfd1
+		basic_machine=z80-unknown
6ccfd1
+		os=-sim
6ccfd1
+		;;
6ccfd1
 	none)
6ccfd1
 		basic_machine=none-none
6ccfd1
 		os=-none
6ccfd1
@@ -1078,13 +1276,10 @@
6ccfd1
 	we32k)
6ccfd1
 		basic_machine=we32k-att
6ccfd1
 		;;
6ccfd1
-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
6ccfd1
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
6ccfd1
 		basic_machine=sh-unknown
6ccfd1
 		;;
6ccfd1
-	sh64)
6ccfd1
-		basic_machine=sh64-unknown
6ccfd1
-		;;
6ccfd1
-	sparc | sparcv8 | sparcv9 | sparcv9b)
6ccfd1
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
6ccfd1
 		basic_machine=sparc-sun
6ccfd1
 		;;
6ccfd1
 	cydra)
6ccfd1
@@ -1128,9 +1323,12 @@
6ccfd1
 if [ x"$os" != x"" ]
6ccfd1
 then
6ccfd1
 case $os in
6ccfd1
-        # First match some system type aliases
6ccfd1
-        # that might get confused with valid system types.
6ccfd1
+	# First match some system type aliases
6ccfd1
+	# that might get confused with valid system types.
6ccfd1
 	# -solaris* is a basic system type, with this one exception.
6ccfd1
+	-auroraux)
6ccfd1
+		os=-auroraux
6ccfd1
+		;;
6ccfd1
 	-solaris1 | -solaris1.*)
6ccfd1
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
6ccfd1
 		;;
6ccfd1
@@ -1151,26 +1349,31 @@
6ccfd1
 	# Each alternative MUST END IN A *, to match a version number.
6ccfd1
 	# -sysv* is not here because it comes later, after sysvr4.
6ccfd1
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
6ccfd1
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
6ccfd1
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
6ccfd1
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
6ccfd1
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
6ccfd1
+	      | -sym* | -kopensolaris* \
6ccfd1
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
6ccfd1
-	      | -aos* \
6ccfd1
+	      | -aos* | -aros* \
6ccfd1
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
6ccfd1
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
6ccfd1
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
6ccfd1
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
6ccfd1
+	      | -bitrig* | -openbsd* | -solidbsd* \
6ccfd1
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
6ccfd1
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
6ccfd1
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
6ccfd1
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
6ccfd1
-	      | -chorusos* | -chorusrdb* \
6ccfd1
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
6ccfd1
-	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
6ccfd1
+	      | -chorusos* | -chorusrdb* | -cegcc* \
6ccfd1
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
6ccfd1
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
6ccfd1
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
6ccfd1
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
6ccfd1
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
6ccfd1
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
6ccfd1
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
6ccfd1
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
6ccfd1
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
6ccfd1
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
6ccfd1
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
6ccfd1
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
6ccfd1
 	# Remember, each alternative MUST END IN *, to match a version number.
6ccfd1
 		;;
6ccfd1
 	-qnx*)
6ccfd1
@@ -1188,7 +1391,7 @@
6ccfd1
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
6ccfd1
 		;;
6ccfd1
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
6ccfd1
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
6ccfd1
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
6ccfd1
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
6ccfd1
 		;;
6ccfd1
 	-mac*)
6ccfd1
@@ -1209,7 +1412,7 @@
6ccfd1
 	-opened*)
6ccfd1
 		os=-openedition
6ccfd1
 		;;
6ccfd1
-        -os400*)
6ccfd1
+	-os400*)
6ccfd1
 		os=-os400
6ccfd1
 		;;
6ccfd1
 	-wince*)
6ccfd1
@@ -1258,7 +1461,7 @@
6ccfd1
 	-sinix*)
6ccfd1
 		os=-sysv4
6ccfd1
 		;;
6ccfd1
-        -tpf*)
6ccfd1
+	-tpf*)
6ccfd1
 		os=-tpf
6ccfd1
 		;;
6ccfd1
 	-triton*)
6ccfd1
@@ -1297,6 +1500,14 @@
6ccfd1
 	-kaos*)
6ccfd1
 		os=-kaos
6ccfd1
 		;;
6ccfd1
+	-zvmoe)
6ccfd1
+		os=-zvmoe
6ccfd1
+		;;
6ccfd1
+	-dicos*)
6ccfd1
+		os=-dicos
6ccfd1
+		;;
6ccfd1
+	-nacl*)
6ccfd1
+		;;
6ccfd1
 	-none)
6ccfd1
 		;;
6ccfd1
 	*)
6ccfd1
@@ -1319,6 +1530,12 @@
6ccfd1
 # system, and we'll never get to this point.
6ccfd1
 
6ccfd1
 case $basic_machine in
6ccfd1
+	score-*)
6ccfd1
+		os=-elf
6ccfd1
+		;;
6ccfd1
+	spu-*)
6ccfd1
+		os=-elf
6ccfd1
+		;;
6ccfd1
 	*-acorn)
6ccfd1
 		os=-riscix1.2
6ccfd1
 		;;
6ccfd1
@@ -1328,9 +1545,21 @@
6ccfd1
 	arm*-semi)
6ccfd1
 		os=-aout
6ccfd1
 		;;
6ccfd1
-    c4x-* | tic4x-*)
6ccfd1
-        os=-coff
6ccfd1
-        ;;
6ccfd1
+	c4x-* | tic4x-*)
6ccfd1
+		os=-coff
6ccfd1
+		;;
6ccfd1
+	hexagon-*)
6ccfd1
+		os=-elf
6ccfd1
+		;;
6ccfd1
+	tic54x-*)
6ccfd1
+		os=-coff
6ccfd1
+		;;
6ccfd1
+	tic55x-*)
6ccfd1
+		os=-coff
6ccfd1
+		;;
6ccfd1
+	tic6x-*)
6ccfd1
+		os=-coff
6ccfd1
+		;;
6ccfd1
 	# This must come before the *-dec entry.
6ccfd1
 	pdp10-*)
6ccfd1
 		os=-tops20
6ccfd1
@@ -1349,13 +1578,13 @@
6ccfd1
 		;;
6ccfd1
 	m68000-sun)
6ccfd1
 		os=-sunos3
6ccfd1
-		# This also exists in the configure program, but was not the
6ccfd1
-		# default.
6ccfd1
-		# os=-sunos4
6ccfd1
 		;;
6ccfd1
 	m68*-cisco)
6ccfd1
 		os=-aout
6ccfd1
 		;;
6ccfd1
+	mep-*)
6ccfd1
+		os=-elf
6ccfd1
+		;;
6ccfd1
 	mips*-cisco)
6ccfd1
 		os=-elf
6ccfd1
 		;;
6ccfd1
@@ -1374,10 +1603,13 @@
6ccfd1
 	*-be)
6ccfd1
 		os=-beos
6ccfd1
 		;;
6ccfd1
+	*-haiku)
6ccfd1
+		os=-haiku
6ccfd1
+		;;
6ccfd1
 	*-ibm)
6ccfd1
 		os=-aix
6ccfd1
 		;;
6ccfd1
-    	*-knuth)
6ccfd1
+	*-knuth)
6ccfd1
 		os=-mmixware
6ccfd1
 		;;
6ccfd1
 	*-wec)
6ccfd1
@@ -1482,7 +1714,7 @@
6ccfd1
 			-sunos*)
6ccfd1
 				vendor=sun
6ccfd1
 				;;
6ccfd1
-			-aix*)
6ccfd1
+			-cnk*|-aix*)
6ccfd1
 				vendor=ibm
6ccfd1
 				;;
6ccfd1
 			-beos*)
6ccfd1
@@ -1545,7 +1777,7 @@
6ccfd1
 esac
6ccfd1
 
6ccfd1
 echo $basic_machine$os
6ccfd1
-exit 0
6ccfd1
+exit
6ccfd1
 
6ccfd1
 # Local variables:
6ccfd1
 # eval: (add-hook 'write-file-hooks 'time-stamp)