Replace config.guess and config.sub by same updated version as in current SDL12 subdir, for cross-compilation
authorPatrice Mandin <patmandin@gmail.com>
Fri, 02 Dec 2005 22:54:15 +0000
changeset 11218ef1756e699
parent 111 4e18bf511122
child 113 d881769db2f0
Replace config.guess and config.sub by same updated version as in current SDL12 subdir, for cross-compilation
config.guess
config.sub
     1.1 --- a/config.guess	Fri Dec 02 22:51:58 2005 +0000
     1.2 +++ b/config.guess	Fri Dec 02 22:54:15 2005 +0000
     1.3 @@ -1,9 +1,9 @@
     1.4  #! /bin/sh
     1.5  # Attempt to guess a canonical system name.
     1.6 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     1.7 -#   Free Software Foundation, Inc.
     1.8 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     1.9 +#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    1.10  
    1.11 -timestamp='2001-01-17'
    1.12 +timestamp='2003-02-22'
    1.13  
    1.14  # This file is free software; you can redistribute it and/or modify it
    1.15  # under the terms of the GNU General Public License as published by
    1.16 @@ -24,8 +24,9 @@
    1.17  # configuration script generated by Autoconf, you may include it under
    1.18  # the same distribution terms that you use for the rest of that program.
    1.19  
    1.20 -# Written by Per Bothner <bothner@cygnus.com>.
    1.21 -# Please send patches to <config-patches@gnu.org>.
    1.22 +# Originally written by Per Bothner <per@bothner.com>.
    1.23 +# Please send patches to <config-patches@gnu.org>.  Submit a context
    1.24 +# diff and a properly formatted ChangeLog entry.
    1.25  #
    1.26  # This script attempts to guess a canonical system name similar to
    1.27  # config.sub.  If it succeeds, it prints the system name on stdout, and
    1.28 @@ -33,10 +34,6 @@
    1.29  #
    1.30  # The plan is that this can be called by configure scripts if you
    1.31  # don't specify an explicit build system type.
    1.32 -#
    1.33 -# Only a few systems have been added to this list; please add others
    1.34 -# (but try to keep the structure clean).
    1.35 -#
    1.36  
    1.37  me=`echo "$0" | sed -e 's,.*/,,'`
    1.38  
    1.39 @@ -56,7 +53,7 @@
    1.40  GNU config.guess ($timestamp)
    1.41  
    1.42  Originally written by Per Bothner.
    1.43 -Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
    1.44 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    1.45  Free Software Foundation, Inc.
    1.46  
    1.47  This is free software; see the source for copying conditions.  There is NO
    1.48 @@ -91,33 +88,44 @@
    1.49    exit 1
    1.50  fi
    1.51  
    1.52 +trap 'exit 1' 1 2 15
    1.53  
    1.54 -dummy=dummy-$$
    1.55 -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
    1.56 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
    1.57 +# compiler to aid in system detection is discouraged as it requires
    1.58 +# temporary files to be created and, as you can see below, it is a
    1.59 +# headache to deal with in a portable fashion.
    1.60  
    1.61 -# CC_FOR_BUILD -- compiler used by this script.
    1.62  # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
    1.63  # use `HOST_CC' if defined, but it is deprecated.
    1.64  
    1.65 +# Portable tmp directory creation inspired by the Autoconf team.
    1.66 +
    1.67 +set_cc_for_build='
    1.68 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
    1.69 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
    1.70 +: ${TMPDIR=/tmp} ;
    1.71 + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
    1.72 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
    1.73 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
    1.74 +dummy=$tmp/dummy ;
    1.75 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    1.76  case $CC_FOR_BUILD,$HOST_CC,$CC in
    1.77 - ,,)    echo "int dummy(){}" > $dummy.c
    1.78 -	for c in cc gcc c89 ; do
    1.79 -	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
    1.80 -	  if test $? = 0 ; then
    1.81 -	     CC_FOR_BUILD="$c"; break
    1.82 -	  fi
    1.83 -	done
    1.84 -	rm -f $dummy.c $dummy.o $dummy.rel
    1.85 + ,,)    echo "int x;" > $dummy.c ;
    1.86 +	for c in cc gcc c89 c99 ; do
    1.87 +	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
    1.88 +	     CC_FOR_BUILD="$c"; break ;
    1.89 +	  fi ;
    1.90 +	done ;
    1.91  	if test x"$CC_FOR_BUILD" = x ; then
    1.92 -	  CC_FOR_BUILD=no_compiler_found
    1.93 +	  CC_FOR_BUILD=no_compiler_found ;
    1.94  	fi
    1.95  	;;
    1.96   ,,*)   CC_FOR_BUILD=$CC ;;
    1.97   ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    1.98 -esac
    1.99 +esac ;'
   1.100  
   1.101  # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
   1.102 -# (ghazi@noc.rutgers.edu 8/24/94.)
   1.103 +# (ghazi@noc.rutgers.edu 1994-08-24)
   1.104  if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
   1.105  	PATH=$PATH:/.attbin ; export PATH
   1.106  fi
   1.107 @@ -131,29 +139,31 @@
   1.108  
   1.109  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
   1.110      *:NetBSD:*:*)
   1.111 -	# Netbsd (nbsd) targets should (where applicable) match one or
   1.112 +	# NetBSD (nbsd) targets should (where applicable) match one or
   1.113  	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
   1.114  	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
   1.115  	# switched to ELF, *-*-netbsd* would select the old
   1.116  	# object file format.  This provides both forward
   1.117  	# compatibility and a consistent mechanism for selecting the
   1.118  	# object file format.
   1.119 -	# Determine the machine/vendor (is the vendor relevant).
   1.120 -	case "${UNAME_MACHINE}" in
   1.121 -	    amiga) machine=m68k-unknown ;;
   1.122 -	    arm32) machine=arm-unknown ;;
   1.123 -	    atari*) machine=m68k-atari ;;
   1.124 -	    sun3*) machine=m68k-sun ;;
   1.125 -	    mac68k) machine=m68k-apple ;;
   1.126 -	    macppc) machine=powerpc-apple ;;
   1.127 -	    hp3[0-9][05]) machine=m68k-hp ;;
   1.128 -	    ibmrt|romp-ibm) machine=romp-ibm ;;
   1.129 -	    *) machine=${UNAME_MACHINE}-unknown ;;
   1.130 +	#
   1.131 +	# Note: NetBSD doesn't particularly care about the vendor
   1.132 +	# portion of the name.  We always set it to "unknown".
   1.133 +	sysctl="sysctl -n hw.machine_arch"
   1.134 +	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
   1.135 +	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
   1.136 +	case "${UNAME_MACHINE_ARCH}" in
   1.137 +	    armeb) machine=armeb-unknown ;;
   1.138 +	    arm*) machine=arm-unknown ;;
   1.139 +	    sh3el) machine=shl-unknown ;;
   1.140 +	    sh3eb) machine=sh-unknown ;;
   1.141 +	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
   1.142  	esac
   1.143  	# The Operating System including object format, if it has switched
   1.144  	# to ELF recently, or will in the future.
   1.145 -	case "${UNAME_MACHINE}" in
   1.146 -	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
   1.147 +	case "${UNAME_MACHINE_ARCH}" in
   1.148 +	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
   1.149 +		eval $set_cc_for_build
   1.150  		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
   1.151  			| grep __ELF__ >/dev/null
   1.152  		then
   1.153 @@ -169,69 +179,107 @@
   1.154  		;;
   1.155  	esac
   1.156  	# The OS release
   1.157 -	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.158 +	# Debian GNU/NetBSD machines have a different userland, and
   1.159 +	# thus, need a distinct triplet. However, they do not need
   1.160 +	# kernel version information, so it can be replaced with a
   1.161 +	# suitable tag, in the style of linux-gnu.
   1.162 +	case "${UNAME_VERSION}" in
   1.163 +	    Debian*)
   1.164 +		release='-gnu'
   1.165 +		;;
   1.166 +	    *)
   1.167 +		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.168 +		;;
   1.169 +	esac
   1.170  	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   1.171  	# contains redundant information, the shorter form:
   1.172  	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   1.173  	echo "${machine}-${os}${release}"
   1.174  	exit 0 ;;
   1.175 +    amiga:OpenBSD:*:*)
   1.176 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.177 +	exit 0 ;;
   1.178 +    arc:OpenBSD:*:*)
   1.179 +	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   1.180 +	exit 0 ;;
   1.181 +    hp300:OpenBSD:*:*)
   1.182 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.183 +	exit 0 ;;
   1.184 +    mac68k:OpenBSD:*:*)
   1.185 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.186 +	exit 0 ;;
   1.187 +    macppc:OpenBSD:*:*)
   1.188 +	echo powerpc-unknown-openbsd${UNAME_RELEASE}
   1.189 +	exit 0 ;;
   1.190 +    mvme68k:OpenBSD:*:*)
   1.191 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.192 +	exit 0 ;;
   1.193 +    mvme88k:OpenBSD:*:*)
   1.194 +	echo m88k-unknown-openbsd${UNAME_RELEASE}
   1.195 +	exit 0 ;;
   1.196 +    mvmeppc:OpenBSD:*:*)
   1.197 +	echo powerpc-unknown-openbsd${UNAME_RELEASE}
   1.198 +	exit 0 ;;
   1.199 +    pmax:OpenBSD:*:*)
   1.200 +	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   1.201 +	exit 0 ;;
   1.202 +    sgi:OpenBSD:*:*)
   1.203 +	echo mipseb-unknown-openbsd${UNAME_RELEASE}
   1.204 +	exit 0 ;;
   1.205 +    sun3:OpenBSD:*:*)
   1.206 +	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.207 +	exit 0 ;;
   1.208 +    wgrisc:OpenBSD:*:*)
   1.209 +	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   1.210 +	exit 0 ;;
   1.211 +    *:OpenBSD:*:*)
   1.212 +	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
   1.213 +	exit 0 ;;
   1.214      alpha:OSF1:*:*)
   1.215  	if test $UNAME_RELEASE = "V4.0"; then
   1.216  		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   1.217  	fi
   1.218 +	# According to Compaq, /usr/sbin/psrinfo has been available on
   1.219 +	# OSF/1 and Tru64 systems produced since 1995.  I hope that
   1.220 +	# covers most systems running today.  This code pipes the CPU
   1.221 +	# types through head -n 1, so we only detect the type of CPU 0.
   1.222 +	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
   1.223 +	case "$ALPHA_CPU_TYPE" in
   1.224 +	    "EV4 (21064)")
   1.225 +		UNAME_MACHINE="alpha" ;;
   1.226 +	    "EV4.5 (21064)")
   1.227 +		UNAME_MACHINE="alpha" ;;
   1.228 +	    "LCA4 (21066/21068)")
   1.229 +		UNAME_MACHINE="alpha" ;;
   1.230 +	    "EV5 (21164)")
   1.231 +		UNAME_MACHINE="alphaev5" ;;
   1.232 +	    "EV5.6 (21164A)")
   1.233 +		UNAME_MACHINE="alphaev56" ;;
   1.234 +	    "EV5.6 (21164PC)")
   1.235 +		UNAME_MACHINE="alphapca56" ;;
   1.236 +	    "EV5.7 (21164PC)")
   1.237 +		UNAME_MACHINE="alphapca57" ;;
   1.238 +	    "EV6 (21264)")
   1.239 +		UNAME_MACHINE="alphaev6" ;;
   1.240 +	    "EV6.7 (21264A)")
   1.241 +		UNAME_MACHINE="alphaev67" ;;
   1.242 +	    "EV6.8CB (21264C)")
   1.243 +		UNAME_MACHINE="alphaev68" ;;
   1.244 +	    "EV6.8AL (21264B)")
   1.245 +		UNAME_MACHINE="alphaev68" ;;
   1.246 +	    "EV6.8CX (21264D)")
   1.247 +		UNAME_MACHINE="alphaev68" ;;
   1.248 +	    "EV6.9A (21264/EV69A)")
   1.249 +		UNAME_MACHINE="alphaev69" ;;
   1.250 +	    "EV7 (21364)")
   1.251 +		UNAME_MACHINE="alphaev7" ;;
   1.252 +	    "EV7.9 (21364A)")
   1.253 +		UNAME_MACHINE="alphaev79" ;;
   1.254 +	esac
   1.255  	# A Vn.n version is a released version.
   1.256  	# A Tn.n version is a released field test version.
   1.257  	# A Xn.n version is an unreleased experimental baselevel.
   1.258  	# 1.2 uses "1.2" for uname -r.
   1.259 -	cat <<EOF >$dummy.s
   1.260 -	.data
   1.261 -\$Lformat:
   1.262 -	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
   1.263 -
   1.264 -	.text
   1.265 -	.globl main
   1.266 -	.align 4
   1.267 -	.ent main
   1.268 -main:
   1.269 -	.frame \$30,16,\$26,0
   1.270 -	ldgp \$29,0(\$27)
   1.271 -	.prologue 1
   1.272 -	.long 0x47e03d80 # implver \$0
   1.273 -	lda \$2,-1
   1.274 -	.long 0x47e20c21 # amask \$2,\$1
   1.275 -	lda \$16,\$Lformat
   1.276 -	mov \$0,\$17
   1.277 -	not \$1,\$18
   1.278 -	jsr \$26,printf
   1.279 -	ldgp \$29,0(\$26)
   1.280 -	mov 0,\$16
   1.281 -	jsr \$26,exit
   1.282 -	.end main
   1.283 -EOF
   1.284 -	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   1.285 -	if test "$?" = 0 ; then
   1.286 -		case `./$dummy` in
   1.287 -			0-0)
   1.288 -				UNAME_MACHINE="alpha"
   1.289 -				;;
   1.290 -			1-0)
   1.291 -				UNAME_MACHINE="alphaev5"
   1.292 -				;;
   1.293 -			1-1)
   1.294 -				UNAME_MACHINE="alphaev56"
   1.295 -				;;
   1.296 -			1-101)
   1.297 -				UNAME_MACHINE="alphapca56"
   1.298 -				;;
   1.299 -			2-303)
   1.300 -				UNAME_MACHINE="alphaev6"
   1.301 -				;;
   1.302 -			2-307)
   1.303 -				UNAME_MACHINE="alphaev67"
   1.304 -				;;
   1.305 -		esac
   1.306 -	fi
   1.307 -	rm -f $dummy.s $dummy
   1.308  	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   1.309  	exit 0 ;;
   1.310      Alpha\ *:Windows_NT*:*)
   1.311 @@ -246,29 +294,11 @@
   1.312      Amiga*:UNIX_System_V:4.0:*)
   1.313  	echo m68k-unknown-sysv4
   1.314  	exit 0;;
   1.315 -    amiga:OpenBSD:*:*)
   1.316 -	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.317 -	exit 0 ;;
   1.318      *:[Aa]miga[Oo][Ss]:*:*)
   1.319  	echo ${UNAME_MACHINE}-unknown-amigaos
   1.320  	exit 0 ;;
   1.321 -    arc64:OpenBSD:*:*)
   1.322 -	echo mips64el-unknown-openbsd${UNAME_RELEASE}
   1.323 -	exit 0 ;;
   1.324 -    arc:OpenBSD:*:*)
   1.325 -	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   1.326 -	exit 0 ;;
   1.327 -    hkmips:OpenBSD:*:*)
   1.328 -	echo mips-unknown-openbsd${UNAME_RELEASE}
   1.329 -	exit 0 ;;
   1.330 -    pmax:OpenBSD:*:*)
   1.331 -	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   1.332 -	exit 0 ;;
   1.333 -    sgi:OpenBSD:*:*)
   1.334 -	echo mips-unknown-openbsd${UNAME_RELEASE}
   1.335 -	exit 0 ;;
   1.336 -    wgrisc:OpenBSD:*:*)
   1.337 -	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   1.338 +    *:[Mm]orph[Oo][Ss]:*:*)
   1.339 +	echo ${UNAME_MACHINE}-unknown-morphos
   1.340  	exit 0 ;;
   1.341      *:OS/390:*:*)
   1.342  	echo i370-ibm-openedition
   1.343 @@ -290,6 +320,10 @@
   1.344      NILE*:*:*:dcosx)
   1.345  	echo pyramid-pyramid-svr4
   1.346  	exit 0 ;;
   1.347 +    DRS?6000:UNIX_SV:4.2*:7*)
   1.348 +	case `/usr/bin/uname -p` in
   1.349 +	    sparc) echo sparc-icl-nx7 && exit 0 ;;
   1.350 +	esac ;;
   1.351      sun4H:SunOS:5.*:*)
   1.352  	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   1.353  	exit 0 ;;
   1.354 @@ -318,7 +352,7 @@
   1.355  	echo m68k-sun-sunos${UNAME_RELEASE}
   1.356  	exit 0 ;;
   1.357      sun*:*:4.2BSD:*)
   1.358 -	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
   1.359 +	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
   1.360  	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
   1.361  	case "`/bin/arch`" in
   1.362  	    sun3)
   1.363 @@ -332,9 +366,6 @@
   1.364      aushp:SunOS:*:*)
   1.365  	echo sparc-auspex-sunos${UNAME_RELEASE}
   1.366  	exit 0 ;;
   1.367 -    atari*:OpenBSD:*:*)
   1.368 -	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.369 -	exit 0 ;;
   1.370      # The situation for MiNT is a little confusing.  The machine name
   1.371      # can be virtually everything (everything which is not
   1.372      # "atarist" or "atariste" at least should have a processor
   1.373 @@ -361,18 +392,6 @@
   1.374      *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
   1.375          echo m68k-unknown-mint${UNAME_RELEASE}
   1.376          exit 0 ;;
   1.377 -    sun3*:OpenBSD:*:*)
   1.378 -	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.379 -	exit 0 ;;
   1.380 -    mac68k:OpenBSD:*:*)
   1.381 -	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.382 -	exit 0 ;;
   1.383 -    mvme68k:OpenBSD:*:*)
   1.384 -	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.385 -	exit 0 ;;
   1.386 -    mvme88k:OpenBSD:*:*)
   1.387 -	echo m88k-unknown-openbsd${UNAME_RELEASE}
   1.388 -	exit 0 ;;
   1.389      powerpc:machten:*:*)
   1.390  	echo powerpc-apple-machten${UNAME_RELEASE}
   1.391  	exit 0 ;;
   1.392 @@ -389,6 +408,7 @@
   1.393  	echo clipper-intergraph-clix${UNAME_RELEASE}
   1.394  	exit 0 ;;
   1.395      mips:*:*:UMIPS | mips:*:*:RISCos)
   1.396 +	eval $set_cc_for_build
   1.397  	sed 's/^	//' << EOF >$dummy.c
   1.398  #ifdef __cplusplus
   1.399  #include <stdio.h>  /* for printf() prototype */
   1.400 @@ -410,12 +430,20 @@
   1.401  	  exit (-1);
   1.402  	}
   1.403  EOF
   1.404 -	$CC_FOR_BUILD $dummy.c -o $dummy \
   1.405 -	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
   1.406 -	  && rm $dummy.c $dummy && exit 0
   1.407 -	rm -f $dummy.c $dummy
   1.408 +	$CC_FOR_BUILD -o $dummy $dummy.c \
   1.409 +	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
   1.410 +	  && exit 0
   1.411  	echo mips-mips-riscos${UNAME_RELEASE}
   1.412  	exit 0 ;;
   1.413 +    Motorola:PowerMAX_OS:*:*)
   1.414 +	echo powerpc-motorola-powermax
   1.415 +	exit 0 ;;
   1.416 +    Motorola:*:4.3:PL8-*)
   1.417 +	echo powerpc-harris-powermax
   1.418 +	exit 0 ;;
   1.419 +    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
   1.420 +	echo powerpc-harris-powermax
   1.421 +	exit 0 ;;
   1.422      Night_Hawk:Power_UNIX:*:*)
   1.423  	echo powerpc-harris-powerunix
   1.424  	exit 0 ;;
   1.425 @@ -463,11 +491,20 @@
   1.426      ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
   1.427  	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
   1.428  	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
   1.429 -    i?86:AIX:*:*)
   1.430 +    i*86:AIX:*:*)
   1.431  	echo i386-ibm-aix
   1.432  	exit 0 ;;
   1.433 +    ia64:AIX:*:*)
   1.434 +	if [ -x /usr/bin/oslevel ] ; then
   1.435 +		IBM_REV=`/usr/bin/oslevel`
   1.436 +	else
   1.437 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   1.438 +	fi
   1.439 +	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
   1.440 +	exit 0 ;;
   1.441      *:AIX:2:3)
   1.442  	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
   1.443 +		eval $set_cc_for_build
   1.444  		sed 's/^		//' << EOF >$dummy.c
   1.445  		#include <sys/systemcfg.h>
   1.446  
   1.447 @@ -479,8 +516,7 @@
   1.448  			exit(0);
   1.449  			}
   1.450  EOF
   1.451 -		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
   1.452 -		rm -f $dummy.c $dummy
   1.453 +		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
   1.454  		echo rs6000-ibm-aix3.2.5
   1.455  	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
   1.456  		echo rs6000-ibm-aix3.2.4
   1.457 @@ -488,9 +524,9 @@
   1.458  		echo rs6000-ibm-aix3.2
   1.459  	fi
   1.460  	exit 0 ;;
   1.461 -    *:AIX:*:4)
   1.462 -	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
   1.463 -	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
   1.464 +    *:AIX:*:[45])
   1.465 +	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
   1.466 +	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
   1.467  		IBM_ARCH=rs6000
   1.468  	else
   1.469  		IBM_ARCH=powerpc
   1.470 @@ -498,23 +534,10 @@
   1.471  	if [ -x /usr/bin/oslevel ] ; then
   1.472  		IBM_REV=`/usr/bin/oslevel`
   1.473  	else
   1.474 -		IBM_REV=4.${UNAME_RELEASE}
   1.475 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   1.476  	fi
   1.477  	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
   1.478  	exit 0 ;;
   1.479 -    *:AIX:*:5)
   1.480 -	case "`lsattr -El proc0 -a type -F value`" in
   1.481 -	    PowerPC*) IBM_ARCH=powerpc
   1.482 -		      IBM_MANUF=ibm ;;
   1.483 -	    Itanium)  IBM_ARCH=ia64
   1.484 -		      IBM_MANUF=unknown ;;
   1.485 -	    POWER*)   IBM_ARCH=power
   1.486 -		      IBM_MANUF=ibm ;;
   1.487 -	    *)        IBM_ARCH=powerpc
   1.488 -		      IBM_MANUF=ibm ;;
   1.489 -	esac
   1.490 -	echo ${IBM_ARCH}-${IBM_MANUF}-aix${UNAME_VERSION}.${UNAME_RELEASE}
   1.491 -	exit 0 ;;
   1.492      *:AIX:*:*)
   1.493  	echo rs6000-ibm-aix
   1.494  	exit 0 ;;
   1.495 @@ -542,10 +565,8 @@
   1.496  	    9000/31? )            HP_ARCH=m68000 ;;
   1.497  	    9000/[34]?? )         HP_ARCH=m68k ;;
   1.498  	    9000/[678][0-9][0-9])
   1.499 -              case "${HPUX_REV}" in
   1.500 -                11.[0-9][0-9])
   1.501 -                  if [ -x /usr/bin/getconf ]; then
   1.502 -                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   1.503 +		if [ -x /usr/bin/getconf ]; then
   1.504 +		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   1.505                      sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   1.506                      case "${sc_cpu_version}" in
   1.507                        523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
   1.508 @@ -554,12 +575,13 @@
   1.509                          case "${sc_kernel_bits}" in
   1.510                            32) HP_ARCH="hppa2.0n" ;;
   1.511                            64) HP_ARCH="hppa2.0w" ;;
   1.512 +			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
   1.513                          esac ;;
   1.514                      esac
   1.515 -                  fi ;;
   1.516 -              esac
   1.517 -              if [ "${HP_ARCH}" = "" ]; then
   1.518 -              sed 's/^              //' << EOF >$dummy.c
   1.519 +		fi
   1.520 +		if [ "${HP_ARCH}" = "" ]; then
   1.521 +		    eval $set_cc_for_build
   1.522 +		    sed 's/^              //' << EOF >$dummy.c
   1.523  
   1.524                #define _HPUX_SOURCE
   1.525                #include <stdlib.h>
   1.526 @@ -592,11 +614,21 @@
   1.527                    exit (0);
   1.528                }
   1.529  EOF
   1.530 -	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
   1.531 -	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
   1.532 -	rm -f $dummy.c $dummy
   1.533 -	fi ;;
   1.534 +		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
   1.535 +		    test -z "$HP_ARCH" && HP_ARCH=hppa
   1.536 +		fi ;;
   1.537  	esac
   1.538 +	if [ ${HP_ARCH} = "hppa2.0w" ]
   1.539 +	then
   1.540 +	    # avoid double evaluation of $set_cc_for_build
   1.541 +	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
   1.542 +	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
   1.543 +	    then
   1.544 +		HP_ARCH="hppa2.0w"
   1.545 +	    else
   1.546 +		HP_ARCH="hppa64"
   1.547 +	    fi
   1.548 +	fi
   1.549  	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
   1.550  	exit 0 ;;
   1.551      ia64:HP-UX:*:*)
   1.552 @@ -604,6 +636,7 @@
   1.553  	echo ia64-hp-hpux${HPUX_REV}
   1.554  	exit 0 ;;
   1.555      3050*:HI-UX:*:*)
   1.556 +	eval $set_cc_for_build
   1.557  	sed 's/^	//' << EOF >$dummy.c
   1.558  	#include <unistd.h>
   1.559  	int
   1.560 @@ -629,8 +662,7 @@
   1.561  	  exit (0);
   1.562  	}
   1.563  EOF
   1.564 -	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
   1.565 -	rm -f $dummy.c $dummy
   1.566 +	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
   1.567  	echo unknown-hitachi-hiuxwe2
   1.568  	exit 0 ;;
   1.569      9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
   1.570 @@ -639,7 +671,7 @@
   1.571      9000/8??:4.3bsd:*:*)
   1.572  	echo hppa1.0-hp-bsd
   1.573  	exit 0 ;;
   1.574 -    *9??*:MPE/iX:*:*)
   1.575 +    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
   1.576  	echo hppa1.0-hp-mpeix
   1.577  	exit 0 ;;
   1.578      hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
   1.579 @@ -648,7 +680,7 @@
   1.580      hp8??:OSF1:*:*)
   1.581  	echo hppa1.0-hp-osf
   1.582  	exit 0 ;;
   1.583 -    i?86:OSF1:*:*)
   1.584 +    i*86:OSF1:*:*)
   1.585  	if [ -x /usr/sbin/sysversion ] ; then
   1.586  	    echo ${UNAME_MACHINE}-unknown-osf1mk
   1.587  	else
   1.588 @@ -658,9 +690,6 @@
   1.589      parisc*:Lites*:*:*)
   1.590  	echo hppa1.1-hp-lites
   1.591  	exit 0 ;;
   1.592 -    hppa*:OpenBSD:*:*)
   1.593 -	echo hppa-unknown-openbsd
   1.594 -	exit 0 ;;
   1.595      C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
   1.596  	echo c1-convex-bsd
   1.597          exit 0 ;;
   1.598 @@ -679,42 +708,34 @@
   1.599      C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
   1.600  	echo c4-convex-bsd
   1.601          exit 0 ;;
   1.602 -    CRAY*X-MP:*:*:*)
   1.603 -	echo xmp-cray-unicos
   1.604 -        exit 0 ;;
   1.605      CRAY*Y-MP:*:*:*)
   1.606 -	echo ymp-cray-unicos${UNAME_RELEASE}
   1.607 +	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.608  	exit 0 ;;
   1.609      CRAY*[A-Z]90:*:*:*)
   1.610  	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
   1.611  	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
   1.612 -	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
   1.613 +	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
   1.614 +	      -e 's/\.[^.]*$/.X/'
   1.615  	exit 0 ;;
   1.616      CRAY*TS:*:*:*)
   1.617  	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.618  	exit 0 ;;
   1.619 -    CRAY*T3D:*:*:*)
   1.620 -	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.621 -	exit 0 ;;
   1.622      CRAY*T3E:*:*:*)
   1.623  	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.624  	exit 0 ;;
   1.625      CRAY*SV1:*:*:*)
   1.626  	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.627  	exit 0 ;;
   1.628 -    CRAY-2:*:*:*)
   1.629 -	echo cray2-cray-unicos
   1.630 -        exit 0 ;;
   1.631 +    *:UNICOS/mp:*:*)
   1.632 +	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
   1.633 +	exit 0 ;;
   1.634      F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
   1.635  	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   1.636          FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   1.637          FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   1.638          echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   1.639          exit 0 ;;
   1.640 -    hp300:OpenBSD:*:*)
   1.641 -	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.642 -	exit 0 ;;
   1.643 -    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   1.644 +    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   1.645  	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
   1.646  	exit 0 ;;
   1.647      sparc*:BSD/OS:*:*)
   1.648 @@ -724,10 +745,18 @@
   1.649  	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
   1.650  	exit 0 ;;
   1.651      *:FreeBSD:*:*)
   1.652 -	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
   1.653 -	exit 0 ;;
   1.654 -    *:OpenBSD:*:*)
   1.655 -	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.656 +	# Determine whether the default compiler uses glibc.
   1.657 +	eval $set_cc_for_build
   1.658 +	sed 's/^	//' << EOF >$dummy.c
   1.659 +	#include <features.h>
   1.660 +	#if __GLIBC__ >= 2
   1.661 +	LIBC=gnu
   1.662 +	#else
   1.663 +	LIBC=
   1.664 +	#endif
   1.665 +EOF
   1.666 +	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
   1.667 +	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
   1.668  	exit 0 ;;
   1.669      i*:CYGWIN*:*)
   1.670  	echo ${UNAME_MACHINE}-pc-cygwin
   1.671 @@ -738,11 +767,17 @@
   1.672      i*:PW*:*)
   1.673  	echo ${UNAME_MACHINE}-pc-pw32
   1.674  	exit 0 ;;
   1.675 +    x86:Interix*:3*)
   1.676 +	echo i586-pc-interix3
   1.677 +	exit 0 ;;
   1.678 +    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
   1.679 +	echo i${UNAME_MACHINE}-pc-mks
   1.680 +	exit 0 ;;
   1.681      i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
   1.682  	# How do we know it's Interix rather than the generic POSIX subsystem?
   1.683  	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
   1.684  	# UNAME_MACHINE based on the output of uname instead of i386?
   1.685 -	echo i386-pc-interix
   1.686 +	echo i586-pc-interix
   1.687  	exit 0 ;;
   1.688      i*:UWIN*:*)
   1.689  	echo ${UNAME_MACHINE}-pc-uwin
   1.690 @@ -759,242 +794,156 @@
   1.691      i*86:Minix:*:*)
   1.692  	echo ${UNAME_MACHINE}-pc-minix
   1.693  	exit 0 ;;
   1.694 -    *:Linux:*:*)
   1.695 -
   1.696 +    arm*:Linux:*:*)
   1.697 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.698 +	exit 0 ;;
   1.699 +    ia64:Linux:*:*)
   1.700 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.701 +	exit 0 ;;
   1.702 +    m68*:Linux:*:*)
   1.703 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.704 +	exit 0 ;;
   1.705 +    mips:Linux:*:*)
   1.706 +	eval $set_cc_for_build
   1.707 +	sed 's/^	//' << EOF >$dummy.c
   1.708 +	#undef CPU
   1.709 +	#undef mips
   1.710 +	#undef mipsel
   1.711 +	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
   1.712 +	CPU=mipsel
   1.713 +	#else
   1.714 +	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
   1.715 +	CPU=mips
   1.716 +	#else
   1.717 +	CPU=
   1.718 +	#endif
   1.719 +	#endif
   1.720 +EOF
   1.721 +	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
   1.722 +	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
   1.723 +	;;
   1.724 +    mips64:Linux:*:*)
   1.725 +	eval $set_cc_for_build
   1.726 +	sed 's/^	//' << EOF >$dummy.c
   1.727 +	#undef CPU
   1.728 +	#undef mips64
   1.729 +	#undef mips64el
   1.730 +	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
   1.731 +	CPU=mips64el
   1.732 +	#else
   1.733 +	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
   1.734 +	CPU=mips64
   1.735 +	#else
   1.736 +	CPU=
   1.737 +	#endif
   1.738 +	#endif
   1.739 +EOF
   1.740 +	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
   1.741 +	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
   1.742 +	;;
   1.743 +    ppc:Linux:*:*)
   1.744 +	echo powerpc-unknown-linux-gnu
   1.745 +	exit 0 ;;
   1.746 +    ppc64:Linux:*:*)
   1.747 +	echo powerpc64-unknown-linux-gnu
   1.748 +	exit 0 ;;
   1.749 +    alpha:Linux:*:*)
   1.750 +	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
   1.751 +	  EV5)   UNAME_MACHINE=alphaev5 ;;
   1.752 +	  EV56)  UNAME_MACHINE=alphaev56 ;;
   1.753 +	  PCA56) UNAME_MACHINE=alphapca56 ;;
   1.754 +	  PCA57) UNAME_MACHINE=alphapca56 ;;
   1.755 +	  EV6)   UNAME_MACHINE=alphaev6 ;;
   1.756 +	  EV67)  UNAME_MACHINE=alphaev67 ;;
   1.757 +	  EV68*) UNAME_MACHINE=alphaev68 ;;
   1.758 +        esac
   1.759 +	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
   1.760 +	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
   1.761 +	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
   1.762 +	exit 0 ;;
   1.763 +    parisc:Linux:*:* | hppa:Linux:*:*)
   1.764 +	# Look for CPU level
   1.765 +	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
   1.766 +	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
   1.767 +	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
   1.768 +	  *)    echo hppa-unknown-linux-gnu ;;
   1.769 +	esac
   1.770 +	exit 0 ;;
   1.771 +    parisc64:Linux:*:* | hppa64:Linux:*:*)
   1.772 +	echo hppa64-unknown-linux-gnu
   1.773 +	exit 0 ;;
   1.774 +    s390:Linux:*:* | s390x:Linux:*:*)
   1.775 +	echo ${UNAME_MACHINE}-ibm-linux
   1.776 +	exit 0 ;;
   1.777 +    sh*:Linux:*:*)
   1.778 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.779 +	exit 0 ;;
   1.780 +    sparc:Linux:*:* | sparc64:Linux:*:*)
   1.781 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   1.782 +	exit 0 ;;
   1.783 +    x86_64:Linux:*:*)
   1.784 +	echo x86_64-unknown-linux-gnu
   1.785 +	exit 0 ;;
   1.786 +    i*86:Linux:*:*)
   1.787  	# The BFD linker knows what the default object file format is, so
   1.788  	# first see if it will tell us. cd to the root directory to prevent
   1.789  	# problems with other programs or directories called `ld' in the path.
   1.790 -	ld_supported_emulations=`cd /; ld --help 2>&1 \
   1.791 -			 | sed -ne '/supported emulations:/!d
   1.792 +	# Set LC_ALL=C to ensure ld outputs messages in English.
   1.793 +	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
   1.794 +			 | sed -ne '/supported targets:/!d
   1.795  				    s/[ 	][ 	]*/ /g
   1.796 -				    s/.*supported emulations: *//
   1.797 +				    s/.*supported targets: *//
   1.798  				    s/ .*//
   1.799  				    p'`
   1.800 -        case "$ld_supported_emulations" in
   1.801 -	  *ia64)
   1.802 -		echo "${UNAME_MACHINE}-unknown-linux"
   1.803 -		exit 0
   1.804 -		;;
   1.805 -	  i?86linux)
   1.806 -		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
   1.807 -		exit 0
   1.808 -		;;
   1.809 -	  elf_i?86)
   1.810 +        case "$ld_supported_targets" in
   1.811 +	  elf32-i386)
   1.812  		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
   1.813  		;;
   1.814 -	  i?86coff)
   1.815 +	  a.out-i386-linux)
   1.816 +		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
   1.817 +		exit 0 ;;
   1.818 +	  coff-i386)
   1.819  		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
   1.820 -		exit 0
   1.821 -		;;
   1.822 -	  sparclinux)
   1.823 -		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
   1.824 -		exit 0
   1.825 -		;;
   1.826 -	  elf32_sparc)
   1.827 -		echo "${UNAME_MACHINE}-unknown-linux-gnu"
   1.828 -		exit 0
   1.829 -		;;
   1.830 -	  armlinux)
   1.831 -		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
   1.832 -		exit 0
   1.833 -		;;
   1.834 -	  elf32arm*)
   1.835 -		echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
   1.836 -		exit 0
   1.837 -		;;
   1.838 -	  armelf_linux*)
   1.839 -		echo "${UNAME_MACHINE}-unknown-linux-gnu"
   1.840 -		exit 0
   1.841 -		;;
   1.842 -	  m68klinux)
   1.843 -		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
   1.844 -		exit 0
   1.845 -		;;
   1.846 -	  elf32ppc | elf32ppclinux)
   1.847 -		# Determine Lib Version
   1.848 -		cat >$dummy.c <<EOF
   1.849 -#include <features.h>
   1.850 -#if defined(__GLIBC__)
   1.851 -extern char __libc_version[];
   1.852 -extern char __libc_release[];
   1.853 -#endif
   1.854 -main(argc, argv)
   1.855 -     int argc;
   1.856 -     char *argv[];
   1.857 -{
   1.858 -#if defined(__GLIBC__)
   1.859 -  printf("%s %s\n", __libc_version, __libc_release);
   1.860 -#else
   1.861 -  printf("unkown\n");
   1.862 -#endif
   1.863 -  return 0;
   1.864 -}
   1.865 +		exit 0 ;;
   1.866 +	  "")
   1.867 +		# Either a pre-BFD a.out linker (linux-gnuoldld) or
   1.868 +		# one that does not give us useful --help.
   1.869 +		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
   1.870 +		exit 0 ;;
   1.871 +	esac
   1.872 +	# Determine whether the default compiler is a.out or elf
   1.873 +	eval $set_cc_for_build
   1.874 +	sed 's/^	//' << EOF >$dummy.c
   1.875 +	#include <features.h>
   1.876 +	#ifdef __ELF__
   1.877 +	# ifdef __GLIBC__
   1.878 +	#  if __GLIBC__ >= 2
   1.879 +	LIBC=gnu
   1.880 +	#  else
   1.881 +	LIBC=gnulibc1
   1.882 +	#  endif
   1.883 +	# else
   1.884 +	LIBC=gnulibc1
   1.885 +	# endif
   1.886 +	#else
   1.887 +	#ifdef __INTEL_COMPILER
   1.888 +	LIBC=gnu
   1.889 +	#else
   1.890 +	LIBC=gnuaout
   1.891 +	#endif
   1.892 +	#endif
   1.893  EOF
   1.894 -		LIBC=""
   1.895 -		$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
   1.896 -		if test "$?" = 0 ; then
   1.897 -			./$dummy | grep 1\.99 > /dev/null
   1.898 -			if test "$?" = 0 ; then
   1.899 -				LIBC="libc1"
   1.900 -			fi
   1.901 -		fi
   1.902 -		rm -f $dummy.c $dummy
   1.903 -		echo powerpc-unknown-linux-gnu${LIBC}
   1.904 -		exit 0
   1.905 -		;;
   1.906 -	  shelf_linux)
   1.907 -		echo "${UNAME_MACHINE}-unknown-linux-gnu"
   1.908 -		exit 0
   1.909 -		;;
   1.910 -	esac
   1.911 -
   1.912 -	if test "${UNAME_MACHINE}" = "alpha" ; then
   1.913 -		cat <<EOF >$dummy.s
   1.914 -			.data
   1.915 -		\$Lformat:
   1.916 -			.byte 37,100,45,37,120,10,0	# "%d-%x\n"
   1.917 -
   1.918 -			.text
   1.919 -			.globl main
   1.920 -			.align 4
   1.921 -			.ent main
   1.922 -		main:
   1.923 -			.frame \$30,16,\$26,0
   1.924 -			ldgp \$29,0(\$27)
   1.925 -			.prologue 1
   1.926 -			.long 0x47e03d80 # implver \$0
   1.927 -			lda \$2,-1
   1.928 -			.long 0x47e20c21 # amask \$2,\$1
   1.929 -			lda \$16,\$Lformat
   1.930 -			mov \$0,\$17
   1.931 -			not \$1,\$18
   1.932 -			jsr \$26,printf
   1.933 -			ldgp \$29,0(\$26)
   1.934 -			mov 0,\$16
   1.935 -			jsr \$26,exit
   1.936 -			.end main
   1.937 -EOF
   1.938 -		LIBC=""
   1.939 -		$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   1.940 -		if test "$?" = 0 ; then
   1.941 -			case `./$dummy` in
   1.942 -			0-0)
   1.943 -				UNAME_MACHINE="alpha"
   1.944 -				;;
   1.945 -			1-0)
   1.946 -				UNAME_MACHINE="alphaev5"
   1.947 -				;;
   1.948 -			1-1)
   1.949 -				UNAME_MACHINE="alphaev56"
   1.950 -				;;
   1.951 -			1-101)
   1.952 -				UNAME_MACHINE="alphapca56"
   1.953 -				;;
   1.954 -			2-303)
   1.955 -				UNAME_MACHINE="alphaev6"
   1.956 -				;;
   1.957 -			2-307)
   1.958 -				UNAME_MACHINE="alphaev67"
   1.959 -				;;
   1.960 -			esac
   1.961 -
   1.962 -			objdump --private-headers $dummy | \
   1.963 -			  grep ld.so.1 > /dev/null
   1.964 -			if test "$?" = 0 ; then
   1.965 -				LIBC="libc1"
   1.966 -			fi
   1.967 -		fi
   1.968 -		rm -f $dummy.s $dummy
   1.969 -		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
   1.970 -	elif test "${UNAME_MACHINE}" = "mips" ; then
   1.971 -	  cat >$dummy.c <<EOF
   1.972 -#ifdef __cplusplus
   1.973 -#include <stdio.h>  /* for printf() prototype */
   1.974 -	int main (int argc, char *argv[]) {
   1.975 -#else
   1.976 -	int main (argc, argv) int argc; char *argv[]; {
   1.977 -#endif
   1.978 -#ifdef __MIPSEB__
   1.979 -  printf ("%s-unknown-linux-gnu\n", argv[1]);
   1.980 -#endif
   1.981 -#ifdef __MIPSEL__
   1.982 -  printf ("%sel-unknown-linux-gnu\n", argv[1]);
   1.983 -#endif
   1.984 -  return 0;
   1.985 -}
   1.986 -EOF
   1.987 -	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
   1.988 -	  rm -f $dummy.c $dummy
   1.989 -	elif test "${UNAME_MACHINE}" = "s390"; then
   1.990 -	  echo s390-ibm-linux && exit 0
   1.991 -	elif test "${UNAME_MACHINE}" = "x86_64"; then
   1.992 -	  echo x86_64-unknown-linux-gnu && exit 0
   1.993 -	elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
   1.994 -	  # Look for CPU level
   1.995 -	  case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
   1.996 -	    PA7*)
   1.997 -		echo hppa1.1-unknown-linux-gnu
   1.998 -		;;
   1.999 -	    PA8*)
  1.1000 -		echo hppa2.0-unknown-linux-gnu
  1.1001 -		;;
  1.1002 -	    *)
  1.1003 -		echo hppa-unknown-linux-gnu
  1.1004 -		;;
  1.1005 -	  esac
  1.1006 -	  exit 0
  1.1007 -	else
  1.1008 -	  # Either a pre-BFD a.out linker (linux-gnuoldld)
  1.1009 -	  # or one that does not give us useful --help.
  1.1010 -	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
  1.1011 -	  # If ld does not provide *any* "supported emulations:"
  1.1012 -	  # that means it is gnuoldld.
  1.1013 -	  test -z "$ld_supported_emulations" \
  1.1014 -	    && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
  1.1015 -
  1.1016 -	  case "${UNAME_MACHINE}" in
  1.1017 -	  i?86)
  1.1018 -	    VENDOR=pc;
  1.1019 -	    ;;
  1.1020 -	  *)
  1.1021 -	    VENDOR=unknown;
  1.1022 -	    ;;
  1.1023 -	  esac
  1.1024 -	  # Determine whether the default compiler is a.out or elf
  1.1025 -	  cat >$dummy.c <<EOF
  1.1026 -#include <features.h>
  1.1027 -#ifdef __cplusplus
  1.1028 -#include <stdio.h>  /* for printf() prototype */
  1.1029 -	int main (int argc, char *argv[]) {
  1.1030 -#else
  1.1031 -	int main (argc, argv) int argc; char *argv[]; {
  1.1032 -#endif
  1.1033 -#ifdef __ELF__
  1.1034 -# ifdef __GLIBC__
  1.1035 -#  if __GLIBC__ >= 2
  1.1036 -    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
  1.1037 -#  else
  1.1038 -    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
  1.1039 -#  endif
  1.1040 -# else
  1.1041 -   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
  1.1042 -# endif
  1.1043 -#else
  1.1044 -  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
  1.1045 -#endif
  1.1046 -  return 0;
  1.1047 -}
  1.1048 -EOF
  1.1049 -	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
  1.1050 -	  rm -f $dummy.c $dummy
  1.1051 -	  test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
  1.1052 -	fi ;;
  1.1053 -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
  1.1054 -# are messed up and put the nodename in both sysname and nodename.
  1.1055 -    i?86:DYNIX/ptx:4*:*)
  1.1056 +	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
  1.1057 +	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
  1.1058 +	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
  1.1059 +	;;
  1.1060 +    i*86:DYNIX/ptx:4*:*)
  1.1061 +	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  1.1062 +	# earlier versions are messed up and put the nodename in both
  1.1063 +	# sysname and nodename.
  1.1064  	echo i386-sequent-sysv4
  1.1065  	exit 0 ;;
  1.1066 -    i?86:UNIX_SV:4.2MP:2.*)
  1.1067 +    i*86:UNIX_SV:4.2MP:2.*)
  1.1068          # Unixware is an offshoot of SVR4, but it has its own version
  1.1069          # number series starting with 2...
  1.1070          # I am not positive that other SVR4 systems won't match this,
  1.1071 @@ -1002,7 +951,24 @@
  1.1072          # Use sysv4.2uw... so that sysv4* matches it.
  1.1073  	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  1.1074  	exit 0 ;;
  1.1075 -    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
  1.1076 +    i*86:OS/2:*:*)
  1.1077 +	# If we were able to find `uname', then EMX Unix compatibility
  1.1078 +	# is probably installed.
  1.1079 +	echo ${UNAME_MACHINE}-pc-os2-emx
  1.1080 +	exit 0 ;;
  1.1081 +    i*86:XTS-300:*:STOP)
  1.1082 +	echo ${UNAME_MACHINE}-unknown-stop
  1.1083 +	exit 0 ;;
  1.1084 +    i*86:atheos:*:*)
  1.1085 +	echo ${UNAME_MACHINE}-unknown-atheos
  1.1086 +	exit 0 ;;
  1.1087 +    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
  1.1088 +	echo i386-unknown-lynxos${UNAME_RELEASE}
  1.1089 +	exit 0 ;;
  1.1090 +    i*86:*DOS:*:*)
  1.1091 +	echo ${UNAME_MACHINE}-pc-msdosdjgpp
  1.1092 +	exit 0 ;;
  1.1093 +    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
  1.1094  	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
  1.1095  	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  1.1096  		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
  1.1097 @@ -1010,36 +976,32 @@
  1.1098  		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  1.1099  	fi
  1.1100  	exit 0 ;;
  1.1101 -    i?86:*:5:7*)
  1.1102 -        # Fixed at (any) Pentium or better
  1.1103 -        UNAME_MACHINE=i586
  1.1104 -        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
  1.1105 -	    echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
  1.1106 -	else
  1.1107 -	    echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
  1.1108 -	fi
  1.1109 +    i*86:*:5:[78]*)
  1.1110 +	case `/bin/uname -X | grep "^Machine"` in
  1.1111 +	    *486*)	     UNAME_MACHINE=i486 ;;
  1.1112 +	    *Pentium)	     UNAME_MACHINE=i586 ;;
  1.1113 +	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  1.1114 +	esac
  1.1115 +	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
  1.1116  	exit 0 ;;
  1.1117 -    i?86:*:3.2:*)
  1.1118 +    i*86:*:3.2:*)
  1.1119  	if test -f /usr/options/cb.name; then
  1.1120  		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  1.1121  		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
  1.1122  	elif /bin/uname -X 2>/dev/null >/dev/null ; then
  1.1123 -		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
  1.1124 -		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
  1.1125 -		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
  1.1126 +		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
  1.1127 +		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
  1.1128 +		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
  1.1129  			&& UNAME_MACHINE=i586
  1.1130 -		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
  1.1131 +		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
  1.1132  			&& UNAME_MACHINE=i686
  1.1133 -		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
  1.1134 +		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
  1.1135  			&& UNAME_MACHINE=i686
  1.1136  		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
  1.1137  	else
  1.1138  		echo ${UNAME_MACHINE}-pc-sysv32
  1.1139  	fi
  1.1140  	exit 0 ;;
  1.1141 -    i?86:*DOS:*:*)
  1.1142 -	echo ${UNAME_MACHINE}-pc-msdosdjgpp
  1.1143 -	exit 0 ;;
  1.1144      pc:*:*:*)
  1.1145  	# Left here for compatibility:
  1.1146          # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1.1147 @@ -1063,9 +1025,15 @@
  1.1148  	# "miniframe"
  1.1149  	echo m68010-convergent-sysv
  1.1150  	exit 0 ;;
  1.1151 +    mc68k:UNIX:SYSTEM5:3.51m)
  1.1152 +	echo m68k-convergent-sysv
  1.1153 +	exit 0 ;;
  1.1154 +    M680?0:D-NIX:5.3:*)
  1.1155 +	echo m68k-diab-dnix
  1.1156 +	exit 0 ;;
  1.1157      M68*:*:R3V[567]*:*)
  1.1158  	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
  1.1159 -    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
  1.1160 +    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)
  1.1161  	OS_REL=''
  1.1162  	test -r /etc/.relid \
  1.1163  	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1.1164 @@ -1076,22 +1044,19 @@
  1.1165      3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1.1166          /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1.1167            && echo i486-ncr-sysv4 && exit 0 ;;
  1.1168 -    m68*:LynxOS:2.*:*)
  1.1169 +    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  1.1170  	echo m68k-unknown-lynxos${UNAME_RELEASE}
  1.1171  	exit 0 ;;
  1.1172      mc68030:UNIX_System_V:4.*:*)
  1.1173  	echo m68k-atari-sysv4
  1.1174  	exit 0 ;;
  1.1175 -    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
  1.1176 -	echo i386-unknown-lynxos${UNAME_RELEASE}
  1.1177 -	exit 0 ;;
  1.1178      TSUNAMI:LynxOS:2.*:*)
  1.1179  	echo sparc-unknown-lynxos${UNAME_RELEASE}
  1.1180  	exit 0 ;;
  1.1181      rs6000:LynxOS:2.*:*)
  1.1182  	echo rs6000-unknown-lynxos${UNAME_RELEASE}
  1.1183  	exit 0 ;;
  1.1184 -    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
  1.1185 +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
  1.1186  	echo powerpc-unknown-lynxos${UNAME_RELEASE}
  1.1187  	exit 0 ;;
  1.1188      SM[BE]S:UNIX_SV:*:*)
  1.1189 @@ -1111,8 +1076,8 @@
  1.1190  		echo ns32k-sni-sysv
  1.1191  	fi
  1.1192  	exit 0 ;;
  1.1193 -    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1.1194 -                           # says <Richard.M.Bartel@ccMail.Census.GOV>
  1.1195 +    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1.1196 +                      # says <Richard.M.Bartel@ccMail.Census.GOV>
  1.1197          echo i586-unisys-sysv4
  1.1198          exit 0 ;;
  1.1199      *:UNIX_System_V:4*:FTX*)
  1.1200 @@ -1124,6 +1089,10 @@
  1.1201  	# From seanf@swdc.stratus.com.
  1.1202  	echo i860-stratus-sysv4
  1.1203  	exit 0 ;;
  1.1204 +    *:VOS:*:*)
  1.1205 +	# From Paul.Green@stratus.com.
  1.1206 +	echo hppa1.1-stratus-vos
  1.1207 +	exit 0 ;;
  1.1208      mc68*:A/UX:*:*)
  1.1209  	echo m68k-apple-aux${UNAME_RELEASE}
  1.1210  	exit 0 ;;
  1.1211 @@ -1152,6 +1121,9 @@
  1.1212      SX-5:SUPER-UX:*:*)
  1.1213  	echo sx5-nec-superux${UNAME_RELEASE}
  1.1214  	exit 0 ;;
  1.1215 +    SX-6:SUPER-UX:*:*)
  1.1216 +	echo sx6-nec-superux${UNAME_RELEASE}
  1.1217 +	exit 0 ;;
  1.1218      Power*:Rhapsody:*:*)
  1.1219  	echo powerpc-apple-rhapsody${UNAME_RELEASE}
  1.1220  	exit 0 ;;
  1.1221 @@ -1159,18 +1131,24 @@
  1.1222  	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  1.1223  	exit 0 ;;
  1.1224      *:Darwin:*:*)
  1.1225 -	echo `uname -p`-apple-darwin${UNAME_RELEASE}
  1.1226 +	case `uname -p` in
  1.1227 +	    *86) UNAME_PROCESSOR=i686 ;;
  1.1228 +	    powerpc) UNAME_PROCESSOR=powerpc ;;
  1.1229 +	esac
  1.1230 +	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  1.1231  	exit 0 ;;
  1.1232      *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1.1233 -	if test "${UNAME_MACHINE}" = "x86pc"; then
  1.1234 +	UNAME_PROCESSOR=`uname -p`
  1.1235 +	if test "$UNAME_PROCESSOR" = "x86"; then
  1.1236 +		UNAME_PROCESSOR=i386
  1.1237  		UNAME_MACHINE=pc
  1.1238  	fi
  1.1239 -	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
  1.1240 +	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1.1241  	exit 0 ;;
  1.1242      *:QNX:*:4*)
  1.1243  	echo i386-pc-qnx
  1.1244  	exit 0 ;;
  1.1245 -    NSR-[KW]:NONSTOP_KERNEL:*:*)
  1.1246 +    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
  1.1247  	echo nsr-tandem-nsk${UNAME_RELEASE}
  1.1248  	exit 0 ;;
  1.1249      *:NonStop-UX:*:*)
  1.1250 @@ -1193,11 +1171,6 @@
  1.1251  	fi
  1.1252  	echo ${UNAME_MACHINE}-unknown-plan9
  1.1253  	exit 0 ;;
  1.1254 -    i?86:OS/2:*:*)
  1.1255 -	# If we were able to find `uname', then EMX Unix compatibility
  1.1256 -	# is probably installed.
  1.1257 -	echo ${UNAME_MACHINE}-pc-os2-emx
  1.1258 -	exit 0 ;;
  1.1259      *:TOPS-10:*:*)
  1.1260  	echo pdp10-unknown-tops10
  1.1261  	exit 0 ;;
  1.1262 @@ -1221,6 +1194,7 @@
  1.1263  #echo '(No uname command or uname output not recognized.)' 1>&2
  1.1264  #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  1.1265  
  1.1266 +eval $set_cc_for_build
  1.1267  cat >$dummy.c <<EOF
  1.1268  #ifdef _SEQUENT_
  1.1269  # include <sys/types.h>
  1.1270 @@ -1307,11 +1281,24 @@
  1.1271  #endif
  1.1272  
  1.1273  #if defined (vax)
  1.1274 -#if !defined (ultrix)
  1.1275 -  printf ("vax-dec-bsd\n"); exit (0);
  1.1276 -#else
  1.1277 -  printf ("vax-dec-ultrix\n"); exit (0);
  1.1278 -#endif
  1.1279 +# if !defined (ultrix)
  1.1280 +#  include <sys/param.h>
  1.1281 +#  if defined (BSD)
  1.1282 +#   if BSD == 43
  1.1283 +      printf ("vax-dec-bsd4.3\n"); exit (0);
  1.1284 +#   else
  1.1285 +#    if BSD == 199006
  1.1286 +      printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1.1287 +#    else
  1.1288 +      printf ("vax-dec-bsd\n"); exit (0);
  1.1289 +#    endif
  1.1290 +#   endif
  1.1291 +#  else
  1.1292 +    printf ("vax-dec-bsd\n"); exit (0);
  1.1293 +#  endif
  1.1294 +# else
  1.1295 +    printf ("vax-dec-ultrix\n"); exit (0);
  1.1296 +# endif
  1.1297  #endif
  1.1298  
  1.1299  #if defined (alliant) && defined (i860)
  1.1300 @@ -1322,8 +1309,7 @@
  1.1301  }
  1.1302  EOF
  1.1303  
  1.1304 -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
  1.1305 -rm -f $dummy.c $dummy
  1.1306 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
  1.1307  
  1.1308  # Apollos put the system type in the environment.
  1.1309  
     2.1 --- a/config.sub	Fri Dec 02 22:51:58 2005 +0000
     2.2 +++ b/config.sub	Fri Dec 02 22:54:15 2005 +0000
     2.3 @@ -1,9 +1,9 @@
     2.4  #! /bin/sh
     2.5  # Configuration validation subroutine script.
     2.6 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     2.7 -#   Free Software Foundation, Inc.
     2.8 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     2.9 +#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    2.10  
    2.11 -timestamp='2001-01-12'
    2.12 +timestamp='2003-02-22'
    2.13  
    2.14  # This file is (in principle) common to ALL GNU software.
    2.15  # The presence of a machine in this file suggests that SOME GNU software
    2.16 @@ -29,7 +29,8 @@
    2.17  # configuration script generated by Autoconf, you may include it under
    2.18  # the same distribution terms that you use for the rest of that program.
    2.19  
    2.20 -# Please send patches to <config-patches@gnu.org>.
    2.21 +# Please send patches to <config-patches@gnu.org>.  Submit a context
    2.22 +# diff and a properly formatted ChangeLog entry.
    2.23  #
    2.24  # Configuration subroutine to validate and canonicalize a configuration type.
    2.25  # Supply the specified configuration type as an argument.
    2.26 @@ -117,7 +118,7 @@
    2.27  # Here we must recognize all the valid KERNEL-OS combinations.
    2.28  maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    2.29  case $maybe_os in
    2.30 -  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
    2.31 +  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    2.32      os=-$maybe_os
    2.33      basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    2.34      ;;
    2.35 @@ -157,6 +158,14 @@
    2.36  		os=-vxworks
    2.37  		basic_machine=$1
    2.38  		;;
    2.39 +	-chorusos*)
    2.40 +		os=-chorusos
    2.41 +		basic_machine=$1
    2.42 +		;;
    2.43 + 	-chorusrdb)
    2.44 + 		os=-chorusrdb
    2.45 +		basic_machine=$1
    2.46 + 		;;
    2.47  	-hiux*)
    2.48  		os=-hiuxwe2
    2.49  		;;
    2.50 @@ -215,24 +224,48 @@
    2.51  case $basic_machine in
    2.52  	# Recognize the basic CPU types without company name.
    2.53  	# Some are omitted here because they have special meanings below.
    2.54 -	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
    2.55 -	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
    2.56 -		| pyramid | mn10200 | mn10300 | tron | a29k \
    2.57 -		| 580 | i960 | h8300 \
    2.58 -		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
    2.59 -		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
    2.60 -		| hppa64 \
    2.61 -		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
    2.62 -		| alphaev6[78] \
    2.63 -		| we32k | ns16k | clipper | i370 | sh | sh[34] \
    2.64 -		| powerpc | powerpcle \
    2.65 -		| 1750a | dsp16xx | pdp10 | pdp11 \
    2.66 -		| mips16 | mips64 | mipsel | mips64el \
    2.67 -		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
    2.68 -		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
    2.69 -		| mips64vr5000 | miprs64vr5000el | mcore \
    2.70 -		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
    2.71 -		| thumb | d10v | d30v | fr30 | avr | openrisc)
    2.72 +	1750a | 580 \
    2.73 +	| a29k \
    2.74 +	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    2.75 +	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    2.76 +	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
    2.77 +	| clipper \
    2.78 +	| d10v | d30v | dlx | dsp16xx \
    2.79 +	| fr30 | frv \
    2.80 +	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    2.81 +	| i370 | i860 | i960 | ia64 \
    2.82 +	| ip2k \
    2.83 +	| m32r | m68000 | m68k | m88k | mcore \
    2.84 +	| mips | mipsbe | mipseb | mipsel | mipsle \
    2.85 +	| mips16 \
    2.86 +	| mips64 | mips64el \
    2.87 +	| mips64vr | mips64vrel \
    2.88 +	| mips64orion | mips64orionel \
    2.89 +	| mips64vr4100 | mips64vr4100el \
    2.90 +	| mips64vr4300 | mips64vr4300el \
    2.91 +	| mips64vr5000 | mips64vr5000el \
    2.92 +	| mipsisa32 | mipsisa32el \
    2.93 +	| mipsisa32r2 | mipsisa32r2el \
    2.94 +	| mipsisa64 | mipsisa64el \
    2.95 +	| mipsisa64sb1 | mipsisa64sb1el \
    2.96 +	| mipsisa64sr71k | mipsisa64sr71kel \
    2.97 +	| mipstx39 | mipstx39el \
    2.98 +	| mn10200 | mn10300 \
    2.99 +	| msp430 \
   2.100 +	| ns16k | ns32k \
   2.101 +	| openrisc | or32 \
   2.102 +	| pdp10 | pdp11 | pj | pjl \
   2.103 +	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
   2.104 +	| pyramid \
   2.105 +	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
   2.106 +	| sh64 | sh64le \
   2.107 +	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
   2.108 +	| strongarm \
   2.109 +	| tahoe | thumb | tic80 | tron \
   2.110 +	| v850 | v850e \
   2.111 +	| we32k \
   2.112 +	| x86 | xscale | xstormy16 | xtensa \
   2.113 +	| z8k)
   2.114  		basic_machine=$basic_machine-unknown
   2.115  		;;
   2.116  	m6811 | m68hc11 | m6812 | m68hc12)
   2.117 @@ -240,13 +273,13 @@
   2.118  		basic_machine=$basic_machine-unknown
   2.119  		os=-none
   2.120  		;;
   2.121 -	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
   2.122 +	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
   2.123  		;;
   2.124  
   2.125  	# We use `pc' rather than `unknown'
   2.126  	# because (1) that's what they normally are, and
   2.127  	# (2) the word "unknown" tends to confuse beginning users.
   2.128 -	i[234567]86 | x86_64)
   2.129 +	i*86 | x86_64)
   2.130  	  basic_machine=$basic_machine-pc
   2.131  	  ;;
   2.132  	# Object if more than one company name word.
   2.133 @@ -255,29 +288,60 @@
   2.134  		exit 1
   2.135  		;;
   2.136  	# Recognize the basic CPU types with company name.
   2.137 -	# FIXME: clean up the formatting here.
   2.138 -	vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
   2.139 -	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
   2.140 -	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
   2.141 -	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
   2.142 -	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
   2.143 -	      | xmp-* | ymp-* \
   2.144 -	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
   2.145 -	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
   2.146 -	      | hppa2.0n-* | hppa64-* \
   2.147 -	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
   2.148 -	      | alphaev6[78]-* \
   2.149 -	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
   2.150 -	      | clipper-* | orion-* \
   2.151 -	      | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
   2.152 -	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
   2.153 -	      | mips64el-* | mips64orion-* | mips64orionel-* \
   2.154 -	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
   2.155 -	      | mipstx39-* | mipstx39el-* | mcore-* \
   2.156 -	      | f30[01]-* | f700-* | s390-* | sv1-* | t3e-* \
   2.157 -	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
   2.158 -	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
   2.159 -	      | bs2000-* | tic54x-* | c54x-* | x86_64-*)
   2.160 +	580-* \
   2.161 +	| a29k-* \
   2.162 +	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
   2.163 +	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
   2.164 +	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
   2.165 +	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
   2.166 +	| avr-* \
   2.167 +	| bs2000-* \
   2.168 +	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
   2.169 +	| clipper-* | cydra-* \
   2.170 +	| d10v-* | d30v-* | dlx-* \
   2.171 +	| elxsi-* \
   2.172 +	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
   2.173 +	| h8300-* | h8500-* \
   2.174 +	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
   2.175 +	| i*86-* | i860-* | i960-* | ia64-* \
   2.176 +	| ip2k-* \
   2.177 +	| m32r-* \
   2.178 +	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
   2.179 +	| m88110-* | m88k-* | mcore-* \
   2.180 +	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
   2.181 +	| mips16-* \
   2.182 +	| mips64-* | mips64el-* \
   2.183 +	| mips64vr-* | mips64vrel-* \
   2.184 +	| mips64orion-* | mips64orionel-* \
   2.185 +	| mips64vr4100-* | mips64vr4100el-* \
   2.186 +	| mips64vr4300-* | mips64vr4300el-* \
   2.187 +	| mips64vr5000-* | mips64vr5000el-* \
   2.188 +	| mipsisa32-* | mipsisa32el-* \
   2.189 +	| mipsisa32r2-* | mipsisa32r2el-* \
   2.190 +	| mipsisa64-* | mipsisa64el-* \
   2.191 +	| mipsisa64sb1-* | mipsisa64sb1el-* \
   2.192 +	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
   2.193 +	| mipstx39-* | mipstx39el-* \
   2.194 +	| msp430-* \
   2.195 +	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
   2.196 +	| orion-* \
   2.197 +	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
   2.198 +	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
   2.199 +	| pyramid-* \
   2.200 +	| romp-* | rs6000-* \
   2.201 +	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
   2.202 +	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
   2.203 +	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
   2.204 +	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
   2.205 +	| tahoe-* | thumb-* \
   2.206 +	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
   2.207 +	| tron-* \
   2.208 +	| v850-* | v850e-* | vax-* \
   2.209 +	| we32k-* \
   2.210 +	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
   2.211 +	| xtensa-* \
   2.212 +	| ymp-* \
   2.213 +	| z8k-*)
   2.214  		;;
   2.215  	# Recognize the various machine names and aliases which stand
   2.216  	# for a CPU type and a company and sometimes even an OS.
   2.217 @@ -340,6 +404,10 @@
   2.218  		basic_machine=ns32k-sequent
   2.219  		os=-dynix
   2.220  		;;
   2.221 +	c90)
   2.222 +		basic_machine=c90-cray
   2.223 +		os=-unicos
   2.224 +		;;
   2.225  	convex-c1)
   2.226  		basic_machine=c1-convex
   2.227  		os=-bsd
   2.228 @@ -360,16 +428,8 @@
   2.229  		basic_machine=c38-convex
   2.230  		os=-bsd
   2.231  		;;
   2.232 -	cray | ymp)
   2.233 -		basic_machine=ymp-cray
   2.234 -		os=-unicos
   2.235 -		;;
   2.236 -	cray2)
   2.237 -		basic_machine=cray2-cray
   2.238 -		os=-unicos
   2.239 -		;;
   2.240 -	[ctj]90-cray)
   2.241 -		basic_machine=c90-cray
   2.242 +	cray | j90)
   2.243 +		basic_machine=j90-cray
   2.244  		os=-unicos
   2.245  		;;
   2.246  	crds | unos)
   2.247 @@ -384,6 +444,14 @@
   2.248  	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
   2.249  		basic_machine=mips-dec
   2.250  		;;
   2.251 +	decsystem10* | dec10*)
   2.252 +		basic_machine=pdp10-dec
   2.253 +		os=-tops10
   2.254 +		;;
   2.255 +	decsystem20* | dec20*)
   2.256 +		basic_machine=pdp10-dec
   2.257 +		os=-tops20
   2.258 +		;;
   2.259  	delta | 3300 | motorola-3300 | motorola-delta \
   2.260  	      | 3300-motorola | delta-motorola)
   2.261  		basic_machine=m68k-motorola
   2.262 @@ -425,6 +493,10 @@
   2.263  		basic_machine=tron-gmicro
   2.264  		os=-sysv
   2.265  		;;
   2.266 +	go32)
   2.267 +		basic_machine=i386-pc
   2.268 +		os=-go32
   2.269 +		;;
   2.270  	h3050r* | hiux*)
   2.271  		basic_machine=hppa1.1-hitachi
   2.272  		os=-hiuxwe2
   2.273 @@ -500,19 +572,19 @@
   2.274  		basic_machine=i370-ibm
   2.275  		;;
   2.276  # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
   2.277 -	i[34567]86v32)
   2.278 +	i*86v32)
   2.279  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   2.280  		os=-sysv32
   2.281  		;;
   2.282 -	i[34567]86v4*)
   2.283 +	i*86v4*)
   2.284  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   2.285  		os=-sysv4
   2.286  		;;
   2.287 -	i[34567]86v)
   2.288 +	i*86v)
   2.289  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   2.290  		os=-sysv
   2.291  		;;
   2.292 -	i[34567]86sol2)
   2.293 +	i*86sol2)
   2.294  		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
   2.295  		os=-solaris2
   2.296  		;;
   2.297 @@ -524,18 +596,6 @@
   2.298  		basic_machine=i386-unknown
   2.299  		os=-vsta
   2.300  		;;
   2.301 -	i386-go32 | go32)
   2.302 -		basic_machine=i386-unknown
   2.303 -		os=-go32
   2.304 -		;;
   2.305 -	i386-mingw32 | mingw32)
   2.306 -		basic_machine=i386-unknown
   2.307 -		os=-mingw32
   2.308 -		;;
   2.309 -	i[34567]86-pw32 | pw32)
   2.310 -		basic_machine=i586-unknown
   2.311 -		os=-pw32
   2.312 -		;;
   2.313  	iris | iris4d)
   2.314  		basic_machine=mips-sgi
   2.315  		case $os in
   2.316 @@ -561,6 +621,10 @@
   2.317  		basic_machine=ns32k-utek
   2.318  		os=-sysv
   2.319  		;;
   2.320 +	mingw32)
   2.321 +		basic_machine=i386-pc
   2.322 +		os=-mingw32
   2.323 +		;;
   2.324  	miniframe)
   2.325  		basic_machine=m68000-convergent
   2.326  		;;
   2.327 @@ -568,14 +632,6 @@
   2.328  		basic_machine=m68k-atari
   2.329  		os=-mint
   2.330  		;;
   2.331 -	mipsel*-linux*)
   2.332 -		basic_machine=mipsel-unknown
   2.333 -		os=-linux-gnu
   2.334 -		;;
   2.335 -	mips*-linux*)
   2.336 -		basic_machine=mips-unknown
   2.337 -		os=-linux-gnu
   2.338 -		;;
   2.339  	mips3*-*)
   2.340  		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
   2.341  		;;
   2.342 @@ -590,8 +646,12 @@
   2.343  		basic_machine=m68k-rom68k
   2.344  		os=-coff
   2.345  		;;
   2.346 +	morphos)
   2.347 +		basic_machine=powerpc-unknown
   2.348 +		os=-morphos
   2.349 +		;;
   2.350  	msdos)
   2.351 -		basic_machine=i386-unknown
   2.352 +		basic_machine=i386-pc
   2.353  		os=-msdos
   2.354  		;;
   2.355  	mvs)
   2.356 @@ -662,6 +722,10 @@
   2.357  	np1)
   2.358  		basic_machine=np1-gould
   2.359  		;;
   2.360 +	nv1)
   2.361 +		basic_machine=nv1-cray
   2.362 +		os=-unicosmp
   2.363 +		;;
   2.364  	nsr-tandem)
   2.365  		basic_machine=nsr-tandem
   2.366  		;;
   2.367 @@ -669,6 +733,10 @@
   2.368  		basic_machine=hppa1.1-oki
   2.369  		os=-proelf
   2.370  		;;
   2.371 +	or32 | or32-*)
   2.372 +		basic_machine=or32-unknown
   2.373 +		os=-coff
   2.374 +		;;
   2.375  	OSE68000 | ose68000)
   2.376  		basic_machine=m68000-ericsson
   2.377  		os=-ose
   2.378 @@ -691,19 +759,19 @@
   2.379  	pbb)
   2.380  		basic_machine=m68k-tti
   2.381  		;;
   2.382 -        pc532 | pc532-*)
   2.383 +	pc532 | pc532-*)
   2.384  		basic_machine=ns32k-pc532
   2.385  		;;
   2.386 -	pentium | p5 | k5 | k6 | nexgen)
   2.387 +	pentium | p5 | k5 | k6 | nexgen | viac3)
   2.388  		basic_machine=i586-pc
   2.389  		;;
   2.390 -	pentiumpro | p6 | 6x86 | athlon)
   2.391 +	pentiumpro | p6 | 6x86 | athlon | athlon_*)
   2.392  		basic_machine=i686-pc
   2.393  		;;
   2.394  	pentiumii | pentium2)
   2.395  		basic_machine=i686-pc
   2.396  		;;
   2.397 -	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
   2.398 +	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
   2.399  		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.400  		;;
   2.401  	pentiumpro-* | p6-* | 6x86-* | athlon-*)
   2.402 @@ -718,18 +786,32 @@
   2.403  	power)	basic_machine=power-ibm
   2.404  		;;
   2.405  	ppc)	basic_machine=powerpc-unknown
   2.406 -	        ;;
   2.407 +		;;
   2.408  	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.409  		;;
   2.410  	ppcle | powerpclittle | ppc-le | powerpc-little)
   2.411  		basic_machine=powerpcle-unknown
   2.412 -	        ;;
   2.413 +		;;
   2.414  	ppcle-* | powerpclittle-*)
   2.415  		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.416  		;;
   2.417 +	ppc64)	basic_machine=powerpc64-unknown
   2.418 +		;;
   2.419 +	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.420 +		;;
   2.421 +	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
   2.422 +		basic_machine=powerpc64le-unknown
   2.423 +		;;
   2.424 +	ppc64le-* | powerpc64little-*)
   2.425 +		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
   2.426 +		;;
   2.427  	ps2)
   2.428  		basic_machine=i386-ibm
   2.429  		;;
   2.430 +	pw32)
   2.431 +		basic_machine=i586-unknown
   2.432 +		os=-pw32
   2.433 +		;;
   2.434  	rom68k)
   2.435  		basic_machine=m68k-rom68k
   2.436  		os=-coff
   2.437 @@ -740,10 +822,22 @@
   2.438  	rtpc | rtpc-*)
   2.439  		basic_machine=romp-ibm
   2.440  		;;
   2.441 +	s390 | s390-*)
   2.442 +		basic_machine=s390-ibm
   2.443 +		;;
   2.444 +	s390x | s390x-*)
   2.445 +		basic_machine=s390x-ibm
   2.446 +		;;
   2.447  	sa29200)
   2.448  		basic_machine=a29k-amd
   2.449  		os=-udi
   2.450  		;;
   2.451 +	sb1)
   2.452 +		basic_machine=mipsisa64sb1-unknown
   2.453 +		;;
   2.454 +	sb1el)
   2.455 +		basic_machine=mipsisa64sb1el-unknown
   2.456 +		;;
   2.457  	sequent)
   2.458  		basic_machine=i386-sequent
   2.459  		;;
   2.460 @@ -751,7 +845,7 @@
   2.461  		basic_machine=sh-hitachi
   2.462  		os=-hms
   2.463  		;;
   2.464 -	sparclite-wrs)
   2.465 +	sparclite-wrs | simso-wrs)
   2.466  		basic_machine=sparclite-wrs
   2.467  		os=-vxworks
   2.468  		;;
   2.469 @@ -818,19 +912,39 @@
   2.470  		os=-dynix
   2.471  		;;
   2.472  	t3e)
   2.473 -		basic_machine=t3e-cray
   2.474 +		basic_machine=alphaev5-cray
   2.475  		os=-unicos
   2.476  		;;
   2.477 +	t90)
   2.478 +		basic_machine=t90-cray
   2.479 +		os=-unicos
   2.480 +		;;
   2.481 +        tic4x | c4x*)
   2.482 +		basic_machine=tic4x-unknown
   2.483 +		os=-coff
   2.484 +		;;
   2.485  	tic54x | c54x*)
   2.486  		basic_machine=tic54x-unknown
   2.487  		os=-coff
   2.488  		;;
   2.489 +	tic55x | c55x*)
   2.490 +		basic_machine=tic55x-unknown
   2.491 +		os=-coff
   2.492 +		;;
   2.493 +	tic6x | c6x*)
   2.494 +		basic_machine=tic6x-unknown
   2.495 +		os=-coff
   2.496 +		;;
   2.497  	tx39)
   2.498  		basic_machine=mipstx39-unknown
   2.499  		;;
   2.500  	tx39el)
   2.501  		basic_machine=mipstx39el-unknown
   2.502  		;;
   2.503 +	toad1)
   2.504 +		basic_machine=pdp10-xkl
   2.505 +		os=-tops20
   2.506 +		;;
   2.507  	tower | tower-32)
   2.508  		basic_machine=m68k-ncr
   2.509  		;;
   2.510 @@ -855,8 +969,8 @@
   2.511  		os=-vms
   2.512  		;;
   2.513  	vpp*|vx|vx-*)
   2.514 -               basic_machine=f301-fujitsu
   2.515 -               ;;
   2.516 +		basic_machine=f301-fujitsu
   2.517 +		;;
   2.518  	vxworks960)
   2.519  		basic_machine=i960-wrs
   2.520  		os=-vxworks
   2.521 @@ -877,13 +991,13 @@
   2.522  		basic_machine=hppa1.1-winbond
   2.523  		os=-proelf
   2.524  		;;
   2.525 -	xmp)
   2.526 -		basic_machine=xmp-cray
   2.527 +	xps | xps100)
   2.528 +		basic_machine=xps100-honeywell
   2.529 +		;;
   2.530 +	ymp)
   2.531 +		basic_machine=ymp-cray
   2.532  		os=-unicos
   2.533  		;;
   2.534 -        xps | xps100)
   2.535 -		basic_machine=xps100-honeywell
   2.536 -		;;
   2.537  	z8k-*-coff)
   2.538  		basic_machine=z8k-unknown
   2.539  		os=-sim
   2.540 @@ -904,13 +1018,6 @@
   2.541  	op60c)
   2.542  		basic_machine=hppa1.1-oki
   2.543  		;;
   2.544 -	mips)
   2.545 -		if [ x$os = x-linux-gnu ]; then
   2.546 -			basic_machine=mips-unknown
   2.547 -		else
   2.548 -			basic_machine=mips-mips
   2.549 -		fi
   2.550 -		;;
   2.551  	romp)
   2.552  		basic_machine=romp-ibm
   2.553  		;;
   2.554 @@ -930,13 +1037,16 @@
   2.555  	we32k)
   2.556  		basic_machine=we32k-att
   2.557  		;;
   2.558 -	sh3 | sh4)
   2.559 +	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
   2.560  		basic_machine=sh-unknown
   2.561  		;;
   2.562 -	sparc | sparcv9)
   2.563 +	sh64)
   2.564 +		basic_machine=sh64-unknown
   2.565 +		;;
   2.566 +	sparc | sparcv9 | sparcv9b)
   2.567  		basic_machine=sparc-sun
   2.568  		;;
   2.569 -        cydra)
   2.570 +	cydra)
   2.571  		basic_machine=cydra-cydrome
   2.572  		;;
   2.573  	orion)
   2.574 @@ -951,9 +1061,8 @@
   2.575  	pmac | pmac-mpw)
   2.576  		basic_machine=powerpc-apple
   2.577  		;;
   2.578 -	c4x*)
   2.579 -		basic_machine=c4x-none
   2.580 -		os=-coff
   2.581 +	*-unknown)
   2.582 +		# Make sure to match an already-canonicalized machine name.
   2.583  		;;
   2.584  	*)
   2.585  		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
   2.586 @@ -1011,16 +1120,20 @@
   2.587  	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
   2.588  	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
   2.589  	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
   2.590 +	      | -chorusos* | -chorusrdb* \
   2.591  	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
   2.592  	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
   2.593 -	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
   2.594 +	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
   2.595  	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
   2.596 -	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
   2.597 +	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
   2.598 +	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
   2.599 +	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
   2.600 +	      | -powermax* | -dnix*)
   2.601  	# Remember, each alternative MUST END IN *, to match a version number.
   2.602  		;;
   2.603  	-qnx*)
   2.604  		case $basic_machine in
   2.605 -		    x86-* | i[34567]86-*)
   2.606 +		    x86-* | i*86-*)
   2.607  			;;
   2.608  		    *)
   2.609  			os=-nto$os
   2.610 @@ -1067,14 +1180,20 @@
   2.611  	-acis*)
   2.612  		os=-aos
   2.613  		;;
   2.614 +	-atheos*)
   2.615 +		os=-atheos
   2.616 +		;;
   2.617  	-386bsd)
   2.618  		os=-bsd
   2.619  		;;
   2.620  	-ctix* | -uts*)
   2.621  		os=-sysv
   2.622  		;;
   2.623 +	-nova*)
   2.624 +		os=-rtmk-nova
   2.625 +		;;
   2.626  	-ns2 )
   2.627 -	        os=-nextstep2
   2.628 +		os=-nextstep2
   2.629  		;;
   2.630  	-nsk*)
   2.631  		os=-nsk
   2.632 @@ -1113,8 +1232,14 @@
   2.633  	-xenix)
   2.634  		os=-xenix
   2.635  		;;
   2.636 -        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
   2.637 -	        os=-mint
   2.638 +	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
   2.639 +		os=-mint
   2.640 +		;;
   2.641 +	-aros*)
   2.642 +		os=-aros
   2.643 +		;;
   2.644 +	-kaos*)
   2.645 +		os=-kaos
   2.646  		;;
   2.647  	-none)
   2.648  		;;
   2.649 @@ -1147,10 +1272,11 @@
   2.650  	arm*-semi)
   2.651  		os=-aout
   2.652  		;;
   2.653 +	# This must come before the *-dec entry.
   2.654  	pdp10-*)
   2.655  		os=-tops20
   2.656  		;;
   2.657 -        pdp11-*)
   2.658 +	pdp11-*)
   2.659  		os=-none
   2.660  		;;
   2.661  	*-dec | vax-*)
   2.662 @@ -1177,6 +1303,9 @@
   2.663  	mips*-*)
   2.664  		os=-elf
   2.665  		;;
   2.666 +	or32-*)
   2.667 +		os=-coff
   2.668 +		;;
   2.669  	*-tti)	# must be before sparc entry or we get the wrong os.
   2.670  		os=-sysv3
   2.671  		;;
   2.672 @@ -1240,19 +1369,19 @@
   2.673  	*-next)
   2.674  		os=-nextstep3
   2.675  		;;
   2.676 -        *-gould)
   2.677 +	*-gould)
   2.678  		os=-sysv
   2.679  		;;
   2.680 -        *-highlevel)
   2.681 +	*-highlevel)
   2.682  		os=-bsd
   2.683  		;;
   2.684  	*-encore)
   2.685  		os=-bsd
   2.686  		;;
   2.687 -        *-sgi)
   2.688 +	*-sgi)
   2.689  		os=-irix
   2.690  		;;
   2.691 -        *-siemens)
   2.692 +	*-siemens)
   2.693  		os=-sysv4
   2.694  		;;
   2.695  	*-masscomp)
   2.696 @@ -1324,7 +1453,7 @@
   2.697  			-ptx*)
   2.698  				vendor=sequent
   2.699  				;;
   2.700 -			-vxsim* | -vxworks*)
   2.701 +			-vxsim* | -vxworks* | -windiss*)
   2.702  				vendor=wrs
   2.703  				;;
   2.704  			-aux*)
   2.705 @@ -1339,6 +1468,9 @@
   2.706  			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
   2.707  				vendor=atari
   2.708  				;;
   2.709 +			-vos*)
   2.710 +				vendor=stratus
   2.711 +				;;
   2.712  		esac
   2.713  		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
   2.714  		;;