Added MacOS X Project Builder projects
authorSam Lantinga <slouken@lokigames.com>
Sun, 10 Jun 2001 18:20:23 +0000
changeset 5325dfe480c75e
parent 52 3f344be3301b
child 54 028447a8a758
Added MacOS X Project Builder projects
PBProjects.tar.gz
README.MacOSX
config.guess
config.sub
configure.in
docs.html
src/main/linux/SDL_main.c
src/main/macosx/SDLMain.nib.tar.gz
test/config.guess
test/config.sub
     1.1 Binary file PBProjects.tar.gz has changed
     2.1 --- a/README.MacOSX	Sun Jun 10 05:02:38 2001 +0000
     2.2 +++ b/README.MacOSX	Sun Jun 10 18:20:23 2001 +0000
     2.3 @@ -40,6 +40,17 @@
     2.4  
     2.5  These instructions are for using Apple's Project Builder IDE to build SDL applications.
     2.6  
     2.7 +- First steps
     2.8 +
     2.9 +The first thing to do is to unpack the PBProjects.tar.gz archive in the
    2.10 +top level SDL directory (where the PBProjects.tar.gz archive resides).
    2.11 +Because Stuffit Expander will unpack the archive into a subdirectory,
    2.12 +you should unpack the archive manually from the command line:
    2.13 +	cd [path_to_SDL_source]
    2.14 +	tar zxf PBProjects.tar.gz
    2.15 +This will create a new folder called PBProjects, which you can browse
    2.16 +normally from the Finder.
    2.17 +
    2.18  - Building the Framework
    2.19  
    2.20  The SDL Library is packaged as a framework bundle, an organized
     3.1 --- a/config.guess	Sun Jun 10 05:02:38 2001 +0000
     3.2 +++ b/config.guess	Sun Jun 10 18:20:23 2001 +0000
     3.3 @@ -1,8 +1,10 @@
     3.4  #! /bin/sh
     3.5  # Attempt to guess a canonical system name.
     3.6 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
     3.7 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     3.8  #   Free Software Foundation, Inc.
     3.9 -#
    3.10 +
    3.11 +timestamp='2001-03-16'
    3.12 +
    3.13  # This file is free software; you can redistribute it and/or modify it
    3.14  # under the terms of the GNU General Public License as published by
    3.15  # the Free Software Foundation; either version 2 of the License, or
    3.16 @@ -23,34 +25,93 @@
    3.17  # the same distribution terms that you use for the rest of that program.
    3.18  
    3.19  # Written by Per Bothner <bothner@cygnus.com>.
    3.20 -# The master version of this file is at the FSF in /home/gd/gnu/lib.
    3.21 -# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
    3.22 +# Please send patches to <config-patches@gnu.org>.
    3.23  #
    3.24  # This script attempts to guess a canonical system name similar to
    3.25  # config.sub.  If it succeeds, it prints the system name on stdout, and
    3.26  # exits with 0.  Otherwise, it exits with 1.
    3.27  #
    3.28  # The plan is that this can be called by configure scripts if you
    3.29 -# don't specify an explicit system type (host/target name).
    3.30 -#
    3.31 -# Only a few systems have been added to this list; please add others
    3.32 -# (but try to keep the structure clean).
    3.33 -#
    3.34 +# don't specify an explicit build system type.
    3.35  
    3.36 -# Use $HOST_CC if defined. $CC may point to a cross-compiler
    3.37 -if test x"$CC_FOR_BUILD" = x; then
    3.38 -  if test x"$HOST_CC" != x; then
    3.39 -    CC_FOR_BUILD="$HOST_CC"
    3.40 -  else
    3.41 -    if test x"$CC" != x; then
    3.42 -      CC_FOR_BUILD="$CC"
    3.43 -    else
    3.44 -      CC_FOR_BUILD=cc
    3.45 -    fi
    3.46 -  fi
    3.47 +me=`echo "$0" | sed -e 's,.*/,,'`
    3.48 +
    3.49 +usage="\
    3.50 +Usage: $0 [OPTION]
    3.51 +
    3.52 +Output the configuration name of the system \`$me' is run on.
    3.53 +
    3.54 +Operation modes:
    3.55 +  -h, --help         print this help, then exit
    3.56 +  -t, --time-stamp   print date of last modification, then exit
    3.57 +  -v, --version      print version number, then exit
    3.58 +
    3.59 +Report bugs and patches to <config-patches@gnu.org>."
    3.60 +
    3.61 +version="\
    3.62 +GNU config.guess ($timestamp)
    3.63 +
    3.64 +Originally written by Per Bothner.
    3.65 +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
    3.66 +Free Software Foundation, Inc.
    3.67 +
    3.68 +This is free software; see the source for copying conditions.  There is NO
    3.69 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    3.70 +
    3.71 +help="
    3.72 +Try \`$me --help' for more information."
    3.73 +
    3.74 +# Parse command line
    3.75 +while test $# -gt 0 ; do
    3.76 +  case $1 in
    3.77 +    --time-stamp | --time* | -t )
    3.78 +       echo "$timestamp" ; exit 0 ;;
    3.79 +    --version | -v )
    3.80 +       echo "$version" ; exit 0 ;;
    3.81 +    --help | --h* | -h )
    3.82 +       echo "$usage"; exit 0 ;;
    3.83 +    -- )     # Stop option processing
    3.84 +       shift; break ;;
    3.85 +    - )	# Use stdin as input.
    3.86 +       break ;;
    3.87 +    -* )
    3.88 +       echo "$me: invalid option $1$help" >&2
    3.89 +       exit 1 ;;
    3.90 +    * )
    3.91 +       break ;;
    3.92 +  esac
    3.93 +done
    3.94 +
    3.95 +if test $# != 0; then
    3.96 +  echo "$me: too many arguments$help" >&2
    3.97 +  exit 1
    3.98  fi
    3.99  
   3.100  
   3.101 +dummy=dummy-$$
   3.102 +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
   3.103 +
   3.104 +# CC_FOR_BUILD -- compiler used by this script.
   3.105 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
   3.106 +# use `HOST_CC' if defined, but it is deprecated.
   3.107 +
   3.108 +case $CC_FOR_BUILD,$HOST_CC,$CC in
   3.109 + ,,)    echo "int dummy(){}" > $dummy.c
   3.110 +	for c in cc gcc c89 ; do
   3.111 +	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
   3.112 +	  if test $? = 0 ; then
   3.113 +	     CC_FOR_BUILD="$c"; break
   3.114 +	  fi
   3.115 +	done
   3.116 +	rm -f $dummy.c $dummy.o $dummy.rel
   3.117 +	if test x"$CC_FOR_BUILD" = x ; then
   3.118 +	  CC_FOR_BUILD=no_compiler_found
   3.119 +	fi
   3.120 +	;;
   3.121 + ,,*)   CC_FOR_BUILD=$CC ;;
   3.122 + ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
   3.123 +esac
   3.124 +
   3.125  # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
   3.126  # (ghazi@noc.rutgers.edu 8/24/94.)
   3.127  if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
   3.128 @@ -59,15 +120,57 @@
   3.129  
   3.130  UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
   3.131  UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
   3.132 -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
   3.133 +UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
   3.134  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
   3.135  
   3.136 -dummy=dummy-$$
   3.137 -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
   3.138 -
   3.139  # Note: order is significant - the case branches are not exclusive.
   3.140  
   3.141  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
   3.142 +    *:NetBSD:*:*)
   3.143 +	# Netbsd (nbsd) targets should (where applicable) match one or
   3.144 +	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
   3.145 +	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
   3.146 +	# switched to ELF, *-*-netbsd* would select the old
   3.147 +	# object file format.  This provides both forward
   3.148 +	# compatibility and a consistent mechanism for selecting the
   3.149 +	# object file format.
   3.150 +	# Determine the machine/vendor (is the vendor relevant).
   3.151 +	case "${UNAME_MACHINE}" in
   3.152 +	    amiga) machine=m68k-unknown ;;
   3.153 +	    arm32) machine=arm-unknown ;;
   3.154 +	    atari*) machine=m68k-atari ;;
   3.155 +	    sun3*) machine=m68k-sun ;;
   3.156 +	    mac68k) machine=m68k-apple ;;
   3.157 +	    macppc) machine=powerpc-apple ;;
   3.158 +	    hp3[0-9][05]) machine=m68k-hp ;;
   3.159 +	    ibmrt|romp-ibm) machine=romp-ibm ;;
   3.160 +	    *) machine=${UNAME_MACHINE}-unknown ;;
   3.161 +	esac
   3.162 +	# The Operating System including object format, if it has switched
   3.163 +	# to ELF recently, or will in the future.
   3.164 +	case "${UNAME_MACHINE}" in
   3.165 +	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
   3.166 +		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
   3.167 +			| grep __ELF__ >/dev/null
   3.168 +		then
   3.169 +		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
   3.170 +		    # Return netbsd for either.  FIX?
   3.171 +		    os=netbsd
   3.172 +		else
   3.173 +		    os=netbsdelf
   3.174 +		fi
   3.175 +		;;
   3.176 +	    *)
   3.177 +	        os=netbsd
   3.178 +		;;
   3.179 +	esac
   3.180 +	# The OS release
   3.181 +	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   3.182 +	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   3.183 +	# contains redundant information, the shorter form:
   3.184 +	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   3.185 +	echo "${machine}-${os}${release}"
   3.186 +	exit 0 ;;
   3.187      alpha:OSF1:*:*)
   3.188  	if test $UNAME_RELEASE = "V4.0"; then
   3.189  		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   3.190 @@ -77,41 +180,51 @@
   3.191  	# A Xn.n version is an unreleased experimental baselevel.
   3.192  	# 1.2 uses "1.2" for uname -r.
   3.193  	cat <<EOF >$dummy.s
   3.194 +	.data
   3.195 +\$Lformat:
   3.196 +	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
   3.197 +
   3.198 +	.text
   3.199  	.globl main
   3.200 +	.align 4
   3.201  	.ent main
   3.202  main:
   3.203 -	.frame \$30,0,\$26,0
   3.204 -	.prologue 0
   3.205 -	.long 0x47e03d80 # implver $0
   3.206 -	lda \$2,259
   3.207 -	.long 0x47e20c21 # amask $2,$1
   3.208 -	srl \$1,8,\$2
   3.209 -	sll \$2,2,\$2
   3.210 -	sll \$0,3,\$0
   3.211 -	addl \$1,\$0,\$0
   3.212 -	addl \$2,\$0,\$0
   3.213 -	ret \$31,(\$26),1
   3.214 +	.frame \$30,16,\$26,0
   3.215 +	ldgp \$29,0(\$27)
   3.216 +	.prologue 1
   3.217 +	.long 0x47e03d80 # implver \$0
   3.218 +	lda \$2,-1
   3.219 +	.long 0x47e20c21 # amask \$2,\$1
   3.220 +	lda \$16,\$Lformat
   3.221 +	mov \$0,\$17
   3.222 +	not \$1,\$18
   3.223 +	jsr \$26,printf
   3.224 +	ldgp \$29,0(\$26)
   3.225 +	mov 0,\$16
   3.226 +	jsr \$26,exit
   3.227  	.end main
   3.228  EOF
   3.229  	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   3.230  	if test "$?" = 0 ; then
   3.231 -		./$dummy
   3.232 -		case "$?" in
   3.233 -			7)
   3.234 +		case `./$dummy` in
   3.235 +			0-0)
   3.236  				UNAME_MACHINE="alpha"
   3.237  				;;
   3.238 -			15)
   3.239 +			1-0)
   3.240  				UNAME_MACHINE="alphaev5"
   3.241  				;;
   3.242 -			14)
   3.243 +			1-1)
   3.244  				UNAME_MACHINE="alphaev56"
   3.245  				;;
   3.246 -			10)
   3.247 +			1-101)
   3.248  				UNAME_MACHINE="alphapca56"
   3.249  				;;
   3.250 -			16)
   3.251 +			2-303)
   3.252  				UNAME_MACHINE="alphaev6"
   3.253  				;;
   3.254 +			2-307)
   3.255 +				UNAME_MACHINE="alphaev67"
   3.256 +				;;
   3.257  		esac
   3.258  	fi
   3.259  	rm -f $dummy.s $dummy
   3.260 @@ -127,11 +240,8 @@
   3.261  	echo alpha-dec-winnt3.5
   3.262  	exit 0 ;;
   3.263      Amiga*:UNIX_System_V:4.0:*)
   3.264 -	echo m68k-cbm-sysv4
   3.265 +	echo m68k-unknown-sysv4
   3.266  	exit 0;;
   3.267 -    amiga:NetBSD:*:*)
   3.268 -      echo m68k-cbm-netbsd${UNAME_RELEASE}
   3.269 -      exit 0 ;;
   3.270      amiga:OpenBSD:*:*)
   3.271  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   3.272  	exit 0 ;;
   3.273 @@ -156,13 +266,13 @@
   3.274      wgrisc:OpenBSD:*:*)
   3.275  	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   3.276  	exit 0 ;;
   3.277 +    *:OS/390:*:*)
   3.278 +	echo i370-ibm-openedition
   3.279 +	exit 0 ;;
   3.280      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
   3.281  	echo arm-acorn-riscix${UNAME_RELEASE}
   3.282  	exit 0;;
   3.283 -    arm32:NetBSD:*:*)
   3.284 -	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   3.285 -	exit 0 ;;
   3.286 -    SR2?01:HI-UX/MPP:*:*)
   3.287 +    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
   3.288  	echo hppa1.1-hitachi-hiuxmpp
   3.289  	exit 0;;
   3.290      Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
   3.291 @@ -218,15 +328,12 @@
   3.292      aushp:SunOS:*:*)
   3.293  	echo sparc-auspex-sunos${UNAME_RELEASE}
   3.294  	exit 0 ;;
   3.295 -    atari*:NetBSD:*:*)
   3.296 -	echo m68k-atari-netbsd${UNAME_RELEASE}
   3.297 -	exit 0 ;;
   3.298      atari*:OpenBSD:*:*)
   3.299  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   3.300  	exit 0 ;;
   3.301      # The situation for MiNT is a little confusing.  The machine name
   3.302      # can be virtually everything (everything which is not
   3.303 -    # "atarist" or "atariste" at least should have a processor 
   3.304 +    # "atarist" or "atariste" at least should have a processor
   3.305      # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
   3.306      # to the lowercase version "mint" (or "freemint").  Finally
   3.307      # the system name "TOS" denotes a system which is actually not
   3.308 @@ -250,15 +357,9 @@
   3.309      *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
   3.310          echo m68k-unknown-mint${UNAME_RELEASE}
   3.311          exit 0 ;;
   3.312 -    sun3*:NetBSD:*:*)
   3.313 -	echo m68k-sun-netbsd${UNAME_RELEASE}
   3.314 -	exit 0 ;;
   3.315      sun3*:OpenBSD:*:*)
   3.316  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   3.317  	exit 0 ;;
   3.318 -    mac68k:NetBSD:*:*)
   3.319 -	echo m68k-apple-netbsd${UNAME_RELEASE}
   3.320 -	exit 0 ;;
   3.321      mac68k:OpenBSD:*:*)
   3.322  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   3.323  	exit 0 ;;
   3.324 @@ -271,9 +372,6 @@
   3.325      powerpc:machten:*:*)
   3.326  	echo powerpc-apple-machten${UNAME_RELEASE}
   3.327  	exit 0 ;;
   3.328 -    macppc:NetBSD:*:*)
   3.329 -        echo powerpc-apple-netbsd${UNAME_RELEASE}
   3.330 -        exit 0 ;;
   3.331      RISC*:Mach:*:*)
   3.332  	echo mips-dec-mach_bsd4.3
   3.333  	exit 0 ;;
   3.334 @@ -289,6 +387,7 @@
   3.335      mips:*:*:UMIPS | mips:*:*:RISCos)
   3.336  	sed 's/^	//' << EOF >$dummy.c
   3.337  #ifdef __cplusplus
   3.338 +#include <stdio.h>  /* for printf() prototype */
   3.339  	int main (int argc, char *argv[]) {
   3.340  #else
   3.341  	int main (argc, argv) int argc; char *argv[]; {
   3.342 @@ -309,7 +408,7 @@
   3.343  EOF
   3.344  	$CC_FOR_BUILD $dummy.c -o $dummy \
   3.345  	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
   3.346 -	  && rm $dummy.c $dummy && exit 0
   3.347 +	  && rm -f $dummy.c $dummy && exit 0
   3.348  	rm -f $dummy.c $dummy
   3.349  	echo mips-mips-riscos${UNAME_RELEASE}
   3.350  	exit 0 ;;
   3.351 @@ -328,15 +427,18 @@
   3.352      AViiON:dgux:*:*)
   3.353          # DG/UX returns AViiON for all architectures
   3.354          UNAME_PROCESSOR=`/usr/bin/uname -p`
   3.355 -        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
   3.356 -	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
   3.357 -	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
   3.358 +	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
   3.359 +	then
   3.360 +	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
   3.361 +	       [ ${TARGET_BINARY_INTERFACE}x = x ]
   3.362 +	    then
   3.363  		echo m88k-dg-dgux${UNAME_RELEASE}
   3.364 +	    else
   3.365 +		echo m88k-dg-dguxbcs${UNAME_RELEASE}
   3.366 +	    fi
   3.367  	else
   3.368 -		echo m88k-dg-dguxbcs${UNAME_RELEASE}
   3.369 +	    echo i586-dg-dgux${UNAME_RELEASE}
   3.370  	fi
   3.371 -        else echo i586-dg-dgux${UNAME_RELEASE}
   3.372 -        fi
   3.373   	exit 0 ;;
   3.374      M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
   3.375  	echo m88k-dolphin-sysv3
   3.376 @@ -360,6 +462,14 @@
   3.377      i?86:AIX:*:*)
   3.378  	echo i386-ibm-aix
   3.379  	exit 0 ;;
   3.380 +    ia64:AIX:*:*)
   3.381 +	if [ -x /usr/bin/oslevel ] ; then
   3.382 +		IBM_REV=`/usr/bin/oslevel`
   3.383 +	else
   3.384 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   3.385 +	fi
   3.386 +	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
   3.387 +	exit 0 ;;
   3.388      *:AIX:2:3)
   3.389  	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
   3.390  		sed 's/^		//' << EOF >$dummy.c
   3.391 @@ -373,7 +483,7 @@
   3.392  			exit(0);
   3.393  			}
   3.394  EOF
   3.395 -		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
   3.396 +		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
   3.397  		rm -f $dummy.c $dummy
   3.398  		echo rs6000-ibm-aix3.2.5
   3.399  	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
   3.400 @@ -382,9 +492,9 @@
   3.401  		echo rs6000-ibm-aix3.2
   3.402  	fi
   3.403  	exit 0 ;;
   3.404 -    *:AIX:*:4)
   3.405 +    *:AIX:*:[45])
   3.406  	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
   3.407 -	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
   3.408 +	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
   3.409  		IBM_ARCH=rs6000
   3.410  	else
   3.411  		IBM_ARCH=powerpc
   3.412 @@ -392,7 +502,7 @@
   3.413  	if [ -x /usr/bin/oslevel ] ; then
   3.414  		IBM_REV=`/usr/bin/oslevel`
   3.415  	else
   3.416 -		IBM_REV=4.${UNAME_RELEASE}
   3.417 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   3.418  	fi
   3.419  	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
   3.420  	exit 0 ;;
   3.421 @@ -402,7 +512,7 @@
   3.422      ibmrt:4.4BSD:*|romp-ibm:BSD:*)
   3.423  	echo romp-ibm-bsd4.4
   3.424  	exit 0 ;;
   3.425 -    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
   3.426 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
   3.427  	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
   3.428  	exit 0 ;;                           # report: romp-ibm BSD 4.3
   3.429      *:BOSX:*:*)
   3.430 @@ -418,11 +528,31 @@
   3.431  	echo m68k-hp-bsd4.4
   3.432  	exit 0 ;;
   3.433      9000/[34678]??:HP-UX:*:*)
   3.434 +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
   3.435  	case "${UNAME_MACHINE}" in
   3.436  	    9000/31? )            HP_ARCH=m68000 ;;
   3.437  	    9000/[34]?? )         HP_ARCH=m68k ;;
   3.438  	    9000/[678][0-9][0-9])
   3.439 +              case "${HPUX_REV}" in
   3.440 +                11.[0-9][0-9])
   3.441 +                  if [ -x /usr/bin/getconf ]; then
   3.442 +                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   3.443 +                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   3.444 +                    case "${sc_cpu_version}" in
   3.445 +                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
   3.446 +                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
   3.447 +                      532)                      # CPU_PA_RISC2_0
   3.448 +                        case "${sc_kernel_bits}" in
   3.449 +                          32) HP_ARCH="hppa2.0n" ;;
   3.450 +                          64) HP_ARCH="hppa2.0w" ;;
   3.451 +                        esac ;;
   3.452 +                    esac
   3.453 +                  fi ;;
   3.454 +              esac
   3.455 +              if [ "${HP_ARCH}" = "" ]; then
   3.456                sed 's/^              //' << EOF >$dummy.c
   3.457 +
   3.458 +              #define _HPUX_SOURCE
   3.459                #include <stdlib.h>
   3.460                #include <unistd.h>
   3.461  
   3.462 @@ -453,11 +583,16 @@
   3.463                    exit (0);
   3.464                }
   3.465  EOF
   3.466 -	($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
   3.467 +	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
   3.468 +	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
   3.469  	rm -f $dummy.c $dummy
   3.470 +	fi ;;
   3.471  	esac
   3.472 +	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
   3.473 +	exit 0 ;;
   3.474 +    ia64:HP-UX:*:*)
   3.475  	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
   3.476 -	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
   3.477 +	echo ia64-hp-hpux${HPUX_REV}
   3.478  	exit 0 ;;
   3.479      3050*:HI-UX:*:*)
   3.480  	sed 's/^	//' << EOF >$dummy.c
   3.481 @@ -485,7 +620,7 @@
   3.482  	  exit (0);
   3.483  	}
   3.484  EOF
   3.485 -	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
   3.486 +	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
   3.487  	rm -f $dummy.c $dummy
   3.488  	echo unknown-hitachi-hiuxwe2
   3.489  	exit 0 ;;
   3.490 @@ -547,29 +682,30 @@
   3.491  	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
   3.492  	exit 0 ;;
   3.493      CRAY*TS:*:*:*)
   3.494 -	echo t90-cray-unicos${UNAME_RELEASE}
   3.495 +	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   3.496 +	exit 0 ;;
   3.497 +    CRAY*T3D:*:*:*)
   3.498 +	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   3.499  	exit 0 ;;
   3.500      CRAY*T3E:*:*:*)
   3.501 -	echo t3e-cray-unicosmk${UNAME_RELEASE}
   3.502 +	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   3.503 +	exit 0 ;;
   3.504 +    CRAY*SV1:*:*:*)
   3.505 +	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   3.506  	exit 0 ;;
   3.507      CRAY-2:*:*:*)
   3.508  	echo cray2-cray-unicos
   3.509          exit 0 ;;
   3.510 -    F300:UNIX_System_V:*:*)
   3.511 +    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
   3.512 +	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   3.513          FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   3.514          FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   3.515 -        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   3.516 +        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   3.517          exit 0 ;;
   3.518 -    F301:UNIX_System_V:*:*)
   3.519 -       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
   3.520 -       exit 0 ;;
   3.521 -    hp3[0-9][05]:NetBSD:*:*)
   3.522 -	echo m68k-hp-netbsd${UNAME_RELEASE}
   3.523 -	exit 0 ;;
   3.524      hp300:OpenBSD:*:*)
   3.525  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   3.526  	exit 0 ;;
   3.527 -    i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
   3.528 +    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   3.529  	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
   3.530  	exit 0 ;;
   3.531      sparc*:BSD/OS:*:*)
   3.532 @@ -579,17 +715,8 @@
   3.533  	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
   3.534  	exit 0 ;;
   3.535      *:FreeBSD:*:*)
   3.536 -	if test -x /usr/bin/objformat; then
   3.537 -	    if test "elf" = "`/usr/bin/objformat`"; then
   3.538 -		echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
   3.539 -		exit 0
   3.540 -	    fi
   3.541 -	fi
   3.542  	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
   3.543  	exit 0 ;;
   3.544 -    *:NetBSD:*:*)
   3.545 -	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   3.546 -	exit 0 ;;
   3.547      *:OpenBSD:*:*)
   3.548  	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   3.549  	exit 0 ;;
   3.550 @@ -599,6 +726,9 @@
   3.551      i*:MINGW*:*)
   3.552  	echo ${UNAME_MACHINE}-pc-mingw32
   3.553  	exit 0 ;;
   3.554 +    i*:PW*:*)
   3.555 +	echo ${UNAME_MACHINE}-pc-pw32
   3.556 +	exit 0 ;;
   3.557      i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
   3.558  	# How do we know it's Interix rather than the generic POSIX subsystem?
   3.559  	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
   3.560 @@ -617,34 +747,41 @@
   3.561      *:GNU:*:*)
   3.562  	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
   3.563  	exit 0 ;;
   3.564 -    *:Linux:*:*)
   3.565 -#	# uname on the ARM produces all sorts of strangeness, and we need to
   3.566 -#	# filter it out.
   3.567 -#	case "$UNAME_MACHINE" in
   3.568 -#	  armv*)		      UNAME_MACHINE=$UNAME_MACHINE ;;
   3.569 -#	  arm* | sa110*)	      UNAME_MACHINE="arm" ;;
   3.570 -#	esac
   3.571 -
   3.572 -	# The BFD linker knows what the default object file format is, so
   3.573 -	# first see if it will tell us. cd to the root directory to prevent
   3.574 -	# problems with other programs or directories called `ld' in the path.
   3.575 -	ld_help_string=`cd /; ld --help 2>&1`
   3.576 -	ld_supported_emulations=`echo $ld_help_string \
   3.577 -			 | sed -ne '/supported emulations:/!d
   3.578 -				    s/[ 	][ 	]*/ /g
   3.579 -				    s/.*supported emulations: *//
   3.580 -				    s/ .*//
   3.581 -				    p'`
   3.582 -        case "$ld_supported_emulations" in
   3.583 -	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
   3.584 -	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
   3.585 -	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   3.586 -	  armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   3.587 -	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   3.588 -	  elf32arm)   echo "${UNAME_MACHINE}-unknown-linux-gnu"     ; exit 0 ;;
   3.589 -	  elf32ppc)
   3.590 -		# Determine Lib Version
   3.591 -		cat >$dummy.c <<EOF
   3.592 +    i*86:Minix:*:*)
   3.593 +	echo ${UNAME_MACHINE}-pc-minix
   3.594 +	exit 0 ;;
   3.595 +    arm*:Linux:*:*)
   3.596 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   3.597 +	exit 0 ;;
   3.598 +    ia64:Linux:*:*)
   3.599 +	echo ${UNAME_MACHINE}-unknown-linux
   3.600 +	exit 0 ;;
   3.601 +    m68*:Linux:*:*)
   3.602 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   3.603 +	exit 0 ;;
   3.604 +    mips:Linux:*:*)
   3.605 +	cat >$dummy.c <<EOF
   3.606 +#ifdef __cplusplus
   3.607 +#include <stdio.h>  /* for printf() prototype */
   3.608 +int main (int argc, char *argv[]) {
   3.609 +#else
   3.610 +int main (argc, argv) int argc; char *argv[]; {
   3.611 +#endif
   3.612 +#ifdef __MIPSEB__
   3.613 +  printf ("%s-unknown-linux-gnu\n", argv[1]);
   3.614 +#endif
   3.615 +#ifdef __MIPSEL__
   3.616 +  printf ("%sel-unknown-linux-gnu\n", argv[1]);
   3.617 +#endif
   3.618 +  return 0;
   3.619 +}
   3.620 +EOF
   3.621 +	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
   3.622 +	rm -f $dummy.c $dummy
   3.623 +	;;
   3.624 +    ppc:Linux:*:*)
   3.625 +	# Determine Lib Version
   3.626 +	cat >$dummy.c <<EOF
   3.627  #include <features.h>
   3.628  #if defined(__GLIBC__)
   3.629  extern char __libc_version[];
   3.630 @@ -657,110 +794,130 @@
   3.631  #if defined(__GLIBC__)
   3.632    printf("%s %s\n", __libc_version, __libc_release);
   3.633  #else
   3.634 -  printf("unkown\n");
   3.635 +  printf("unknown\n");
   3.636  #endif
   3.637    return 0;
   3.638  }
   3.639  EOF
   3.640 -		LIBC=""
   3.641 -		$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
   3.642 -		if test "$?" = 0 ; then
   3.643 -			./$dummy | grep 1\.99 > /dev/null
   3.644 -			if test "$?" = 0 ; then
   3.645 -				LIBC="libc1"
   3.646 -			fi
   3.647 -		fi	
   3.648 -		rm -f $dummy.c $dummy
   3.649 -		echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
   3.650 -	esac
   3.651 -
   3.652 -	if test "${UNAME_MACHINE}" = "alpha" ; then
   3.653 -		sed 's/^	//'  <<EOF >$dummy.s
   3.654 +	LIBC=""
   3.655 +	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
   3.656 +	if test "$?" = 0 ; then
   3.657 +		./$dummy | grep 1\.99 > /dev/null
   3.658 +		if test "$?" = 0 ; then LIBC="libc1" ; fi
   3.659 +	fi
   3.660 +	rm -f $dummy.c $dummy
   3.661 +	echo powerpc-unknown-linux-gnu${LIBC}
   3.662 +	exit 0 ;;
   3.663 +    alpha:Linux:*:*)
   3.664 +	cat <<EOF >$dummy.s
   3.665 +	  .data
   3.666 +	  \$Lformat:
   3.667 +		.byte 37,100,45,37,120,10,0	# "%d-%x\n"
   3.668 +	   .text
   3.669  		.globl main
   3.670 +		.align 4
   3.671  		.ent main
   3.672 -	main:
   3.673 -		.frame \$30,0,\$26,0
   3.674 -		.prologue 0
   3.675 -		.long 0x47e03d80 # implver $0
   3.676 -		lda \$2,259
   3.677 -		.long 0x47e20c21 # amask $2,$1
   3.678 -		srl \$1,8,\$2
   3.679 -		sll \$2,2,\$2
   3.680 -		sll \$0,3,\$0
   3.681 -		addl \$1,\$0,\$0
   3.682 -		addl \$2,\$0,\$0
   3.683 -		ret \$31,(\$26),1
   3.684 +	    main:
   3.685 +		.frame \$30,16,\$26,0
   3.686 +		ldgp \$29,0(\$27)
   3.687 +		.prologue 1
   3.688 +		.long 0x47e03d80 # implver \$0
   3.689 +		lda \$2,-1
   3.690 +		.long 0x47e20c21 # amask \$2,\$1
   3.691 +		lda \$16,\$Lformat
   3.692 +		mov \$0,\$17
   3.693 +		not \$1,\$18
   3.694 +		jsr \$26,printf
   3.695 +		ldgp \$29,0(\$26)
   3.696 +		mov 0,\$16
   3.697 +		jsr \$26,exit
   3.698  		.end main
   3.699  EOF
   3.700 -		LIBC=""
   3.701 -		$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   3.702 +	LIBC=""
   3.703 +	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   3.704 +	if test "$?" = 0 ; then
   3.705 +		case `./$dummy` in
   3.706 +		0-0)	UNAME_MACHINE="alpha" ;;
   3.707 +		1-0)	UNAME_MACHINE="alphaev5" ;;
   3.708 +		1-1)    UNAME_MACHINE="alphaev56" ;;
   3.709 +		1-101)	UNAME_MACHINE="alphapca56" ;;
   3.710 +		2-303)	UNAME_MACHINE="alphaev6" ;;
   3.711 +		2-307)	UNAME_MACHINE="alphaev67" ;;
   3.712 +		esac
   3.713 +		objdump --private-headers $dummy | \
   3.714 +		  grep ld.so.1 > /dev/null
   3.715  		if test "$?" = 0 ; then
   3.716 -			./$dummy
   3.717 -			case "$?" in
   3.718 -			7)
   3.719 -				UNAME_MACHINE="alpha"
   3.720 -				;;
   3.721 -			15)
   3.722 -				UNAME_MACHINE="alphaev5"
   3.723 -				;;
   3.724 -			14)
   3.725 -				UNAME_MACHINE="alphaev56"
   3.726 -				;;
   3.727 -			10)
   3.728 -				UNAME_MACHINE="alphapca56"
   3.729 -				;;
   3.730 -			16)
   3.731 -				UNAME_MACHINE="alphaev6"
   3.732 -				;;
   3.733 -			esac
   3.734 -
   3.735 -			objdump --private-headers $dummy | \
   3.736 -			  grep ld.so.1 > /dev/null
   3.737 -			if test "$?" = 0 ; then
   3.738 -				LIBC="libc1"
   3.739 -			fi
   3.740 +			LIBC="libc1"
   3.741  		fi
   3.742 -		rm -f $dummy.s $dummy
   3.743 -		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
   3.744 -	elif test "${UNAME_MACHINE}" = "mips" ; then
   3.745 -	  cat >$dummy.c <<EOF
   3.746 -#ifdef __cplusplus
   3.747 -	int main (int argc, char *argv[]) {
   3.748 -#else
   3.749 -	int main (argc, argv) int argc; char *argv[]; {
   3.750 -#endif
   3.751 -#ifdef __MIPSEB__
   3.752 -  printf ("%s-unknown-linux-gnu\n", argv[1]);
   3.753 -#endif
   3.754 -#ifdef __MIPSEL__
   3.755 -  printf ("%sel-unknown-linux-gnu\n", argv[1]);
   3.756 -#endif
   3.757 -  return 0;
   3.758 -}
   3.759 -EOF
   3.760 -	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
   3.761 -	  rm -f $dummy.c $dummy
   3.762 -	else
   3.763 -	  # Either a pre-BFD a.out linker (linux-gnuoldld)
   3.764 -	  # or one that does not give us useful --help.
   3.765 -	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
   3.766 -	  # If ld does not provide *any* "supported emulations:"
   3.767 -	  # that means it is gnuoldld.
   3.768 -	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
   3.769 -	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
   3.770 -
   3.771 -	  case "${UNAME_MACHINE}" in
   3.772 -	  i?86)
   3.773 -	    VENDOR=pc;
   3.774 -	    ;;
   3.775 -	  *)
   3.776 -	    VENDOR=unknown;
   3.777 -	    ;;
   3.778 -	  esac
   3.779 -	  # Determine whether the default compiler is a.out or elf
   3.780 -	  cat >$dummy.c <<EOF
   3.781 +	fi
   3.782 +	rm -f $dummy.s $dummy
   3.783 +	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
   3.784 +	exit 0 ;;
   3.785 +    parisc:Linux:*:* | hppa:Linux:*:*)
   3.786 +	# Look for CPU level
   3.787 +	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
   3.788 +	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
   3.789 +	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
   3.790 +	  *)    echo hppa-unknown-linux-gnu ;;
   3.791 +	esac
   3.792 +	exit 0 ;;
   3.793 +    parisc64:Linux:*:* | hppa64:Linux:*:*)
   3.794 +	echo hppa64-unknown-linux-gnu
   3.795 +	exit 0 ;;
   3.796 +    s390:Linux:*:* | s390x:Linux:*:*)
   3.797 +	echo ${UNAME_MACHINE}-ibm-linux
   3.798 +	exit 0 ;;
   3.799 +    sh*:Linux:*:*)
   3.800 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   3.801 +	exit 0 ;;
   3.802 +    sparc:Linux:*:* | sparc64:Linux:*:*)
   3.803 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   3.804 +	exit 0 ;;
   3.805 +    x86_64:Linux:*:*)
   3.806 +	echo x86_64-unknown-linux-gnu
   3.807 +	exit 0 ;;
   3.808 +    i?86:Linux:*:*)
   3.809 +	# The BFD linker knows what the default object file format is, so
   3.810 +	# first see if it will tell us. cd to the root directory to prevent
   3.811 +	# problems with other programs or directories called `ld' in the path.
   3.812 +	ld_supported_emulations=`cd /; ld --help 2>&1 \
   3.813 +			 | sed -ne '/supported emulations:/!d
   3.814 +				    s/[ 	][ 	]*/ /g
   3.815 +				    s/.*supported emulations: *//
   3.816 +				    s/ .*//
   3.817 +				    p'`
   3.818 +        case "$ld_supported_emulations" in
   3.819 +	  i?86linux)
   3.820 +		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
   3.821 +		exit 0
   3.822 +		;;
   3.823 +	  elf_i?86)
   3.824 +		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
   3.825 +		;;
   3.826 +	  i?86coff)
   3.827 +		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
   3.828 +		exit 0
   3.829 +		;;
   3.830 +	esac
   3.831 +	# Either a pre-BFD a.out linker (linux-gnuoldld)
   3.832 +	# or one that does not give us useful --help.
   3.833 +	# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
   3.834 +	# If ld does not provide *any* "supported emulations:"
   3.835 +	# that means it is gnuoldld.
   3.836 +	test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
   3.837 +	case "${UNAME_MACHINE}" in
   3.838 +	i?86)
   3.839 +	  VENDOR=pc;
   3.840 +	  ;;
   3.841 +	*)
   3.842 +	  VENDOR=unknown;
   3.843 +	  ;;
   3.844 +	esac
   3.845 +	# Determine whether the default compiler is a.out or elf
   3.846 +	cat >$dummy.c <<EOF
   3.847  #include <features.h>
   3.848  #ifdef __cplusplus
   3.849 +#include <stdio.h>  /* for printf() prototype */
   3.850  	int main (int argc, char *argv[]) {
   3.851  #else
   3.852  	int main (argc, argv) int argc; char *argv[]; {
   3.853 @@ -781,9 +938,10 @@
   3.854    return 0;
   3.855  }
   3.856  EOF
   3.857 -	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
   3.858 -	  rm -f $dummy.c $dummy
   3.859 -	fi ;;
   3.860 +	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
   3.861 +	rm -f $dummy.c $dummy
   3.862 +	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
   3.863 +	;;
   3.864  # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
   3.865  # are messed up and put the nodename in both sysname and nodename.
   3.866      i?86:DYNIX/ptx:4*:*)
   3.867 @@ -798,19 +956,21 @@
   3.868  	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
   3.869  	exit 0 ;;
   3.870      i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
   3.871 +	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
   3.872  	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
   3.873 -		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
   3.874 +		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
   3.875  	else
   3.876 -		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
   3.877 +		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
   3.878  	fi
   3.879  	exit 0 ;;
   3.880      i?86:*:5:7*)
   3.881 -	UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
   3.882 -	(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
   3.883 -	(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
   3.884 -	(/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
   3.885 -	(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
   3.886 -	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
   3.887 +        # Fixed at (any) Pentium or better
   3.888 +        UNAME_MACHINE=i586
   3.889 +        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
   3.890 +	    echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
   3.891 +	else
   3.892 +	    echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
   3.893 +	fi
   3.894  	exit 0 ;;
   3.895      i?86:*:3.2:*)
   3.896  	if test -f /usr/options/cb.name; then
   3.897 @@ -830,7 +990,11 @@
   3.898  		echo ${UNAME_MACHINE}-pc-sysv32
   3.899  	fi
   3.900  	exit 0 ;;
   3.901 +    i?86:*DOS:*:*)
   3.902 +	echo ${UNAME_MACHINE}-pc-msdosdjgpp
   3.903 +	exit 0 ;;
   3.904      pc:*:*:*)
   3.905 +	# Left here for compatibility:
   3.906          # uname -m prints for DJGPP always 'pc', but it prints nothing about
   3.907          # the processor, so we play safe by assuming i386.
   3.908  	echo i386-pc-msdosdjgpp
   3.909 @@ -854,7 +1018,7 @@
   3.910  	exit 0 ;;
   3.911      M68*:*:R3V[567]*:*)
   3.912  	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
   3.913 -    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
   3.914 +    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
   3.915  	OS_REL=''
   3.916  	test -r /etc/.relid \
   3.917  	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
   3.918 @@ -877,9 +1041,12 @@
   3.919      TSUNAMI:LynxOS:2.*:*)
   3.920  	echo sparc-unknown-lynxos${UNAME_RELEASE}
   3.921  	exit 0 ;;
   3.922 -    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
   3.923 +    rs6000:LynxOS:2.*:*)
   3.924  	echo rs6000-unknown-lynxos${UNAME_RELEASE}
   3.925  	exit 0 ;;
   3.926 +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
   3.927 +	echo powerpc-unknown-lynxos${UNAME_RELEASE}
   3.928 +	exit 0 ;;
   3.929      SM[BE]S:UNIX_SV:*:*)
   3.930  	echo mips-dde-sysv${UNAME_RELEASE}
   3.931  	exit 0 ;;
   3.932 @@ -913,7 +1080,7 @@
   3.933      mc68*:A/UX:*:*)
   3.934  	echo m68k-apple-aux${UNAME_RELEASE}
   3.935  	exit 0 ;;
   3.936 -    news*:NEWS-OS:*:6*)
   3.937 +    news*:NEWS-OS:6*:*)
   3.938  	echo mips-sony-newsos6
   3.939  	exit 0 ;;
   3.940      R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
   3.941 @@ -944,6 +1111,64 @@
   3.942      *:Rhapsody:*:*)
   3.943  	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
   3.944  	exit 0 ;;
   3.945 +    *:Darwin:*:*)
   3.946 +	echo `uname -p`-apple-darwin${UNAME_RELEASE}
   3.947 +	exit 0 ;;
   3.948 +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
   3.949 +	if test "${UNAME_MACHINE}" = "x86pc"; then
   3.950 +		UNAME_MACHINE=pc
   3.951 +	fi
   3.952 +	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
   3.953 +	exit 0 ;;
   3.954 +    *:QNX:*:4*)
   3.955 +	echo i386-pc-qnx
   3.956 +	exit 0 ;;
   3.957 +    NSR-[KW]:NONSTOP_KERNEL:*:*)
   3.958 +	echo nsr-tandem-nsk${UNAME_RELEASE}
   3.959 +	exit 0 ;;
   3.960 +    *:NonStop-UX:*:*)
   3.961 +	echo mips-compaq-nonstopux
   3.962 +	exit 0 ;;
   3.963 +    BS2000:POSIX*:*:*)
   3.964 +	echo bs2000-siemens-sysv
   3.965 +	exit 0 ;;
   3.966 +    DS/*:UNIX_System_V:*:*)
   3.967 +	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
   3.968 +	exit 0 ;;
   3.969 +    *:Plan9:*:*)
   3.970 +	# "uname -m" is not consistent, so use $cputype instead. 386
   3.971 +	# is converted to i386 for consistency with other x86
   3.972 +	# operating systems.
   3.973 +	if test "$cputype" = "386"; then
   3.974 +	    UNAME_MACHINE=i386
   3.975 +	else
   3.976 +	    UNAME_MACHINE="$cputype"
   3.977 +	fi
   3.978 +	echo ${UNAME_MACHINE}-unknown-plan9
   3.979 +	exit 0 ;;
   3.980 +    i?86:OS/2:*:*)
   3.981 +	# If we were able to find `uname', then EMX Unix compatibility
   3.982 +	# is probably installed.
   3.983 +	echo ${UNAME_MACHINE}-pc-os2-emx
   3.984 +	exit 0 ;;
   3.985 +    *:TOPS-10:*:*)
   3.986 +	echo pdp10-unknown-tops10
   3.987 +	exit 0 ;;
   3.988 +    *:TENEX:*:*)
   3.989 +	echo pdp10-unknown-tenex
   3.990 +	exit 0 ;;
   3.991 +    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
   3.992 +	echo pdp10-dec-tops20
   3.993 +	exit 0 ;;
   3.994 +    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
   3.995 +	echo pdp10-xkl-tops20
   3.996 +	exit 0 ;;
   3.997 +    *:TOPS-20:*:*)
   3.998 +	echo pdp10-unknown-tops20
   3.999 +	exit 0 ;;
  3.1000 +    *:ITS:*:*)
  3.1001 +	echo pdp10-unknown-its
  3.1002 +	exit 0 ;;
  3.1003  esac
  3.1004  
  3.1005  #echo '(No uname command or uname output not recognized.)' 1>&2
  3.1006 @@ -1035,11 +1260,24 @@
  3.1007  #endif
  3.1008  
  3.1009  #if defined (vax)
  3.1010 -#if !defined (ultrix)
  3.1011 -  printf ("vax-dec-bsd\n"); exit (0);
  3.1012 -#else
  3.1013 -  printf ("vax-dec-ultrix\n"); exit (0);
  3.1014 -#endif
  3.1015 +# if !defined (ultrix)
  3.1016 +#  include <sys/param.h>
  3.1017 +#  if defined (BSD)
  3.1018 +#   if BSD == 43
  3.1019 +      printf ("vax-dec-bsd4.3\n"); exit (0);
  3.1020 +#   else
  3.1021 +#    if BSD == 199006
  3.1022 +      printf ("vax-dec-bsd4.3reno\n"); exit (0);
  3.1023 +#    else
  3.1024 +      printf ("vax-dec-bsd\n"); exit (0);
  3.1025 +#    endif
  3.1026 +#   endif
  3.1027 +#  else
  3.1028 +    printf ("vax-dec-bsd\n"); exit (0);
  3.1029 +#  endif
  3.1030 +# else
  3.1031 +    printf ("vax-dec-ultrix\n"); exit (0);
  3.1032 +# endif
  3.1033  #endif
  3.1034  
  3.1035  #if defined (alliant) && defined (i860)
  3.1036 @@ -1050,7 +1288,7 @@
  3.1037  }
  3.1038  EOF
  3.1039  
  3.1040 -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
  3.1041 +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
  3.1042  rm -f $dummy.c $dummy
  3.1043  
  3.1044  # Apollos put the system type in the environment.
  3.1045 @@ -1083,6 +1321,48 @@
  3.1046      esac
  3.1047  fi
  3.1048  
  3.1049 -#echo '(Unable to guess system type)' 1>&2
  3.1050 +cat >&2 <<EOF
  3.1051 +$0: unable to guess system type
  3.1052 +
  3.1053 +This script, last modified $timestamp, has failed to recognize
  3.1054 +the operating system you are using. It is advised that you
  3.1055 +download the most up to date version of the config scripts from
  3.1056 +
  3.1057 +    ftp://ftp.gnu.org/pub/gnu/config/
  3.1058 +
  3.1059 +If the version you run ($0) is already up to date, please
  3.1060 +send the following data and any information you think might be
  3.1061 +pertinent to <config-patches@gnu.org> in order to provide the needed
  3.1062 +information to handle your system.
  3.1063 +
  3.1064 +config.guess timestamp = $timestamp
  3.1065 +
  3.1066 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
  3.1067 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
  3.1068 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
  3.1069 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
  3.1070 +
  3.1071 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
  3.1072 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
  3.1073 +
  3.1074 +hostinfo               = `(hostinfo) 2>/dev/null`
  3.1075 +/bin/universe          = `(/bin/universe) 2>/dev/null`
  3.1076 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
  3.1077 +/bin/arch              = `(/bin/arch) 2>/dev/null`
  3.1078 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
  3.1079 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
  3.1080 +
  3.1081 +UNAME_MACHINE = ${UNAME_MACHINE}
  3.1082 +UNAME_RELEASE = ${UNAME_RELEASE}
  3.1083 +UNAME_SYSTEM  = ${UNAME_SYSTEM}
  3.1084 +UNAME_VERSION = ${UNAME_VERSION}
  3.1085 +EOF
  3.1086  
  3.1087  exit 1
  3.1088 +
  3.1089 +# Local variables:
  3.1090 +# eval: (add-hook 'write-file-hooks 'time-stamp)
  3.1091 +# time-stamp-start: "timestamp='"
  3.1092 +# time-stamp-format: "%:y-%02m-%02d"
  3.1093 +# time-stamp-end: "'"
  3.1094 +# End:
     4.1 --- a/config.sub	Sun Jun 10 05:02:38 2001 +0000
     4.2 +++ b/config.sub	Sun Jun 10 18:20:23 2001 +0000
     4.3 @@ -1,6 +1,10 @@
     4.4  #! /bin/sh
     4.5 -# Configuration validation subroutine script, version 1.1.
     4.6 -#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
     4.7 +# Configuration validation subroutine script.
     4.8 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     4.9 +#   Free Software Foundation, Inc.
    4.10 +
    4.11 +timestamp='2001-03-19'
    4.12 +
    4.13  # This file is (in principle) common to ALL GNU software.
    4.14  # The presence of a machine in this file suggests that SOME GNU software
    4.15  # can handle that machine.  It does not imply ALL GNU software can.
    4.16 @@ -25,6 +29,8 @@
    4.17  # configuration script generated by Autoconf, you may include it under
    4.18  # the same distribution terms that you use for the rest of that program.
    4.19  
    4.20 +# Please send patches to <config-patches@gnu.org>.
    4.21 +#
    4.22  # Configuration subroutine to validate and canonicalize a configuration type.
    4.23  # Supply the specified configuration type as an argument.
    4.24  # If it is invalid, we print an error message on stderr and exit with code 1.
    4.25 @@ -45,30 +51,73 @@
    4.26  #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
    4.27  # It is wrong to echo any other type of specification.
    4.28  
    4.29 -if [ x$1 = x ]
    4.30 -then
    4.31 -	echo Configuration name missing. 1>&2
    4.32 -	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
    4.33 -	echo "or     $0 ALIAS" 1>&2
    4.34 -	echo where ALIAS is a recognized configuration type. 1>&2
    4.35 -	exit 1
    4.36 -fi
    4.37 +me=`echo "$0" | sed -e 's,.*/,,'`
    4.38  
    4.39 -# First pass through any local machine types.
    4.40 -case $1 in
    4.41 -	*local*)
    4.42 -		echo $1
    4.43 -		exit 0
    4.44 -		;;
    4.45 -	*)
    4.46 -	;;
    4.47 +usage="\
    4.48 +Usage: $0 [OPTION] CPU-MFR-OPSYS
    4.49 +       $0 [OPTION] ALIAS
    4.50 +
    4.51 +Canonicalize a configuration name.
    4.52 +
    4.53 +Operation modes:
    4.54 +  -h, --help         print this help, then exit
    4.55 +  -t, --time-stamp   print date of last modification, then exit
    4.56 +  -v, --version      print version number, then exit
    4.57 +
    4.58 +Report bugs and patches to <config-patches@gnu.org>."
    4.59 +
    4.60 +version="\
    4.61 +GNU config.sub ($timestamp)
    4.62 +
    4.63 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    4.64 +Free Software Foundation, Inc.
    4.65 +
    4.66 +This is free software; see the source for copying conditions.  There is NO
    4.67 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    4.68 +
    4.69 +help="
    4.70 +Try \`$me --help' for more information."
    4.71 +
    4.72 +# Parse command line
    4.73 +while test $# -gt 0 ; do
    4.74 +  case $1 in
    4.75 +    --time-stamp | --time* | -t )
    4.76 +       echo "$timestamp" ; exit 0 ;;
    4.77 +    --version | -v )
    4.78 +       echo "$version" ; exit 0 ;;
    4.79 +    --help | --h* | -h )
    4.80 +       echo "$usage"; exit 0 ;;
    4.81 +    -- )     # Stop option processing
    4.82 +       shift; break ;;
    4.83 +    - )	# Use stdin as input.
    4.84 +       break ;;
    4.85 +    -* )
    4.86 +       echo "$me: invalid option $1$help"
    4.87 +       exit 1 ;;
    4.88 +
    4.89 +    *local*)
    4.90 +       # First pass through any local machine types.
    4.91 +       echo $1
    4.92 +       exit 0;;
    4.93 +
    4.94 +    * )
    4.95 +       break ;;
    4.96 +  esac
    4.97 +done
    4.98 +
    4.99 +case $# in
   4.100 + 0) echo "$me: missing argument$help" >&2
   4.101 +    exit 1;;
   4.102 + 1) ;;
   4.103 + *) echo "$me: too many arguments$help" >&2
   4.104 +    exit 1;;
   4.105  esac
   4.106  
   4.107  # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
   4.108  # Here we must recognize all the valid KERNEL-OS combinations.
   4.109  maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
   4.110  case $maybe_os in
   4.111 -  linux-gnu*)
   4.112 +  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
   4.113      os=-$maybe_os
   4.114      basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
   4.115      ;;
   4.116 @@ -94,7 +143,7 @@
   4.117  	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
   4.118  	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
   4.119  	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
   4.120 -	-apple)
   4.121 +	-apple | -axis)
   4.122  		os=
   4.123  		basic_machine=$1
   4.124  		;;
   4.125 @@ -105,7 +154,7 @@
   4.126  	-scout)
   4.127  		;;
   4.128  	-wrs)
   4.129 -		os=vxworks
   4.130 +		os=-vxworks
   4.131  		basic_machine=$1
   4.132  		;;
   4.133  	-hiux*)
   4.134 @@ -156,33 +205,49 @@
   4.135  	-psos*)
   4.136  		os=-psos
   4.137  		;;
   4.138 +	-mint | -mint[0-9]*)
   4.139 +		basic_machine=m68k-atari
   4.140 +		os=-mint
   4.141 +		;;
   4.142  esac
   4.143  
   4.144  # Decode aliases for certain CPU-COMPANY combinations.
   4.145  case $basic_machine in
   4.146  	# Recognize the basic CPU types without company name.
   4.147  	# Some are omitted here because they have special meanings below.
   4.148 -	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
   4.149 -		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
   4.150 +	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
   4.151 +	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
   4.152 +		| pyramid | mn10200 | mn10300 | tron | a29k \
   4.153  		| 580 | i960 | h8300 \
   4.154 +		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
   4.155  		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
   4.156 -		| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
   4.157 -		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
   4.158 -		| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
   4.159 +		| hppa64 \
   4.160 +		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
   4.161 +		| alphaev6[78] \
   4.162 +		| we32k | ns16k | clipper | i370 | sh | sh[34] \
   4.163 +		| powerpc | powerpcle \
   4.164 +		| 1750a | dsp16xx | pdp10 | pdp11 \
   4.165 +		| mips16 | mips64 | mipsel | mips64el \
   4.166  		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
   4.167  		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
   4.168 -		| mips64vr5000 | miprs64vr5000el \
   4.169 -		| armv[34][lb] | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
   4.170 -		| thumb | d10v)
   4.171 +		| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
   4.172 +		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
   4.173 +		| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
   4.174 +		| pj | pjl | h8500)
   4.175  		basic_machine=$basic_machine-unknown
   4.176  		;;
   4.177 -	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
   4.178 +	m6811 | m68hc11 | m6812 | m68hc12)
   4.179 +		# Motorola 68HC11/12.
   4.180 +		basic_machine=$basic_machine-unknown
   4.181 +		os=-none
   4.182 +		;;
   4.183 +	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
   4.184  		;;
   4.185  
   4.186  	# We use `pc' rather than `unknown'
   4.187  	# because (1) that's what they normally are, and
   4.188  	# (2) the word "unknown" tends to confuse beginning users.
   4.189 -	i[34567]86)
   4.190 +	i[234567]86 | x86_64)
   4.191  	  basic_machine=$basic_machine-pc
   4.192  	  ;;
   4.193  	# Object if more than one company name word.
   4.194 @@ -191,24 +256,30 @@
   4.195  		exit 1
   4.196  		;;
   4.197  	# Recognize the basic CPU types with company name.
   4.198 -	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
   4.199 -	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
   4.200 +	# FIXME: clean up the formatting here.
   4.201 +	vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
   4.202 +	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
   4.203 +	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
   4.204  	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
   4.205  	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
   4.206  	      | xmp-* | ymp-* \
   4.207 -	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
   4.208 -	      | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
   4.209 +	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
   4.210 +	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
   4.211 +	      | hppa2.0n-* | hppa64-* \
   4.212 +	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
   4.213 +	      | alphaev6[78]-* \
   4.214  	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
   4.215  	      | clipper-* | orion-* \
   4.216 -	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
   4.217 +	      | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
   4.218  	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
   4.219  	      | mips64el-* | mips64orion-* | mips64orionel-* \
   4.220  	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
   4.221 -	      | mipstx39-* | mipstx39el-* \
   4.222 -	      | armv[34][lb]-* \
   4.223 -	      | f301-* | armv*-* | t3e-* \
   4.224 +	      | mipstx39-* | mipstx39el-* | mcore-* \
   4.225 +	      | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
   4.226 +	      | [cjt]90-* \
   4.227  	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
   4.228 -	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
   4.229 +	      | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
   4.230 +	      | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
   4.231  		;;
   4.232  	# Recognize the various machine names and aliases which stand
   4.233  	# for a CPU type and a company and sometimes even an OS.
   4.234 @@ -245,14 +316,14 @@
   4.235  		os=-sysv
   4.236  		;;
   4.237  	amiga | amiga-*)
   4.238 -		basic_machine=m68k-cbm
   4.239 +		basic_machine=m68k-unknown
   4.240  		;;
   4.241  	amigaos | amigados)
   4.242 -		basic_machine=m68k-cbm
   4.243 +		basic_machine=m68k-unknown
   4.244  		os=-amigaos
   4.245  		;;
   4.246  	amigaunix | amix)
   4.247 -		basic_machine=m68k-cbm
   4.248 +		basic_machine=m68k-unknown
   4.249  		os=-sysv4
   4.250  		;;
   4.251  	apollo68)
   4.252 @@ -299,13 +370,16 @@
   4.253  		basic_machine=cray2-cray
   4.254  		os=-unicos
   4.255  		;;
   4.256 -	[ctj]90-cray)
   4.257 -		basic_machine=c90-cray
   4.258 +	[cjt]90)
   4.259 +		basic_machine=${basic_machine}-cray
   4.260  		os=-unicos
   4.261  		;;
   4.262  	crds | unos)
   4.263  		basic_machine=m68k-crds
   4.264  		;;
   4.265 +	cris | cris-* | etrax*)
   4.266 +		basic_machine=cris-axis
   4.267 +		;;
   4.268  	da30 | da30-*)
   4.269  		basic_machine=m68k-da30
   4.270  		;;
   4.271 @@ -353,6 +427,10 @@
   4.272  		basic_machine=tron-gmicro
   4.273  		os=-sysv
   4.274  		;;
   4.275 +	go32)
   4.276 +		basic_machine=i386-pc
   4.277 +		os=-go32
   4.278 +		;;
   4.279  	h3050r* | hiux*)
   4.280  		basic_machine=hppa1.1-hitachi
   4.281  		os=-hiuxwe2
   4.282 @@ -426,7 +504,6 @@
   4.283  		;;
   4.284  	i370-ibm* | ibm*)
   4.285  		basic_machine=i370-ibm
   4.286 -		os=-mvs
   4.287  		;;
   4.288  # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
   4.289  	i[34567]86v32)
   4.290 @@ -453,14 +530,6 @@
   4.291  		basic_machine=i386-unknown
   4.292  		os=-vsta
   4.293  		;;
   4.294 -	i386-go32 | go32)
   4.295 -		basic_machine=i386-unknown
   4.296 -		os=-go32
   4.297 -		;;
   4.298 -	i386-mingw32 | mingw32)
   4.299 -		basic_machine=i386-unknown
   4.300 -		os=-mingw32
   4.301 -		;;
   4.302  	iris | iris4d)
   4.303  		basic_machine=mips-sgi
   4.304  		case $os in
   4.305 @@ -486,10 +555,14 @@
   4.306  		basic_machine=ns32k-utek
   4.307  		os=-sysv
   4.308  		;;
   4.309 +	mingw32)
   4.310 +		basic_machine=i386-pc
   4.311 +		os=-mingw32
   4.312 +		;;
   4.313  	miniframe)
   4.314  		basic_machine=m68000-convergent
   4.315  		;;
   4.316 -	*mint | *MiNT)
   4.317 +	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
   4.318  		basic_machine=m68k-atari
   4.319  		os=-mint
   4.320  		;;
   4.321 @@ -507,14 +580,22 @@
   4.322  	mips3*)
   4.323  		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
   4.324  		;;
   4.325 +	mmix*)
   4.326 +		basic_machine=mmix-knuth
   4.327 +		os=-mmixware
   4.328 +		;;
   4.329  	monitor)
   4.330  		basic_machine=m68k-rom68k
   4.331  		os=-coff
   4.332  		;;
   4.333  	msdos)
   4.334 -		basic_machine=i386-unknown
   4.335 +		basic_machine=i386-pc
   4.336  		os=-msdos
   4.337  		;;
   4.338 +	mvs)
   4.339 +		basic_machine=i370-ibm
   4.340 +		os=-mvs
   4.341 +		;;
   4.342  	ncr3000)
   4.343  		basic_machine=i486-ncr
   4.344  		os=-sysv4
   4.345 @@ -524,7 +605,7 @@
   4.346  		os=-netbsd
   4.347  		;;
   4.348  	netwinder)
   4.349 -		basic_machine=armv4l-corel
   4.350 +		basic_machine=armv4l-rebel
   4.351  		os=-linux
   4.352  		;;
   4.353  	news | news700 | news800 | news900)
   4.354 @@ -572,9 +653,16 @@
   4.355  		basic_machine=i960-intel
   4.356  		os=-mon960
   4.357  		;;
   4.358 +	nonstopux)
   4.359 +		basic_machine=mips-compaq
   4.360 +		os=-nonstopux
   4.361 +		;;
   4.362  	np1)
   4.363  		basic_machine=np1-gould
   4.364  		;;
   4.365 +	nsr-tandem)
   4.366 +		basic_machine=nsr-tandem
   4.367 +		;;
   4.368  	op50n-* | op60c-*)
   4.369  		basic_machine=hppa1.1-oki
   4.370  		os=-proelf
   4.371 @@ -604,28 +692,28 @@
   4.372          pc532 | pc532-*)
   4.373  		basic_machine=ns32k-pc532
   4.374  		;;
   4.375 -	pentium | p5 | k5 | k6 | nexen)
   4.376 +	pentium | p5 | k5 | k6 | nexgen)
   4.377  		basic_machine=i586-pc
   4.378  		;;
   4.379 -	pentiumpro | p6 | 6x86)
   4.380 +	pentiumpro | p6 | 6x86 | athlon)
   4.381  		basic_machine=i686-pc
   4.382  		;;
   4.383  	pentiumii | pentium2)
   4.384 -		basic_machine=i786-pc
   4.385 +		basic_machine=i686-pc
   4.386  		;;
   4.387 -	pentium-* | p5-* | k5-* | k6-* | nexen-*)
   4.388 +	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
   4.389  		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
   4.390  		;;
   4.391 -	pentiumpro-* | p6-* | 6x86-*)
   4.392 +	pentiumpro-* | p6-* | 6x86-* | athlon-*)
   4.393  		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
   4.394  		;;
   4.395  	pentiumii-* | pentium2-*)
   4.396 -		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
   4.397 +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
   4.398  		;;
   4.399  	pn)
   4.400  		basic_machine=pn-gould
   4.401  		;;
   4.402 -	power)	basic_machine=rs6000-ibm
   4.403 +	power)	basic_machine=power-ibm
   4.404  		;;
   4.405  	ppc)	basic_machine=powerpc-unknown
   4.406  	        ;;
   4.407 @@ -640,6 +728,10 @@
   4.408  	ps2)
   4.409  		basic_machine=i386-ibm
   4.410  		;;
   4.411 +	pw32)
   4.412 +		basic_machine=i586-unknown
   4.413 +		os=-pw32
   4.414 +		;;
   4.415  	rom68k)
   4.416  		basic_machine=m68k-rom68k
   4.417  		os=-coff
   4.418 @@ -719,6 +811,10 @@
   4.419  	sun386 | sun386i | roadrunner)
   4.420  		basic_machine=i386-sun
   4.421  		;;
   4.422 +	sv1)
   4.423 +		basic_machine=sv1-cray
   4.424 +		os=-unicos
   4.425 +		;;
   4.426  	symmetry)
   4.427  		basic_machine=i386-sequent
   4.428  		os=-dynix
   4.429 @@ -727,6 +823,10 @@
   4.430  		basic_machine=t3e-cray
   4.431  		os=-unicos
   4.432  		;;
   4.433 +	tic54x | c54x*)
   4.434 +		basic_machine=tic54x-unknown
   4.435 +		os=-coff
   4.436 +		;;
   4.437  	tx39)
   4.438  		basic_machine=mipstx39-unknown
   4.439  		;;
   4.440 @@ -822,12 +922,19 @@
   4.441  	vax)
   4.442  		basic_machine=vax-dec
   4.443  		;;
   4.444 +	pdp10)
   4.445 +		# there are many clones, so DEC is not a safe bet
   4.446 +		basic_machine=pdp10-unknown
   4.447 +		;;
   4.448  	pdp11)
   4.449  		basic_machine=pdp11-dec
   4.450  		;;
   4.451  	we32k)
   4.452  		basic_machine=we32k-att
   4.453  		;;
   4.454 +	sh3 | sh4)
   4.455 +		basic_machine=sh-unknown
   4.456 +		;;
   4.457  	sparc | sparcv9)
   4.458  		basic_machine=sparc-sun
   4.459  		;;
   4.460 @@ -908,12 +1015,26 @@
   4.461  	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
   4.462  	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
   4.463  	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
   4.464 -	      | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
   4.465 +	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
   4.466 +	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
   4.467 +	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
   4.468  	# Remember, each alternative MUST END IN *, to match a version number.
   4.469  		;;
   4.470 +	-qnx*)
   4.471 +		case $basic_machine in
   4.472 +		    x86-* | i[34567]86-*)
   4.473 +			;;
   4.474 +		    *)
   4.475 +			os=-nto$os
   4.476 +			;;
   4.477 +		esac
   4.478 +		;;
   4.479 +	-nto*)
   4.480 +		os=-nto-qnx
   4.481 +		;;
   4.482  	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
   4.483  	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
   4.484 -	      | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
   4.485 +	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
   4.486  		;;
   4.487  	-mac*)
   4.488  		os=`echo $os | sed -e 's|mac|macos|'`
   4.489 @@ -927,6 +1048,12 @@
   4.490  	-sunos6*)
   4.491  		os=`echo $os | sed -e 's|sunos6|solaris3|'`
   4.492  		;;
   4.493 +	-opened*)
   4.494 +		os=-openedition
   4.495 +		;;
   4.496 +	-wince*)
   4.497 +		os=-wince
   4.498 +		;;
   4.499  	-osfrose*)
   4.500  		os=-osfrose
   4.501  		;;
   4.502 @@ -951,6 +1078,9 @@
   4.503  	-ns2 )
   4.504  	        os=-nextstep2
   4.505  		;;
   4.506 +	-nsk*)
   4.507 +		os=-nsk
   4.508 +		;;
   4.509  	# Preserve the version number of sinix5.
   4.510  	-sinix5.*)
   4.511  		os=`echo $os | sed -e 's|sinix|sysv|'`
   4.512 @@ -985,7 +1115,7 @@
   4.513  	-xenix)
   4.514  		os=-xenix
   4.515  		;;
   4.516 -        -*mint | -*MiNT)
   4.517 +        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
   4.518  	        os=-mint
   4.519  		;;
   4.520  	-none)
   4.521 @@ -1013,12 +1143,15 @@
   4.522  	*-acorn)
   4.523  		os=-riscix1.2
   4.524  		;;
   4.525 -	arm*-corel)
   4.526 +	arm*-rebel)
   4.527  		os=-linux
   4.528  		;;
   4.529  	arm*-semi)
   4.530  		os=-aout
   4.531  		;;
   4.532 +	pdp10-*)
   4.533 +		os=-tops20
   4.534 +		;;
   4.535          pdp11-*)
   4.536  		os=-none
   4.537  		;;
   4.538 @@ -1127,7 +1260,7 @@
   4.539  	*-masscomp)
   4.540  		os=-rtu
   4.541  		;;
   4.542 -	f301-fujitsu)
   4.543 +	f30[01]-fujitsu | f700-fujitsu)
   4.544  		os=-uxpv
   4.545  		;;
   4.546  	*-rom68k)
   4.547 @@ -1187,7 +1320,7 @@
   4.548  			-genix*)
   4.549  				vendor=ns
   4.550  				;;
   4.551 -			-mvs*)
   4.552 +			-mvs* | -opened*)
   4.553  				vendor=ibm
   4.554  				;;
   4.555  			-ptx*)
   4.556 @@ -1205,7 +1338,7 @@
   4.557  			-mpw* | -macos*)
   4.558  				vendor=apple
   4.559  				;;
   4.560 -			-*mint | -*MiNT)
   4.561 +			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
   4.562  				vendor=atari
   4.563  				;;
   4.564  		esac
   4.565 @@ -1214,3 +1347,11 @@
   4.566  esac
   4.567  
   4.568  echo $basic_machine$os
   4.569 +exit 0
   4.570 +
   4.571 +# Local variables:
   4.572 +# eval: (add-hook 'write-file-hooks 'time-stamp)
   4.573 +# time-stamp-start: "timestamp='"
   4.574 +# time-stamp-format: "%:y-%02m-%02d"
   4.575 +# time-stamp-end: "'"
   4.576 +# End:
     5.1 --- a/configure.in	Sun Jun 10 05:02:38 2001 +0000
     5.2 +++ b/configure.in	Sun Jun 10 18:20:23 2001 +0000
     5.3 @@ -1865,7 +1865,7 @@
     5.4          fi
     5.5          # The MacOS X platform requires special setup
     5.6          SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework"
     5.7 -        SDL_LIBS="$SDL_LIBS -framework Carbon"
     5.8 +        SDL_LIBS="-lSDLmain $SDL_LIBS -framework Carbon"
     5.9          ;;
    5.10      *)
    5.11          AC_MSG_ERROR(Unsupported target:  Please add to configure.in)
     6.1 --- a/docs.html	Sun Jun 10 05:02:38 2001 +0000
     6.2 +++ b/docs.html	Sun Jun 10 18:20:23 2001 +0000
     6.3 @@ -16,8 +16,9 @@
     6.4  Major changes since SDL 1.0.0:
     6.5  </H2>
     6.6  <UL>
     6.7 -	<LI> 1.2.1: Disabled /dev/event joystick interface by default
     6.8 +	<LI> 1.2.1: Added MacOS X Project Builder projects (thanks Darrell!)
     6.9  	<LI> 1.2.1: Added initial support for Quartz video (thanks Darrell!)
    6.10 +	<LI> 1.2.1: Disabled Linux /dev/event joystick interface by default
    6.11  	<LI> 1.2.1: Added native OpenBSD audio driver (thanks vedge!)
    6.12  	<LI> 1.2.1: Added detection of Open Sound System on Solaris x86
    6.13  	<LI> 1.2.1: Added initial support for Nano-X (thanks Hsieh-Fu!)
     7.1 --- a/src/main/linux/SDL_main.c	Sun Jun 10 05:02:38 2001 +0000
     7.2 +++ b/src/main/linux/SDL_main.c	Sun Jun 10 18:20:23 2001 +0000
     7.3 @@ -5,9 +5,9 @@
     7.4  #undef main
     7.5  #endif
     7.6  
     7.7 -extern int SDL_run(int argc, char **argv);
     7.8 +extern int SDL_main(int argc, char *argv[]);
     7.9  
    7.10  int main(int argc, char *argv[])
    7.11  {
    7.12 -	return(SDL_run(argc, argv));
    7.13 +	return(SDL_main(argc, argv));
    7.14  }
     8.1 Binary file src/main/macosx/SDLMain.nib.tar.gz has changed
     9.1 --- a/test/config.guess	Sun Jun 10 05:02:38 2001 +0000
     9.2 +++ b/test/config.guess	Sun Jun 10 18:20:23 2001 +0000
     9.3 @@ -1,8 +1,10 @@
     9.4  #! /bin/sh
     9.5  # Attempt to guess a canonical system name.
     9.6 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
     9.7 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     9.8  #   Free Software Foundation, Inc.
     9.9 -#
    9.10 +
    9.11 +timestamp='2001-03-16'
    9.12 +
    9.13  # This file is free software; you can redistribute it and/or modify it
    9.14  # under the terms of the GNU General Public License as published by
    9.15  # the Free Software Foundation; either version 2 of the License, or
    9.16 @@ -23,34 +25,93 @@
    9.17  # the same distribution terms that you use for the rest of that program.
    9.18  
    9.19  # Written by Per Bothner <bothner@cygnus.com>.
    9.20 -# The master version of this file is at the FSF in /home/gd/gnu/lib.
    9.21 -# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
    9.22 +# Please send patches to <config-patches@gnu.org>.
    9.23  #
    9.24  # This script attempts to guess a canonical system name similar to
    9.25  # config.sub.  If it succeeds, it prints the system name on stdout, and
    9.26  # exits with 0.  Otherwise, it exits with 1.
    9.27  #
    9.28  # The plan is that this can be called by configure scripts if you
    9.29 -# don't specify an explicit system type (host/target name).
    9.30 -#
    9.31 -# Only a few systems have been added to this list; please add others
    9.32 -# (but try to keep the structure clean).
    9.33 -#
    9.34 +# don't specify an explicit build system type.
    9.35  
    9.36 -# Use $HOST_CC if defined. $CC may point to a cross-compiler
    9.37 -if test x"$CC_FOR_BUILD" = x; then
    9.38 -  if test x"$HOST_CC" != x; then
    9.39 -    CC_FOR_BUILD="$HOST_CC"
    9.40 -  else
    9.41 -    if test x"$CC" != x; then
    9.42 -      CC_FOR_BUILD="$CC"
    9.43 -    else
    9.44 -      CC_FOR_BUILD=cc
    9.45 -    fi
    9.46 -  fi
    9.47 +me=`echo "$0" | sed -e 's,.*/,,'`
    9.48 +
    9.49 +usage="\
    9.50 +Usage: $0 [OPTION]
    9.51 +
    9.52 +Output the configuration name of the system \`$me' is run on.
    9.53 +
    9.54 +Operation modes:
    9.55 +  -h, --help         print this help, then exit
    9.56 +  -t, --time-stamp   print date of last modification, then exit
    9.57 +  -v, --version      print version number, then exit
    9.58 +
    9.59 +Report bugs and patches to <config-patches@gnu.org>."
    9.60 +
    9.61 +version="\
    9.62 +GNU config.guess ($timestamp)
    9.63 +
    9.64 +Originally written by Per Bothner.
    9.65 +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
    9.66 +Free Software Foundation, Inc.
    9.67 +
    9.68 +This is free software; see the source for copying conditions.  There is NO
    9.69 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    9.70 +
    9.71 +help="
    9.72 +Try \`$me --help' for more information."
    9.73 +
    9.74 +# Parse command line
    9.75 +while test $# -gt 0 ; do
    9.76 +  case $1 in
    9.77 +    --time-stamp | --time* | -t )
    9.78 +       echo "$timestamp" ; exit 0 ;;
    9.79 +    --version | -v )
    9.80 +       echo "$version" ; exit 0 ;;
    9.81 +    --help | --h* | -h )
    9.82 +       echo "$usage"; exit 0 ;;
    9.83 +    -- )     # Stop option processing
    9.84 +       shift; break ;;
    9.85 +    - )	# Use stdin as input.
    9.86 +       break ;;
    9.87 +    -* )
    9.88 +       echo "$me: invalid option $1$help" >&2
    9.89 +       exit 1 ;;
    9.90 +    * )
    9.91 +       break ;;
    9.92 +  esac
    9.93 +done
    9.94 +
    9.95 +if test $# != 0; then
    9.96 +  echo "$me: too many arguments$help" >&2
    9.97 +  exit 1
    9.98  fi
    9.99  
   9.100  
   9.101 +dummy=dummy-$$
   9.102 +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
   9.103 +
   9.104 +# CC_FOR_BUILD -- compiler used by this script.
   9.105 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
   9.106 +# use `HOST_CC' if defined, but it is deprecated.
   9.107 +
   9.108 +case $CC_FOR_BUILD,$HOST_CC,$CC in
   9.109 + ,,)    echo "int dummy(){}" > $dummy.c
   9.110 +	for c in cc gcc c89 ; do
   9.111 +	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
   9.112 +	  if test $? = 0 ; then
   9.113 +	     CC_FOR_BUILD="$c"; break
   9.114 +	  fi
   9.115 +	done
   9.116 +	rm -f $dummy.c $dummy.o $dummy.rel
   9.117 +	if test x"$CC_FOR_BUILD" = x ; then
   9.118 +	  CC_FOR_BUILD=no_compiler_found
   9.119 +	fi
   9.120 +	;;
   9.121 + ,,*)   CC_FOR_BUILD=$CC ;;
   9.122 + ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
   9.123 +esac
   9.124 +
   9.125  # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
   9.126  # (ghazi@noc.rutgers.edu 8/24/94.)
   9.127  if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
   9.128 @@ -59,15 +120,57 @@
   9.129  
   9.130  UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
   9.131  UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
   9.132 -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
   9.133 +UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
   9.134  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
   9.135  
   9.136 -dummy=dummy-$$
   9.137 -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
   9.138 -
   9.139  # Note: order is significant - the case branches are not exclusive.
   9.140  
   9.141  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
   9.142 +    *:NetBSD:*:*)
   9.143 +	# Netbsd (nbsd) targets should (where applicable) match one or
   9.144 +	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
   9.145 +	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
   9.146 +	# switched to ELF, *-*-netbsd* would select the old
   9.147 +	# object file format.  This provides both forward
   9.148 +	# compatibility and a consistent mechanism for selecting the
   9.149 +	# object file format.
   9.150 +	# Determine the machine/vendor (is the vendor relevant).
   9.151 +	case "${UNAME_MACHINE}" in
   9.152 +	    amiga) machine=m68k-unknown ;;
   9.153 +	    arm32) machine=arm-unknown ;;
   9.154 +	    atari*) machine=m68k-atari ;;
   9.155 +	    sun3*) machine=m68k-sun ;;
   9.156 +	    mac68k) machine=m68k-apple ;;
   9.157 +	    macppc) machine=powerpc-apple ;;
   9.158 +	    hp3[0-9][05]) machine=m68k-hp ;;
   9.159 +	    ibmrt|romp-ibm) machine=romp-ibm ;;
   9.160 +	    *) machine=${UNAME_MACHINE}-unknown ;;
   9.161 +	esac
   9.162 +	# The Operating System including object format, if it has switched
   9.163 +	# to ELF recently, or will in the future.
   9.164 +	case "${UNAME_MACHINE}" in
   9.165 +	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
   9.166 +		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
   9.167 +			| grep __ELF__ >/dev/null
   9.168 +		then
   9.169 +		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
   9.170 +		    # Return netbsd for either.  FIX?
   9.171 +		    os=netbsd
   9.172 +		else
   9.173 +		    os=netbsdelf
   9.174 +		fi
   9.175 +		;;
   9.176 +	    *)
   9.177 +	        os=netbsd
   9.178 +		;;
   9.179 +	esac
   9.180 +	# The OS release
   9.181 +	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   9.182 +	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   9.183 +	# contains redundant information, the shorter form:
   9.184 +	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   9.185 +	echo "${machine}-${os}${release}"
   9.186 +	exit 0 ;;
   9.187      alpha:OSF1:*:*)
   9.188  	if test $UNAME_RELEASE = "V4.0"; then
   9.189  		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   9.190 @@ -77,41 +180,51 @@
   9.191  	# A Xn.n version is an unreleased experimental baselevel.
   9.192  	# 1.2 uses "1.2" for uname -r.
   9.193  	cat <<EOF >$dummy.s
   9.194 +	.data
   9.195 +\$Lformat:
   9.196 +	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
   9.197 +
   9.198 +	.text
   9.199  	.globl main
   9.200 +	.align 4
   9.201  	.ent main
   9.202  main:
   9.203 -	.frame \$30,0,\$26,0
   9.204 -	.prologue 0
   9.205 -	.long 0x47e03d80 # implver $0
   9.206 -	lda \$2,259
   9.207 -	.long 0x47e20c21 # amask $2,$1
   9.208 -	srl \$1,8,\$2
   9.209 -	sll \$2,2,\$2
   9.210 -	sll \$0,3,\$0
   9.211 -	addl \$1,\$0,\$0
   9.212 -	addl \$2,\$0,\$0
   9.213 -	ret \$31,(\$26),1
   9.214 +	.frame \$30,16,\$26,0
   9.215 +	ldgp \$29,0(\$27)
   9.216 +	.prologue 1
   9.217 +	.long 0x47e03d80 # implver \$0
   9.218 +	lda \$2,-1
   9.219 +	.long 0x47e20c21 # amask \$2,\$1
   9.220 +	lda \$16,\$Lformat
   9.221 +	mov \$0,\$17
   9.222 +	not \$1,\$18
   9.223 +	jsr \$26,printf
   9.224 +	ldgp \$29,0(\$26)
   9.225 +	mov 0,\$16
   9.226 +	jsr \$26,exit
   9.227  	.end main
   9.228  EOF
   9.229  	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   9.230  	if test "$?" = 0 ; then
   9.231 -		./$dummy
   9.232 -		case "$?" in
   9.233 -			7)
   9.234 +		case `./$dummy` in
   9.235 +			0-0)
   9.236  				UNAME_MACHINE="alpha"
   9.237  				;;
   9.238 -			15)
   9.239 +			1-0)
   9.240  				UNAME_MACHINE="alphaev5"
   9.241  				;;
   9.242 -			14)
   9.243 +			1-1)
   9.244  				UNAME_MACHINE="alphaev56"
   9.245  				;;
   9.246 -			10)
   9.247 +			1-101)
   9.248  				UNAME_MACHINE="alphapca56"
   9.249  				;;
   9.250 -			16)
   9.251 +			2-303)
   9.252  				UNAME_MACHINE="alphaev6"
   9.253  				;;
   9.254 +			2-307)
   9.255 +				UNAME_MACHINE="alphaev67"
   9.256 +				;;
   9.257  		esac
   9.258  	fi
   9.259  	rm -f $dummy.s $dummy
   9.260 @@ -127,11 +240,8 @@
   9.261  	echo alpha-dec-winnt3.5
   9.262  	exit 0 ;;
   9.263      Amiga*:UNIX_System_V:4.0:*)
   9.264 -	echo m68k-cbm-sysv4
   9.265 +	echo m68k-unknown-sysv4
   9.266  	exit 0;;
   9.267 -    amiga:NetBSD:*:*)
   9.268 -      echo m68k-cbm-netbsd${UNAME_RELEASE}
   9.269 -      exit 0 ;;
   9.270      amiga:OpenBSD:*:*)
   9.271  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   9.272  	exit 0 ;;
   9.273 @@ -156,13 +266,13 @@
   9.274      wgrisc:OpenBSD:*:*)
   9.275  	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   9.276  	exit 0 ;;
   9.277 +    *:OS/390:*:*)
   9.278 +	echo i370-ibm-openedition
   9.279 +	exit 0 ;;
   9.280      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
   9.281  	echo arm-acorn-riscix${UNAME_RELEASE}
   9.282  	exit 0;;
   9.283 -    arm32:NetBSD:*:*)
   9.284 -	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   9.285 -	exit 0 ;;
   9.286 -    SR2?01:HI-UX/MPP:*:*)
   9.287 +    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
   9.288  	echo hppa1.1-hitachi-hiuxmpp
   9.289  	exit 0;;
   9.290      Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
   9.291 @@ -218,15 +328,12 @@
   9.292      aushp:SunOS:*:*)
   9.293  	echo sparc-auspex-sunos${UNAME_RELEASE}
   9.294  	exit 0 ;;
   9.295 -    atari*:NetBSD:*:*)
   9.296 -	echo m68k-atari-netbsd${UNAME_RELEASE}
   9.297 -	exit 0 ;;
   9.298      atari*:OpenBSD:*:*)
   9.299  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   9.300  	exit 0 ;;
   9.301      # The situation for MiNT is a little confusing.  The machine name
   9.302      # can be virtually everything (everything which is not
   9.303 -    # "atarist" or "atariste" at least should have a processor 
   9.304 +    # "atarist" or "atariste" at least should have a processor
   9.305      # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
   9.306      # to the lowercase version "mint" (or "freemint").  Finally
   9.307      # the system name "TOS" denotes a system which is actually not
   9.308 @@ -250,15 +357,9 @@
   9.309      *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
   9.310          echo m68k-unknown-mint${UNAME_RELEASE}
   9.311          exit 0 ;;
   9.312 -    sun3*:NetBSD:*:*)
   9.313 -	echo m68k-sun-netbsd${UNAME_RELEASE}
   9.314 -	exit 0 ;;
   9.315      sun3*:OpenBSD:*:*)
   9.316  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   9.317  	exit 0 ;;
   9.318 -    mac68k:NetBSD:*:*)
   9.319 -	echo m68k-apple-netbsd${UNAME_RELEASE}
   9.320 -	exit 0 ;;
   9.321      mac68k:OpenBSD:*:*)
   9.322  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   9.323  	exit 0 ;;
   9.324 @@ -271,9 +372,6 @@
   9.325      powerpc:machten:*:*)
   9.326  	echo powerpc-apple-machten${UNAME_RELEASE}
   9.327  	exit 0 ;;
   9.328 -    macppc:NetBSD:*:*)
   9.329 -        echo powerpc-apple-netbsd${UNAME_RELEASE}
   9.330 -        exit 0 ;;
   9.331      RISC*:Mach:*:*)
   9.332  	echo mips-dec-mach_bsd4.3
   9.333  	exit 0 ;;
   9.334 @@ -289,6 +387,7 @@
   9.335      mips:*:*:UMIPS | mips:*:*:RISCos)
   9.336  	sed 's/^	//' << EOF >$dummy.c
   9.337  #ifdef __cplusplus
   9.338 +#include <stdio.h>  /* for printf() prototype */
   9.339  	int main (int argc, char *argv[]) {
   9.340  #else
   9.341  	int main (argc, argv) int argc; char *argv[]; {
   9.342 @@ -309,7 +408,7 @@
   9.343  EOF
   9.344  	$CC_FOR_BUILD $dummy.c -o $dummy \
   9.345  	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
   9.346 -	  && rm $dummy.c $dummy && exit 0
   9.347 +	  && rm -f $dummy.c $dummy && exit 0
   9.348  	rm -f $dummy.c $dummy
   9.349  	echo mips-mips-riscos${UNAME_RELEASE}
   9.350  	exit 0 ;;
   9.351 @@ -328,15 +427,18 @@
   9.352      AViiON:dgux:*:*)
   9.353          # DG/UX returns AViiON for all architectures
   9.354          UNAME_PROCESSOR=`/usr/bin/uname -p`
   9.355 -        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
   9.356 -	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
   9.357 -	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
   9.358 +	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
   9.359 +	then
   9.360 +	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
   9.361 +	       [ ${TARGET_BINARY_INTERFACE}x = x ]
   9.362 +	    then
   9.363  		echo m88k-dg-dgux${UNAME_RELEASE}
   9.364 +	    else
   9.365 +		echo m88k-dg-dguxbcs${UNAME_RELEASE}
   9.366 +	    fi
   9.367  	else
   9.368 -		echo m88k-dg-dguxbcs${UNAME_RELEASE}
   9.369 +	    echo i586-dg-dgux${UNAME_RELEASE}
   9.370  	fi
   9.371 -        else echo i586-dg-dgux${UNAME_RELEASE}
   9.372 -        fi
   9.373   	exit 0 ;;
   9.374      M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
   9.375  	echo m88k-dolphin-sysv3
   9.376 @@ -360,6 +462,14 @@
   9.377      i?86:AIX:*:*)
   9.378  	echo i386-ibm-aix
   9.379  	exit 0 ;;
   9.380 +    ia64:AIX:*:*)
   9.381 +	if [ -x /usr/bin/oslevel ] ; then
   9.382 +		IBM_REV=`/usr/bin/oslevel`
   9.383 +	else
   9.384 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   9.385 +	fi
   9.386 +	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
   9.387 +	exit 0 ;;
   9.388      *:AIX:2:3)
   9.389  	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
   9.390  		sed 's/^		//' << EOF >$dummy.c
   9.391 @@ -373,7 +483,7 @@
   9.392  			exit(0);
   9.393  			}
   9.394  EOF
   9.395 -		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
   9.396 +		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
   9.397  		rm -f $dummy.c $dummy
   9.398  		echo rs6000-ibm-aix3.2.5
   9.399  	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
   9.400 @@ -382,9 +492,9 @@
   9.401  		echo rs6000-ibm-aix3.2
   9.402  	fi
   9.403  	exit 0 ;;
   9.404 -    *:AIX:*:4)
   9.405 +    *:AIX:*:[45])
   9.406  	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
   9.407 -	if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
   9.408 +	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
   9.409  		IBM_ARCH=rs6000
   9.410  	else
   9.411  		IBM_ARCH=powerpc
   9.412 @@ -392,7 +502,7 @@
   9.413  	if [ -x /usr/bin/oslevel ] ; then
   9.414  		IBM_REV=`/usr/bin/oslevel`
   9.415  	else
   9.416 -		IBM_REV=4.${UNAME_RELEASE}
   9.417 +		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
   9.418  	fi
   9.419  	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
   9.420  	exit 0 ;;
   9.421 @@ -402,7 +512,7 @@
   9.422      ibmrt:4.4BSD:*|romp-ibm:BSD:*)
   9.423  	echo romp-ibm-bsd4.4
   9.424  	exit 0 ;;
   9.425 -    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
   9.426 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
   9.427  	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
   9.428  	exit 0 ;;                           # report: romp-ibm BSD 4.3
   9.429      *:BOSX:*:*)
   9.430 @@ -418,11 +528,31 @@
   9.431  	echo m68k-hp-bsd4.4
   9.432  	exit 0 ;;
   9.433      9000/[34678]??:HP-UX:*:*)
   9.434 +	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
   9.435  	case "${UNAME_MACHINE}" in
   9.436  	    9000/31? )            HP_ARCH=m68000 ;;
   9.437  	    9000/[34]?? )         HP_ARCH=m68k ;;
   9.438  	    9000/[678][0-9][0-9])
   9.439 +              case "${HPUX_REV}" in
   9.440 +                11.[0-9][0-9])
   9.441 +                  if [ -x /usr/bin/getconf ]; then
   9.442 +                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   9.443 +                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   9.444 +                    case "${sc_cpu_version}" in
   9.445 +                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
   9.446 +                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
   9.447 +                      532)                      # CPU_PA_RISC2_0
   9.448 +                        case "${sc_kernel_bits}" in
   9.449 +                          32) HP_ARCH="hppa2.0n" ;;
   9.450 +                          64) HP_ARCH="hppa2.0w" ;;
   9.451 +                        esac ;;
   9.452 +                    esac
   9.453 +                  fi ;;
   9.454 +              esac
   9.455 +              if [ "${HP_ARCH}" = "" ]; then
   9.456                sed 's/^              //' << EOF >$dummy.c
   9.457 +
   9.458 +              #define _HPUX_SOURCE
   9.459                #include <stdlib.h>
   9.460                #include <unistd.h>
   9.461  
   9.462 @@ -453,11 +583,16 @@
   9.463                    exit (0);
   9.464                }
   9.465  EOF
   9.466 -	($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
   9.467 +	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
   9.468 +	if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
   9.469  	rm -f $dummy.c $dummy
   9.470 +	fi ;;
   9.471  	esac
   9.472 +	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
   9.473 +	exit 0 ;;
   9.474 +    ia64:HP-UX:*:*)
   9.475  	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
   9.476 -	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
   9.477 +	echo ia64-hp-hpux${HPUX_REV}
   9.478  	exit 0 ;;
   9.479      3050*:HI-UX:*:*)
   9.480  	sed 's/^	//' << EOF >$dummy.c
   9.481 @@ -485,7 +620,7 @@
   9.482  	  exit (0);
   9.483  	}
   9.484  EOF
   9.485 -	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
   9.486 +	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
   9.487  	rm -f $dummy.c $dummy
   9.488  	echo unknown-hitachi-hiuxwe2
   9.489  	exit 0 ;;
   9.490 @@ -547,29 +682,30 @@
   9.491  	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
   9.492  	exit 0 ;;
   9.493      CRAY*TS:*:*:*)
   9.494 -	echo t90-cray-unicos${UNAME_RELEASE}
   9.495 +	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   9.496 +	exit 0 ;;
   9.497 +    CRAY*T3D:*:*:*)
   9.498 +	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   9.499  	exit 0 ;;
   9.500      CRAY*T3E:*:*:*)
   9.501 -	echo t3e-cray-unicosmk${UNAME_RELEASE}
   9.502 +	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   9.503 +	exit 0 ;;
   9.504 +    CRAY*SV1:*:*:*)
   9.505 +	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   9.506  	exit 0 ;;
   9.507      CRAY-2:*:*:*)
   9.508  	echo cray2-cray-unicos
   9.509          exit 0 ;;
   9.510 -    F300:UNIX_System_V:*:*)
   9.511 +    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
   9.512 +	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   9.513          FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   9.514          FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   9.515 -        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   9.516 +        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   9.517          exit 0 ;;
   9.518 -    F301:UNIX_System_V:*:*)
   9.519 -       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
   9.520 -       exit 0 ;;
   9.521 -    hp3[0-9][05]:NetBSD:*:*)
   9.522 -	echo m68k-hp-netbsd${UNAME_RELEASE}
   9.523 -	exit 0 ;;
   9.524      hp300:OpenBSD:*:*)
   9.525  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   9.526  	exit 0 ;;
   9.527 -    i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
   9.528 +    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   9.529  	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
   9.530  	exit 0 ;;
   9.531      sparc*:BSD/OS:*:*)
   9.532 @@ -579,17 +715,8 @@
   9.533  	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
   9.534  	exit 0 ;;
   9.535      *:FreeBSD:*:*)
   9.536 -	if test -x /usr/bin/objformat; then
   9.537 -	    if test "elf" = "`/usr/bin/objformat`"; then
   9.538 -		echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
   9.539 -		exit 0
   9.540 -	    fi
   9.541 -	fi
   9.542  	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
   9.543  	exit 0 ;;
   9.544 -    *:NetBSD:*:*)
   9.545 -	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   9.546 -	exit 0 ;;
   9.547      *:OpenBSD:*:*)
   9.548  	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   9.549  	exit 0 ;;
   9.550 @@ -599,6 +726,9 @@
   9.551      i*:MINGW*:*)
   9.552  	echo ${UNAME_MACHINE}-pc-mingw32
   9.553  	exit 0 ;;
   9.554 +    i*:PW*:*)
   9.555 +	echo ${UNAME_MACHINE}-pc-pw32
   9.556 +	exit 0 ;;
   9.557      i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
   9.558  	# How do we know it's Interix rather than the generic POSIX subsystem?
   9.559  	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
   9.560 @@ -617,34 +747,41 @@
   9.561      *:GNU:*:*)
   9.562  	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
   9.563  	exit 0 ;;
   9.564 -    *:Linux:*:*)
   9.565 -#	# uname on the ARM produces all sorts of strangeness, and we need to
   9.566 -#	# filter it out.
   9.567 -#	case "$UNAME_MACHINE" in
   9.568 -#	  armv*)		      UNAME_MACHINE=$UNAME_MACHINE ;;
   9.569 -#	  arm* | sa110*)	      UNAME_MACHINE="arm" ;;
   9.570 -#	esac
   9.571 -
   9.572 -	# The BFD linker knows what the default object file format is, so
   9.573 -	# first see if it will tell us. cd to the root directory to prevent
   9.574 -	# problems with other programs or directories called `ld' in the path.
   9.575 -	ld_help_string=`cd /; ld --help 2>&1`
   9.576 -	ld_supported_emulations=`echo $ld_help_string \
   9.577 -			 | sed -ne '/supported emulations:/!d
   9.578 -				    s/[ 	][ 	]*/ /g
   9.579 -				    s/.*supported emulations: *//
   9.580 -				    s/ .*//
   9.581 -				    p'`
   9.582 -        case "$ld_supported_emulations" in
   9.583 -	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
   9.584 -	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
   9.585 -	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   9.586 -	  armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   9.587 -	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   9.588 -	  elf32arm)   echo "${UNAME_MACHINE}-unknown-linux-gnu"     ; exit 0 ;;
   9.589 -	  elf32ppc)
   9.590 -		# Determine Lib Version
   9.591 -		cat >$dummy.c <<EOF
   9.592 +    i*86:Minix:*:*)
   9.593 +	echo ${UNAME_MACHINE}-pc-minix
   9.594 +	exit 0 ;;
   9.595 +    arm*:Linux:*:*)
   9.596 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   9.597 +	exit 0 ;;
   9.598 +    ia64:Linux:*:*)
   9.599 +	echo ${UNAME_MACHINE}-unknown-linux
   9.600 +	exit 0 ;;
   9.601 +    m68*:Linux:*:*)
   9.602 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   9.603 +	exit 0 ;;
   9.604 +    mips:Linux:*:*)
   9.605 +	cat >$dummy.c <<EOF
   9.606 +#ifdef __cplusplus
   9.607 +#include <stdio.h>  /* for printf() prototype */
   9.608 +int main (int argc, char *argv[]) {
   9.609 +#else
   9.610 +int main (argc, argv) int argc; char *argv[]; {
   9.611 +#endif
   9.612 +#ifdef __MIPSEB__
   9.613 +  printf ("%s-unknown-linux-gnu\n", argv[1]);
   9.614 +#endif
   9.615 +#ifdef __MIPSEL__
   9.616 +  printf ("%sel-unknown-linux-gnu\n", argv[1]);
   9.617 +#endif
   9.618 +  return 0;
   9.619 +}
   9.620 +EOF
   9.621 +	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
   9.622 +	rm -f $dummy.c $dummy
   9.623 +	;;
   9.624 +    ppc:Linux:*:*)
   9.625 +	# Determine Lib Version
   9.626 +	cat >$dummy.c <<EOF
   9.627  #include <features.h>
   9.628  #if defined(__GLIBC__)
   9.629  extern char __libc_version[];
   9.630 @@ -657,110 +794,130 @@
   9.631  #if defined(__GLIBC__)
   9.632    printf("%s %s\n", __libc_version, __libc_release);
   9.633  #else
   9.634 -  printf("unkown\n");
   9.635 +  printf("unknown\n");
   9.636  #endif
   9.637    return 0;
   9.638  }
   9.639  EOF
   9.640 -		LIBC=""
   9.641 -		$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
   9.642 -		if test "$?" = 0 ; then
   9.643 -			./$dummy | grep 1\.99 > /dev/null
   9.644 -			if test "$?" = 0 ; then
   9.645 -				LIBC="libc1"
   9.646 -			fi
   9.647 -		fi	
   9.648 -		rm -f $dummy.c $dummy
   9.649 -		echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
   9.650 -	esac
   9.651 -
   9.652 -	if test "${UNAME_MACHINE}" = "alpha" ; then
   9.653 -		sed 's/^	//'  <<EOF >$dummy.s
   9.654 +	LIBC=""
   9.655 +	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
   9.656 +	if test "$?" = 0 ; then
   9.657 +		./$dummy | grep 1\.99 > /dev/null
   9.658 +		if test "$?" = 0 ; then LIBC="libc1" ; fi
   9.659 +	fi
   9.660 +	rm -f $dummy.c $dummy
   9.661 +	echo powerpc-unknown-linux-gnu${LIBC}
   9.662 +	exit 0 ;;
   9.663 +    alpha:Linux:*:*)
   9.664 +	cat <<EOF >$dummy.s
   9.665 +	  .data
   9.666 +	  \$Lformat:
   9.667 +		.byte 37,100,45,37,120,10,0	# "%d-%x\n"
   9.668 +	   .text
   9.669  		.globl main
   9.670 +		.align 4
   9.671  		.ent main
   9.672 -	main:
   9.673 -		.frame \$30,0,\$26,0
   9.674 -		.prologue 0
   9.675 -		.long 0x47e03d80 # implver $0
   9.676 -		lda \$2,259
   9.677 -		.long 0x47e20c21 # amask $2,$1
   9.678 -		srl \$1,8,\$2
   9.679 -		sll \$2,2,\$2
   9.680 -		sll \$0,3,\$0
   9.681 -		addl \$1,\$0,\$0
   9.682 -		addl \$2,\$0,\$0
   9.683 -		ret \$31,(\$26),1
   9.684 +	    main:
   9.685 +		.frame \$30,16,\$26,0
   9.686 +		ldgp \$29,0(\$27)
   9.687 +		.prologue 1
   9.688 +		.long 0x47e03d80 # implver \$0
   9.689 +		lda \$2,-1
   9.690 +		.long 0x47e20c21 # amask \$2,\$1
   9.691 +		lda \$16,\$Lformat
   9.692 +		mov \$0,\$17
   9.693 +		not \$1,\$18
   9.694 +		jsr \$26,printf
   9.695 +		ldgp \$29,0(\$26)
   9.696 +		mov 0,\$16
   9.697 +		jsr \$26,exit
   9.698  		.end main
   9.699  EOF
   9.700 -		LIBC=""
   9.701 -		$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   9.702 +	LIBC=""
   9.703 +	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   9.704 +	if test "$?" = 0 ; then
   9.705 +		case `./$dummy` in
   9.706 +		0-0)	UNAME_MACHINE="alpha" ;;
   9.707 +		1-0)	UNAME_MACHINE="alphaev5" ;;
   9.708 +		1-1)    UNAME_MACHINE="alphaev56" ;;
   9.709 +		1-101)	UNAME_MACHINE="alphapca56" ;;
   9.710 +		2-303)	UNAME_MACHINE="alphaev6" ;;
   9.711 +		2-307)	UNAME_MACHINE="alphaev67" ;;
   9.712 +		esac
   9.713 +		objdump --private-headers $dummy | \
   9.714 +		  grep ld.so.1 > /dev/null
   9.715  		if test "$?" = 0 ; then
   9.716 -			./$dummy
   9.717 -			case "$?" in
   9.718 -			7)
   9.719 -				UNAME_MACHINE="alpha"
   9.720 -				;;
   9.721 -			15)
   9.722 -				UNAME_MACHINE="alphaev5"
   9.723 -				;;
   9.724 -			14)
   9.725 -				UNAME_MACHINE="alphaev56"
   9.726 -				;;
   9.727 -			10)
   9.728 -				UNAME_MACHINE="alphapca56"
   9.729 -				;;
   9.730 -			16)
   9.731 -				UNAME_MACHINE="alphaev6"
   9.732 -				;;
   9.733 -			esac
   9.734 -
   9.735 -			objdump --private-headers $dummy | \
   9.736 -			  grep ld.so.1 > /dev/null
   9.737 -			if test "$?" = 0 ; then
   9.738 -				LIBC="libc1"
   9.739 -			fi
   9.740 +			LIBC="libc1"
   9.741  		fi
   9.742 -		rm -f $dummy.s $dummy
   9.743 -		echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
   9.744 -	elif test "${UNAME_MACHINE}" = "mips" ; then
   9.745 -	  cat >$dummy.c <<EOF
   9.746 -#ifdef __cplusplus
   9.747 -	int main (int argc, char *argv[]) {
   9.748 -#else
   9.749 -	int main (argc, argv) int argc; char *argv[]; {
   9.750 -#endif
   9.751 -#ifdef __MIPSEB__
   9.752 -  printf ("%s-unknown-linux-gnu\n", argv[1]);
   9.753 -#endif
   9.754 -#ifdef __MIPSEL__
   9.755 -  printf ("%sel-unknown-linux-gnu\n", argv[1]);
   9.756 -#endif
   9.757 -  return 0;
   9.758 -}
   9.759 -EOF
   9.760 -	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
   9.761 -	  rm -f $dummy.c $dummy
   9.762 -	else
   9.763 -	  # Either a pre-BFD a.out linker (linux-gnuoldld)
   9.764 -	  # or one that does not give us useful --help.
   9.765 -	  # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
   9.766 -	  # If ld does not provide *any* "supported emulations:"
   9.767 -	  # that means it is gnuoldld.
   9.768 -	  echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
   9.769 -	  test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
   9.770 -
   9.771 -	  case "${UNAME_MACHINE}" in
   9.772 -	  i?86)
   9.773 -	    VENDOR=pc;
   9.774 -	    ;;
   9.775 -	  *)
   9.776 -	    VENDOR=unknown;
   9.777 -	    ;;
   9.778 -	  esac
   9.779 -	  # Determine whether the default compiler is a.out or elf
   9.780 -	  cat >$dummy.c <<EOF
   9.781 +	fi
   9.782 +	rm -f $dummy.s $dummy
   9.783 +	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
   9.784 +	exit 0 ;;
   9.785 +    parisc:Linux:*:* | hppa:Linux:*:*)
   9.786 +	# Look for CPU level
   9.787 +	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
   9.788 +	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
   9.789 +	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
   9.790 +	  *)    echo hppa-unknown-linux-gnu ;;
   9.791 +	esac
   9.792 +	exit 0 ;;
   9.793 +    parisc64:Linux:*:* | hppa64:Linux:*:*)
   9.794 +	echo hppa64-unknown-linux-gnu
   9.795 +	exit 0 ;;
   9.796 +    s390:Linux:*:* | s390x:Linux:*:*)
   9.797 +	echo ${UNAME_MACHINE}-ibm-linux
   9.798 +	exit 0 ;;
   9.799 +    sh*:Linux:*:*)
   9.800 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   9.801 +	exit 0 ;;
   9.802 +    sparc:Linux:*:* | sparc64:Linux:*:*)
   9.803 +	echo ${UNAME_MACHINE}-unknown-linux-gnu
   9.804 +	exit 0 ;;
   9.805 +    x86_64:Linux:*:*)
   9.806 +	echo x86_64-unknown-linux-gnu
   9.807 +	exit 0 ;;
   9.808 +    i?86:Linux:*:*)
   9.809 +	# The BFD linker knows what the default object file format is, so
   9.810 +	# first see if it will tell us. cd to the root directory to prevent
   9.811 +	# problems with other programs or directories called `ld' in the path.
   9.812 +	ld_supported_emulations=`cd /; ld --help 2>&1 \
   9.813 +			 | sed -ne '/supported emulations:/!d
   9.814 +				    s/[ 	][ 	]*/ /g
   9.815 +				    s/.*supported emulations: *//
   9.816 +				    s/ .*//
   9.817 +				    p'`
   9.818 +        case "$ld_supported_emulations" in
   9.819 +	  i?86linux)
   9.820 +		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
   9.821 +		exit 0
   9.822 +		;;
   9.823 +	  elf_i?86)
   9.824 +		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
   9.825 +		;;
   9.826 +	  i?86coff)
   9.827 +		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
   9.828 +		exit 0
   9.829 +		;;
   9.830 +	esac
   9.831 +	# Either a pre-BFD a.out linker (linux-gnuoldld)
   9.832 +	# or one that does not give us useful --help.
   9.833 +	# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
   9.834 +	# If ld does not provide *any* "supported emulations:"
   9.835 +	# that means it is gnuoldld.
   9.836 +	test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
   9.837 +	case "${UNAME_MACHINE}" in
   9.838 +	i?86)
   9.839 +	  VENDOR=pc;
   9.840 +	  ;;
   9.841 +	*)
   9.842 +	  VENDOR=unknown;
   9.843 +	  ;;
   9.844 +	esac
   9.845 +	# Determine whether the default compiler is a.out or elf
   9.846 +	cat >$dummy.c <<EOF
   9.847  #include <features.h>
   9.848  #ifdef __cplusplus
   9.849 +#include <stdio.h>  /* for printf() prototype */
   9.850  	int main (int argc, char *argv[]) {
   9.851  #else
   9.852  	int main (argc, argv) int argc; char *argv[]; {
   9.853 @@ -781,9 +938,10 @@
   9.854    return 0;
   9.855  }
   9.856  EOF
   9.857 -	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
   9.858 -	  rm -f $dummy.c $dummy
   9.859 -	fi ;;
   9.860 +	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
   9.861 +	rm -f $dummy.c $dummy
   9.862 +	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
   9.863 +	;;
   9.864  # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
   9.865  # are messed up and put the nodename in both sysname and nodename.
   9.866      i?86:DYNIX/ptx:4*:*)
   9.867 @@ -798,19 +956,21 @@
   9.868  	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
   9.869  	exit 0 ;;
   9.870      i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
   9.871 +	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
   9.872  	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
   9.873 -		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
   9.874 +		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
   9.875  	else
   9.876 -		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
   9.877 +		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
   9.878  	fi
   9.879  	exit 0 ;;
   9.880      i?86:*:5:7*)
   9.881 -	UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
   9.882 -	(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
   9.883 -	(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
   9.884 -	(/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
   9.885 -	(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
   9.886 -	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
   9.887 +        # Fixed at (any) Pentium or better
   9.888 +        UNAME_MACHINE=i586
   9.889 +        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
   9.890 +	    echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
   9.891 +	else
   9.892 +	    echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
   9.893 +	fi
   9.894  	exit 0 ;;
   9.895      i?86:*:3.2:*)
   9.896  	if test -f /usr/options/cb.name; then
   9.897 @@ -830,7 +990,11 @@
   9.898  		echo ${UNAME_MACHINE}-pc-sysv32
   9.899  	fi
   9.900  	exit 0 ;;
   9.901 +    i?86:*DOS:*:*)
   9.902 +	echo ${UNAME_MACHINE}-pc-msdosdjgpp
   9.903 +	exit 0 ;;
   9.904      pc:*:*:*)
   9.905 +	# Left here for compatibility:
   9.906          # uname -m prints for DJGPP always 'pc', but it prints nothing about
   9.907          # the processor, so we play safe by assuming i386.
   9.908  	echo i386-pc-msdosdjgpp
   9.909 @@ -854,7 +1018,7 @@
   9.910  	exit 0 ;;
   9.911      M68*:*:R3V[567]*:*)
   9.912  	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
   9.913 -    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
   9.914 +    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
   9.915  	OS_REL=''
   9.916  	test -r /etc/.relid \
   9.917  	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
   9.918 @@ -877,9 +1041,12 @@
   9.919      TSUNAMI:LynxOS:2.*:*)
   9.920  	echo sparc-unknown-lynxos${UNAME_RELEASE}
   9.921  	exit 0 ;;
   9.922 -    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
   9.923 +    rs6000:LynxOS:2.*:*)
   9.924  	echo rs6000-unknown-lynxos${UNAME_RELEASE}
   9.925  	exit 0 ;;
   9.926 +    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
   9.927 +	echo powerpc-unknown-lynxos${UNAME_RELEASE}
   9.928 +	exit 0 ;;
   9.929      SM[BE]S:UNIX_SV:*:*)
   9.930  	echo mips-dde-sysv${UNAME_RELEASE}
   9.931  	exit 0 ;;
   9.932 @@ -913,7 +1080,7 @@
   9.933      mc68*:A/UX:*:*)
   9.934  	echo m68k-apple-aux${UNAME_RELEASE}
   9.935  	exit 0 ;;
   9.936 -    news*:NEWS-OS:*:6*)
   9.937 +    news*:NEWS-OS:6*:*)
   9.938  	echo mips-sony-newsos6
   9.939  	exit 0 ;;
   9.940      R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
   9.941 @@ -944,6 +1111,64 @@
   9.942      *:Rhapsody:*:*)
   9.943  	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
   9.944  	exit 0 ;;
   9.945 +    *:Darwin:*:*)
   9.946 +	echo `uname -p`-apple-darwin${UNAME_RELEASE}
   9.947 +	exit 0 ;;
   9.948 +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
   9.949 +	if test "${UNAME_MACHINE}" = "x86pc"; then
   9.950 +		UNAME_MACHINE=pc
   9.951 +	fi
   9.952 +	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
   9.953 +	exit 0 ;;
   9.954 +    *:QNX:*:4*)
   9.955 +	echo i386-pc-qnx
   9.956 +	exit 0 ;;
   9.957 +    NSR-[KW]:NONSTOP_KERNEL:*:*)
   9.958 +	echo nsr-tandem-nsk${UNAME_RELEASE}
   9.959 +	exit 0 ;;
   9.960 +    *:NonStop-UX:*:*)
   9.961 +	echo mips-compaq-nonstopux
   9.962 +	exit 0 ;;
   9.963 +    BS2000:POSIX*:*:*)
   9.964 +	echo bs2000-siemens-sysv
   9.965 +	exit 0 ;;
   9.966 +    DS/*:UNIX_System_V:*:*)
   9.967 +	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
   9.968 +	exit 0 ;;
   9.969 +    *:Plan9:*:*)
   9.970 +	# "uname -m" is not consistent, so use $cputype instead. 386
   9.971 +	# is converted to i386 for consistency with other x86
   9.972 +	# operating systems.
   9.973 +	if test "$cputype" = "386"; then
   9.974 +	    UNAME_MACHINE=i386
   9.975 +	else
   9.976 +	    UNAME_MACHINE="$cputype"
   9.977 +	fi
   9.978 +	echo ${UNAME_MACHINE}-unknown-plan9
   9.979 +	exit 0 ;;
   9.980 +    i?86:OS/2:*:*)
   9.981 +	# If we were able to find `uname', then EMX Unix compatibility
   9.982 +	# is probably installed.
   9.983 +	echo ${UNAME_MACHINE}-pc-os2-emx
   9.984 +	exit 0 ;;
   9.985 +    *:TOPS-10:*:*)
   9.986 +	echo pdp10-unknown-tops10
   9.987 +	exit 0 ;;
   9.988 +    *:TENEX:*:*)
   9.989 +	echo pdp10-unknown-tenex
   9.990 +	exit 0 ;;
   9.991 +    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
   9.992 +	echo pdp10-dec-tops20
   9.993 +	exit 0 ;;
   9.994 +    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
   9.995 +	echo pdp10-xkl-tops20
   9.996 +	exit 0 ;;
   9.997 +    *:TOPS-20:*:*)
   9.998 +	echo pdp10-unknown-tops20
   9.999 +	exit 0 ;;
  9.1000 +    *:ITS:*:*)
  9.1001 +	echo pdp10-unknown-its
  9.1002 +	exit 0 ;;
  9.1003  esac
  9.1004  
  9.1005  #echo '(No uname command or uname output not recognized.)' 1>&2
  9.1006 @@ -1035,11 +1260,24 @@
  9.1007  #endif
  9.1008  
  9.1009  #if defined (vax)
  9.1010 -#if !defined (ultrix)
  9.1011 -  printf ("vax-dec-bsd\n"); exit (0);
  9.1012 -#else
  9.1013 -  printf ("vax-dec-ultrix\n"); exit (0);
  9.1014 -#endif
  9.1015 +# if !defined (ultrix)
  9.1016 +#  include <sys/param.h>
  9.1017 +#  if defined (BSD)
  9.1018 +#   if BSD == 43
  9.1019 +      printf ("vax-dec-bsd4.3\n"); exit (0);
  9.1020 +#   else
  9.1021 +#    if BSD == 199006
  9.1022 +      printf ("vax-dec-bsd4.3reno\n"); exit (0);
  9.1023 +#    else
  9.1024 +      printf ("vax-dec-bsd\n"); exit (0);
  9.1025 +#    endif
  9.1026 +#   endif
  9.1027 +#  else
  9.1028 +    printf ("vax-dec-bsd\n"); exit (0);
  9.1029 +#  endif
  9.1030 +# else
  9.1031 +    printf ("vax-dec-ultrix\n"); exit (0);
  9.1032 +# endif
  9.1033  #endif
  9.1034  
  9.1035  #if defined (alliant) && defined (i860)
  9.1036 @@ -1050,7 +1288,7 @@
  9.1037  }
  9.1038  EOF
  9.1039  
  9.1040 -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
  9.1041 +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
  9.1042  rm -f $dummy.c $dummy
  9.1043  
  9.1044  # Apollos put the system type in the environment.
  9.1045 @@ -1083,6 +1321,48 @@
  9.1046      esac
  9.1047  fi
  9.1048  
  9.1049 -#echo '(Unable to guess system type)' 1>&2
  9.1050 +cat >&2 <<EOF
  9.1051 +$0: unable to guess system type
  9.1052 +
  9.1053 +This script, last modified $timestamp, has failed to recognize
  9.1054 +the operating system you are using. It is advised that you
  9.1055 +download the most up to date version of the config scripts from
  9.1056 +
  9.1057 +    ftp://ftp.gnu.org/pub/gnu/config/
  9.1058 +
  9.1059 +If the version you run ($0) is already up to date, please
  9.1060 +send the following data and any information you think might be
  9.1061 +pertinent to <config-patches@gnu.org> in order to provide the needed
  9.1062 +information to handle your system.
  9.1063 +
  9.1064 +config.guess timestamp = $timestamp
  9.1065 +
  9.1066 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
  9.1067 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
  9.1068 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
  9.1069 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
  9.1070 +
  9.1071 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
  9.1072 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
  9.1073 +
  9.1074 +hostinfo               = `(hostinfo) 2>/dev/null`
  9.1075 +/bin/universe          = `(/bin/universe) 2>/dev/null`
  9.1076 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
  9.1077 +/bin/arch              = `(/bin/arch) 2>/dev/null`
  9.1078 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
  9.1079 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
  9.1080 +
  9.1081 +UNAME_MACHINE = ${UNAME_MACHINE}
  9.1082 +UNAME_RELEASE = ${UNAME_RELEASE}
  9.1083 +UNAME_SYSTEM  = ${UNAME_SYSTEM}
  9.1084 +UNAME_VERSION = ${UNAME_VERSION}
  9.1085 +EOF
  9.1086  
  9.1087  exit 1
  9.1088 +
  9.1089 +# Local variables:
  9.1090 +# eval: (add-hook 'write-file-hooks 'time-stamp)
  9.1091 +# time-stamp-start: "timestamp='"
  9.1092 +# time-stamp-format: "%:y-%02m-%02d"
  9.1093 +# time-stamp-end: "'"
  9.1094 +# End:
    10.1 --- a/test/config.sub	Sun Jun 10 05:02:38 2001 +0000
    10.2 +++ b/test/config.sub	Sun Jun 10 18:20:23 2001 +0000
    10.3 @@ -1,6 +1,10 @@
    10.4  #! /bin/sh
    10.5 -# Configuration validation subroutine script, version 1.1.
    10.6 -#   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
    10.7 +# Configuration validation subroutine script.
    10.8 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    10.9 +#   Free Software Foundation, Inc.
   10.10 +
   10.11 +timestamp='2001-03-19'
   10.12 +
   10.13  # This file is (in principle) common to ALL GNU software.
   10.14  # The presence of a machine in this file suggests that SOME GNU software
   10.15  # can handle that machine.  It does not imply ALL GNU software can.
   10.16 @@ -25,6 +29,8 @@
   10.17  # configuration script generated by Autoconf, you may include it under
   10.18  # the same distribution terms that you use for the rest of that program.
   10.19  
   10.20 +# Please send patches to <config-patches@gnu.org>.
   10.21 +#
   10.22  # Configuration subroutine to validate and canonicalize a configuration type.
   10.23  # Supply the specified configuration type as an argument.
   10.24  # If it is invalid, we print an error message on stderr and exit with code 1.
   10.25 @@ -45,30 +51,73 @@
   10.26  #	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
   10.27  # It is wrong to echo any other type of specification.
   10.28  
   10.29 -if [ x$1 = x ]
   10.30 -then
   10.31 -	echo Configuration name missing. 1>&2
   10.32 -	echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
   10.33 -	echo "or     $0 ALIAS" 1>&2
   10.34 -	echo where ALIAS is a recognized configuration type. 1>&2
   10.35 -	exit 1
   10.36 -fi
   10.37 +me=`echo "$0" | sed -e 's,.*/,,'`
   10.38  
   10.39 -# First pass through any local machine types.
   10.40 -case $1 in
   10.41 -	*local*)
   10.42 -		echo $1
   10.43 -		exit 0
   10.44 -		;;
   10.45 -	*)
   10.46 -	;;
   10.47 +usage="\
   10.48 +Usage: $0 [OPTION] CPU-MFR-OPSYS
   10.49 +       $0 [OPTION] ALIAS
   10.50 +
   10.51 +Canonicalize a configuration name.
   10.52 +
   10.53 +Operation modes:
   10.54 +  -h, --help         print this help, then exit
   10.55 +  -t, --time-stamp   print date of last modification, then exit
   10.56 +  -v, --version      print version number, then exit
   10.57 +
   10.58 +Report bugs and patches to <config-patches@gnu.org>."
   10.59 +
   10.60 +version="\
   10.61 +GNU config.sub ($timestamp)
   10.62 +
   10.63 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
   10.64 +Free Software Foundation, Inc.
   10.65 +
   10.66 +This is free software; see the source for copying conditions.  There is NO
   10.67 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
   10.68 +
   10.69 +help="
   10.70 +Try \`$me --help' for more information."
   10.71 +
   10.72 +# Parse command line
   10.73 +while test $# -gt 0 ; do
   10.74 +  case $1 in
   10.75 +    --time-stamp | --time* | -t )
   10.76 +       echo "$timestamp" ; exit 0 ;;
   10.77 +    --version | -v )
   10.78 +       echo "$version" ; exit 0 ;;
   10.79 +    --help | --h* | -h )
   10.80 +       echo "$usage"; exit 0 ;;
   10.81 +    -- )     # Stop option processing
   10.82 +       shift; break ;;
   10.83 +    - )	# Use stdin as input.
   10.84 +       break ;;
   10.85 +    -* )
   10.86 +       echo "$me: invalid option $1$help"
   10.87 +       exit 1 ;;
   10.88 +
   10.89 +    *local*)
   10.90 +       # First pass through any local machine types.
   10.91 +       echo $1
   10.92 +       exit 0;;
   10.93 +
   10.94 +    * )
   10.95 +       break ;;
   10.96 +  esac
   10.97 +done
   10.98 +
   10.99 +case $# in
  10.100 + 0) echo "$me: missing argument$help" >&2
  10.101 +    exit 1;;
  10.102 + 1) ;;
  10.103 + *) echo "$me: too many arguments$help" >&2
  10.104 +    exit 1;;
  10.105  esac
  10.106  
  10.107  # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
  10.108  # Here we must recognize all the valid KERNEL-OS combinations.
  10.109  maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
  10.110  case $maybe_os in
  10.111 -  linux-gnu*)
  10.112 +  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
  10.113      os=-$maybe_os
  10.114      basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
  10.115      ;;
  10.116 @@ -94,7 +143,7 @@
  10.117  	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  10.118  	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  10.119  	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
  10.120 -	-apple)
  10.121 +	-apple | -axis)
  10.122  		os=
  10.123  		basic_machine=$1
  10.124  		;;
  10.125 @@ -105,7 +154,7 @@
  10.126  	-scout)
  10.127  		;;
  10.128  	-wrs)
  10.129 -		os=vxworks
  10.130 +		os=-vxworks
  10.131  		basic_machine=$1
  10.132  		;;
  10.133  	-hiux*)
  10.134 @@ -156,33 +205,49 @@
  10.135  	-psos*)
  10.136  		os=-psos
  10.137  		;;
  10.138 +	-mint | -mint[0-9]*)
  10.139 +		basic_machine=m68k-atari
  10.140 +		os=-mint
  10.141 +		;;
  10.142  esac
  10.143  
  10.144  # Decode aliases for certain CPU-COMPANY combinations.
  10.145  case $basic_machine in
  10.146  	# Recognize the basic CPU types without company name.
  10.147  	# Some are omitted here because they have special meanings below.
  10.148 -	tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
  10.149 -		| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
  10.150 +	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
  10.151 +	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
  10.152 +		| pyramid | mn10200 | mn10300 | tron | a29k \
  10.153  		| 580 | i960 | h8300 \
  10.154 +		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
  10.155  		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
  10.156 -		| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
  10.157 -		| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
  10.158 -		| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
  10.159 +		| hppa64 \
  10.160 +		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
  10.161 +		| alphaev6[78] \
  10.162 +		| we32k | ns16k | clipper | i370 | sh | sh[34] \
  10.163 +		| powerpc | powerpcle \
  10.164 +		| 1750a | dsp16xx | pdp10 | pdp11 \
  10.165 +		| mips16 | mips64 | mipsel | mips64el \
  10.166  		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
  10.167  		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
  10.168 -		| mips64vr5000 | miprs64vr5000el \
  10.169 -		| armv[34][lb] | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
  10.170 -		| thumb | d10v)
  10.171 +		| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
  10.172 +		| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
  10.173 +		| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
  10.174 +		| pj | pjl | h8500)
  10.175  		basic_machine=$basic_machine-unknown
  10.176  		;;
  10.177 -	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
  10.178 +	m6811 | m68hc11 | m6812 | m68hc12)
  10.179 +		# Motorola 68HC11/12.
  10.180 +		basic_machine=$basic_machine-unknown
  10.181 +		os=-none
  10.182 +		;;
  10.183 +	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
  10.184  		;;
  10.185  
  10.186  	# We use `pc' rather than `unknown'
  10.187  	# because (1) that's what they normally are, and
  10.188  	# (2) the word "unknown" tends to confuse beginning users.
  10.189 -	i[34567]86)
  10.190 +	i[234567]86 | x86_64)
  10.191  	  basic_machine=$basic_machine-pc
  10.192  	  ;;
  10.193  	# Object if more than one company name word.
  10.194 @@ -191,24 +256,30 @@
  10.195  		exit 1
  10.196  		;;
  10.197  	# Recognize the basic CPU types with company name.
  10.198 -	vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
  10.199 -	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
  10.200 +	# FIXME: clean up the formatting here.
  10.201 +	vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
  10.202 +	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
  10.203 +	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
  10.204  	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  10.205  	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
  10.206  	      | xmp-* | ymp-* \
  10.207 -	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
  10.208 -	      | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
  10.209 +	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
  10.210 +	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
  10.211 +	      | hppa2.0n-* | hppa64-* \
  10.212 +	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
  10.213 +	      | alphaev6[78]-* \
  10.214  	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
  10.215  	      | clipper-* | orion-* \
  10.216 -	      | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
  10.217 +	      | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
  10.218  	      | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
  10.219  	      | mips64el-* | mips64orion-* | mips64orionel-* \
  10.220  	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
  10.221 -	      | mipstx39-* | mipstx39el-* \
  10.222 -	      | armv[34][lb]-* \
  10.223 -	      | f301-* | armv*-* | t3e-* \
  10.224 +	      | mipstx39-* | mipstx39el-* | mcore-* \
  10.225 +	      | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
  10.226 +	      | [cjt]90-* \
  10.227  	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
  10.228 -	      | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
  10.229 +	      | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
  10.230 +	      | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
  10.231  		;;
  10.232  	# Recognize the various machine names and aliases which stand
  10.233  	# for a CPU type and a company and sometimes even an OS.
  10.234 @@ -245,14 +316,14 @@
  10.235  		os=-sysv
  10.236  		;;
  10.237  	amiga | amiga-*)
  10.238 -		basic_machine=m68k-cbm
  10.239 +		basic_machine=m68k-unknown
  10.240  		;;
  10.241  	amigaos | amigados)
  10.242 -		basic_machine=m68k-cbm
  10.243 +		basic_machine=m68k-unknown
  10.244  		os=-amigaos
  10.245  		;;
  10.246  	amigaunix | amix)
  10.247 -		basic_machine=m68k-cbm
  10.248 +		basic_machine=m68k-unknown
  10.249  		os=-sysv4
  10.250  		;;
  10.251  	apollo68)
  10.252 @@ -299,13 +370,16 @@
  10.253  		basic_machine=cray2-cray
  10.254  		os=-unicos
  10.255  		;;
  10.256 -	[ctj]90-cray)
  10.257 -		basic_machine=c90-cray
  10.258 +	[cjt]90)
  10.259 +		basic_machine=${basic_machine}-cray
  10.260  		os=-unicos
  10.261  		;;
  10.262  	crds | unos)
  10.263  		basic_machine=m68k-crds
  10.264  		;;
  10.265 +	cris | cris-* | etrax*)
  10.266 +		basic_machine=cris-axis
  10.267 +		;;
  10.268  	da30 | da30-*)
  10.269  		basic_machine=m68k-da30
  10.270  		;;
  10.271 @@ -353,6 +427,10 @@
  10.272  		basic_machine=tron-gmicro
  10.273  		os=-sysv
  10.274  		;;
  10.275 +	go32)
  10.276 +		basic_machine=i386-pc
  10.277 +		os=-go32
  10.278 +		;;
  10.279  	h3050r* | hiux*)
  10.280  		basic_machine=hppa1.1-hitachi
  10.281  		os=-hiuxwe2
  10.282 @@ -426,7 +504,6 @@
  10.283  		;;
  10.284  	i370-ibm* | ibm*)
  10.285  		basic_machine=i370-ibm
  10.286 -		os=-mvs
  10.287  		;;
  10.288  # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
  10.289  	i[34567]86v32)
  10.290 @@ -453,14 +530,6 @@
  10.291  		basic_machine=i386-unknown
  10.292  		os=-vsta
  10.293  		;;
  10.294 -	i386-go32 | go32)
  10.295 -		basic_machine=i386-unknown
  10.296 -		os=-go32
  10.297 -		;;
  10.298 -	i386-mingw32 | mingw32)
  10.299 -		basic_machine=i386-unknown
  10.300 -		os=-mingw32
  10.301 -		;;
  10.302  	iris | iris4d)
  10.303  		basic_machine=mips-sgi
  10.304  		case $os in
  10.305 @@ -486,10 +555,14 @@
  10.306  		basic_machine=ns32k-utek
  10.307  		os=-sysv
  10.308  		;;
  10.309 +	mingw32)
  10.310 +		basic_machine=i386-pc
  10.311 +		os=-mingw32
  10.312 +		;;
  10.313  	miniframe)
  10.314  		basic_machine=m68000-convergent
  10.315  		;;
  10.316 -	*mint | *MiNT)
  10.317 +	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
  10.318  		basic_machine=m68k-atari
  10.319  		os=-mint
  10.320  		;;
  10.321 @@ -507,14 +580,22 @@
  10.322  	mips3*)
  10.323  		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  10.324  		;;
  10.325 +	mmix*)
  10.326 +		basic_machine=mmix-knuth
  10.327 +		os=-mmixware
  10.328 +		;;
  10.329  	monitor)
  10.330  		basic_machine=m68k-rom68k
  10.331  		os=-coff
  10.332  		;;
  10.333  	msdos)
  10.334 -		basic_machine=i386-unknown
  10.335 +		basic_machine=i386-pc
  10.336  		os=-msdos
  10.337  		;;
  10.338 +	mvs)
  10.339 +		basic_machine=i370-ibm
  10.340 +		os=-mvs
  10.341 +		;;
  10.342  	ncr3000)
  10.343  		basic_machine=i486-ncr
  10.344  		os=-sysv4
  10.345 @@ -524,7 +605,7 @@
  10.346  		os=-netbsd
  10.347  		;;
  10.348  	netwinder)
  10.349 -		basic_machine=armv4l-corel
  10.350 +		basic_machine=armv4l-rebel
  10.351  		os=-linux
  10.352  		;;
  10.353  	news | news700 | news800 | news900)
  10.354 @@ -572,9 +653,16 @@
  10.355  		basic_machine=i960-intel
  10.356  		os=-mon960
  10.357  		;;
  10.358 +	nonstopux)
  10.359 +		basic_machine=mips-compaq
  10.360 +		os=-nonstopux
  10.361 +		;;
  10.362  	np1)
  10.363  		basic_machine=np1-gould
  10.364  		;;
  10.365 +	nsr-tandem)
  10.366 +		basic_machine=nsr-tandem
  10.367 +		;;
  10.368  	op50n-* | op60c-*)
  10.369  		basic_machine=hppa1.1-oki
  10.370  		os=-proelf
  10.371 @@ -604,28 +692,28 @@
  10.372          pc532 | pc532-*)
  10.373  		basic_machine=ns32k-pc532
  10.374  		;;
  10.375 -	pentium | p5 | k5 | k6 | nexen)
  10.376 +	pentium | p5 | k5 | k6 | nexgen)
  10.377  		basic_machine=i586-pc
  10.378  		;;
  10.379 -	pentiumpro | p6 | 6x86)
  10.380 +	pentiumpro | p6 | 6x86 | athlon)
  10.381  		basic_machine=i686-pc
  10.382  		;;
  10.383  	pentiumii | pentium2)
  10.384 -		basic_machine=i786-pc
  10.385 +		basic_machine=i686-pc
  10.386  		;;
  10.387 -	pentium-* | p5-* | k5-* | k6-* | nexen-*)
  10.388 +	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
  10.389  		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  10.390  		;;
  10.391 -	pentiumpro-* | p6-* | 6x86-*)
  10.392 +	pentiumpro-* | p6-* | 6x86-* | athlon-*)
  10.393  		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  10.394  		;;
  10.395  	pentiumii-* | pentium2-*)
  10.396 -		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  10.397 +		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  10.398  		;;
  10.399  	pn)
  10.400  		basic_machine=pn-gould
  10.401  		;;
  10.402 -	power)	basic_machine=rs6000-ibm
  10.403 +	power)	basic_machine=power-ibm
  10.404  		;;
  10.405  	ppc)	basic_machine=powerpc-unknown
  10.406  	        ;;
  10.407 @@ -640,6 +728,10 @@
  10.408  	ps2)
  10.409  		basic_machine=i386-ibm
  10.410  		;;
  10.411 +	pw32)
  10.412 +		basic_machine=i586-unknown
  10.413 +		os=-pw32
  10.414 +		;;
  10.415  	rom68k)
  10.416  		basic_machine=m68k-rom68k
  10.417  		os=-coff
  10.418 @@ -719,6 +811,10 @@
  10.419  	sun386 | sun386i | roadrunner)
  10.420  		basic_machine=i386-sun
  10.421  		;;
  10.422 +	sv1)
  10.423 +		basic_machine=sv1-cray
  10.424 +		os=-unicos
  10.425 +		;;
  10.426  	symmetry)
  10.427  		basic_machine=i386-sequent
  10.428  		os=-dynix
  10.429 @@ -727,6 +823,10 @@
  10.430  		basic_machine=t3e-cray
  10.431  		os=-unicos
  10.432  		;;
  10.433 +	tic54x | c54x*)
  10.434 +		basic_machine=tic54x-unknown
  10.435 +		os=-coff
  10.436 +		;;
  10.437  	tx39)
  10.438  		basic_machine=mipstx39-unknown
  10.439  		;;
  10.440 @@ -822,12 +922,19 @@
  10.441  	vax)
  10.442  		basic_machine=vax-dec
  10.443  		;;
  10.444 +	pdp10)
  10.445 +		# there are many clones, so DEC is not a safe bet
  10.446 +		basic_machine=pdp10-unknown
  10.447 +		;;
  10.448  	pdp11)
  10.449  		basic_machine=pdp11-dec
  10.450  		;;
  10.451  	we32k)
  10.452  		basic_machine=we32k-att
  10.453  		;;
  10.454 +	sh3 | sh4)
  10.455 +		basic_machine=sh-unknown
  10.456 +		;;
  10.457  	sparc | sparcv9)
  10.458  		basic_machine=sparc-sun
  10.459  		;;
  10.460 @@ -908,12 +1015,26 @@
  10.461  	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  10.462  	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  10.463  	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  10.464 -	      | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*)
  10.465 +	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
  10.466 +	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  10.467 +	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
  10.468  	# Remember, each alternative MUST END IN *, to match a version number.
  10.469  		;;
  10.470 +	-qnx*)
  10.471 +		case $basic_machine in
  10.472 +		    x86-* | i[34567]86-*)
  10.473 +			;;
  10.474 +		    *)
  10.475 +			os=-nto$os
  10.476 +			;;
  10.477 +		esac
  10.478 +		;;
  10.479 +	-nto*)
  10.480 +		os=-nto-qnx
  10.481 +		;;
  10.482  	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  10.483  	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
  10.484 -	      | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
  10.485 +	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  10.486  		;;
  10.487  	-mac*)
  10.488  		os=`echo $os | sed -e 's|mac|macos|'`
  10.489 @@ -927,6 +1048,12 @@
  10.490  	-sunos6*)
  10.491  		os=`echo $os | sed -e 's|sunos6|solaris3|'`
  10.492  		;;
  10.493 +	-opened*)
  10.494 +		os=-openedition
  10.495 +		;;
  10.496 +	-wince*)
  10.497 +		os=-wince
  10.498 +		;;
  10.499  	-osfrose*)
  10.500  		os=-osfrose
  10.501  		;;
  10.502 @@ -951,6 +1078,9 @@
  10.503  	-ns2 )
  10.504  	        os=-nextstep2
  10.505  		;;
  10.506 +	-nsk*)
  10.507 +		os=-nsk
  10.508 +		;;
  10.509  	# Preserve the version number of sinix5.
  10.510  	-sinix5.*)
  10.511  		os=`echo $os | sed -e 's|sinix|sysv|'`
  10.512 @@ -985,7 +1115,7 @@
  10.513  	-xenix)
  10.514  		os=-xenix
  10.515  		;;
  10.516 -        -*mint | -*MiNT)
  10.517 +        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  10.518  	        os=-mint
  10.519  		;;
  10.520  	-none)
  10.521 @@ -1013,12 +1143,15 @@
  10.522  	*-acorn)
  10.523  		os=-riscix1.2
  10.524  		;;
  10.525 -	arm*-corel)
  10.526 +	arm*-rebel)
  10.527  		os=-linux
  10.528  		;;
  10.529  	arm*-semi)
  10.530  		os=-aout
  10.531  		;;
  10.532 +	pdp10-*)
  10.533 +		os=-tops20
  10.534 +		;;
  10.535          pdp11-*)
  10.536  		os=-none
  10.537  		;;
  10.538 @@ -1127,7 +1260,7 @@
  10.539  	*-masscomp)
  10.540  		os=-rtu
  10.541  		;;
  10.542 -	f301-fujitsu)
  10.543 +	f30[01]-fujitsu | f700-fujitsu)
  10.544  		os=-uxpv
  10.545  		;;
  10.546  	*-rom68k)
  10.547 @@ -1187,7 +1320,7 @@
  10.548  			-genix*)
  10.549  				vendor=ns
  10.550  				;;
  10.551 -			-mvs*)
  10.552 +			-mvs* | -opened*)
  10.553  				vendor=ibm
  10.554  				;;
  10.555  			-ptx*)
  10.556 @@ -1205,7 +1338,7 @@
  10.557  			-mpw* | -macos*)
  10.558  				vendor=apple
  10.559  				;;
  10.560 -			-*mint | -*MiNT)
  10.561 +			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  10.562  				vendor=atari
  10.563  				;;
  10.564  		esac
  10.565 @@ -1214,3 +1347,11 @@
  10.566  esac
  10.567  
  10.568  echo $basic_machine$os
  10.569 +exit 0
  10.570 +
  10.571 +# Local variables:
  10.572 +# eval: (add-hook 'write-file-hooks 'time-stamp)
  10.573 +# time-stamp-start: "timestamp='"
  10.574 +# time-stamp-format: "%:y-%02m-%02d"
  10.575 +# time-stamp-end: "'"
  10.576 +# End: