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