config.guess
changeset 2 e273b0e38b8b
parent 0 76be7dab668c
child 16 3f4734b3c97e
     1.1 --- a/config.guess	Thu Aug 10 06:06:57 2000 +0000
     1.2 +++ b/config.guess	Thu Aug 10 06:12:39 2000 +0000
     1.3 @@ -1,8 +1,10 @@
     1.4  #! /bin/sh
     1.5  # Attempt to guess a canonical system name.
     1.6 -#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
     1.7 +#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
     1.8  #   Free Software Foundation, Inc.
     1.9 -#
    1.10 +
    1.11 +version='2000-07-27'
    1.12 +
    1.13  # This file is free software; you can redistribute it and/or modify it
    1.14  # under the terms of the GNU General Public License as published by
    1.15  # the Free Software Foundation; either version 2 of the License, or
    1.16 @@ -23,8 +25,7 @@
    1.17  # the same distribution terms that you use for the rest of that program.
    1.18  
    1.19  # Written by Per Bothner <bothner@cygnus.com>.
    1.20 -# The master version of this file is at the FSF in /home/gd/gnu/lib.
    1.21 -# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
    1.22 +# Please send patches to <config-patches@gnu.org>.
    1.23  #
    1.24  # This script attempts to guess a canonical system name similar to
    1.25  # config.sub.  If it succeeds, it prints the system name on stdout, and
    1.26 @@ -37,6 +38,46 @@
    1.27  # (but try to keep the structure clean).
    1.28  #
    1.29  
    1.30 +me=`echo "$0" | sed -e 's,.*/,,'`
    1.31 +
    1.32 +usage="\
    1.33 +Usage: $0 [OPTION]
    1.34 +
    1.35 +Output the configuration name of this system.
    1.36 +
    1.37 +Operation modes:
    1.38 +  -h, --help               print this help, then exit
    1.39 +  -V, --version            print version number, then exit"
    1.40 +
    1.41 +help="
    1.42 +Try \`$me --help' for more information."
    1.43 +
    1.44 +# Parse command line
    1.45 +while test $# -gt 0 ; do
    1.46 +  case "$1" in
    1.47 +    --version | --vers* | -V )
    1.48 +       echo "$version" ; exit 0 ;;
    1.49 +    --help | --h* | -h )
    1.50 +       echo "$usage"; exit 0 ;;
    1.51 +    -- )     # Stop option processing
    1.52 +       shift; break ;;
    1.53 +    - )	# Use stdin as input.
    1.54 +       break ;;
    1.55 +    -* )
    1.56 +       exec >&2
    1.57 +       echo "$me: invalid option $1"
    1.58 +       echo "$help"
    1.59 +       exit 1 ;;
    1.60 +    * )
    1.61 +       break ;;
    1.62 +  esac
    1.63 +done
    1.64 +
    1.65 +if test $# != 0; then
    1.66 +  echo "$me: too many arguments$help" >&2
    1.67 +  exit 1
    1.68 +fi
    1.69 +
    1.70  # Use $HOST_CC if defined. $CC may point to a cross-compiler
    1.71  if test x"$CC_FOR_BUILD" = x; then
    1.72    if test x"$HOST_CC" != x; then
    1.73 @@ -68,6 +109,43 @@
    1.74  # Note: order is significant - the case branches are not exclusive.
    1.75  
    1.76  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    1.77 +    *:NetBSD:*:*)
    1.78 +	# Netbsd (nbsd) targets should (where applicable) match one or
    1.79 +	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
    1.80 +	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
    1.81 +	# switched to ELF, *-*-netbsd* would select the old
    1.82 +	# object file format.  This provides both forward
    1.83 +	# compatibility and a consistent mechanism for selecting the
    1.84 +	# object file format.
    1.85 +	# Determine the machine/vendor (is the vendor relevant).
    1.86 +	case "${UNAME_MACHINE}" in
    1.87 +	    amiga) machine=m68k-unknown ;;
    1.88 +	    arm32) machine=arm-unknown ;;
    1.89 +	    atari*) machine=m68k-atari ;;
    1.90 +	    sun3*) machine=m68k-sun ;;
    1.91 +	    mac68k) machine=m68k-apple ;;
    1.92 +	    macppc) machine=powerpc-apple ;;
    1.93 +	    hp3[0-9][05]) machine=m68k-hp ;;
    1.94 +	    ibmrt|romp-ibm) machine=romp-ibm ;;
    1.95 +	    *) machine=${UNAME_MACHINE}-unknown ;;
    1.96 +	esac
    1.97 +	# The Operating System including object format.
    1.98 +	if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
    1.99 +		| grep __ELF__ >/dev/null
   1.100 +	then
   1.101 +	    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
   1.102 +	    # Return netbsd for either.  FIX?
   1.103 +	    os=netbsd
   1.104 +	else
   1.105 +	    os=netbsdelf
   1.106 +	fi
   1.107 +	# The OS release
   1.108 +	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.109 +	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   1.110 +	# contains redundant information, the shorter form:
   1.111 +	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   1.112 +	echo "${machine}-${os}${release}"
   1.113 +	exit 0 ;;
   1.114      alpha:OSF1:*:*)
   1.115  	if test $UNAME_RELEASE = "V4.0"; then
   1.116  		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   1.117 @@ -77,41 +155,51 @@
   1.118  	# A Xn.n version is an unreleased experimental baselevel.
   1.119  	# 1.2 uses "1.2" for uname -r.
   1.120  	cat <<EOF >$dummy.s
   1.121 +	.data
   1.122 +\$Lformat:
   1.123 +	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
   1.124 +
   1.125 +	.text
   1.126  	.globl main
   1.127 +	.align 4
   1.128  	.ent main
   1.129  main:
   1.130 -	.frame \$30,0,\$26,0
   1.131 -	.prologue 0
   1.132 -	.long 0x47e03d80 # implver $0
   1.133 -	lda \$2,259
   1.134 -	.long 0x47e20c21 # amask $2,$1
   1.135 -	srl \$1,8,\$2
   1.136 -	sll \$2,2,\$2
   1.137 -	sll \$0,3,\$0
   1.138 -	addl \$1,\$0,\$0
   1.139 -	addl \$2,\$0,\$0
   1.140 -	ret \$31,(\$26),1
   1.141 +	.frame \$30,16,\$26,0
   1.142 +	ldgp \$29,0(\$27)
   1.143 +	.prologue 1
   1.144 +	.long 0x47e03d80 # implver \$0
   1.145 +	lda \$2,-1
   1.146 +	.long 0x47e20c21 # amask \$2,\$1
   1.147 +	lda \$16,\$Lformat
   1.148 +	mov \$0,\$17
   1.149 +	not \$1,\$18
   1.150 +	jsr \$26,printf
   1.151 +	ldgp \$29,0(\$26)
   1.152 +	mov 0,\$16
   1.153 +	jsr \$26,exit
   1.154  	.end main
   1.155  EOF
   1.156  	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   1.157  	if test "$?" = 0 ; then
   1.158 -		./$dummy
   1.159 -		case "$?" in
   1.160 -			7)
   1.161 +		case `./$dummy` in
   1.162 +			0-0)
   1.163  				UNAME_MACHINE="alpha"
   1.164  				;;
   1.165 -			15)
   1.166 +			1-0)
   1.167  				UNAME_MACHINE="alphaev5"
   1.168  				;;
   1.169 -			14)
   1.170 +			1-1)
   1.171  				UNAME_MACHINE="alphaev56"
   1.172  				;;
   1.173 -			10)
   1.174 +			1-101)
   1.175  				UNAME_MACHINE="alphapca56"
   1.176  				;;
   1.177 -			16)
   1.178 +			2-303)
   1.179  				UNAME_MACHINE="alphaev6"
   1.180  				;;
   1.181 +			2-307)
   1.182 +				UNAME_MACHINE="alphaev67"
   1.183 +				;;
   1.184  		esac
   1.185  	fi
   1.186  	rm -f $dummy.s $dummy
   1.187 @@ -127,11 +215,8 @@
   1.188  	echo alpha-dec-winnt3.5
   1.189  	exit 0 ;;
   1.190      Amiga*:UNIX_System_V:4.0:*)
   1.191 -	echo m68k-cbm-sysv4
   1.192 +	echo m68k-unknown-sysv4
   1.193  	exit 0;;
   1.194 -    amiga:NetBSD:*:*)
   1.195 -      echo m68k-cbm-netbsd${UNAME_RELEASE}
   1.196 -      exit 0 ;;
   1.197      amiga:OpenBSD:*:*)
   1.198  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.199  	exit 0 ;;
   1.200 @@ -156,12 +241,12 @@
   1.201      wgrisc:OpenBSD:*:*)
   1.202  	echo mipsel-unknown-openbsd${UNAME_RELEASE}
   1.203  	exit 0 ;;
   1.204 +    *:OS/390:*:*)
   1.205 +	echo i370-ibm-openedition
   1.206 +	exit 0 ;;
   1.207      arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
   1.208  	echo arm-acorn-riscix${UNAME_RELEASE}
   1.209  	exit 0;;
   1.210 -    arm32:NetBSD:*:*)
   1.211 -	echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.212 -	exit 0 ;;
   1.213      SR2?01:HI-UX/MPP:*:*)
   1.214  	echo hppa1.1-hitachi-hiuxmpp
   1.215  	exit 0;;
   1.216 @@ -218,15 +303,12 @@
   1.217      aushp:SunOS:*:*)
   1.218  	echo sparc-auspex-sunos${UNAME_RELEASE}
   1.219  	exit 0 ;;
   1.220 -    atari*:NetBSD:*:*)
   1.221 -	echo m68k-atari-netbsd${UNAME_RELEASE}
   1.222 -	exit 0 ;;
   1.223      atari*:OpenBSD:*:*)
   1.224  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.225  	exit 0 ;;
   1.226      # The situation for MiNT is a little confusing.  The machine name
   1.227      # can be virtually everything (everything which is not
   1.228 -    # "atarist" or "atariste" at least should have a processor 
   1.229 +    # "atarist" or "atariste" at least should have a processor
   1.230      # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
   1.231      # to the lowercase version "mint" (or "freemint").  Finally
   1.232      # the system name "TOS" denotes a system which is actually not
   1.233 @@ -250,15 +332,9 @@
   1.234      *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
   1.235          echo m68k-unknown-mint${UNAME_RELEASE}
   1.236          exit 0 ;;
   1.237 -    sun3*:NetBSD:*:*)
   1.238 -	echo m68k-sun-netbsd${UNAME_RELEASE}
   1.239 -	exit 0 ;;
   1.240      sun3*:OpenBSD:*:*)
   1.241  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.242  	exit 0 ;;
   1.243 -    mac68k:NetBSD:*:*)
   1.244 -	echo m68k-apple-netbsd${UNAME_RELEASE}
   1.245 -	exit 0 ;;
   1.246      mac68k:OpenBSD:*:*)
   1.247  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.248  	exit 0 ;;
   1.249 @@ -271,9 +347,6 @@
   1.250      powerpc:machten:*:*)
   1.251  	echo powerpc-apple-machten${UNAME_RELEASE}
   1.252  	exit 0 ;;
   1.253 -    macppc:NetBSD:*:*)
   1.254 -        echo powerpc-apple-netbsd${UNAME_RELEASE}
   1.255 -        exit 0 ;;
   1.256      RISC*:Mach:*:*)
   1.257  	echo mips-dec-mach_bsd4.3
   1.258  	exit 0 ;;
   1.259 @@ -289,6 +362,7 @@
   1.260      mips:*:*:UMIPS | mips:*:*:RISCos)
   1.261  	sed 's/^	//' << EOF >$dummy.c
   1.262  #ifdef __cplusplus
   1.263 +#include <stdio.h>  /* for printf() prototype */
   1.264  	int main (int argc, char *argv[]) {
   1.265  #else
   1.266  	int main (argc, argv) int argc; char *argv[]; {
   1.267 @@ -328,15 +402,18 @@
   1.268      AViiON:dgux:*:*)
   1.269          # DG/UX returns AViiON for all architectures
   1.270          UNAME_PROCESSOR=`/usr/bin/uname -p`
   1.271 -        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
   1.272 -	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
   1.273 -	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
   1.274 +	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
   1.275 +	then
   1.276 +	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
   1.277 +	       [ ${TARGET_BINARY_INTERFACE}x = x ]
   1.278 +	    then
   1.279  		echo m88k-dg-dgux${UNAME_RELEASE}
   1.280 +	    else
   1.281 +		echo m88k-dg-dguxbcs${UNAME_RELEASE}
   1.282 +	    fi
   1.283  	else
   1.284 -		echo m88k-dg-dguxbcs${UNAME_RELEASE}
   1.285 +	    echo i586-dg-dgux${UNAME_RELEASE}
   1.286  	fi
   1.287 -        else echo i586-dg-dgux${UNAME_RELEASE}
   1.288 -        fi
   1.289   	exit 0 ;;
   1.290      M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
   1.291  	echo m88k-dolphin-sysv3
   1.292 @@ -402,7 +479,7 @@
   1.293      ibmrt:4.4BSD:*|romp-ibm:BSD:*)
   1.294  	echo romp-ibm-bsd4.4
   1.295  	exit 0 ;;
   1.296 -    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
   1.297 +    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
   1.298  	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
   1.299  	exit 0 ;;                           # report: romp-ibm BSD 4.3
   1.300      *:BOSX:*:*)
   1.301 @@ -423,6 +500,8 @@
   1.302  	    9000/[34]?? )         HP_ARCH=m68k ;;
   1.303  	    9000/[678][0-9][0-9])
   1.304                sed 's/^              //' << EOF >$dummy.c
   1.305 +
   1.306 +              #define _HPUX_SOURCE
   1.307                #include <stdlib.h>
   1.308                #include <unistd.h>
   1.309  
   1.310 @@ -453,7 +532,7 @@
   1.311                    exit (0);
   1.312                }
   1.313  EOF
   1.314 -	($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
   1.315 +	(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
   1.316  	rm -f $dummy.c $dummy
   1.317  	esac
   1.318  	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
   1.319 @@ -547,10 +626,13 @@
   1.320  	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
   1.321  	exit 0 ;;
   1.322      CRAY*TS:*:*:*)
   1.323 -	echo t90-cray-unicos${UNAME_RELEASE}
   1.324 +	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.325  	exit 0 ;;
   1.326      CRAY*T3E:*:*:*)
   1.327 -	echo t3e-cray-unicosmk${UNAME_RELEASE}
   1.328 +	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.329 +	exit 0 ;;
   1.330 +    CRAY*SV1:*:*:*)
   1.331 +	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   1.332  	exit 0 ;;
   1.333      CRAY-2:*:*:*)
   1.334  	echo cray2-cray-unicos
   1.335 @@ -563,13 +645,10 @@
   1.336      F301:UNIX_System_V:*:*)
   1.337         echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
   1.338         exit 0 ;;
   1.339 -    hp3[0-9][05]:NetBSD:*:*)
   1.340 -	echo m68k-hp-netbsd${UNAME_RELEASE}
   1.341 -	exit 0 ;;
   1.342      hp300:OpenBSD:*:*)
   1.343  	echo m68k-unknown-openbsd${UNAME_RELEASE}
   1.344  	exit 0 ;;
   1.345 -    i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
   1.346 +    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   1.347  	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
   1.348  	exit 0 ;;
   1.349      sparc*:BSD/OS:*:*)
   1.350 @@ -579,17 +658,8 @@
   1.351  	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
   1.352  	exit 0 ;;
   1.353      *:FreeBSD:*:*)
   1.354 -	if test -x /usr/bin/objformat; then
   1.355 -	    if test "elf" = "`/usr/bin/objformat`"; then
   1.356 -		echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
   1.357 -		exit 0
   1.358 -	    fi
   1.359 -	fi
   1.360  	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
   1.361  	exit 0 ;;
   1.362 -    *:NetBSD:*:*)
   1.363 -	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.364 -	exit 0 ;;
   1.365      *:OpenBSD:*:*)
   1.366  	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
   1.367  	exit 0 ;;
   1.368 @@ -617,13 +687,10 @@
   1.369      *:GNU:*:*)
   1.370  	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
   1.371  	exit 0 ;;
   1.372 +    i*86:Minix:*:*)
   1.373 +	echo ${UNAME_MACHINE}-pc-minix
   1.374 +	exit 0 ;;
   1.375      *:Linux:*:*)
   1.376 -	# uname on the ARM produces all sorts of strangeness, and we need to
   1.377 -	# filter it out.
   1.378 -	case "$UNAME_MACHINE" in
   1.379 -	  armv*)		      UNAME_MACHINE=$UNAME_MACHINE ;;
   1.380 -	  arm* | sa110*)	      UNAME_MACHINE="arm" ;;
   1.381 -	esac
   1.382  
   1.383  	# The BFD linker knows what the default object file format is, so
   1.384  	# first see if it will tell us. cd to the root directory to prevent
   1.385 @@ -636,12 +703,42 @@
   1.386  				    s/ .*//
   1.387  				    p'`
   1.388          case "$ld_supported_emulations" in
   1.389 -	  i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
   1.390 -	  i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
   1.391 -	  sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   1.392 -	  armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   1.393 -	  m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
   1.394 -	  elf32ppc)
   1.395 +	  *ia64)
   1.396 +		echo "${UNAME_MACHINE}-unknown-linux"
   1.397 +		exit 0
   1.398 +		;;
   1.399 +	  i?86linux)
   1.400 +		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
   1.401 +		exit 0
   1.402 +		;;
   1.403 +	  elf_i?86)
   1.404 +		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
   1.405 +		;;
   1.406 +	  i?86coff)
   1.407 +		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
   1.408 +		exit 0
   1.409 +		;;
   1.410 +	  sparclinux)
   1.411 +		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
   1.412 +		exit 0
   1.413 +		;;
   1.414 +	  armlinux)
   1.415 +		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
   1.416 +		exit 0
   1.417 +		;;
   1.418 +	  elf32arm*)
   1.419 +		echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
   1.420 +		exit 0
   1.421 +		;;
   1.422 +	  armelf_linux*)
   1.423 +		echo "${UNAME_MACHINE}-unknown-linux-gnu"
   1.424 +		exit 0
   1.425 +		;;
   1.426 +	  m68klinux)
   1.427 +		echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
   1.428 +		exit 0
   1.429 +		;;
   1.430 +	  elf32ppc | elf32ppclinux)
   1.431  		# Determine Lib Version
   1.432  		cat >$dummy.c <<EOF
   1.433  #include <features.h>
   1.434 @@ -668,49 +765,65 @@
   1.435  			if test "$?" = 0 ; then
   1.436  				LIBC="libc1"
   1.437  			fi
   1.438 -		fi	
   1.439 +		fi
   1.440  		rm -f $dummy.c $dummy
   1.441 -		echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
   1.442 +		echo powerpc-unknown-linux-gnu${LIBC}
   1.443 +		exit 0
   1.444 +		;;
   1.445 +	  shelf_linux)
   1.446 +		echo "${UNAME_MACHINE}-unknown-linux-gnu"
   1.447 +		exit 0
   1.448 +		;;
   1.449  	esac
   1.450  
   1.451  	if test "${UNAME_MACHINE}" = "alpha" ; then
   1.452 -		sed 's/^	//'  <<EOF >$dummy.s
   1.453 -		.globl main
   1.454 -		.ent main
   1.455 -	main:
   1.456 -		.frame \$30,0,\$26,0
   1.457 -		.prologue 0
   1.458 -		.long 0x47e03d80 # implver $0
   1.459 -		lda \$2,259
   1.460 -		.long 0x47e20c21 # amask $2,$1
   1.461 -		srl \$1,8,\$2
   1.462 -		sll \$2,2,\$2
   1.463 -		sll \$0,3,\$0
   1.464 -		addl \$1,\$0,\$0
   1.465 -		addl \$2,\$0,\$0
   1.466 -		ret \$31,(\$26),1
   1.467 -		.end main
   1.468 +		cat <<EOF >$dummy.s
   1.469 +			.data
   1.470 +		\$Lformat:
   1.471 +			.byte 37,100,45,37,120,10,0	# "%d-%x\n"
   1.472 +
   1.473 +			.text
   1.474 +			.globl main
   1.475 +			.align 4
   1.476 +			.ent main
   1.477 +		main:
   1.478 +			.frame \$30,16,\$26,0
   1.479 +			ldgp \$29,0(\$27)
   1.480 +			.prologue 1
   1.481 +			.long 0x47e03d80 # implver \$0
   1.482 +			lda \$2,-1
   1.483 +			.long 0x47e20c21 # amask \$2,\$1
   1.484 +			lda \$16,\$Lformat
   1.485 +			mov \$0,\$17
   1.486 +			not \$1,\$18
   1.487 +			jsr \$26,printf
   1.488 +			ldgp \$29,0(\$26)
   1.489 +			mov 0,\$16
   1.490 +			jsr \$26,exit
   1.491 +			.end main
   1.492  EOF
   1.493  		LIBC=""
   1.494  		$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
   1.495  		if test "$?" = 0 ; then
   1.496 -			./$dummy
   1.497 -			case "$?" in
   1.498 -			7)
   1.499 +			case `./$dummy` in
   1.500 +			0-0)
   1.501  				UNAME_MACHINE="alpha"
   1.502  				;;
   1.503 -			15)
   1.504 +			1-0)
   1.505  				UNAME_MACHINE="alphaev5"
   1.506  				;;
   1.507 -			14)
   1.508 +			1-1)
   1.509  				UNAME_MACHINE="alphaev56"
   1.510  				;;
   1.511 -			10)
   1.512 +			1-101)
   1.513  				UNAME_MACHINE="alphapca56"
   1.514  				;;
   1.515 -			16)
   1.516 +			2-303)
   1.517  				UNAME_MACHINE="alphaev6"
   1.518  				;;
   1.519 +			2-307)
   1.520 +				UNAME_MACHINE="alphaev67"
   1.521 +				;;
   1.522  			esac
   1.523  
   1.524  			objdump --private-headers $dummy | \
   1.525 @@ -724,6 +837,7 @@
   1.526  	elif test "${UNAME_MACHINE}" = "mips" ; then
   1.527  	  cat >$dummy.c <<EOF
   1.528  #ifdef __cplusplus
   1.529 +#include <stdio.h>  /* for printf() prototype */
   1.530  	int main (int argc, char *argv[]) {
   1.531  #else
   1.532  	int main (argc, argv) int argc; char *argv[]; {
   1.533 @@ -739,6 +853,8 @@
   1.534  EOF
   1.535  	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
   1.536  	  rm -f $dummy.c $dummy
   1.537 +	elif test "${UNAME_MACHINE}" = "s390"; then
   1.538 +	  echo s390-ibm-linux && exit 0
   1.539  	else
   1.540  	  # Either a pre-BFD a.out linker (linux-gnuoldld)
   1.541  	  # or one that does not give us useful --help.
   1.542 @@ -760,6 +876,7 @@
   1.543  	  cat >$dummy.c <<EOF
   1.544  #include <features.h>
   1.545  #ifdef __cplusplus
   1.546 +#include <stdio.h>  /* for printf() prototype */
   1.547  	int main (int argc, char *argv[]) {
   1.548  #else
   1.549  	int main (argc, argv) int argc; char *argv[]; {
   1.550 @@ -782,6 +899,7 @@
   1.551  EOF
   1.552  	  $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
   1.553  	  rm -f $dummy.c $dummy
   1.554 +	  test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
   1.555  	fi ;;
   1.556  # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
   1.557  # are messed up and put the nodename in both sysname and nodename.
   1.558 @@ -797,19 +915,21 @@
   1.559  	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
   1.560  	exit 0 ;;
   1.561      i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
   1.562 +	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
   1.563  	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
   1.564 -		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
   1.565 +		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
   1.566  	else
   1.567 -		echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
   1.568 +		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
   1.569  	fi
   1.570  	exit 0 ;;
   1.571      i?86:*:5:7*)
   1.572 -	UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
   1.573 -	(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
   1.574 -	(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
   1.575 -	(/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
   1.576 -	(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
   1.577 -	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
   1.578 +        # Fixed at (any) Pentium or better
   1.579 +        UNAME_MACHINE=i586
   1.580 +        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
   1.581 +	    echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
   1.582 +	else
   1.583 +	    echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
   1.584 +	fi
   1.585  	exit 0 ;;
   1.586      i?86:*:3.2:*)
   1.587  	if test -f /usr/options/cb.name; then
   1.588 @@ -829,7 +949,11 @@
   1.589  		echo ${UNAME_MACHINE}-pc-sysv32
   1.590  	fi
   1.591  	exit 0 ;;
   1.592 +    i?86:*DOS:*:*)
   1.593 +	echo ${UNAME_MACHINE}-pc-msdosdjgpp
   1.594 +	exit 0 ;;
   1.595      pc:*:*:*)
   1.596 +	# Left here for compatibility:
   1.597          # uname -m prints for DJGPP always 'pc', but it prints nothing about
   1.598          # the processor, so we play safe by assuming i386.
   1.599  	echo i386-pc-msdosdjgpp
   1.600 @@ -943,6 +1067,38 @@
   1.601      *:Rhapsody:*:*)
   1.602  	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
   1.603  	exit 0 ;;
   1.604 +    *:Darwin:*:*)
   1.605 +	echo `uname -p`-apple-darwin${UNAME_RELEASE}
   1.606 +	exit 0 ;;
   1.607 +    *:procnto*:*:* | *:QNX:[0123456789]*:*)
   1.608 +	if test "${UNAME_MACHINE}" = "x86pc"; then
   1.609 +		UNAME_MACHINE=pc
   1.610 +	fi
   1.611 +	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
   1.612 +	exit 0 ;;
   1.613 +    *:QNX:*:4*)
   1.614 +	echo i386-pc-qnx
   1.615 +	exit 0 ;;
   1.616 +    NSR-W:NONSTOP_KERNEL:*:*)
   1.617 +	echo nsr-tandem-nsk${UNAME_RELEASE}
   1.618 +	exit 0 ;;
   1.619 +    BS2000:POSIX*:*:*)
   1.620 +	echo bs2000-siemens-sysv
   1.621 +	exit 0 ;;
   1.622 +    DS/*:UNIX_System_V:*:*)
   1.623 +	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
   1.624 +	exit 0 ;;
   1.625 +    *:Plan9:*:*)
   1.626 +	# "uname -m" is not consistent, so use $cputype instead. 386
   1.627 +	# is converted to i386 for consistency with other x86
   1.628 +	# operating systems.
   1.629 +	if test "$cputype" = "386"; then
   1.630 +	    UNAME_MACHINE=i386
   1.631 +	else
   1.632 +	    UNAME_MACHINE="$cputype"
   1.633 +	fi
   1.634 +	echo ${UNAME_MACHINE}-unknown-plan9
   1.635 +	exit 0 ;;
   1.636  esac
   1.637  
   1.638  #echo '(No uname command or uname output not recognized.)' 1>&2
   1.639 @@ -1082,6 +1238,47 @@
   1.640      esac
   1.641  fi
   1.642  
   1.643 -#echo '(Unable to guess system type)' 1>&2
   1.644 +cat >&2 <<EOF
   1.645 +$0: unable to guess system type
   1.646 +
   1.647 +The $version version of this script cannot recognize your system type.
   1.648 +Please download the most up to date version of the config scripts:
   1.649 +
   1.650 +    ftp://ftp.gnu.org/pub/gnu/config/
   1.651 +
   1.652 +If the version you run ($0) is already up to date, please
   1.653 +send the following data and any information you think might be
   1.654 +pertinent to <config-patches@gnu.org> in order to provide the needed
   1.655 +information to handle your system.
   1.656 +
   1.657 +config.guess version = $version
   1.658 +
   1.659 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
   1.660 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
   1.661 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
   1.662 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
   1.663 +
   1.664 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
   1.665 +/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
   1.666 +
   1.667 +hostinfo               = `(hostinfo) 2>/dev/null`
   1.668 +/bin/universe          = `(/bin/universe) 2>/dev/null`
   1.669 +/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
   1.670 +/bin/arch              = `(/bin/arch) 2>/dev/null`
   1.671 +/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
   1.672 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
   1.673 +
   1.674 +UNAME_MACHINE = ${UNAME_MACHINE}
   1.675 +UNAME_RELEASE = ${UNAME_RELEASE}
   1.676 +UNAME_SYSTEM  = ${UNAME_SYSTEM}
   1.677 +UNAME_VERSION = ${UNAME_VERSION}
   1.678 +EOF
   1.679  
   1.680  exit 1
   1.681 +
   1.682 +# Local variables:
   1.683 +# eval: (add-hook 'write-file-hooks 'time-stamp)
   1.684 +# time-stamp-start: "version='"
   1.685 +# time-stamp-format: "%:y-%02m-%02d"
   1.686 +# time-stamp-end: "'"
   1.687 +# End: