build-scripts/config.guess
changeset 6442 2d3caa191dc4
parent 3353 6b14223dd5c7
child 7753 e4c38f17bfad
equal deleted inserted replaced
6441:ada3545fed23 6442:2d3caa191dc4
     1 #! /bin/sh
     1 #! /bin/sh
     2 # Attempt to guess a canonical system name.
     2 # Attempt to guess a canonical system name.
     3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
     4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
     5 #   Free Software Foundation, Inc.
     5 #   2011, 2012 Free Software Foundation, Inc.
     6 
     6 
     7 timestamp='2009-09-18'
     7 timestamp='2012-08-14'
     8 
     8 
     9 # This file is free software; you can redistribute it and/or modify it
     9 # This file is free software; you can redistribute it and/or modify it
    10 # under the terms of the GNU General Public License as published by
    10 # under the terms of the GNU General Public License as published by
    11 # the Free Software Foundation; either version 2 of the License, or
    11 # the Free Software Foundation; either version 2 of the License, or
    12 # (at your option) any later version.
    12 # (at your option) any later version.
    15 # WITHOUT ANY WARRANTY; without even the implied warranty of
    15 # WITHOUT ANY WARRANTY; without even the implied warranty of
    16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    17 # General Public License for more details.
    17 # General Public License for more details.
    18 #
    18 #
    19 # You should have received a copy of the GNU General Public License
    19 # You should have received a copy of the GNU General Public License
    20 # along with this program; if not, write to the Free Software
    20 # along with this program; if not, see <http://www.gnu.org/licenses/>.
    21 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
       
    22 # 02110-1301, USA.
       
    23 #
    21 #
    24 # As a special exception to the GNU General Public License, if you
    22 # As a special exception to the GNU General Public License, if you
    25 # distribute this file as part of a program that contains a
    23 # distribute this file as part of a program that contains a
    26 # configuration script generated by Autoconf, you may include it under
    24 # configuration script generated by Autoconf, you may include it under
    27 # the same distribution terms that you use for the rest of that program.
    25 # the same distribution terms that you use for the rest of that program.
    54 
    52 
    55 version="\
    53 version="\
    56 GNU config.guess ($timestamp)
    54 GNU config.guess ($timestamp)
    57 
    55 
    58 Originally written by Per Bothner.
    56 Originally written by Per Bothner.
    59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    57 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    60 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    58 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
       
    59 Free Software Foundation, Inc.
    61 
    60 
    62 This is free software; see the source for copying conditions.  There is NO
    61 This is free software; see the source for copying conditions.  There is NO
    63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    62 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    64 
    63 
    65 help="
    64 help="
   142 # Note: order is significant - the case branches are not exclusive.
   141 # Note: order is significant - the case branches are not exclusive.
   143 
   142 
   144 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
   143 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
   145     *:NetBSD:*:*)
   144     *:NetBSD:*:*)
   146 	# NetBSD (nbsd) targets should (where applicable) match one or
   145 	# NetBSD (nbsd) targets should (where applicable) match one or
   147 	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
   146 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
   148 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
   147 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
   149 	# switched to ELF, *-*-netbsd* would select the old
   148 	# switched to ELF, *-*-netbsd* would select the old
   150 	# object file format.  This provides both forward
   149 	# object file format.  This provides both forward
   151 	# compatibility and a consistent mechanism for selecting the
   150 	# compatibility and a consistent mechanism for selecting the
   152 	# object file format.
   151 	# object file format.
   178 		else
   177 		else
   179 		    os=netbsdelf
   178 		    os=netbsdelf
   180 		fi
   179 		fi
   181 		;;
   180 		;;
   182 	    *)
   181 	    *)
   183 	        os=netbsd
   182 		os=netbsd
   184 		;;
   183 		;;
   185 	esac
   184 	esac
   186 	# The OS release
   185 	# The OS release
   187 	# Debian GNU/NetBSD machines have a different userland, and
   186 	# Debian GNU/NetBSD machines have a different userland, and
   188 	# thus, need a distinct triplet. However, they do not need
   187 	# thus, need a distinct triplet. However, they do not need
   199 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   198 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
   200 	# contains redundant information, the shorter form:
   199 	# contains redundant information, the shorter form:
   201 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   200 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
   202 	echo "${machine}-${os}${release}"
   201 	echo "${machine}-${os}${release}"
   203 	exit ;;
   202 	exit ;;
       
   203     *:Bitrig:*:*)
       
   204 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
       
   205 	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
       
   206 	exit ;;
   204     *:OpenBSD:*:*)
   207     *:OpenBSD:*:*)
   205 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
   208 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
   206 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
   209 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
   207 	exit ;;
   210 	exit ;;
   208     *:ekkoBSD:*:*)
   211     *:ekkoBSD:*:*)
   221 	case $UNAME_RELEASE in
   224 	case $UNAME_RELEASE in
   222 	*4.0)
   225 	*4.0)
   223 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   226 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
   224 		;;
   227 		;;
   225 	*5.*)
   228 	*5.*)
   226 	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
   229 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
   227 		;;
   230 		;;
   228 	esac
   231 	esac
   229 	# According to Compaq, /usr/sbin/psrinfo has been available on
   232 	# According to Compaq, /usr/sbin/psrinfo has been available on
   230 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
   233 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
   231 	# covers most systems running today.  This code pipes the CPU
   234 	# covers most systems running today.  This code pipes the CPU
   267 	# A Vn.n version is a released version.
   270 	# A Vn.n version is a released version.
   268 	# A Tn.n version is a released field test version.
   271 	# A Tn.n version is a released field test version.
   269 	# A Xn.n version is an unreleased experimental baselevel.
   272 	# A Xn.n version is an unreleased experimental baselevel.
   270 	# 1.2 uses "1.2" for uname -r.
   273 	# 1.2 uses "1.2" for uname -r.
   271 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   274 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   272 	exit ;;
   275 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
       
   276 	exitcode=$?
       
   277 	trap '' 0
       
   278 	exit $exitcode ;;
   273     Alpha\ *:Windows_NT*:*)
   279     Alpha\ *:Windows_NT*:*)
   274 	# How do we know it's Interix rather than the generic POSIX subsystem?
   280 	# How do we know it's Interix rather than the generic POSIX subsystem?
   275 	# Should we change UNAME_MACHINE based on the output of uname instead
   281 	# Should we change UNAME_MACHINE based on the output of uname instead
   276 	# of the specific Alpha model?
   282 	# of the specific Alpha model?
   277 	echo alpha-pc-interix
   283 	echo alpha-pc-interix
   293 	exit ;;
   299 	exit ;;
   294     *:z/VM:*:*)
   300     *:z/VM:*:*)
   295 	echo s390-ibm-zvmoe
   301 	echo s390-ibm-zvmoe
   296 	exit ;;
   302 	exit ;;
   297     *:OS400:*:*)
   303     *:OS400:*:*)
   298         echo powerpc-ibm-os400
   304 	echo powerpc-ibm-os400
   299 	exit ;;
   305 	exit ;;
   300     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
   306     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
   301 	echo arm-acorn-riscix${UNAME_RELEASE}
   307 	echo arm-acorn-riscix${UNAME_RELEASE}
   302 	exit ;;
   308 	exit ;;
   303     arm:riscos:*:*|arm:RISCOS:*:*)
   309     arm:riscos:*:*|arm:RISCOS:*:*)
   330     sun4H:SunOS:5.*:*)
   336     sun4H:SunOS:5.*:*)
   331 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   337 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   332 	exit ;;
   338 	exit ;;
   333     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
   339     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
   334 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
   340 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
       
   341 	exit ;;
       
   342     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
       
   343 	echo i386-pc-auroraux${UNAME_RELEASE}
   335 	exit ;;
   344 	exit ;;
   336     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
   345     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
   337 	eval $set_cc_for_build
   346 	eval $set_cc_for_build
   338 	SUN_ARCH="i386"
   347 	SUN_ARCH="i386"
   339 	# If there is a compiler, see if it is configured for 64-bit objects.
   348 	# If there is a compiler, see if it is configured for 64-bit objects.
   389     # to the lowercase version "mint" (or "freemint").  Finally
   398     # to the lowercase version "mint" (or "freemint").  Finally
   390     # the system name "TOS" denotes a system which is actually not
   399     # the system name "TOS" denotes a system which is actually not
   391     # MiNT.  But MiNT is downward compatible to TOS, so this should
   400     # MiNT.  But MiNT is downward compatible to TOS, so this should
   392     # be no problem.
   401     # be no problem.
   393     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
   402     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
   394         echo m68k-atari-mint${UNAME_RELEASE}
   403 	echo m68k-atari-mint${UNAME_RELEASE}
   395 	exit ;;
   404 	exit ;;
   396     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
   405     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
   397 	echo m68k-atari-mint${UNAME_RELEASE}
   406 	echo m68k-atari-mint${UNAME_RELEASE}
   398         exit ;;
   407 	exit ;;
   399     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
   408     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
   400         echo m68k-atari-mint${UNAME_RELEASE}
   409 	echo m68k-atari-mint${UNAME_RELEASE}
   401 	exit ;;
   410 	exit ;;
   402     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
   411     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
   403         echo m68k-milan-mint${UNAME_RELEASE}
   412 	echo m68k-milan-mint${UNAME_RELEASE}
   404         exit ;;
   413 	exit ;;
   405     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
   414     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
   406         echo m68k-hades-mint${UNAME_RELEASE}
   415 	echo m68k-hades-mint${UNAME_RELEASE}
   407         exit ;;
   416 	exit ;;
   408     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
   417     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
   409         echo m68k-unknown-mint${UNAME_RELEASE}
   418 	echo m68k-unknown-mint${UNAME_RELEASE}
   410         exit ;;
   419 	exit ;;
   411     m68k:machten:*:*)
   420     m68k:machten:*:*)
   412 	echo m68k-apple-machten${UNAME_RELEASE}
   421 	echo m68k-apple-machten${UNAME_RELEASE}
   413 	exit ;;
   422 	exit ;;
   414     powerpc:machten:*:*)
   423     powerpc:machten:*:*)
   415 	echo powerpc-apple-machten${UNAME_RELEASE}
   424 	echo powerpc-apple-machten${UNAME_RELEASE}
   475 	exit ;;
   484 	exit ;;
   476     m88k:*:3*:R3*)
   485     m88k:*:3*:R3*)
   477 	echo m88k-motorola-sysv3
   486 	echo m88k-motorola-sysv3
   478 	exit ;;
   487 	exit ;;
   479     AViiON:dgux:*:*)
   488     AViiON:dgux:*:*)
   480         # DG/UX returns AViiON for all architectures
   489 	# DG/UX returns AViiON for all architectures
   481         UNAME_PROCESSOR=`/usr/bin/uname -p`
   490 	UNAME_PROCESSOR=`/usr/bin/uname -p`
   482 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
   491 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
   483 	then
   492 	then
   484 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
   493 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
   485 	       [ ${TARGET_BINARY_INTERFACE}x = x ]
   494 	       [ ${TARGET_BINARY_INTERFACE}x = x ]
   486 	    then
   495 	    then
   489 		echo m88k-dg-dguxbcs${UNAME_RELEASE}
   498 		echo m88k-dg-dguxbcs${UNAME_RELEASE}
   490 	    fi
   499 	    fi
   491 	else
   500 	else
   492 	    echo i586-dg-dgux${UNAME_RELEASE}
   501 	    echo i586-dg-dgux${UNAME_RELEASE}
   493 	fi
   502 	fi
   494  	exit ;;
   503 	exit ;;
   495     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
   504     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
   496 	echo m88k-dolphin-sysv3
   505 	echo m88k-dolphin-sysv3
   497 	exit ;;
   506 	exit ;;
   498     M88*:*:R3*:*)
   507     M88*:*:R3*:*)
   499 	# Delta 88k system running SVR3
   508 	# Delta 88k system running SVR3
   546 		echo rs6000-ibm-aix3.2.4
   555 		echo rs6000-ibm-aix3.2.4
   547 	else
   556 	else
   548 		echo rs6000-ibm-aix3.2
   557 		echo rs6000-ibm-aix3.2
   549 	fi
   558 	fi
   550 	exit ;;
   559 	exit ;;
   551     *:AIX:*:[456])
   560     *:AIX:*:[4567])
   552 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
   561 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
   553 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
   562 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
   554 		IBM_ARCH=rs6000
   563 		IBM_ARCH=rs6000
   555 	else
   564 	else
   556 		IBM_ARCH=powerpc
   565 		IBM_ARCH=powerpc
   589 	    9000/31? )            HP_ARCH=m68000 ;;
   598 	    9000/31? )            HP_ARCH=m68000 ;;
   590 	    9000/[34]?? )         HP_ARCH=m68k ;;
   599 	    9000/[34]?? )         HP_ARCH=m68k ;;
   591 	    9000/[678][0-9][0-9])
   600 	    9000/[678][0-9][0-9])
   592 		if [ -x /usr/bin/getconf ]; then
   601 		if [ -x /usr/bin/getconf ]; then
   593 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   602 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
   594                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   603 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
   595                     case "${sc_cpu_version}" in
   604 		    case "${sc_cpu_version}" in
   596                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
   605 		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
   597                       528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
   606 		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
   598                       532)                      # CPU_PA_RISC2_0
   607 		      532)                      # CPU_PA_RISC2_0
   599                         case "${sc_kernel_bits}" in
   608 			case "${sc_kernel_bits}" in
   600                           32) HP_ARCH="hppa2.0n" ;;
   609 			  32) HP_ARCH="hppa2.0n" ;;
   601                           64) HP_ARCH="hppa2.0w" ;;
   610 			  64) HP_ARCH="hppa2.0w" ;;
   602 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
   611 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
   603                         esac ;;
   612 			esac ;;
   604                     esac
   613 		    esac
   605 		fi
   614 		fi
   606 		if [ "${HP_ARCH}" = "" ]; then
   615 		if [ "${HP_ARCH}" = "" ]; then
   607 		    eval $set_cc_for_build
   616 		    eval $set_cc_for_build
   608 		    sed 's/^              //' << EOF >$dummy.c
   617 		    sed 's/^		//' << EOF >$dummy.c
   609 
   618 
   610               #define _HPUX_SOURCE
   619 		#define _HPUX_SOURCE
   611               #include <stdlib.h>
   620 		#include <stdlib.h>
   612               #include <unistd.h>
   621 		#include <unistd.h>
   613 
   622 
   614               int main ()
   623 		int main ()
   615               {
   624 		{
   616               #if defined(_SC_KERNEL_BITS)
   625 		#if defined(_SC_KERNEL_BITS)
   617                   long bits = sysconf(_SC_KERNEL_BITS);
   626 		    long bits = sysconf(_SC_KERNEL_BITS);
   618               #endif
   627 		#endif
   619                   long cpu  = sysconf (_SC_CPU_VERSION);
   628 		    long cpu  = sysconf (_SC_CPU_VERSION);
   620 
   629 
   621                   switch (cpu)
   630 		    switch (cpu)
   622               	{
   631 			{
   623               	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
   632 			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
   624               	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
   633 			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
   625               	case CPU_PA_RISC2_0:
   634 			case CPU_PA_RISC2_0:
   626               #if defined(_SC_KERNEL_BITS)
   635 		#if defined(_SC_KERNEL_BITS)
   627               	    switch (bits)
   636 			    switch (bits)
   628               		{
   637 				{
   629               		case 64: puts ("hppa2.0w"); break;
   638 				case 64: puts ("hppa2.0w"); break;
   630               		case 32: puts ("hppa2.0n"); break;
   639 				case 32: puts ("hppa2.0n"); break;
   631               		default: puts ("hppa2.0"); break;
   640 				default: puts ("hppa2.0"); break;
   632               		} break;
   641 				} break;
   633               #else  /* !defined(_SC_KERNEL_BITS) */
   642 		#else  /* !defined(_SC_KERNEL_BITS) */
   634               	    puts ("hppa2.0"); break;
   643 			    puts ("hppa2.0"); break;
   635               #endif
   644 		#endif
   636               	default: puts ("hppa1.0"); break;
   645 			default: puts ("hppa1.0"); break;
   637               	}
   646 			}
   638                   exit (0);
   647 		    exit (0);
   639               }
   648 		}
   640 EOF
   649 EOF
   641 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
   650 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
   642 		    test -z "$HP_ARCH" && HP_ARCH=hppa
   651 		    test -z "$HP_ARCH" && HP_ARCH=hppa
   643 		fi ;;
   652 		fi ;;
   644 	esac
   653 	esac
   725     parisc*:Lites*:*:*)
   734     parisc*:Lites*:*:*)
   726 	echo hppa1.1-hp-lites
   735 	echo hppa1.1-hp-lites
   727 	exit ;;
   736 	exit ;;
   728     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
   737     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
   729 	echo c1-convex-bsd
   738 	echo c1-convex-bsd
   730         exit ;;
   739 	exit ;;
   731     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
   740     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
   732 	if getsysinfo -f scalar_acc
   741 	if getsysinfo -f scalar_acc
   733 	then echo c32-convex-bsd
   742 	then echo c32-convex-bsd
   734 	else echo c2-convex-bsd
   743 	else echo c2-convex-bsd
   735 	fi
   744 	fi
   736         exit ;;
   745 	exit ;;
   737     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
   746     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
   738 	echo c34-convex-bsd
   747 	echo c34-convex-bsd
   739         exit ;;
   748 	exit ;;
   740     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
   749     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
   741 	echo c38-convex-bsd
   750 	echo c38-convex-bsd
   742         exit ;;
   751 	exit ;;
   743     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
   752     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
   744 	echo c4-convex-bsd
   753 	echo c4-convex-bsd
   745         exit ;;
   754 	exit ;;
   746     CRAY*Y-MP:*:*:*)
   755     CRAY*Y-MP:*:*:*)
   747 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   756 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   748 	exit ;;
   757 	exit ;;
   749     CRAY*[A-Z]90:*:*:*)
   758     CRAY*[A-Z]90:*:*:*)
   750 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
   759 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
   764     *:UNICOS/mp:*:*)
   773     *:UNICOS/mp:*:*)
   765 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   774 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
   766 	exit ;;
   775 	exit ;;
   767     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
   776     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
   768 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   777 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
   769         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   778 	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   770         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   779 	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
   771         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   780 	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   772         exit ;;
   781 	exit ;;
   773     5000:UNIX_System_V:4.*:*)
   782     5000:UNIX_System_V:4.*:*)
   774         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   783 	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
   775         FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
   784 	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
   776         echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   785 	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
   777 	exit ;;
   786 	exit ;;
   778     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   787     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
   779 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
   788 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
   780 	exit ;;
   789 	exit ;;
   781     sparc*:BSD/OS:*:*)
   790     sparc*:BSD/OS:*:*)
   783 	exit ;;
   792 	exit ;;
   784     *:BSD/OS:*:*)
   793     *:BSD/OS:*:*)
   785 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
   794 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
   786 	exit ;;
   795 	exit ;;
   787     *:FreeBSD:*:*)
   796     *:FreeBSD:*:*)
   788 	case ${UNAME_MACHINE} in
   797 	UNAME_PROCESSOR=`/usr/bin/uname -p`
   789 	    pc98)
   798 	case ${UNAME_PROCESSOR} in
   790 		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
       
   791 	    amd64)
   799 	    amd64)
   792 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   800 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   793 	    *)
   801 	    *)
   794 		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   802 		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
   795 	esac
   803 	esac
   796 	exit ;;
   804 	exit ;;
   797     i*:CYGWIN*:*)
   805     i*:CYGWIN*:*)
   798 	echo ${UNAME_MACHINE}-pc-cygwin
   806 	echo ${UNAME_MACHINE}-pc-cygwin
   799 	exit ;;
   807 	exit ;;
       
   808     *:MINGW64*:*)
       
   809 	echo ${UNAME_MACHINE}-pc-mingw64
       
   810 	exit ;;
   800     *:MINGW*:*)
   811     *:MINGW*:*)
   801 	echo ${UNAME_MACHINE}-pc-mingw32
   812 	echo ${UNAME_MACHINE}-pc-mingw32
   802 	exit ;;
   813 	exit ;;
       
   814     i*:MSYS*:*)
       
   815 	echo ${UNAME_MACHINE}-pc-msys
       
   816 	exit ;;
   803     i*:windows32*:*)
   817     i*:windows32*:*)
   804     	# uname -m includes "-pc" on this system.
   818 	# uname -m includes "-pc" on this system.
   805     	echo ${UNAME_MACHINE}-mingw32
   819 	echo ${UNAME_MACHINE}-mingw32
   806 	exit ;;
   820 	exit ;;
   807     i*:PW*:*)
   821     i*:PW*:*)
   808 	echo ${UNAME_MACHINE}-pc-pw32
   822 	echo ${UNAME_MACHINE}-pc-pw32
   809 	exit ;;
   823 	exit ;;
   810     *:Interix*:[3456]*)
   824     *:Interix*:*)
   811     	case ${UNAME_MACHINE} in
   825 	case ${UNAME_MACHINE} in
   812 	    x86)
   826 	    x86)
   813 		echo i586-pc-interix${UNAME_RELEASE}
   827 		echo i586-pc-interix${UNAME_RELEASE}
   814 		exit ;;
   828 		exit ;;
   815 	    EM64T | authenticamd | genuineintel)
   829 	    authenticamd | genuineintel | EM64T)
   816 		echo x86_64-unknown-interix${UNAME_RELEASE}
   830 		echo x86_64-unknown-interix${UNAME_RELEASE}
   817 		exit ;;
   831 		exit ;;
   818 	    IA64)
   832 	    IA64)
   819 		echo ia64-unknown-interix${UNAME_RELEASE}
   833 		echo ia64-unknown-interix${UNAME_RELEASE}
   820 		exit ;;
   834 		exit ;;
   851 	# other systems with GNU libc and userland
   865 	# other systems with GNU libc and userland
   852 	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
   866 	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
   853 	exit ;;
   867 	exit ;;
   854     i*86:Minix:*:*)
   868     i*86:Minix:*:*)
   855 	echo ${UNAME_MACHINE}-pc-minix
   869 	echo ${UNAME_MACHINE}-pc-minix
       
   870 	exit ;;
       
   871     aarch64:Linux:*:*)
       
   872 	echo ${UNAME_MACHINE}-unknown-linux-gnu
       
   873 	exit ;;
       
   874     aarch64_be:Linux:*:*)
       
   875 	UNAME_MACHINE=aarch64_be
       
   876 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   856 	exit ;;
   877 	exit ;;
   857     alpha:Linux:*:*)
   878     alpha:Linux:*:*)
   858 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
   879 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
   859 	  EV5)   UNAME_MACHINE=alphaev5 ;;
   880 	  EV5)   UNAME_MACHINE=alphaev5 ;;
   860 	  EV56)  UNAME_MACHINE=alphaev56 ;;
   881 	  EV56)  UNAME_MACHINE=alphaev56 ;;
   861 	  PCA56) UNAME_MACHINE=alphapca56 ;;
   882 	  PCA56) UNAME_MACHINE=alphapca56 ;;
   862 	  PCA57) UNAME_MACHINE=alphapca56 ;;
   883 	  PCA57) UNAME_MACHINE=alphapca56 ;;
   863 	  EV6)   UNAME_MACHINE=alphaev6 ;;
   884 	  EV6)   UNAME_MACHINE=alphaev6 ;;
   864 	  EV67)  UNAME_MACHINE=alphaev67 ;;
   885 	  EV67)  UNAME_MACHINE=alphaev67 ;;
   865 	  EV68*) UNAME_MACHINE=alphaev68 ;;
   886 	  EV68*) UNAME_MACHINE=alphaev68 ;;
   866         esac
   887 	esac
   867 	objdump --private-headers /bin/sh | grep -q ld.so.1
   888 	objdump --private-headers /bin/sh | grep -q ld.so.1
   868 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
   889 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
   869 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
   890 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
   870 	exit ;;
   891 	exit ;;
   871     arm*:Linux:*:*)
   892     arm*:Linux:*:*)
   873 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
   894 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
   874 	    | grep -q __ARM_EABI__
   895 	    | grep -q __ARM_EABI__
   875 	then
   896 	then
   876 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
   897 	    echo ${UNAME_MACHINE}-unknown-linux-gnu
   877 	else
   898 	else
   878 	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
   899 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
       
   900 		| grep -q __ARM_PCS_VFP
       
   901 	    then
       
   902 		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
       
   903 	    else
       
   904 		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
       
   905 	    fi
   879 	fi
   906 	fi
   880 	exit ;;
   907 	exit ;;
   881     avr32*:Linux:*:*)
   908     avr32*:Linux:*:*)
   882 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   909 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   883 	exit ;;
   910 	exit ;;
   884     cris:Linux:*:*)
   911     cris:Linux:*:*)
   885 	echo cris-axis-linux-gnu
   912 	echo ${UNAME_MACHINE}-axis-linux-gnu
   886 	exit ;;
   913 	exit ;;
   887     crisv32:Linux:*:*)
   914     crisv32:Linux:*:*)
   888 	echo crisv32-axis-linux-gnu
   915 	echo ${UNAME_MACHINE}-axis-linux-gnu
   889 	exit ;;
   916 	exit ;;
   890     frv:Linux:*:*)
   917     frv:Linux:*:*)
   891     	echo frv-unknown-linux-gnu
   918 	echo ${UNAME_MACHINE}-unknown-linux-gnu
       
   919 	exit ;;
       
   920     hexagon:Linux:*:*)
       
   921 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   892 	exit ;;
   922 	exit ;;
   893     i*86:Linux:*:*)
   923     i*86:Linux:*:*)
   894 	echo ${UNAME_MACHINE}-pc-linux-gnu
   924 	LIBC=gnu
       
   925 	eval $set_cc_for_build
       
   926 	sed 's/^	//' << EOF >$dummy.c
       
   927 	#ifdef __dietlibc__
       
   928 	LIBC=dietlibc
       
   929 	#endif
       
   930 EOF
       
   931 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
       
   932 	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
   895 	exit ;;
   933 	exit ;;
   896     ia64:Linux:*:*)
   934     ia64:Linux:*:*)
   897 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   935 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   898 	exit ;;
   936 	exit ;;
   899     m32r*:Linux:*:*)
   937     m32r*:Linux:*:*)
   916 	#else
   954 	#else
   917 	CPU=
   955 	CPU=
   918 	#endif
   956 	#endif
   919 	#endif
   957 	#endif
   920 EOF
   958 EOF
   921 	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
   959 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
   922 	    /^CPU/{
       
   923 		s: ::g
       
   924 		p
       
   925 	    }'`"
       
   926 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
   960 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
   927 	;;
   961 	;;
   928     or32:Linux:*:*)
   962     or32:Linux:*:*)
   929 	echo or32-unknown-linux-gnu
   963 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   930 	exit ;;
   964 	exit ;;
   931     padre:Linux:*:*)
   965     padre:Linux:*:*)
   932 	echo sparc-unknown-linux-gnu
   966 	echo sparc-unknown-linux-gnu
   933 	exit ;;
   967 	exit ;;
   934     parisc64:Linux:*:* | hppa64:Linux:*:*)
   968     parisc64:Linux:*:* | hppa64:Linux:*:*)
   950 	exit ;;
   984 	exit ;;
   951     s390:Linux:*:* | s390x:Linux:*:*)
   985     s390:Linux:*:* | s390x:Linux:*:*)
   952 	echo ${UNAME_MACHINE}-ibm-linux
   986 	echo ${UNAME_MACHINE}-ibm-linux
   953 	exit ;;
   987 	exit ;;
   954     sh64*:Linux:*:*)
   988     sh64*:Linux:*:*)
   955     	echo ${UNAME_MACHINE}-unknown-linux-gnu
   989 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   956 	exit ;;
   990 	exit ;;
   957     sh*:Linux:*:*)
   991     sh*:Linux:*:*)
   958 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   992 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   959 	exit ;;
   993 	exit ;;
   960     sparc:Linux:*:* | sparc64:Linux:*:*)
   994     sparc:Linux:*:* | sparc64:Linux:*:*)
   961 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   995 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   962 	exit ;;
   996 	exit ;;
       
   997     tile*:Linux:*:*)
       
   998 	echo ${UNAME_MACHINE}-unknown-linux-gnu
       
   999 	exit ;;
   963     vax:Linux:*:*)
  1000     vax:Linux:*:*)
   964 	echo ${UNAME_MACHINE}-dec-linux-gnu
  1001 	echo ${UNAME_MACHINE}-dec-linux-gnu
   965 	exit ;;
  1002 	exit ;;
   966     x86_64:Linux:*:*)
  1003     x86_64:Linux:*:*)
   967 	echo x86_64-unknown-linux-gnu
  1004 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   968 	exit ;;
  1005 	exit ;;
   969     xtensa*:Linux:*:*)
  1006     xtensa*:Linux:*:*)
   970     	echo ${UNAME_MACHINE}-unknown-linux-gnu
  1007 	echo ${UNAME_MACHINE}-unknown-linux-gnu
   971 	exit ;;
  1008 	exit ;;
   972     i*86:DYNIX/ptx:4*:*)
  1009     i*86:DYNIX/ptx:4*:*)
   973 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  1010 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
   974 	# earlier versions are messed up and put the nodename in both
  1011 	# earlier versions are messed up and put the nodename in both
   975 	# sysname and nodename.
  1012 	# sysname and nodename.
   976 	echo i386-sequent-sysv4
  1013 	echo i386-sequent-sysv4
   977 	exit ;;
  1014 	exit ;;
   978     i*86:UNIX_SV:4.2MP:2.*)
  1015     i*86:UNIX_SV:4.2MP:2.*)
   979         # Unixware is an offshoot of SVR4, but it has its own version
  1016 	# Unixware is an offshoot of SVR4, but it has its own version
   980         # number series starting with 2...
  1017 	# number series starting with 2...
   981         # I am not positive that other SVR4 systems won't match this,
  1018 	# I am not positive that other SVR4 systems won't match this,
   982 	# I just have to hope.  -- rms.
  1019 	# I just have to hope.  -- rms.
   983         # Use sysv4.2uw... so that sysv4* matches it.
  1020 	# Use sysv4.2uw... so that sysv4* matches it.
   984 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  1021 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
   985 	exit ;;
  1022 	exit ;;
   986     i*86:OS/2:*:*)
  1023     i*86:OS/2:*:*)
   987 	# If we were able to find `uname', then EMX Unix compatibility
  1024 	# If we were able to find `uname', then EMX Unix compatibility
   988 	# is probably installed.
  1025 	# is probably installed.
  1010 	else
  1047 	else
  1011 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  1048 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  1012 	fi
  1049 	fi
  1013 	exit ;;
  1050 	exit ;;
  1014     i*86:*:5:[678]*)
  1051     i*86:*:5:[678]*)
  1015     	# UnixWare 7.x, OpenUNIX and OpenServer 6.
  1052 	# UnixWare 7.x, OpenUNIX and OpenServer 6.
  1016 	case `/bin/uname -X | grep "^Machine"` in
  1053 	case `/bin/uname -X | grep "^Machine"` in
  1017 	    *486*)	     UNAME_MACHINE=i486 ;;
  1054 	    *486*)	     UNAME_MACHINE=i486 ;;
  1018 	    *Pentium)	     UNAME_MACHINE=i586 ;;
  1055 	    *Pentium)	     UNAME_MACHINE=i586 ;;
  1019 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  1056 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  1020 	esac
  1057 	esac
  1038 		echo ${UNAME_MACHINE}-pc-sysv32
  1075 		echo ${UNAME_MACHINE}-pc-sysv32
  1039 	fi
  1076 	fi
  1040 	exit ;;
  1077 	exit ;;
  1041     pc:*:*:*)
  1078     pc:*:*:*)
  1042 	# Left here for compatibility:
  1079 	# Left here for compatibility:
  1043         # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1080 	# uname -m prints for DJGPP always 'pc', but it prints nothing about
  1044         # the processor, so we play safe by assuming i586.
  1081 	# the processor, so we play safe by assuming i586.
  1045 	# Note: whatever this is, it MUST be the same as what config.sub
  1082 	# Note: whatever this is, it MUST be the same as what config.sub
  1046 	# prints for the "djgpp" host, or else GDB configury will decide that
  1083 	# prints for the "djgpp" host, or else GDB configury will decide that
  1047 	# this is a cross-build.
  1084 	# this is a cross-build.
  1048 	echo i586-pc-msdosdjgpp
  1085 	echo i586-pc-msdosdjgpp
  1049         exit ;;
  1086 	exit ;;
  1050     Intel:Mach:3*:*)
  1087     Intel:Mach:3*:*)
  1051 	echo i386-pc-mach3
  1088 	echo i386-pc-mach3
  1052 	exit ;;
  1089 	exit ;;
  1053     paragon:*:*:*)
  1090     paragon:*:*:*)
  1054 	echo i860-intel-osf1
  1091 	echo i860-intel-osf1
  1079 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1116 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1080 	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1117 	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1081 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1118 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1082 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1119 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1083     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1120     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1084         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1121 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1085           && { echo i486-ncr-sysv4; exit; } ;;
  1122 	  && { echo i486-ncr-sysv4; exit; } ;;
  1086     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  1123     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  1087 	OS_REL='.3'
  1124 	OS_REL='.3'
  1088 	test -r /etc/.relid \
  1125 	test -r /etc/.relid \
  1089 	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1126 	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1090 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1127 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1123 		echo ${UNAME_MACHINE}-sni-sysv4
  1160 		echo ${UNAME_MACHINE}-sni-sysv4
  1124 	else
  1161 	else
  1125 		echo ns32k-sni-sysv
  1162 		echo ns32k-sni-sysv
  1126 	fi
  1163 	fi
  1127 	exit ;;
  1164 	exit ;;
  1128     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1165     PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1129                       # says <Richard.M.Bartel@ccMail.Census.GOV>
  1166 			# says <Richard.M.Bartel@ccMail.Census.GOV>
  1130         echo i586-unisys-sysv4
  1167 	echo i586-unisys-sysv4
  1131         exit ;;
  1168 	exit ;;
  1132     *:UNIX_System_V:4*:FTX*)
  1169     *:UNIX_System_V:4*:FTX*)
  1133 	# From Gerald Hewes <hewes@openmarket.com>.
  1170 	# From Gerald Hewes <hewes@openmarket.com>.
  1134 	# How about differentiating between stratus architectures? -djm
  1171 	# How about differentiating between stratus architectures? -djm
  1135 	echo hppa1.1-stratus-sysv4
  1172 	echo hppa1.1-stratus-sysv4
  1136 	exit ;;
  1173 	exit ;;
  1152     news*:NEWS-OS:6*:*)
  1189     news*:NEWS-OS:6*:*)
  1153 	echo mips-sony-newsos6
  1190 	echo mips-sony-newsos6
  1154 	exit ;;
  1191 	exit ;;
  1155     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  1192     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  1156 	if [ -d /usr/nec ]; then
  1193 	if [ -d /usr/nec ]; then
  1157 	        echo mips-nec-sysv${UNAME_RELEASE}
  1194 		echo mips-nec-sysv${UNAME_RELEASE}
  1158 	else
  1195 	else
  1159 	        echo mips-unknown-sysv${UNAME_RELEASE}
  1196 		echo mips-unknown-sysv${UNAME_RELEASE}
  1160 	fi
  1197 	fi
  1161         exit ;;
  1198 	exit ;;
  1162     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
  1199     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
  1163 	echo powerpc-be-beos
  1200 	echo powerpc-be-beos
  1164 	exit ;;
  1201 	exit ;;
  1165     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
  1202     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
  1166 	echo powerpc-apple-beos
  1203 	echo powerpc-apple-beos
  1168     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
  1205     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
  1169 	echo i586-pc-beos
  1206 	echo i586-pc-beos
  1170 	exit ;;
  1207 	exit ;;
  1171     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
  1208     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
  1172 	echo i586-pc-haiku
  1209 	echo i586-pc-haiku
       
  1210 	exit ;;
       
  1211     x86_64:Haiku:*:*)
       
  1212 	echo x86_64-unknown-haiku
  1173 	exit ;;
  1213 	exit ;;
  1174     SX-4:SUPER-UX:*:*)
  1214     SX-4:SUPER-UX:*:*)
  1175 	echo sx4-nec-superux${UNAME_RELEASE}
  1215 	echo sx4-nec-superux${UNAME_RELEASE}
  1176 	exit ;;
  1216 	exit ;;
  1177     SX-5:SUPER-UX:*:*)
  1217     SX-5:SUPER-UX:*:*)
  1221 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1261 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1222 	exit ;;
  1262 	exit ;;
  1223     *:QNX:*:4*)
  1263     *:QNX:*:4*)
  1224 	echo i386-pc-qnx
  1264 	echo i386-pc-qnx
  1225 	exit ;;
  1265 	exit ;;
  1226     NSE-?:NONSTOP_KERNEL:*:*)
  1266     NEO-?:NONSTOP_KERNEL:*:*)
       
  1267 	echo neo-tandem-nsk${UNAME_RELEASE}
       
  1268 	exit ;;
       
  1269     NSE-*:NONSTOP_KERNEL:*:*)
  1227 	echo nse-tandem-nsk${UNAME_RELEASE}
  1270 	echo nse-tandem-nsk${UNAME_RELEASE}
  1228 	exit ;;
  1271 	exit ;;
  1229     NSR-?:NONSTOP_KERNEL:*:*)
  1272     NSR-?:NONSTOP_KERNEL:*:*)
  1230 	echo nsr-tandem-nsk${UNAME_RELEASE}
  1273 	echo nsr-tandem-nsk${UNAME_RELEASE}
  1231 	exit ;;
  1274 	exit ;;
  1266 	exit ;;
  1309 	exit ;;
  1267     *:ITS:*:*)
  1310     *:ITS:*:*)
  1268 	echo pdp10-unknown-its
  1311 	echo pdp10-unknown-its
  1269 	exit ;;
  1312 	exit ;;
  1270     SEI:*:*:SEIUX)
  1313     SEI:*:*:SEIUX)
  1271         echo mips-sei-seiux${UNAME_RELEASE}
  1314 	echo mips-sei-seiux${UNAME_RELEASE}
  1272 	exit ;;
  1315 	exit ;;
  1273     *:DragonFly:*:*)
  1316     *:DragonFly:*:*)
  1274 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  1317 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  1275 	exit ;;
  1318 	exit ;;
  1276     *:*VMS:*:*)
  1319     *:*VMS:*:*)
  1277     	UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1320 	UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1278 	case "${UNAME_MACHINE}" in
  1321 	case "${UNAME_MACHINE}" in
  1279 	    A*) echo alpha-dec-vms ; exit ;;
  1322 	    A*) echo alpha-dec-vms ; exit ;;
  1280 	    I*) echo ia64-dec-vms ; exit ;;
  1323 	    I*) echo ia64-dec-vms ; exit ;;
  1281 	    V*) echo vax-dec-vms ; exit ;;
  1324 	    V*) echo vax-dec-vms ; exit ;;
  1282 	esac ;;
  1325 	esac ;;
  1290 	echo ${UNAME_MACHINE}-pc-rdos
  1333 	echo ${UNAME_MACHINE}-pc-rdos
  1291 	exit ;;
  1334 	exit ;;
  1292     i*86:AROS:*:*)
  1335     i*86:AROS:*:*)
  1293 	echo ${UNAME_MACHINE}-pc-aros
  1336 	echo ${UNAME_MACHINE}-pc-aros
  1294 	exit ;;
  1337 	exit ;;
       
  1338     x86_64:VMkernel:*:*)
       
  1339 	echo ${UNAME_MACHINE}-unknown-esx
       
  1340 	exit ;;
  1295 esac
  1341 esac
  1296 
       
  1297 #echo '(No uname command or uname output not recognized.)' 1>&2
       
  1298 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
       
  1299 
  1342 
  1300 eval $set_cc_for_build
  1343 eval $set_cc_for_build
  1301 cat >$dummy.c <<EOF
  1344 cat >$dummy.c <<EOF
  1302 #ifdef _SEQUENT_
  1345 #ifdef _SEQUENT_
  1303 # include <sys/types.h>
  1346 # include <sys/types.h>
  1312   printf ("mips-sony-bsd\n"); exit (0);
  1355   printf ("mips-sony-bsd\n"); exit (0);
  1313 #else
  1356 #else
  1314 #include <sys/param.h>
  1357 #include <sys/param.h>
  1315   printf ("m68k-sony-newsos%s\n",
  1358   printf ("m68k-sony-newsos%s\n",
  1316 #ifdef NEWSOS4
  1359 #ifdef NEWSOS4
  1317           "4"
  1360 	"4"
  1318 #else
  1361 #else
  1319 	  ""
  1362 	""
  1320 #endif
  1363 #endif
  1321          ); exit (0);
  1364 	); exit (0);
  1322 #endif
  1365 #endif
  1323 #endif
  1366 #endif
  1324 
  1367 
  1325 #if defined (__arm) && defined (__acorn) && defined (__unix)
  1368 #if defined (__arm) && defined (__acorn) && defined (__unix)
  1326   printf ("arm-acorn-riscix\n"); exit (0);
  1369   printf ("arm-acorn-riscix\n"); exit (0);