e75128
From 3480f36d80a89e0b337b1eef7641a1975f4b15fd Mon Sep 17 00:00:00 2001
e75128
From: Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
e75128
Date: Fri, 11 Apr 2014 13:07:49 -0500
e75128
Subject: [PATCH 1/4] ppc64le build support
e75128
e75128
---
e75128
 ldap/sdks/c-sdk/config/autoconf/config.guess | 637 +++++++++++++++------------
e75128
 ldap/sdks/c-sdk/config/autoconf/config.sub   | 459 +++++++++++++------
e75128
 mozilla/build/autoconf/config.guess          | 499 +++++++++++----------
e75128
 mozilla/build/autoconf/config.sub            | 305 ++++++++-----
e75128
 mozilla/configure.in                         |   2 +-
e75128
 mozilla/js/src/build/autoconf/config.guess   | 499 +++++++++++----------
e75128
 mozilla/js/src/build/autoconf/config.sub     | 305 ++++++++-----
e75128
 mozilla/js/src/ctypes/libffi/config.guess    | 418 ++++++++++--------
e75128
 mozilla/js/src/ctypes/libffi/config.sub      | 305 ++++++++-----
e75128
 9 files changed, 2052 insertions(+), 1377 deletions(-)
e75128
e75128
diff --git a/ldap/sdks/c-sdk/config/autoconf/config.guess b/ldap/sdks/c-sdk/config/autoconf/config.guess
e75128
index a20b311..9afd676 100644
e75128
--- a/ldap/sdks/c-sdk/config/autoconf/config.guess
e75128
+++ b/ldap/sdks/c-sdk/config/autoconf/config.guess
e75128
@@ -1,13 +1,12 @@
e75128
 #! /bin/sh
e75128
 # Attempt to guess a canonical system name.
e75128
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
e75128
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
e75128
+#   Copyright 1992-2013 Free Software Foundation, Inc.
e75128
 
e75128
-timestamp='2005-10-13'
e75128
+timestamp='2013-11-29'
e75128
 
e75128
 # This file is free software; you can redistribute it and/or modify it
e75128
 # under the terms of the GNU General Public License as published by
e75128
-# the Free Software Foundation; either version 2 of the License, or
e75128
+# the Free Software Foundation; either version 3 of the License, or
e75128
 # (at your option) any later version.
e75128
 #
e75128
 # This program is distributed in the hope that it will be useful, but
e75128
@@ -16,26 +15,22 @@ timestamp='2005-10-13'
e75128
 # General Public License for more details.
e75128
 #
e75128
 # You should have received a copy of the GNU General Public License
e75128
-# along with this program; if not, write to the Free Software
e75128
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
e75128
-# 02110-1301, USA.
e75128
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
e75128
 #
e75128
 # As a special exception to the GNU General Public License, if you
e75128
 # distribute this file as part of a program that contains a
e75128
 # configuration script generated by Autoconf, you may include it under
e75128
-# the same distribution terms that you use for the rest of that program.
e75128
-
e75128
-
e75128
-# Originally written by Per Bothner <per@bothner.com>.
e75128
-# Please send patches to <config-patches@gnu.org>.  Submit a context
e75128
-# diff and a properly formatted ChangeLog entry.
e75128
+# the same distribution terms that you use for the rest of that
e75128
+# program.  This Exception is an additional permission under section 7
e75128
+# of the GNU General Public License, version 3 ("GPLv3").
e75128
+#
e75128
+# Originally written by Per Bothner.
e75128
 #
e75128
-# This script attempts to guess a canonical system name similar to
e75128
-# config.sub.  If it succeeds, it prints the system name on stdout, and
e75128
-# exits with 0.  Otherwise, it exits with 1.
e75128
+# You can get the latest version of this script from:
e75128
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
e75128
 #
e75128
-# The plan is that this can be called by configure scripts if you
e75128
-# don't specify an explicit build system type.
e75128
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
e75128
+
e75128
 
e75128
 me=`echo "$0" | sed -e 's,.*/,,'`
e75128
 
e75128
@@ -55,8 +50,7 @@ version="\
e75128
 GNU config.guess ($timestamp)
e75128
 
e75128
 Originally written by Per Bothner.
e75128
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
e75128
-Free Software Foundation, Inc.
e75128
+Copyright 1992-2013 Free Software Foundation, Inc.
e75128
 
e75128
 This is free software; see the source for copying conditions.  There is NO
e75128
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
e75128
@@ -106,7 +100,7 @@ set_cc_for_build='
e75128
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
e75128
 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
e75128
 : ${TMPDIR=/tmp} ;
e75128
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
e75128
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
e75128
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
e75128
  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
e75128
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
e75128
@@ -138,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
e75128
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
e75128
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
e75128
 
e75128
+case "${UNAME_SYSTEM}" in
e75128
+Linux|GNU|GNU/*)
e75128
+	# If the system lacks a compiler, then just pick glibc.
e75128
+	# We could probably try harder.
e75128
+	LIBC=gnu
e75128
+
e75128
+	eval $set_cc_for_build
e75128
+	cat <<-EOF > $dummy.c
e75128
+	#include <features.h>
e75128
+	#if defined(__UCLIBC__)
e75128
+	LIBC=uclibc
e75128
+	#elif defined(__dietlibc__)
e75128
+	LIBC=dietlibc
e75128
+	#else
e75128
+	LIBC=gnu
e75128
+	#endif
e75128
+	EOF
e75128
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
e75128
+	;;
e75128
+esac
e75128
+
e75128
 # Note: order is significant - the case branches are not exclusive.
e75128
 
e75128
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
     *:NetBSD:*:*)
e75128
 	# NetBSD (nbsd) targets should (where applicable) match one or
e75128
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
e75128
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
e75128
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
e75128
 	# switched to ELF, *-*-netbsd* would select the old
e75128
 	# object file format.  This provides both forward
e75128
@@ -160,6 +175,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
 	    arm*) machine=arm-unknown ;;
e75128
 	    sh3el) machine=shl-unknown ;;
e75128
 	    sh3eb) machine=sh-unknown ;;
e75128
+	    sh5el) machine=sh5le-unknown ;;
e75128
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
e75128
 	esac
e75128
 	# The Operating System including object format, if it has switched
e75128
@@ -168,7 +184,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
e75128
 		eval $set_cc_for_build
e75128
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
e75128
-			| grep __ELF__ >/dev/null
e75128
+			| grep -q __ELF__
e75128
 		then
e75128
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
e75128
 		    # Return netbsd for either.  FIX?
e75128
@@ -178,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
 		fi
e75128
 		;;
e75128
 	    *)
e75128
-	        os=netbsd
e75128
+		os=netbsd
e75128
 		;;
e75128
 	esac
e75128
 	# The OS release
e75128
@@ -199,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
e75128
 	echo "${machine}-${os}${release}"
e75128
 	exit ;;
e75128
+    *:Bitrig:*:*)
e75128
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
e75128
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
e75128
+	exit ;;
e75128
     *:OpenBSD:*:*)
e75128
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
e75128
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
e75128
@@ -206,8 +226,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
     *:ekkoBSD:*:*)
e75128
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
e75128
 	exit ;;
e75128
+    *:SolidBSD:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
e75128
+	exit ;;
e75128
     macppc:MirBSD:*:*)
e75128
-	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
e75128
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     *:MirBSD:*:*)
e75128
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
e75128
@@ -218,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
e75128
 		;;
e75128
 	*5.*)
e75128
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
e75128
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
e75128
 		;;
e75128
 	esac
e75128
 	# According to Compaq, /usr/sbin/psrinfo has been available on
e75128
@@ -264,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
 	# A Xn.n version is an unreleased experimental baselevel.
e75128
 	# 1.2 uses "1.2" for uname -r.
e75128
 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
e75128
-	exit ;;
e75128
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
e75128
+	exitcode=$?
e75128
+	trap '' 0
e75128
+	exit $exitcode ;;
e75128
     Alpha\ *:Windows_NT*:*)
e75128
 	# How do we know it's Interix rather than the generic POSIX subsystem?
e75128
 	# Should we change UNAME_MACHINE based on the output of uname instead
e75128
@@ -290,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
 	echo s390-ibm-zvmoe
e75128
 	exit ;;
e75128
     *:OS400:*:*)
e75128
-        echo powerpc-ibm-os400
e75128
+	echo powerpc-ibm-os400
e75128
 	exit ;;
e75128
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
e75128
 	echo arm-acorn-riscix${UNAME_RELEASE}
e75128
 	exit ;;
e75128
-    arm:riscos:*:*|arm:RISCOS:*:*)
e75128
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
e75128
 	echo arm-unknown-riscos
e75128
 	exit ;;
e75128
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
e75128
@@ -319,14 +345,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
 	case `/usr/bin/uname -p` in
e75128
 	    sparc) echo sparc-icl-nx7; exit ;;
e75128
 	esac ;;
e75128
+    s390x:SunOS:*:*)
e75128
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
e75128
+	exit ;;
e75128
     sun4H:SunOS:5.*:*)
e75128
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
e75128
 	exit ;;
e75128
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
e75128
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
e75128
 	exit ;;
e75128
-    i86pc:SunOS:5.*:*)
e75128
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
e75128
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
e75128
+	echo i386-pc-auroraux${UNAME_RELEASE}
e75128
+	exit ;;
e75128
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
e75128
+	eval $set_cc_for_build
e75128
+	SUN_ARCH="i386"
e75128
+	# If there is a compiler, see if it is configured for 64-bit objects.
e75128
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
e75128
+	# This test works for both compilers.
e75128
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
e75128
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
e75128
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
e75128
+		grep IS_64BIT_ARCH >/dev/null
e75128
+	    then
e75128
+		SUN_ARCH="x86_64"
e75128
+	    fi
e75128
+	fi
e75128
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
e75128
 	exit ;;
e75128
     sun4*:SunOS:6*:*)
e75128
 	# According to config.sub, this is the proper way to canonicalize
e75128
@@ -370,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
e75128
     # MiNT.  But MiNT is downward compatible to TOS, so this should
e75128
     # be no problem.
e75128
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
e75128
-        echo m68k-atari-mint${UNAME_RELEASE}
e75128
+	echo m68k-atari-mint${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
e75128
 	echo m68k-atari-mint${UNAME_RELEASE}
e75128
-        exit ;;
e75128
+	exit ;;
e75128
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
e75128
-        echo m68k-atari-mint${UNAME_RELEASE}
e75128
+	echo m68k-atari-mint${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
e75128
-        echo m68k-milan-mint${UNAME_RELEASE}
e75128
-        exit ;;
e75128
+	echo m68k-milan-mint${UNAME_RELEASE}
e75128
+	exit ;;
e75128
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
e75128
-        echo m68k-hades-mint${UNAME_RELEASE}
e75128
-        exit ;;
e75128
+	echo m68k-hades-mint${UNAME_RELEASE}
e75128
+	exit ;;
e75128
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
e75128
-        echo m68k-unknown-mint${UNAME_RELEASE}
e75128
-        exit ;;
e75128
+	echo m68k-unknown-mint${UNAME_RELEASE}
e75128
+	exit ;;
e75128
     m68k:machten:*:*)
e75128
 	echo m68k-apple-machten${UNAME_RELEASE}
e75128
 	exit ;;
e75128
@@ -456,8 +501,8 @@ EOF
e75128
 	echo m88k-motorola-sysv3
e75128
 	exit ;;
e75128
     AViiON:dgux:*:*)
e75128
-        # DG/UX returns AViiON for all architectures
e75128
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
e75128
+	# DG/UX returns AViiON for all architectures
e75128
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
e75128
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
e75128
 	then
e75128
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
e75128
@@ -470,7 +515,7 @@ EOF
e75128
 	else
e75128
 	    echo i586-dg-dgux${UNAME_RELEASE}
e75128
 	fi
e75128
- 	exit ;;
e75128
+	exit ;;
e75128
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
e75128
 	echo m88k-dolphin-sysv3
e75128
 	exit ;;
e75128
@@ -527,7 +572,7 @@ EOF
e75128
 		echo rs6000-ibm-aix3.2
e75128
 	fi
e75128
 	exit ;;
e75128
-    *:AIX:*:[45])
e75128
+    *:AIX:*:[4567])
e75128
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
e75128
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
e75128
 		IBM_ARCH=rs6000
e75128
@@ -570,52 +615,52 @@ EOF
e75128
 	    9000/[678][0-9][0-9])
e75128
 		if [ -x /usr/bin/getconf ]; then
e75128
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
e75128
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
e75128
-                    case "${sc_cpu_version}" in
e75128
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
e75128
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
e75128
-                      532)                      # CPU_PA_RISC2_0
e75128
-                        case "${sc_kernel_bits}" in
e75128
-                          32) HP_ARCH="hppa2.0n" ;;
e75128
-                          64) HP_ARCH="hppa2.0w" ;;
e75128
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
e75128
+		    case "${sc_cpu_version}" in
e75128
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
e75128
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
e75128
+		      532)                      # CPU_PA_RISC2_0
e75128
+			case "${sc_kernel_bits}" in
e75128
+			  32) HP_ARCH="hppa2.0n" ;;
e75128
+			  64) HP_ARCH="hppa2.0w" ;;
e75128
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
e75128
-                        esac ;;
e75128
-                    esac
e75128
+			esac ;;
e75128
+		    esac
e75128
 		fi
e75128
 		if [ "${HP_ARCH}" = "" ]; then
e75128
 		    eval $set_cc_for_build
e75128
-		    sed 's/^              //' << EOF >$dummy.c
e75128
+		    sed 's/^		//' << EOF >$dummy.c
e75128
 
e75128
-              #define _HPUX_SOURCE
e75128
-              #include <stdlib.h>
e75128
-              #include <unistd.h>
e75128
+		#define _HPUX_SOURCE
e75128
+		#include <stdlib.h>
e75128
+		#include <unistd.h>
e75128
 
e75128
-              int main ()
e75128
-              {
e75128
-              #if defined(_SC_KERNEL_BITS)
e75128
-                  long bits = sysconf(_SC_KERNEL_BITS);
e75128
-              #endif
e75128
-                  long cpu  = sysconf (_SC_CPU_VERSION);
e75128
+		int main ()
e75128
+		{
e75128
+		#if defined(_SC_KERNEL_BITS)
e75128
+		    long bits = sysconf(_SC_KERNEL_BITS);
e75128
+		#endif
e75128
+		    long cpu  = sysconf (_SC_CPU_VERSION);
e75128
 
e75128
-                  switch (cpu)
e75128
-              	{
e75128
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
e75128
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
e75128
-              	case CPU_PA_RISC2_0:
e75128
-              #if defined(_SC_KERNEL_BITS)
e75128
-              	    switch (bits)
e75128
-              		{
e75128
-              		case 64: puts ("hppa2.0w"); break;
e75128
-              		case 32: puts ("hppa2.0n"); break;
e75128
-              		default: puts ("hppa2.0"); break;
e75128
-              		} break;
e75128
-              #else  /* !defined(_SC_KERNEL_BITS) */
e75128
-              	    puts ("hppa2.0"); break;
e75128
-              #endif
e75128
-              	default: puts ("hppa1.0"); break;
e75128
-              	}
e75128
-                  exit (0);
e75128
-              }
e75128
+		    switch (cpu)
e75128
+			{
e75128
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
e75128
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
e75128
+			case CPU_PA_RISC2_0:
e75128
+		#if defined(_SC_KERNEL_BITS)
e75128
+			    switch (bits)
e75128
+				{
e75128
+				case 64: puts ("hppa2.0w"); break;
e75128
+				case 32: puts ("hppa2.0n"); break;
e75128
+				default: puts ("hppa2.0"); break;
e75128
+				} break;
e75128
+		#else  /* !defined(_SC_KERNEL_BITS) */
e75128
+			    puts ("hppa2.0"); break;
e75128
+		#endif
e75128
+			default: puts ("hppa1.0"); break;
e75128
+			}
e75128
+		    exit (0);
e75128
+		}
e75128
 EOF
e75128
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
e75128
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
e75128
@@ -635,7 +680,7 @@ EOF
e75128
 	    # => hppa64-hp-hpux11.23
e75128
 
e75128
 	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
e75128
-		grep __LP64__ >/dev/null
e75128
+		grep -q __LP64__
e75128
 	    then
e75128
 		HP_ARCH="hppa2.0w"
e75128
 	    else
e75128
@@ -706,22 +751,22 @@ EOF
e75128
 	exit ;;
e75128
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
e75128
 	echo c1-convex-bsd
e75128
-        exit ;;
e75128
+	exit ;;
e75128
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
e75128
 	if getsysinfo -f scalar_acc
e75128
 	then echo c32-convex-bsd
e75128
 	else echo c2-convex-bsd
e75128
 	fi
e75128
-        exit ;;
e75128
+	exit ;;
e75128
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
e75128
 	echo c34-convex-bsd
e75128
-        exit ;;
e75128
+	exit ;;
e75128
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
e75128
 	echo c38-convex-bsd
e75128
-        exit ;;
e75128
+	exit ;;
e75128
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
e75128
 	echo c4-convex-bsd
e75128
-        exit ;;
e75128
+	exit ;;
e75128
     CRAY*Y-MP:*:*:*)
e75128
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
e75128
 	exit ;;
e75128
@@ -745,14 +790,14 @@ EOF
e75128
 	exit ;;
e75128
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
e75128
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
e75128
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
e75128
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
e75128
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
e75128
-        exit ;;
e75128
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
e75128
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
e75128
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
e75128
+	exit ;;
e75128
     5000:UNIX_System_V:4.*:*)
e75128
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
e75128
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
e75128
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
e75128
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
e75128
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
e75128
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
e75128
 	exit ;;
e75128
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
e75128
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
e75128
@@ -764,33 +809,51 @@ EOF
e75128
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     *:FreeBSD:*:*)
e75128
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
e75128
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
e75128
+	case ${UNAME_PROCESSOR} in
e75128
+	    amd64)
e75128
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
e75128
+	    *)
e75128
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
e75128
+	esac
e75128
 	exit ;;
e75128
     i*:CYGWIN*:*)
e75128
 	echo ${UNAME_MACHINE}-pc-cygwin
e75128
 	exit ;;
e75128
-    i*:MINGW*:*)
e75128
+    *:MINGW64*:*)
e75128
+	echo ${UNAME_MACHINE}-pc-mingw64
e75128
+	exit ;;
e75128
+    *:MINGW*:*)
e75128
 	echo ${UNAME_MACHINE}-pc-mingw32
e75128
 	exit ;;
e75128
-#### MozillaHack 
e75128
-# Netscape's hacked uname
e75128
-    xx:WINNT:* | xx:WIN95:*)
e75128
-	echo i586-pc-msvc
e75128
+    i*:MSYS*:*)
e75128
+	echo ${UNAME_MACHINE}-pc-msys
e75128
 	exit ;;
e75128
-###  End MozillaHack
e75128
     i*:windows32*:*)
e75128
-    	# uname -m includes "-pc" on this system.
e75128
-    	echo ${UNAME_MACHINE}-mingw32
e75128
+	# uname -m includes "-pc" on this system.
e75128
+	echo ${UNAME_MACHINE}-mingw32
e75128
 	exit ;;
e75128
     i*:PW*:*)
e75128
 	echo ${UNAME_MACHINE}-pc-pw32
e75128
 	exit ;;
e75128
-    x86:Interix*:[34]*)
e75128
-	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
e75128
-	exit ;;
e75128
+    *:Interix*:*)
e75128
+	case ${UNAME_MACHINE} in
e75128
+	    x86)
e75128
+		echo i586-pc-interix${UNAME_RELEASE}
e75128
+		exit ;;
e75128
+	    authenticamd | genuineintel | EM64T)
e75128
+		echo x86_64-unknown-interix${UNAME_RELEASE}
e75128
+		exit ;;
e75128
+	    IA64)
e75128
+		echo ia64-unknown-interix${UNAME_RELEASE}
e75128
+		exit ;;
e75128
+	esac ;;
e75128
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
e75128
 	echo i${UNAME_MACHINE}-pc-mks
e75128
 	exit ;;
e75128
+    8664:Windows_NT:*)
e75128
+	echo x86_64-pc-mks
e75128
+	exit ;;
e75128
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
e75128
 	# How do we know it's Interix rather than the generic POSIX subsystem?
e75128
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
e75128
@@ -811,182 +874,157 @@ EOF
e75128
 	exit ;;
e75128
     *:GNU:*:*)
e75128
 	# the GNU system
e75128
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
e75128
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
e75128
 	exit ;;
e75128
     *:GNU/*:*:*)
e75128
 	# other systems with GNU libc and userland
e75128
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
e75128
 	exit ;;
e75128
     i*86:Minix:*:*)
e75128
 	echo ${UNAME_MACHINE}-pc-minix
e75128
 	exit ;;
e75128
+    aarch64:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    aarch64_be:Linux:*:*)
e75128
+	UNAME_MACHINE=aarch64_be
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    alpha:Linux:*:*)
e75128
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
e75128
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
e75128
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
e75128
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
e75128
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
e75128
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
e75128
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
e75128
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
e75128
+	esac
e75128
+	objdump --private-headers /bin/sh | grep -q ld.so.1
e75128
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    arc:Linux:*:* | arceb:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
     arm*:Linux:*:*)
e75128
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
e75128
+	eval $set_cc_for_build
e75128
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
e75128
+	    | grep -q __ARM_EABI__
e75128
+	then
e75128
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	else
e75128
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
e75128
+		| grep -q __ARM_PCS_VFP
e75128
+	    then
e75128
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
e75128
+	    else
e75128
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
e75128
+	    fi
e75128
+	fi
e75128
+	exit ;;
e75128
+    avr32*:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
     cris:Linux:*:*)
e75128
-	echo cris-axis-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
e75128
 	exit ;;
e75128
     crisv32:Linux:*:*)
e75128
-	echo crisv32-axis-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
e75128
 	exit ;;
e75128
     frv:Linux:*:*)
e75128
-    	echo frv-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    hexagon:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    i*86:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
e75128
 	exit ;;
e75128
     ia64:Linux:*:*)
e75128
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
     m32r*:Linux:*:*)
e75128
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
     m68*:Linux:*:*)
e75128
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
-    mips:Linux:*:*)
e75128
-	eval $set_cc_for_build
e75128
-	sed 's/^	//' << EOF >$dummy.c
e75128
-	#undef CPU
e75128
-	#undef mips
e75128
-	#undef mipsel
e75128
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
e75128
-	CPU=mipsel
e75128
-	#else
e75128
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
e75128
-	CPU=mips
e75128
-	#else
e75128
-	CPU=
e75128
-	#endif
e75128
-	#endif
e75128
-EOF
e75128
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
e75128
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
e75128
-	;;
e75128
-    mips64:Linux:*:*)
e75128
+    mips:Linux:*:* | mips64:Linux:*:*)
e75128
 	eval $set_cc_for_build
e75128
 	sed 's/^	//' << EOF >$dummy.c
e75128
 	#undef CPU
e75128
-	#undef mips64
e75128
-	#undef mips64el
e75128
+	#undef ${UNAME_MACHINE}
e75128
+	#undef ${UNAME_MACHINE}el
e75128
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
e75128
-	CPU=mips64el
e75128
+	CPU=${UNAME_MACHINE}el
e75128
 	#else
e75128
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
e75128
-	CPU=mips64
e75128
+	CPU=${UNAME_MACHINE}
e75128
 	#else
e75128
 	CPU=
e75128
 	#endif
e75128
 	#endif
e75128
 EOF
e75128
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
e75128
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
e75128
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
e75128
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
e75128
 	;;
e75128
+    or1k:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
     or32:Linux:*:*)
e75128
-	echo or32-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
-    ppc:Linux:*:*)
e75128
-	echo powerpc-unknown-linux-gnu
e75128
+    padre:Linux:*:*)
e75128
+	echo sparc-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
-    ppc64:Linux:*:*)
e75128
-	echo powerpc64-unknown-linux-gnu
e75128
-	exit ;;
e75128
-    alpha:Linux:*:*)
e75128
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
e75128
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
e75128
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
e75128
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
e75128
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
e75128
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
e75128
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
e75128
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
e75128
-        esac
e75128
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
e75128
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
e75128
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
e75128
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
e75128
+	echo hppa64-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
     parisc:Linux:*:* | hppa:Linux:*:*)
e75128
 	# Look for CPU level
e75128
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
e75128
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
e75128
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
e75128
-	  *)    echo hppa-unknown-linux-gnu ;;
e75128
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
e75128
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
e75128
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
e75128
 	esac
e75128
 	exit ;;
e75128
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
e75128
-	echo hppa64-unknown-linux-gnu
e75128
+    ppc64:Linux:*:*)
e75128
+	echo powerpc64-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    ppc:Linux:*:*)
e75128
+	echo powerpc-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    ppc64le:Linux:*:*)
e75128
+	echo powerpc64le-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    ppcle:Linux:*:*)
e75128
+	echo powerpcle-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
     s390:Linux:*:* | s390x:Linux:*:*)
e75128
-	echo ${UNAME_MACHINE}-ibm-linux
e75128
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
e75128
 	exit ;;
e75128
     sh64*:Linux:*:*)
e75128
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
     sh*:Linux:*:*)
e75128
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
     sparc:Linux:*:* | sparc64:Linux:*:*)
e75128
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    tile*:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    vax:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
e75128
 	exit ;;
e75128
     x86_64:Linux:*:*)
e75128
-	echo x86_64-unknown-linux-gnu
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
+	exit ;;
e75128
+    xtensa*:Linux:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
e75128
 	exit ;;
e75128
-    i*86:Linux:*:*)
e75128
-	# The BFD linker knows what the default object file format is, so
e75128
-	# first see if it will tell us. cd to the root directory to prevent
e75128
-	# problems with other programs or directories called `ld' in the path.
e75128
-	# Set LC_ALL=C to ensure ld outputs messages in English.
e75128
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
e75128
-			 | sed -ne '/supported targets:/!d
e75128
-				    s/[ 	][ 	]*/ /g
e75128
-				    s/.*supported targets: *//
e75128
-				    s/ .*//
e75128
-				    p'`
e75128
-        case "$ld_supported_targets" in
e75128
-	  elf32-i386)
e75128
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
e75128
-		;;
e75128
-	  a.out-i386-linux)
e75128
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
e75128
-		exit ;;
e75128
-	  coff-i386)
e75128
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
e75128
-		exit ;;
e75128
-	  "")
e75128
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
e75128
-		# one that does not give us useful --help.
e75128
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
e75128
-		exit ;;
e75128
-	esac
e75128
-	# Determine whether the default compiler is a.out or elf
e75128
-	eval $set_cc_for_build
e75128
-	sed 's/^	//' << EOF >$dummy.c
e75128
-	#include <features.h>
e75128
-	#ifdef __ELF__
e75128
-	# ifdef __GLIBC__
e75128
-	#  if __GLIBC__ >= 2
e75128
-	LIBC=gnu
e75128
-	#  else
e75128
-	LIBC=gnulibc1
e75128
-	#  endif
e75128
-	# else
e75128
-	LIBC=gnulibc1
e75128
-	# endif
e75128
-	#else
e75128
-	#ifdef __INTEL_COMPILER
e75128
-	LIBC=gnu
e75128
-	#else
e75128
-	LIBC=gnuaout
e75128
-	#endif
e75128
-	#endif
e75128
-	#ifdef __dietlibc__
e75128
-	LIBC=dietlibc
e75128
-	#endif
e75128
-EOF
e75128
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
e75128
-	test x"${LIBC}" != x && {
e75128
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
e75128
-		exit
e75128
-	}
e75128
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
e75128
-	;;
e75128
     i*86:DYNIX/ptx:4*:*)
e75128
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
e75128
 	# earlier versions are messed up and put the nodename in both
e75128
@@ -994,11 +1032,11 @@ EOF
e75128
 	echo i386-sequent-sysv4
e75128
 	exit ;;
e75128
     i*86:UNIX_SV:4.2MP:2.*)
e75128
-        # Unixware is an offshoot of SVR4, but it has its own version
e75128
-        # number series starting with 2...
e75128
-        # I am not positive that other SVR4 systems won't match this,
e75128
+	# Unixware is an offshoot of SVR4, but it has its own version
e75128
+	# number series starting with 2...
e75128
+	# I am not positive that other SVR4 systems won't match this,
e75128
 	# I just have to hope.  -- rms.
e75128
-        # Use sysv4.2uw... so that sysv4* matches it.
e75128
+	# Use sysv4.2uw... so that sysv4* matches it.
e75128
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
e75128
 	exit ;;
e75128
     i*86:OS/2:*:*)
e75128
@@ -1015,7 +1053,7 @@ EOF
e75128
     i*86:syllable:*:*)
e75128
 	echo ${UNAME_MACHINE}-pc-syllable
e75128
 	exit ;;
e75128
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
e75128
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
e75128
 	echo i386-unknown-lynxos${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     i*86:*DOS:*:*)
e75128
@@ -1030,7 +1068,7 @@ EOF
e75128
 	fi
e75128
 	exit ;;
e75128
     i*86:*:5:[678]*)
e75128
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
e75128
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
e75128
 	case `/bin/uname -X | grep "^Machine"` in
e75128
 	    *486*)	     UNAME_MACHINE=i486 ;;
e75128
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
e75128
@@ -1058,10 +1096,13 @@ EOF
e75128
 	exit ;;
e75128
     pc:*:*:*)
e75128
 	# Left here for compatibility:
e75128
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
e75128
-        # the processor, so we play safe by assuming i386.
e75128
-	echo i386-pc-msdosdjgpp
e75128
-        exit ;;
e75128
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
e75128
+	# the processor, so we play safe by assuming i586.
e75128
+	# Note: whatever this is, it MUST be the same as what config.sub
e75128
+	# prints for the "djgpp" host, or else GDB configury will decide that
e75128
+	# this is a cross-build.
e75128
+	echo i586-pc-msdosdjgpp
e75128
+	exit ;;
e75128
     Intel:Mach:3*:*)
e75128
 	echo i386-pc-mach3
e75128
 	exit ;;
e75128
@@ -1096,8 +1137,18 @@ EOF
e75128
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
e75128
 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
e75128
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
e75128
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
e75128
-          && { echo i486-ncr-sysv4; exit; } ;;
e75128
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
e75128
+	  && { echo i486-ncr-sysv4; exit; } ;;
e75128
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
e75128
+	OS_REL='.3'
e75128
+	test -r /etc/.relid \
e75128
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
e75128
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
e75128
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
e75128
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
e75128
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
e75128
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
e75128
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
e75128
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
e75128
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
e75128
 	exit ;;
e75128
@@ -1110,7 +1161,7 @@ EOF
e75128
     rs6000:LynxOS:2.*:*)
e75128
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
e75128
 	exit ;;
e75128
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
e75128
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
e75128
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     SM[BE]S:UNIX_SV:*:*)
e75128
@@ -1130,20 +1181,10 @@ EOF
e75128
 		echo ns32k-sni-sysv
e75128
 	fi
e75128
 	exit ;;
e75128
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
e75128
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
e75128
-        echo i586-unisys-sysv4
e75128
-        exit ;;
e75128
-#### MozillaHack 
e75128
-    *:*OpenVMS*:*:*)
e75128
-        case "${UNAME_SYSTEM}" in
e75128
-            POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;;
e75128
-            POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;;
e75128
-            OpenVMS) echo alpha-dec-openvms ;;
e75128
-            *) echo unknown-dec-openvms ;;
e75128
-        esac
e75128
-        exit ;;
e75128
-#### End MozillaHack 
e75128
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
e75128
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
e75128
+	echo i586-unisys-sysv4
e75128
+	exit ;;
e75128
     *:UNIX_System_V:4*:FTX*)
e75128
 	# From Gerald Hewes <hewes@openmarket.com>.
e75128
 	# How about differentiating between stratus architectures? -djm
e75128
@@ -1169,11 +1210,11 @@ EOF
e75128
 	exit ;;
e75128
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
e75128
 	if [ -d /usr/nec ]; then
e75128
-	        echo mips-nec-sysv${UNAME_RELEASE}
e75128
+		echo mips-nec-sysv${UNAME_RELEASE}
e75128
 	else
e75128
-	        echo mips-unknown-sysv${UNAME_RELEASE}
e75128
+		echo mips-unknown-sysv${UNAME_RELEASE}
e75128
 	fi
e75128
-        exit ;;
e75128
+	exit ;;
e75128
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
e75128
 	echo powerpc-be-beos
e75128
 	exit ;;
e75128
@@ -1183,6 +1224,12 @@ EOF
e75128
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
e75128
 	echo i586-pc-beos
e75128
 	exit ;;
e75128
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
e75128
+	echo i586-pc-haiku
e75128
+	exit ;;
e75128
+    x86_64:Haiku:*:*)
e75128
+	echo x86_64-unknown-haiku
e75128
+	exit ;;
e75128
     SX-4:SUPER-UX:*:*)
e75128
 	echo sx4-nec-superux${UNAME_RELEASE}
e75128
 	exit ;;
e75128
@@ -1192,6 +1239,15 @@ EOF
e75128
     SX-6:SUPER-UX:*:*)
e75128
 	echo sx6-nec-superux${UNAME_RELEASE}
e75128
 	exit ;;
e75128
+    SX-7:SUPER-UX:*:*)
e75128
+	echo sx7-nec-superux${UNAME_RELEASE}
e75128
+	exit ;;
e75128
+    SX-8:SUPER-UX:*:*)
e75128
+	echo sx8-nec-superux${UNAME_RELEASE}
e75128
+	exit ;;
e75128
+    SX-8R:SUPER-UX:*:*)
e75128
+	echo sx8r-nec-superux${UNAME_RELEASE}
e75128
+	exit ;;
e75128
     Power*:Rhapsody:*:*)
e75128
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
e75128
 	exit ;;
e75128
@@ -1200,9 +1256,31 @@ EOF
e75128
 	exit ;;
e75128
     *:Darwin:*:*)
e75128
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
e75128
-	case $UNAME_PROCESSOR in
e75128
-	    unknown) UNAME_PROCESSOR=powerpc ;;
e75128
-	esac
e75128
+	eval $set_cc_for_build
e75128
+	if test "$UNAME_PROCESSOR" = unknown ; then
e75128
+	    UNAME_PROCESSOR=powerpc
e75128
+	fi
e75128
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
e75128
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
e75128
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
e75128
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
e75128
+		    grep IS_64BIT_ARCH >/dev/null
e75128
+		then
e75128
+		    case $UNAME_PROCESSOR in
e75128
+			i386) UNAME_PROCESSOR=x86_64 ;;
e75128
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
e75128
+		    esac
e75128
+		fi
e75128
+	    fi
e75128
+	elif test "$UNAME_PROCESSOR" = i386 ; then
e75128
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
e75128
+	    # that puts up a graphical alert prompting to install
e75128
+	    # developer tools.  Any system running Mac OS X 10.7 or
e75128
+	    # later (Darwin 11 and later) is required to have a 64-bit
e75128
+	    # processor. This is not true of the ARM version of Darwin
e75128
+	    # that Apple uses in portable devices.
e75128
+	    UNAME_PROCESSOR=x86_64
e75128
+	fi
e75128
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
e75128
@@ -1216,7 +1294,10 @@ EOF
e75128
     *:QNX:*:4*)
e75128
 	echo i386-pc-qnx
e75128
 	exit ;;
e75128
-    NSE-?:NONSTOP_KERNEL:*:*)
e75128
+    NEO-?:NONSTOP_KERNEL:*:*)
e75128
+	echo neo-tandem-nsk${UNAME_RELEASE}
e75128
+	exit ;;
e75128
+    NSE-*:NONSTOP_KERNEL:*:*)
e75128
 	echo nse-tandem-nsk${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     NSR-?:NONSTOP_KERNEL:*:*)
e75128
@@ -1261,13 +1342,13 @@ EOF
e75128
 	echo pdp10-unknown-its
e75128
 	exit ;;
e75128
     SEI:*:*:SEIUX)
e75128
-        echo mips-sei-seiux${UNAME_RELEASE}
e75128
+	echo mips-sei-seiux${UNAME_RELEASE}
e75128
 	exit ;;
e75128
     *:DragonFly:*:*)
e75128
 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
e75128
 	exit ;;
e75128
     *:*VMS:*:*)
e75128
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
e75128
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
e75128
 	case "${UNAME_MACHINE}" in
e75128
 	    A*) echo alpha-dec-vms ; exit ;;
e75128
 	    I*) echo ia64-dec-vms ; exit ;;
e75128
@@ -1279,11 +1360,17 @@ EOF
e75128
     i*86:skyos:*:*)
e75128
 	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
e75128
 	exit ;;
e75128
+    i*86:rdos:*:*)
e75128
+	echo ${UNAME_MACHINE}-pc-rdos
e75128
+	exit ;;
e75128
+    i*86:AROS:*:*)
e75128
+	echo ${UNAME_MACHINE}-pc-aros
e75128
+	exit ;;
e75128
+    x86_64:VMkernel:*:*)
e75128
+	echo ${UNAME_MACHINE}-unknown-esx
e75128
+	exit ;;
e75128
 esac
e75128
 
e75128
-#echo '(No uname command or uname output not recognized.)' 1>&2
e75128
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
e75128
-
e75128
 eval $set_cc_for_build
e75128
 cat >$dummy.c <
e75128
 #ifdef _SEQUENT_
e75128
@@ -1301,11 +1388,11 @@ main ()
e75128
 #include <sys/param.h>
e75128
   printf ("m68k-sony-newsos%s\n",
e75128
 #ifdef NEWSOS4
e75128
-          "4"
e75128
+	"4"
e75128
 #else
e75128
-	  ""
e75128
+	""
e75128
 #endif
e75128
-         ); exit (0);
e75128
+	); exit (0);
e75128
 #endif
e75128
 #endif
e75128
 
e75128
@@ -1439,9 +1526,9 @@ This script, last modified $timestamp, has failed to recognize
e75128
 the operating system you are using. It is advised that you
e75128
 download the most up to date version of the config scripts from
e75128
 
e75128
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
e75128
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
e75128
 and
e75128
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
e75128
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
e75128
 
e75128
 If the version you run ($0) is already up to date, please
e75128
 send the following data and any information you think might be
e75128
diff --git a/ldap/sdks/c-sdk/config/autoconf/config.sub b/ldap/sdks/c-sdk/config/autoconf/config.sub
e75128
index 4900684..ece8142 100644
e75128
--- a/ldap/sdks/c-sdk/config/autoconf/config.sub
e75128
+++ b/ldap/sdks/c-sdk/config/autoconf/config.sub
e75128
@@ -1,43 +1,40 @@
e75128
 #! /bin/sh
e75128
 # Configuration validation subroutine script.
e75128
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
e75128
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
e75128
+#   Copyright 1992-2013 Free Software Foundation, Inc.
e75128
 
e75128
-timestamp='2005-10-13'
e75128
+timestamp='2013-10-01'
e75128
 
e75128
-# This file is (in principle) common to ALL GNU software.
e75128
-# The presence of a machine in this file suggests that SOME GNU software
e75128
-# can handle that machine.  It does not imply ALL GNU software can.
e75128
-#
e75128
-# This file is free software; you can redistribute it and/or modify
e75128
-# it under the terms of the GNU General Public License as published by
e75128
-# the Free Software Foundation; either version 2 of the License, or
e75128
+# This file is free software; you can redistribute it and/or modify it
e75128
+# under the terms of the GNU General Public License as published by
e75128
+# the Free Software Foundation; either version 3 of the License, or
e75128
 # (at your option) any later version.
e75128
 #
e75128
-# This program is distributed in the hope that it will be useful,
e75128
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
e75128
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e75128
-# GNU General Public License for more details.
e75128
+# This program is distributed in the hope that it will be useful, but
e75128
+# WITHOUT ANY WARRANTY; without even the implied warranty of
e75128
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
e75128
+# General Public License for more details.
e75128
 #
e75128
 # You should have received a copy of the GNU General Public License
e75128
-# along with this program; if not, write to the Free Software
e75128
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
e75128
-# 02110-1301, USA.
e75128
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
e75128
 #
e75128
 # As a special exception to the GNU General Public License, if you
e75128
 # distribute this file as part of a program that contains a
e75128
 # configuration script generated by Autoconf, you may include it under
e75128
-# the same distribution terms that you use for the rest of that program.
e75128
+# the same distribution terms that you use for the rest of that
e75128
+# program.  This Exception is an additional permission under section 7
e75128
+# of the GNU General Public License, version 3 ("GPLv3").
e75128
 
e75128
 
e75128
-# Please send patches to <config-patches@gnu.org>.  Submit a context
e75128
-# diff and a properly formatted ChangeLog entry.
e75128
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
e75128
 #
e75128
 # Configuration subroutine to validate and canonicalize a configuration type.
e75128
 # Supply the specified configuration type as an argument.
e75128
 # If it is invalid, we print an error message on stderr and exit with code 1.
e75128
 # Otherwise, we print the canonical config type on stdout and succeed.
e75128
 
e75128
+# You can get the latest version of this script from:
e75128
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
e75128
+
e75128
 # This file is supposed to be the same for all GNU packages
e75128
 # and recognize all the CPU types, system types and aliases
e75128
 # that are meaningful with *any* GNU software.
e75128
@@ -71,8 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
e75128
 version="\
e75128
 GNU config.sub ($timestamp)
e75128
 
e75128
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
e75128
-Free Software Foundation, Inc.
e75128
+Copyright 1992-2013 Free Software Foundation, Inc.
e75128
 
e75128
 This is free software; see the source for copying conditions.  There is NO
e75128
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
e75128
@@ -119,11 +115,18 @@ esac
e75128
 # Here we must recognize all the valid KERNEL-OS combinations.
e75128
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
e75128
 case $maybe_os in
e75128
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
e75128
-  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
e75128
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
e75128
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
e75128
+  knetbsd*-gnu* | netbsd*-gnu* | \
e75128
+  kopensolaris*-gnu* | \
e75128
+  storm-chaos* | os2-emx* | rtmk-nova*)
e75128
     os=-$maybe_os
e75128
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
e75128
     ;;
e75128
+  android-linux)
e75128
+    os=-linux-android
e75128
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
e75128
+    ;;
e75128
   *)
e75128
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
e75128
     if [ $basic_machine != $1 ]
e75128
@@ -146,10 +149,13 @@ case $os in
e75128
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
e75128
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
e75128
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
e75128
-	-apple | -axis | -knuth | -cray)
e75128
+	-apple | -axis | -knuth | -cray | -microblaze*)
e75128
 		os=
e75128
 		basic_machine=$1
e75128
 		;;
e75128
+	-bluegene*)
e75128
+		os=-cnk
e75128
+		;;
e75128
 	-sim | -cisco | -oki | -wec | -winbond)
e75128
 		os=
e75128
 		basic_machine=$1
e75128
@@ -164,13 +170,17 @@ case $os in
e75128
 		os=-chorusos
e75128
 		basic_machine=$1
e75128
 		;;
e75128
- 	-chorusrdb)
e75128
- 		os=-chorusrdb
e75128
+	-chorusrdb)
e75128
+		os=-chorusrdb
e75128
 		basic_machine=$1
e75128
- 		;;
e75128
+		;;
e75128
 	-hiux*)
e75128
 		os=-hiuxwe2
e75128
 		;;
e75128
+	-sco6)
e75128
+		os=-sco5v6
e75128
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
e75128
+		;;
e75128
 	-sco5)
e75128
 		os=-sco3.2v5
e75128
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
e75128
@@ -187,6 +197,10 @@ case $os in
e75128
 		# Don't forget version if it is 3.2v4 or newer.
e75128
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
e75128
 		;;
e75128
+	-sco5v6*)
e75128
+		# Don't forget version if it is 3.2v4 or newer.
e75128
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
e75128
+		;;
e75128
 	-sco*)
e75128
 		os=-sco3.2v2
e75128
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
e75128
@@ -204,6 +218,12 @@ case $os in
e75128
 	-isc*)
e75128
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
e75128
 		;;
e75128
+	-lynx*178)
e75128
+		os=-lynxos178
e75128
+		;;
e75128
+	-lynx*5)
e75128
+		os=-lynxos5
e75128
+		;;
e75128
 	-lynx*)
e75128
 		os=-lynxos
e75128
 		;;
e75128
@@ -226,28 +246,37 @@ esac
e75128
 case $basic_machine in
e75128
 	# Recognize the basic CPU types without company name.
e75128
 	# Some are omitted here because they have special meanings below.
e75128
-#### MozillaHack 
e75128
-# mips*el
e75128
-#### End MozillaHack 
e75128
 	1750a | 580 \
e75128
 	| a29k \
e75128
+	| aarch64 | aarch64_be \
e75128
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
e75128
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
e75128
 	| am33_2.0 \
e75128
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
e75128
+	| arc | arceb \
e75128
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
e75128
+	| avr | avr32 \
e75128
+	| be32 | be64 \
e75128
 	| bfin \
e75128
-	| c4x | clipper \
e75128
+	| c4x | c8051 | clipper \
e75128
 	| d10v | d30v | dlx | dsp16xx \
e75128
-	| fr30 | frv \
e75128
+	| epiphany \
e75128
+	| fido | fr30 | frv \
e75128
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
e75128
+	| hexagon \
e75128
 	| i370 | i860 | i960 | ia64 \
e75128
 	| ip2k | iq2000 \
e75128
-	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
e75128
-	| mips | mipsbe | mipseb | mips*el | mipsle \
e75128
+	| k1om \
e75128
+	| le32 | le64 \
e75128
+	| lm32 \
e75128
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
e75128
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
e75128
+	| mips | mipsbe | mipseb | mipsel | mipsle \
e75128
 	| mips16 \
e75128
 	| mips64 | mips64el \
e75128
-	| mips64vr | mips64vrel \
e75128
+	| mips64octeon | mips64octeonel \
e75128
 	| mips64orion | mips64orionel \
e75128
+	| mips64r5900 | mips64r5900el \
e75128
+	| mips64vr | mips64vrel \
e75128
 	| mips64vr4100 | mips64vr4100el \
e75128
 	| mips64vr4300 | mips64vr4300el \
e75128
 	| mips64vr5000 | mips64vr5000el \
e75128
@@ -258,37 +287,68 @@ case $basic_machine in
e75128
 	| mipsisa64r2 | mipsisa64r2el \
e75128
 	| mipsisa64sb1 | mipsisa64sb1el \
e75128
 	| mipsisa64sr71k | mipsisa64sr71kel \
e75128
+	| mipsr5900 | mipsr5900el \
e75128
 	| mipstx39 | mipstx39el \
e75128
 	| mn10200 | mn10300 \
e75128
-	| ms1 \
e75128
+	| moxie \
e75128
+	| mt \
e75128
 	| msp430 \
e75128
+	| nds32 | nds32le | nds32be \
e75128
+	| nios | nios2 | nios2eb | nios2el \
e75128
 	| ns16k | ns32k \
e75128
-	| or32 \
e75128
+	| open8 \
e75128
+	| or1k | or32 \
e75128
 	| pdp10 | pdp11 | pj | pjl \
e75128
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
e75128
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
e75128
 	| pyramid \
e75128
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
e75128
+	| rl78 | rx \
e75128
+	| score \
e75128
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
e75128
 	| sh64 | sh64le \
e75128
-	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
e75128
-	| sparcv8 | sparcv9 | sparcv9b \
e75128
-	| strongarm \
e75128
-	| tahoe | thumb | tic4x | tic80 | tron \
e75128
-	| v850 | v850e \
e75128
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
e75128
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
e75128
+	| spu \
e75128
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
e75128
+	| ubicom32 \
e75128
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
e75128
 	| we32k \
e75128
-	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
e75128
-	| z8k)
e75128
+	| x86 | xc16x | xstormy16 | xtensa \
e75128
+	| z8k | z80)
e75128
 		basic_machine=$basic_machine-unknown
e75128
 		;;
e75128
-	m32c)
e75128
-		basic_machine=$basic_machine-unknown
e75128
+	c54x)
e75128
+		basic_machine=tic54x-unknown
e75128
+		;;
e75128
+	c55x)
e75128
+		basic_machine=tic55x-unknown
e75128
 		;;
e75128
-	m6811 | m68hc11 | m6812 | m68hc12)
e75128
-		# Motorola 68HC11/12.
e75128
+	c6x)
e75128
+		basic_machine=tic6x-unknown
e75128
+		;;
e75128
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
e75128
 		basic_machine=$basic_machine-unknown
e75128
 		os=-none
e75128
 		;;
e75128
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
e75128
 		;;
e75128
+	ms1)
e75128
+		basic_machine=mt-unknown
e75128
+		;;
e75128
+
e75128
+	strongarm | thumb | xscale)
e75128
+		basic_machine=arm-unknown
e75128
+		;;
e75128
+	xgate)
e75128
+		basic_machine=$basic_machine-unknown
e75128
+		os=-none
e75128
+		;;
e75128
+	xscaleeb)
e75128
+		basic_machine=armeb-unknown
e75128
+		;;
e75128
+
e75128
+	xscaleel)
e75128
+		basic_machine=armel-unknown
e75128
+		;;
e75128
 
e75128
 	# We use `pc' rather than `unknown'
e75128
 	# because (1) that's what they normally are, and
e75128
@@ -302,34 +362,40 @@ case $basic_machine in
e75128
 		exit 1
e75128
 		;;
e75128
 	# Recognize the basic CPU types with company name.
e75128
-#### MozillaHack 
e75128
-# mips*el
e75128
-#### End MozillaHack 
e75128
 	580-* \
e75128
 	| a29k-* \
e75128
+	| aarch64-* | aarch64_be-* \
e75128
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
e75128
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
e75128
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
e75128
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
e75128
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
e75128
-	| avr-* \
e75128
+	| avr-* | avr32-* \
e75128
+	| be32-* | be64-* \
e75128
 	| bfin-* | bs2000-* \
e75128
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
e75128
-	| clipper-* | craynv-* | cydra-* \
e75128
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
e75128
+	| c8051-* | clipper-* | craynv-* | cydra-* \
e75128
 	| d10v-* | d30v-* | dlx-* \
e75128
 	| elxsi-* \
e75128
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
e75128
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
e75128
 	| h8300-* | h8500-* \
e75128
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
e75128
+	| hexagon-* \
e75128
 	| i*86-* | i860-* | i960-* | ia64-* \
e75128
 	| ip2k-* | iq2000-* \
e75128
-	| m32r-* | m32rle-* \
e75128
+	| k1om-* \
e75128
+	| le32-* | le64-* \
e75128
+	| lm32-* \
e75128
+	| m32c-* | m32r-* | m32rle-* \
e75128
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
e75128
-	| m88110-* | m88k-* | maxq-* | mcore-* \
e75128
-	| mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \
e75128
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
e75128
+	| microblaze-* | microblazeel-* \
e75128
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
e75128
 	| mips16-* \
e75128
 	| mips64-* | mips64el-* \
e75128
-	| mips64vr-* | mips64vrel-* \
e75128
+	| mips64octeon-* | mips64octeonel-* \
e75128
 	| mips64orion-* | mips64orionel-* \
e75128
+	| mips64r5900-* | mips64r5900el-* \
e75128
+	| mips64vr-* | mips64vrel-* \
e75128
 	| mips64vr4100-* | mips64vr4100el-* \
e75128
 	| mips64vr4300-* | mips64vr4300el-* \
e75128
 	| mips64vr5000-* | mips64vr5000el-* \
e75128
@@ -340,32 +406,41 @@ case $basic_machine in
e75128
 	| mipsisa64r2-* | mipsisa64r2el-* \
e75128
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
e75128
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
e75128
+	| mipsr5900-* | mipsr5900el-* \
e75128
 	| mipstx39-* | mipstx39el-* \
e75128
 	| mmix-* \
e75128
-	| ms1-* \
e75128
+	| mt-* \
e75128
 	| msp430-* \
e75128
+	| nds32-* | nds32le-* | nds32be-* \
e75128
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
e75128
 	| none-* | np1-* | ns16k-* | ns32k-* \
e75128
+	| open8-* \
e75128
 	| orion-* \
e75128
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
e75128
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
e75128
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
e75128
 	| pyramid-* \
e75128
-	| romp-* | rs6000-* \
e75128
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
e75128
+	| rl78-* | romp-* | rs6000-* | rx-* \
e75128
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
e75128
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
e75128
-	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
e75128
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
e75128
 	| sparclite-* \
e75128
-	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
e75128
-	| tahoe-* | thumb-* \
e75128
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
e75128
+	| tahoe-* \
e75128
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
e75128
+	| tile*-* \
e75128
 	| tron-* \
e75128
-	| v850-* | v850e-* | vax-* \
e75128
+	| ubicom32-* \
e75128
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
e75128
+	| vax-* \
e75128
 	| we32k-* \
e75128
-	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
e75128
-	| xstormy16-* | xtensa-* \
e75128
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
e75128
+	| xstormy16-* | xtensa*-* \
e75128
 	| ymp-* \
e75128
-	| z8k-*)
e75128
+	| z8k-* | z80-*)
e75128
 		;;
e75128
-	m32c-*)
e75128
+	# Recognize the basic CPU types without company name, with glob match.
e75128
+	xtensa*)
e75128
+		basic_machine=$basic_machine-unknown
e75128
 		;;
e75128
 	# Recognize the various machine names and aliases which stand
e75128
 	# for a CPU type and a company and sometimes even an OS.
e75128
@@ -383,7 +458,7 @@ case $basic_machine in
e75128
 		basic_machine=a29k-amd
e75128
 		os=-udi
e75128
 		;;
e75128
-    	abacus)
e75128
+	abacus)
e75128
 		basic_machine=abacus-unknown
e75128
 		;;
e75128
 	adobe68k)
e75128
@@ -429,6 +504,10 @@ case $basic_machine in
e75128
 		basic_machine=m68k-apollo
e75128
 		os=-bsd
e75128
 		;;
e75128
+	aros)
e75128
+		basic_machine=i386-pc
e75128
+		os=-aros
e75128
+		;;
e75128
 	aux)
e75128
 		basic_machine=m68k-apple
e75128
 		os=-aux
e75128
@@ -437,10 +516,35 @@ case $basic_machine in
e75128
 		basic_machine=ns32k-sequent
e75128
 		os=-dynix
e75128
 		;;
e75128
+	blackfin)
e75128
+		basic_machine=bfin-unknown
e75128
+		os=-linux
e75128
+		;;
e75128
+	blackfin-*)
e75128
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+		os=-linux
e75128
+		;;
e75128
+	bluegene*)
e75128
+		basic_machine=powerpc-ibm
e75128
+		os=-cnk
e75128
+		;;
e75128
+	c54x-*)
e75128
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+		;;
e75128
+	c55x-*)
e75128
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+		;;
e75128
+	c6x-*)
e75128
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+		;;
e75128
 	c90)
e75128
 		basic_machine=c90-cray
e75128
 		os=-unicos
e75128
 		;;
e75128
+	cegcc)
e75128
+		basic_machine=arm-unknown
e75128
+		os=-cegcc
e75128
+		;;
e75128
 	convex-c1)
e75128
 		basic_machine=c1-convex
e75128
 		os=-bsd
e75128
@@ -469,8 +573,8 @@ case $basic_machine in
e75128
 		basic_machine=craynv-cray
e75128
 		os=-unicosmp
e75128
 		;;
e75128
-	cr16c)
e75128
-		basic_machine=cr16c-unknown
e75128
+	cr16 | cr16-*)
e75128
+		basic_machine=cr16-unknown
e75128
 		os=-elf
e75128
 		;;
e75128
 	crds | unos)
e75128
@@ -508,6 +612,10 @@ case $basic_machine in
e75128
 		basic_machine=m88k-motorola
e75128
 		os=-sysv3
e75128
 		;;
e75128
+	dicos)
e75128
+		basic_machine=i686-pc
e75128
+		os=-dicos
e75128
+		;;
e75128
 	djgpp)
e75128
 		basic_machine=i586-pc
e75128
 		os=-msdosdjgpp
e75128
@@ -623,7 +731,6 @@ case $basic_machine in
e75128
 	i370-ibm* | ibm*)
e75128
 		basic_machine=i370-ibm
e75128
 		;;
e75128
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
e75128
 	i*86v32)
e75128
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
e75128
 		os=-sysv32
e75128
@@ -662,6 +769,14 @@ case $basic_machine in
e75128
 		basic_machine=m68k-isi
e75128
 		os=-sysv
e75128
 		;;
e75128
+	m68knommu)
e75128
+		basic_machine=m68k-unknown
e75128
+		os=-linux
e75128
+		;;
e75128
+	m68knommu-*)
e75128
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+		os=-linux
e75128
+		;;
e75128
 	m88k-omron*)
e75128
 		basic_machine=m88k-omron
e75128
 		;;
e75128
@@ -673,16 +788,21 @@ case $basic_machine in
e75128
 		basic_machine=ns32k-utek
e75128
 		os=-sysv
e75128
 		;;
e75128
+	microblaze*)
e75128
+		basic_machine=microblaze-xilinx
e75128
+		;;
e75128
+	mingw64)
e75128
+		basic_machine=x86_64-pc
e75128
+		os=-mingw64
e75128
+		;;
e75128
 	mingw32)
e75128
-		basic_machine=i386-pc
e75128
+		basic_machine=i686-pc
e75128
 		os=-mingw32
e75128
 		;;
e75128
-#### MozillaHack 
e75128
-	i386-msvc | msvc)
e75128
-		basic_machine=i386-pc
e75128
-		os=-msvc
e75128
+	mingw32ce)
e75128
+		basic_machine=arm-unknown
e75128
+		os=-mingw32ce
e75128
 		;;
e75128
-#### End MozillaHack 
e75128
 	miniframe)
e75128
 		basic_machine=m68000-convergent
e75128
 		;;
e75128
@@ -708,10 +828,21 @@ case $basic_machine in
e75128
 		basic_machine=i386-pc
e75128
 		os=-msdos
e75128
 		;;
e75128
+	ms1-*)
e75128
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
e75128
+		;;
e75128
+	msys)
e75128
+		basic_machine=i686-pc
e75128
+		os=-msys
e75128
+		;;
e75128
 	mvs)
e75128
 		basic_machine=i370-ibm
e75128
 		os=-mvs
e75128
 		;;
e75128
+	nacl)
e75128
+		basic_machine=le32-unknown
e75128
+		os=-nacl
e75128
+		;;
e75128
 	ncr3000)
e75128
 		basic_machine=i486-ncr
e75128
 		os=-sysv4
e75128
@@ -776,6 +907,12 @@ case $basic_machine in
e75128
 	np1)
e75128
 		basic_machine=np1-gould
e75128
 		;;
e75128
+	neo-tandem)
e75128
+		basic_machine=neo-tandem
e75128
+		;;
e75128
+	nse-tandem)
e75128
+		basic_machine=nse-tandem
e75128
+		;;
e75128
 	nsr-tandem)
e75128
 		basic_machine=nsr-tandem
e75128
 		;;
e75128
@@ -806,6 +943,14 @@ case $basic_machine in
e75128
 		basic_machine=i860-intel
e75128
 		os=-osf
e75128
 		;;
e75128
+	parisc)
e75128
+		basic_machine=hppa-unknown
e75128
+		os=-linux
e75128
+		;;
e75128
+	parisc-*)
e75128
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+		os=-linux
e75128
+		;;
e75128
 	pbd)
e75128
 		basic_machine=sparc-tti
e75128
 		;;
e75128
@@ -815,6 +960,12 @@ case $basic_machine in
e75128
 	pc532 | pc532-*)
e75128
 		basic_machine=ns32k-pc532
e75128
 		;;
e75128
+	pc98)
e75128
+		basic_machine=i386-pc
e75128
+		;;
e75128
+	pc98-*)
e75128
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+		;;
e75128
 	pentium | p5 | k5 | k6 | nexgen | viac3)
e75128
 		basic_machine=i586-pc
e75128
 		;;
e75128
@@ -844,9 +995,10 @@ case $basic_machine in
e75128
 		;;
e75128
 	power)	basic_machine=power-ibm
e75128
 		;;
e75128
-	ppc)	basic_machine=powerpc-unknown
e75128
+	ppc | ppcbe)	basic_machine=powerpc-unknown
e75128
 		;;
e75128
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+	ppc-* | ppcbe-*)
e75128
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
 		;;
e75128
 	ppcle | powerpclittle | ppc-le | powerpc-little)
e75128
 		basic_machine=powerpcle-unknown
e75128
@@ -856,7 +1008,7 @@ case $basic_machine in
e75128
 		;;
e75128
 	ppc64)	basic_machine=powerpc64-unknown
e75128
 		;;
e75128
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+	ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
 		;;
e75128
 	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
e75128
 		basic_machine=powerpc64le-unknown
e75128
@@ -871,6 +1023,14 @@ case $basic_machine in
e75128
 		basic_machine=i586-unknown
e75128
 		os=-pw32
e75128
 		;;
e75128
+	rdos | rdos64)
e75128
+		basic_machine=x86_64-pc
e75128
+		os=-rdos
e75128
+		;;
e75128
+	rdos32)
e75128
+		basic_machine=i386-pc
e75128
+		os=-rdos
e75128
+		;;
e75128
 	rom68k)
e75128
 		basic_machine=m68k-rom68k
e75128
 		os=-coff
e75128
@@ -897,6 +1057,10 @@ case $basic_machine in
e75128
 	sb1el)
e75128
 		basic_machine=mipsisa64sb1el-unknown
e75128
 		;;
e75128
+	sde)
e75128
+		basic_machine=mipsisa32-sde
e75128
+		os=-elf
e75128
+		;;
e75128
 	sei)
e75128
 		basic_machine=mips-sei
e75128
 		os=-seiux
e75128
@@ -908,6 +1072,9 @@ case $basic_machine in
e75128
 		basic_machine=sh-hitachi
e75128
 		os=-hms
e75128
 		;;
e75128
+	sh5el)
e75128
+		basic_machine=sh5le-unknown
e75128
+		;;
e75128
 	sh64)
e75128
 		basic_machine=sh64-unknown
e75128
 		;;
e75128
@@ -929,6 +1096,9 @@ case $basic_machine in
e75128
 		basic_machine=i860-stratus
e75128
 		os=-sysv4
e75128
 		;;
e75128
+	strongarm-* | thumb-*)
e75128
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
e75128
+		;;
e75128
 	sun2)
e75128
 		basic_machine=m68000-sun
e75128
 		;;
e75128
@@ -985,17 +1155,9 @@ case $basic_machine in
e75128
 		basic_machine=t90-cray
e75128
 		os=-unicos
e75128
 		;;
e75128
-	tic54x | c54x*)
e75128
-		basic_machine=tic54x-unknown
e75128
-		os=-coff
e75128
-		;;
e75128
-	tic55x | c55x*)
e75128
-		basic_machine=tic55x-unknown
e75128
-		os=-coff
e75128
-		;;
e75128
-	tic6x | c6x*)
e75128
-		basic_machine=tic6x-unknown
e75128
-		os=-coff
e75128
+	tile*)
e75128
+		basic_machine=$basic_machine-unknown
e75128
+		os=-linux-gnu
e75128
 		;;
e75128
 	tx39)
e75128
 		basic_machine=mipstx39-unknown
e75128
@@ -1064,6 +1226,9 @@ case $basic_machine in
e75128
 	xps | xps100)
e75128
 		basic_machine=xps100-honeywell
e75128
 		;;
e75128
+	xscale-* | xscalee[bl]-*)
e75128
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
e75128
+		;;
e75128
 	ymp)
e75128
 		basic_machine=ymp-cray
e75128
 		os=-unicos
e75128
@@ -1072,6 +1237,10 @@ case $basic_machine in
e75128
 		basic_machine=z8k-unknown
e75128
 		os=-sim
e75128
 		;;
e75128
+	z80-*-coff)
e75128
+		basic_machine=z80-unknown
e75128
+		os=-sim
e75128
+		;;
e75128
 	none)
e75128
 		basic_machine=none-none
e75128
 		os=-none
e75128
@@ -1110,10 +1279,10 @@ case $basic_machine in
e75128
 	we32k)
e75128
 		basic_machine=we32k-att
e75128
 		;;
e75128
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
e75128
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
e75128
 		basic_machine=sh-unknown
e75128
 		;;
e75128
-	sparc | sparcv8 | sparcv9 | sparcv9b)
e75128
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
e75128
 		basic_machine=sparc-sun
e75128
 		;;
e75128
 	cydra)
e75128
@@ -1157,9 +1326,12 @@ esac
e75128
 if [ x"$os" != x"" ]
e75128
 then
e75128
 case $os in
e75128
-        # First match some system type aliases
e75128
-        # that might get confused with valid system types.
e75128
+	# First match some system type aliases
e75128
+	# that might get confused with valid system types.
e75128
 	# -solaris* is a basic system type, with this one exception.
e75128
+	-auroraux)
e75128
+		os=-auroraux
e75128
+		;;
e75128
 	-solaris1 | -solaris1.*)
e75128
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
e75128
 		;;
e75128
@@ -1179,32 +1351,32 @@ case $os in
e75128
 	# The portable systems comes first.
e75128
 	# Each alternative MUST END IN A *, to match a version number.
e75128
 	# -sysv* is not here because it comes later, after sysvr4.
e75128
-#### MozillaHack 
e75128
-# msvc
e75128
-#### End MozillaHack 
e75128
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
e75128
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
e75128
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
e75128
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
e75128
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
e75128
+	      | -sym* | -kopensolaris* | -plan9* \
e75128
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
e75128
-	      | -aos* \
e75128
+	      | -aos* | -aros* \
e75128
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
e75128
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
e75128
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
e75128
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
e75128
+	      | -bitrig* | -openbsd* | -solidbsd* \
e75128
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
e75128
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
e75128
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
e75128
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
e75128
-	      | -chorusos* | -chorusrdb* \
e75128
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
e75128
-	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
e75128
+	      | -chorusos* | -chorusrdb* | -cegcc* \
e75128
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
e75128
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
e75128
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
e75128
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
e75128
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
e75128
-	      | -msvc* \
e75128
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
e75128
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
e75128
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
e75128
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
e75128
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
e75128
-	      | -skyos* | -haiku*)
e75128
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
e75128
 	# Remember, each alternative MUST END IN *, to match a version number.
e75128
 		;;
e75128
 	-qnx*)
e75128
@@ -1243,9 +1415,12 @@ case $os in
e75128
 	-opened*)
e75128
 		os=-openedition
e75128
 		;;
e75128
-        -os400*)
e75128
+	-os400*)
e75128
 		os=-os400
e75128
 		;;
e75128
+	-wince*)
e75128
+		os=-wince
e75128
+		;;
e75128
 	-osfrose*)
e75128
 		os=-osfrose
e75128
 		;;
e75128
@@ -1289,7 +1464,7 @@ case $os in
e75128
 	-sinix*)
e75128
 		os=-sysv4
e75128
 		;;
e75128
-        -tpf*)
e75128
+	-tpf*)
e75128
 		os=-tpf
e75128
 		;;
e75128
 	-triton*)
e75128
@@ -1325,12 +1500,14 @@ case $os in
e75128
 	-aros*)
e75128
 		os=-aros
e75128
 		;;
e75128
-	-kaos*)
e75128
-		os=-kaos
e75128
-		;;
e75128
 	-zvmoe)
e75128
 		os=-zvmoe
e75128
 		;;
e75128
+	-dicos*)
e75128
+		os=-dicos
e75128
+		;;
e75128
+	-nacl*)
e75128
+		;;
e75128
 	-none)
e75128
 		;;
e75128
 	*)
e75128
@@ -1353,6 +1530,12 @@ else
e75128
 # system, and we'll never get to this point.
e75128
 
e75128
 case $basic_machine in
e75128
+	score-*)
e75128
+		os=-elf
e75128
+		;;
e75128
+	spu-*)
e75128
+		os=-elf
e75128
+		;;
e75128
 	*-acorn)
e75128
 		os=-riscix1.2
e75128
 		;;
e75128
@@ -1362,9 +1545,24 @@ case $basic_machine in
e75128
 	arm*-semi)
e75128
 		os=-aout
e75128
 		;;
e75128
-    c4x-* | tic4x-*)
e75128
-        os=-coff
e75128
-        ;;
e75128
+	c4x-* | tic4x-*)
e75128
+		os=-coff
e75128
+		;;
e75128
+	c8051-*)
e75128
+		os=-elf
e75128
+		;;
e75128
+	hexagon-*)
e75128
+		os=-elf
e75128
+		;;
e75128
+	tic54x-*)
e75128
+		os=-coff
e75128
+		;;
e75128
+	tic55x-*)
e75128
+		os=-coff
e75128
+		;;
e75128
+	tic6x-*)
e75128
+		os=-coff
e75128
+		;;
e75128
 	# This must come before the *-dec entry.
e75128
 	pdp10-*)
e75128
 		os=-tops20
e75128
@@ -1383,19 +1581,22 @@ case $basic_machine in
e75128
 		;;
e75128
 	m68000-sun)
e75128
 		os=-sunos3
e75128
-		# This also exists in the configure program, but was not the
e75128
-		# default.
e75128
-		# os=-sunos4
e75128
 		;;
e75128
 	m68*-cisco)
e75128
 		os=-aout
e75128
 		;;
e75128
+	mep-*)
e75128
+		os=-elf
e75128
+		;;
e75128
 	mips*-cisco)
e75128
 		os=-elf
e75128
 		;;
e75128
 	mips*-*)
e75128
 		os=-elf
e75128
 		;;
e75128
+	or1k-*)
e75128
+		os=-elf
e75128
+		;;
e75128
 	or32-*)
e75128
 		os=-coff
e75128
 		;;
e75128
@@ -1414,7 +1615,7 @@ case $basic_machine in
e75128
 	*-ibm)
e75128
 		os=-aix
e75128
 		;;
e75128
-    	*-knuth)
e75128
+	*-knuth)
e75128
 		os=-mmixware
e75128
 		;;
e75128
 	*-wec)
e75128
@@ -1519,7 +1720,7 @@ case $basic_machine in
e75128
 			-sunos*)
e75128
 				vendor=sun
e75128
 				;;
e75128
-			-aix*)
e75128
+			-cnk*|-aix*)
e75128
 				vendor=ibm
e75128
 				;;
e75128
 			-beos*)