Blame SOURCES/config.guess

396caf
#! /bin/sh
396caf
# Attempt to guess a canonical system name.
396caf
#   Copyright 1992-2016 Free Software Foundation, Inc.
396caf
396caf
timestamp='2016-10-02'
396caf
396caf
# This file is free software; you can redistribute it and/or modify it
396caf
# under the terms of the GNU General Public License as published by
396caf
# the Free Software Foundation; either version 3 of the License, or
396caf
# (at your option) any later version.
396caf
#
396caf
# This program is distributed in the hope that it will be useful, but
396caf
# WITHOUT ANY WARRANTY; without even the implied warranty of
396caf
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
396caf
# General Public License for more details.
396caf
#
396caf
# You should have received a copy of the GNU General Public License
396caf
# along with this program; if not, see <http://www.gnu.org/licenses/>.
396caf
#
396caf
# As a special exception to the GNU General Public License, if you
396caf
# distribute this file as part of a program that contains a
396caf
# configuration script generated by Autoconf, you may include it under
396caf
# the same distribution terms that you use for the rest of that
396caf
# program.  This Exception is an additional permission under section 7
396caf
# of the GNU General Public License, version 3 ("GPLv3").
396caf
#
396caf
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
396caf
#
396caf
# You can get the latest version of this script from:
396caf
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
396caf
#
396caf
# Please send patches to <config-patches@gnu.org>.
396caf
396caf
396caf
me=`echo "$0" | sed -e 's,.*/,,'`
396caf
396caf
usage="\
396caf
Usage: $0 [OPTION]
396caf
396caf
Output the configuration name of the system \`$me' is run on.
396caf
396caf
Operation modes:
396caf
  -h, --help         print this help, then exit
396caf
  -t, --time-stamp   print date of last modification, then exit
396caf
  -v, --version      print version number, then exit
396caf
396caf
Report bugs and patches to <config-patches@gnu.org>."
396caf
396caf
version="\
396caf
GNU config.guess ($timestamp)
396caf
396caf
Originally written by Per Bothner.
396caf
Copyright 1992-2016 Free Software Foundation, Inc.
396caf
396caf
This is free software; see the source for copying conditions.  There is NO
396caf
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
396caf
396caf
help="
396caf
Try \`$me --help' for more information."
396caf
396caf
# Parse command line
396caf
while test $# -gt 0 ; do
396caf
  case $1 in
396caf
    --time-stamp | --time* | -t )
396caf
       echo "$timestamp" ; exit ;;
396caf
    --version | -v )
396caf
       echo "$version" ; exit ;;
396caf
    --help | --h* | -h )
396caf
       echo "$usage"; exit ;;
396caf
    -- )     # Stop option processing
396caf
       shift; break ;;
396caf
    - )	# Use stdin as input.
396caf
       break ;;
396caf
    -* )
396caf
       echo "$me: invalid option $1$help" >&2
396caf
       exit 1 ;;
396caf
    * )
396caf
       break ;;
396caf
  esac
396caf
done
396caf
396caf
if test $# != 0; then
396caf
  echo "$me: too many arguments$help" >&2
396caf
  exit 1
396caf
fi
396caf
396caf
trap 'exit 1' 1 2 15
396caf
396caf
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
396caf
# compiler to aid in system detection is discouraged as it requires
396caf
# temporary files to be created and, as you can see below, it is a
396caf
# headache to deal with in a portable fashion.
396caf
396caf
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
396caf
# use `HOST_CC' if defined, but it is deprecated.
396caf
396caf
# Portable tmp directory creation inspired by the Autoconf team.
396caf
396caf
set_cc_for_build='
396caf
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
396caf
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
396caf
: ${TMPDIR=/tmp} ;
396caf
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
396caf
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
396caf
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
396caf
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
396caf
dummy=$tmp/dummy ;
396caf
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
396caf
case $CC_FOR_BUILD,$HOST_CC,$CC in
396caf
 ,,)    echo "int x;" > $dummy.c ;
396caf
	for c in cc gcc c89 c99 ; do
396caf
	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
396caf
	     CC_FOR_BUILD="$c"; break ;
396caf
	  fi ;
396caf
	done ;
396caf
	if test x"$CC_FOR_BUILD" = x ; then
396caf
	  CC_FOR_BUILD=no_compiler_found ;
396caf
	fi
396caf
	;;
396caf
 ,,*)   CC_FOR_BUILD=$CC ;;
396caf
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
396caf
esac ; set_cc_for_build= ;'
396caf
396caf
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
396caf
# (ghazi@noc.rutgers.edu 1994-08-24)
396caf
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
396caf
	PATH=$PATH:/.attbin ; export PATH
396caf
fi
396caf
396caf
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
396caf
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
396caf
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
396caf
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
396caf
396caf
case "${UNAME_SYSTEM}" in
396caf
Linux|GNU|GNU/*)
396caf
	# If the system lacks a compiler, then just pick glibc.
396caf
	# We could probably try harder.
396caf
	LIBC=gnu
396caf
396caf
	eval $set_cc_for_build
396caf
	cat <<-EOF > $dummy.c
396caf
	#include <features.h>
396caf
	#if defined(__UCLIBC__)
396caf
	LIBC=uclibc
396caf
	#elif defined(__dietlibc__)
396caf
	LIBC=dietlibc
396caf
	#else
396caf
	LIBC=gnu
396caf
	#endif
396caf
	EOF
396caf
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
396caf
	;;
396caf
esac
396caf
396caf
# Note: order is significant - the case branches are not exclusive.
396caf
396caf
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
396caf
    *:NetBSD:*:*)
396caf
	# NetBSD (nbsd) targets should (where applicable) match one or
396caf
	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
396caf
	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
396caf
	# switched to ELF, *-*-netbsd* would select the old
396caf
	# object file format.  This provides both forward
396caf
	# compatibility and a consistent mechanism for selecting the
396caf
	# object file format.
396caf
	#
396caf
	# Note: NetBSD doesn't particularly care about the vendor
396caf
	# portion of the name.  We always set it to "unknown".
396caf
	sysctl="sysctl -n hw.machine_arch"
396caf
	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
396caf
	    /sbin/$sysctl 2>/dev/null || \
396caf
	    /usr/sbin/$sysctl 2>/dev/null || \
396caf
	    echo unknown)`
396caf
	case "${UNAME_MACHINE_ARCH}" in
396caf
	    armeb) machine=armeb-unknown ;;
396caf
	    arm*) machine=arm-unknown ;;
396caf
	    sh3el) machine=shl-unknown ;;
396caf
	    sh3eb) machine=sh-unknown ;;
396caf
	    sh5el) machine=sh5le-unknown ;;
396caf
	    earmv*)
396caf
		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
396caf
		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
396caf
		machine=${arch}${endian}-unknown
396caf
		;;
396caf
	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
396caf
	esac
396caf
	# The Operating System including object format, if it has switched
396caf
	# to ELF recently (or will in the future) and ABI.
396caf
	case "${UNAME_MACHINE_ARCH}" in
396caf
	    earm*)
396caf
		os=netbsdelf
396caf
		;;
396caf
	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
396caf
		eval $set_cc_for_build
396caf
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
396caf
			| grep -q __ELF__
396caf
		then
396caf
		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
396caf
		    # Return netbsd for either.  FIX?
396caf
		    os=netbsd
396caf
		else
396caf
		    os=netbsdelf
396caf
		fi
396caf
		;;
396caf
	    *)
396caf
		os=netbsd
396caf
		;;
396caf
	esac
396caf
	# Determine ABI tags.
396caf
	case "${UNAME_MACHINE_ARCH}" in
396caf
	    earm*)
396caf
		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
396caf
		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
396caf
		;;
396caf
	esac
396caf
	# The OS release
396caf
	# Debian GNU/NetBSD machines have a different userland, and
396caf
	# thus, need a distinct triplet. However, they do not need
396caf
	# kernel version information, so it can be replaced with a
396caf
	# suitable tag, in the style of linux-gnu.
396caf
	case "${UNAME_VERSION}" in
396caf
	    Debian*)
396caf
		release='-gnu'
396caf
		;;
396caf
	    *)
396caf
		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
396caf
		;;
396caf
	esac
396caf
	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
396caf
	# contains redundant information, the shorter form:
396caf
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
396caf
	echo "${machine}-${os}${release}${abi}"
396caf
	exit ;;
396caf
    *:Bitrig:*:*)
396caf
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
396caf
	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:OpenBSD:*:*)
396caf
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
396caf
	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:LibertyBSD:*:*)
396caf
	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
396caf
	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:ekkoBSD:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:SolidBSD:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
396caf
	exit ;;
396caf
    macppc:MirBSD:*:*)
396caf
	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:MirBSD:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:Sortix:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-sortix
396caf
	exit ;;
396caf
    alpha:OSF1:*:*)
396caf
	case $UNAME_RELEASE in
396caf
	*4.0)
396caf
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
396caf
		;;
396caf
	*5.*)
396caf
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
396caf
		;;
396caf
	esac
396caf
	# According to Compaq, /usr/sbin/psrinfo has been available on
396caf
	# OSF/1 and Tru64 systems produced since 1995.  I hope that
396caf
	# covers most systems running today.  This code pipes the CPU
396caf
	# types through head -n 1, so we only detect the type of CPU 0.
396caf
	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
396caf
	case "$ALPHA_CPU_TYPE" in
396caf
	    "EV4 (21064)")
396caf
		UNAME_MACHINE=alpha ;;
396caf
	    "EV4.5 (21064)")
396caf
		UNAME_MACHINE=alpha ;;
396caf
	    "LCA4 (21066/21068)")
396caf
		UNAME_MACHINE=alpha ;;
396caf
	    "EV5 (21164)")
396caf
		UNAME_MACHINE=alphaev5 ;;
396caf
	    "EV5.6 (21164A)")
396caf
		UNAME_MACHINE=alphaev56 ;;
396caf
	    "EV5.6 (21164PC)")
396caf
		UNAME_MACHINE=alphapca56 ;;
396caf
	    "EV5.7 (21164PC)")
396caf
		UNAME_MACHINE=alphapca57 ;;
396caf
	    "EV6 (21264)")
396caf
		UNAME_MACHINE=alphaev6 ;;
396caf
	    "EV6.7 (21264A)")
396caf
		UNAME_MACHINE=alphaev67 ;;
396caf
	    "EV6.8CB (21264C)")
396caf
		UNAME_MACHINE=alphaev68 ;;
396caf
	    "EV6.8AL (21264B)")
396caf
		UNAME_MACHINE=alphaev68 ;;
396caf
	    "EV6.8CX (21264D)")
396caf
		UNAME_MACHINE=alphaev68 ;;
396caf
	    "EV6.9A (21264/EV69A)")
396caf
		UNAME_MACHINE=alphaev69 ;;
396caf
	    "EV7 (21364)")
396caf
		UNAME_MACHINE=alphaev7 ;;
396caf
	    "EV7.9 (21364A)")
396caf
		UNAME_MACHINE=alphaev79 ;;
396caf
	esac
396caf
	# A Pn.n version is a patched version.
396caf
	# A Vn.n version is a released version.
396caf
	# A Tn.n version is a released field test version.
396caf
	# A Xn.n version is an unreleased experimental baselevel.
396caf
	# 1.2 uses "1.2" for uname -r.
396caf
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
396caf
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
396caf
	exitcode=$?
396caf
	trap '' 0
396caf
	exit $exitcode ;;
396caf
    Alpha\ *:Windows_NT*:*)
396caf
	# How do we know it's Interix rather than the generic POSIX subsystem?
396caf
	# Should we change UNAME_MACHINE based on the output of uname instead
396caf
	# of the specific Alpha model?
396caf
	echo alpha-pc-interix
396caf
	exit ;;
396caf
    21064:Windows_NT:50:3)
396caf
	echo alpha-dec-winnt3.5
396caf
	exit ;;
396caf
    Amiga*:UNIX_System_V:4.0:*)
396caf
	echo m68k-unknown-sysv4
396caf
	exit ;;
396caf
    *:[Aa]miga[Oo][Ss]:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-amigaos
396caf
	exit ;;
396caf
    *:[Mm]orph[Oo][Ss]:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-morphos
396caf
	exit ;;
396caf
    *:OS/390:*:*)
396caf
	echo i370-ibm-openedition
396caf
	exit ;;
396caf
    *:z/VM:*:*)
396caf
	echo s390-ibm-zvmoe
396caf
	exit ;;
396caf
    *:OS400:*:*)
396caf
	echo powerpc-ibm-os400
396caf
	exit ;;
396caf
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
396caf
	echo arm-acorn-riscix${UNAME_RELEASE}
396caf
	exit ;;
396caf
    arm*:riscos:*:*|arm*:RISCOS:*:*)
396caf
	echo arm-unknown-riscos
396caf
	exit ;;
396caf
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
396caf
	echo hppa1.1-hitachi-hiuxmpp
396caf
	exit ;;
396caf
    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
396caf
	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
396caf
	if test "`(/bin/universe) 2>/dev/null`" = att ; then
396caf
		echo pyramid-pyramid-sysv3
396caf
	else
396caf
		echo pyramid-pyramid-bsd
396caf
	fi
396caf
	exit ;;
396caf
    NILE*:*:*:dcosx)
396caf
	echo pyramid-pyramid-svr4
396caf
	exit ;;
396caf
    DRS?6000:unix:4.0:6*)
396caf
	echo sparc-icl-nx6
396caf
	exit ;;
396caf
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
396caf
	case `/usr/bin/uname -p` in
396caf
	    sparc) echo sparc-icl-nx7; exit ;;
396caf
	esac ;;
396caf
    s390x:SunOS:*:*)
396caf
	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
396caf
	exit ;;
396caf
    sun4H:SunOS:5.*:*)
396caf
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
396caf
	exit ;;
396caf
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
396caf
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
396caf
	exit ;;
396caf
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
396caf
	echo i386-pc-auroraux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
396caf
	eval $set_cc_for_build
396caf
	SUN_ARCH=i386
396caf
	# If there is a compiler, see if it is configured for 64-bit objects.
396caf
	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
396caf
	# This test works for both compilers.
396caf
	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
396caf
	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
396caf
		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
396caf
		grep IS_64BIT_ARCH >/dev/null
396caf
	    then
396caf
		SUN_ARCH=x86_64
396caf
	    fi
396caf
	fi
396caf
	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
396caf
	exit ;;
396caf
    sun4*:SunOS:6*:*)
396caf
	# According to config.sub, this is the proper way to canonicalize
396caf
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
396caf
	# it's likely to be more like Solaris than SunOS4.
396caf
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
396caf
	exit ;;
396caf
    sun4*:SunOS:*:*)
396caf
	case "`/usr/bin/arch -k`" in
396caf
	    Series*|S4*)
396caf
		UNAME_RELEASE=`uname -v`
396caf
		;;
396caf
	esac
396caf
	# Japanese Language versions have a version number like `4.1.3-JL'.
396caf
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
396caf
	exit ;;
396caf
    sun3*:SunOS:*:*)
396caf
	echo m68k-sun-sunos${UNAME_RELEASE}
396caf
	exit ;;
396caf
    sun*:*:4.2BSD:*)
396caf
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
396caf
	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
396caf
	case "`/bin/arch`" in
396caf
	    sun3)
396caf
		echo m68k-sun-sunos${UNAME_RELEASE}
396caf
		;;
396caf
	    sun4)
396caf
		echo sparc-sun-sunos${UNAME_RELEASE}
396caf
		;;
396caf
	esac
396caf
	exit ;;
396caf
    aushp:SunOS:*:*)
396caf
	echo sparc-auspex-sunos${UNAME_RELEASE}
396caf
	exit ;;
396caf
    # The situation for MiNT is a little confusing.  The machine name
396caf
    # can be virtually everything (everything which is not
396caf
    # "atarist" or "atariste" at least should have a processor
396caf
    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
396caf
    # to the lowercase version "mint" (or "freemint").  Finally
396caf
    # the system name "TOS" denotes a system which is actually not
396caf
    # MiNT.  But MiNT is downward compatible to TOS, so this should
396caf
    # be no problem.
396caf
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
396caf
	echo m68k-atari-mint${UNAME_RELEASE}
396caf
	exit ;;
396caf
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
396caf
	echo m68k-atari-mint${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
396caf
	echo m68k-atari-mint${UNAME_RELEASE}
396caf
	exit ;;
396caf
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
396caf
	echo m68k-milan-mint${UNAME_RELEASE}
396caf
	exit ;;
396caf
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
396caf
	echo m68k-hades-mint${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
396caf
	echo m68k-unknown-mint${UNAME_RELEASE}
396caf
	exit ;;
396caf
    m68k:machten:*:*)
396caf
	echo m68k-apple-machten${UNAME_RELEASE}
396caf
	exit ;;
396caf
    powerpc:machten:*:*)
396caf
	echo powerpc-apple-machten${UNAME_RELEASE}
396caf
	exit ;;
396caf
    RISC*:Mach:*:*)
396caf
	echo mips-dec-mach_bsd4.3
396caf
	exit ;;
396caf
    RISC*:ULTRIX:*:*)
396caf
	echo mips-dec-ultrix${UNAME_RELEASE}
396caf
	exit ;;
396caf
    VAX*:ULTRIX*:*:*)
396caf
	echo vax-dec-ultrix${UNAME_RELEASE}
396caf
	exit ;;
396caf
    2020:CLIX:*:* | 2430:CLIX:*:*)
396caf
	echo clipper-intergraph-clix${UNAME_RELEASE}
396caf
	exit ;;
396caf
    mips:*:*:UMIPS | mips:*:*:RISCos)
396caf
	eval $set_cc_for_build
396caf
	sed 's/^	//' << EOF >$dummy.c
396caf
#ifdef __cplusplus
396caf
#include <stdio.h>  /* for printf() prototype */
396caf
	int main (int argc, char *argv[]) {
396caf
#else
396caf
	int main (argc, argv) int argc; char *argv[]; {
396caf
#endif
396caf
	#if defined (host_mips) && defined (MIPSEB)
396caf
	#if defined (SYSTYPE_SYSV)
396caf
	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
396caf
	#endif
396caf
	#if defined (SYSTYPE_SVR4)
396caf
	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
396caf
	#endif
396caf
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
396caf
	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
396caf
	#endif
396caf
	#endif
396caf
	  exit (-1);
396caf
	}
396caf
EOF
396caf
	$CC_FOR_BUILD -o $dummy $dummy.c &&
396caf
	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
396caf
	  SYSTEM_NAME=`$dummy $dummyarg` &&
396caf
	    { echo "$SYSTEM_NAME"; exit; }
396caf
	echo mips-mips-riscos${UNAME_RELEASE}
396caf
	exit ;;
396caf
    Motorola:PowerMAX_OS:*:*)
396caf
	echo powerpc-motorola-powermax
396caf
	exit ;;
396caf
    Motorola:*:4.3:PL8-*)
396caf
	echo powerpc-harris-powermax
396caf
	exit ;;
396caf
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
396caf
	echo powerpc-harris-powermax
396caf
	exit ;;
396caf
    Night_Hawk:Power_UNIX:*:*)
396caf
	echo powerpc-harris-powerunix
396caf
	exit ;;
396caf
    m88k:CX/UX:7*:*)
396caf
	echo m88k-harris-cxux7
396caf
	exit ;;
396caf
    m88k:*:4*:R4*)
396caf
	echo m88k-motorola-sysv4
396caf
	exit ;;
396caf
    m88k:*:3*:R3*)
396caf
	echo m88k-motorola-sysv3
396caf
	exit ;;
396caf
    AViiON:dgux:*:*)
396caf
	# DG/UX returns AViiON for all architectures
396caf
	UNAME_PROCESSOR=`/usr/bin/uname -p`
396caf
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
396caf
	then
396caf
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
396caf
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
396caf
	    then
396caf
		echo m88k-dg-dgux${UNAME_RELEASE}
396caf
	    else
396caf
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
396caf
	    fi
396caf
	else
396caf
	    echo i586-dg-dgux${UNAME_RELEASE}
396caf
	fi
396caf
	exit ;;
396caf
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
396caf
	echo m88k-dolphin-sysv3
396caf
	exit ;;
396caf
    M88*:*:R3*:*)
396caf
	# Delta 88k system running SVR3
396caf
	echo m88k-motorola-sysv3
396caf
	exit ;;
396caf
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
396caf
	echo m88k-tektronix-sysv3
396caf
	exit ;;
396caf
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
396caf
	echo m68k-tektronix-bsd
396caf
	exit ;;
396caf
    *:IRIX*:*:*)
396caf
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
396caf
	exit ;;
396caf
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
396caf
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
396caf
	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
396caf
    i*86:AIX:*:*)
396caf
	echo i386-ibm-aix
396caf
	exit ;;
396caf
    ia64:AIX:*:*)
396caf
	if [ -x /usr/bin/oslevel ] ; then
396caf
		IBM_REV=`/usr/bin/oslevel`
396caf
	else
396caf
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
396caf
	fi
396caf
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
396caf
	exit ;;
396caf
    *:AIX:2:3)
396caf
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
396caf
		eval $set_cc_for_build
396caf
		sed 's/^		//' << EOF >$dummy.c
396caf
		#include <sys/systemcfg.h>
396caf
396caf
		main()
396caf
			{
396caf
			if (!__power_pc())
396caf
				exit(1);
396caf
			puts("powerpc-ibm-aix3.2.5");
396caf
			exit(0);
396caf
			}
396caf
EOF
396caf
		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
396caf
		then
396caf
			echo "$SYSTEM_NAME"
396caf
		else
396caf
			echo rs6000-ibm-aix3.2.5
396caf
		fi
396caf
	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
396caf
		echo rs6000-ibm-aix3.2.4
396caf
	else
396caf
		echo rs6000-ibm-aix3.2
396caf
	fi
396caf
	exit ;;
396caf
    *:AIX:*:[4567])
396caf
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
396caf
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
396caf
		IBM_ARCH=rs6000
396caf
	else
396caf
		IBM_ARCH=powerpc
396caf
	fi
396caf
	if [ -x /usr/bin/lslpp ] ; then
396caf
		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
396caf
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
396caf
	else
396caf
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
396caf
	fi
396caf
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
396caf
	exit ;;
396caf
    *:AIX:*:*)
396caf
	echo rs6000-ibm-aix
396caf
	exit ;;
396caf
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
396caf
	echo romp-ibm-bsd4.4
396caf
	exit ;;
396caf
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
396caf
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
396caf
	exit ;;                             # report: romp-ibm BSD 4.3
396caf
    *:BOSX:*:*)
396caf
	echo rs6000-bull-bosx
396caf
	exit ;;
396caf
    DPX/2?00:B.O.S.:*:*)
396caf
	echo m68k-bull-sysv3
396caf
	exit ;;
396caf
    9000/[34]??:4.3bsd:1.*:*)
396caf
	echo m68k-hp-bsd
396caf
	exit ;;
396caf
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
396caf
	echo m68k-hp-bsd4.4
396caf
	exit ;;
396caf
    9000/[34678]??:HP-UX:*:*)
396caf
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
396caf
	case "${UNAME_MACHINE}" in
396caf
	    9000/31? )            HP_ARCH=m68000 ;;
396caf
	    9000/[34]?? )         HP_ARCH=m68k ;;
396caf
	    9000/[678][0-9][0-9])
396caf
		if [ -x /usr/bin/getconf ]; then
396caf
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
396caf
		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
396caf
		    case "${sc_cpu_version}" in
396caf
		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
396caf
		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
396caf
		      532)                      # CPU_PA_RISC2_0
396caf
			case "${sc_kernel_bits}" in
396caf
			  32) HP_ARCH=hppa2.0n ;;
396caf
			  64) HP_ARCH=hppa2.0w ;;
396caf
			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
396caf
			esac ;;
396caf
		    esac
396caf
		fi
396caf
		if [ "${HP_ARCH}" = "" ]; then
396caf
		    eval $set_cc_for_build
396caf
		    sed 's/^		//' << EOF >$dummy.c
396caf
396caf
		#define _HPUX_SOURCE
396caf
		#include <stdlib.h>
396caf
		#include <unistd.h>
396caf
396caf
		int main ()
396caf
		{
396caf
		#if defined(_SC_KERNEL_BITS)
396caf
		    long bits = sysconf(_SC_KERNEL_BITS);
396caf
		#endif
396caf
		    long cpu  = sysconf (_SC_CPU_VERSION);
396caf
396caf
		    switch (cpu)
396caf
			{
396caf
			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
396caf
			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
396caf
			case CPU_PA_RISC2_0:
396caf
		#if defined(_SC_KERNEL_BITS)
396caf
			    switch (bits)
396caf
				{
396caf
				case 64: puts ("hppa2.0w"); break;
396caf
				case 32: puts ("hppa2.0n"); break;
396caf
				default: puts ("hppa2.0"); break;
396caf
				} break;
396caf
		#else  /* !defined(_SC_KERNEL_BITS) */
396caf
			    puts ("hppa2.0"); break;
396caf
		#endif
396caf
			default: puts ("hppa1.0"); break;
396caf
			}
396caf
		    exit (0);
396caf
		}
396caf
EOF
396caf
		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
396caf
		    test -z "$HP_ARCH" && HP_ARCH=hppa
396caf
		fi ;;
396caf
	esac
396caf
	if [ ${HP_ARCH} = hppa2.0w ]
396caf
	then
396caf
	    eval $set_cc_for_build
396caf
396caf
	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
396caf
	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
396caf
	    # generating 64-bit code.  GNU and HP use different nomenclature:
396caf
	    #
396caf
	    # $ CC_FOR_BUILD=cc ./config.guess
396caf
	    # => hppa2.0w-hp-hpux11.23
396caf
	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
396caf
	    # => hppa64-hp-hpux11.23
396caf
396caf
	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
396caf
		grep -q __LP64__
396caf
	    then
396caf
		HP_ARCH=hppa2.0w
396caf
	    else
396caf
		HP_ARCH=hppa64
396caf
	    fi
396caf
	fi
396caf
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
396caf
	exit ;;
396caf
    ia64:HP-UX:*:*)
396caf
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
396caf
	echo ia64-hp-hpux${HPUX_REV}
396caf
	exit ;;
396caf
    3050*:HI-UX:*:*)
396caf
	eval $set_cc_for_build
396caf
	sed 's/^	//' << EOF >$dummy.c
396caf
	#include <unistd.h>
396caf
	int
396caf
	main ()
396caf
	{
396caf
	  long cpu = sysconf (_SC_CPU_VERSION);
396caf
	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
396caf
	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
396caf
	     results, however.  */
396caf
	  if (CPU_IS_PA_RISC (cpu))
396caf
	    {
396caf
	      switch (cpu)
396caf
		{
396caf
		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
396caf
		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
396caf
		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
396caf
		  default: puts ("hppa-hitachi-hiuxwe2"); break;
396caf
		}
396caf
	    }
396caf
	  else if (CPU_IS_HP_MC68K (cpu))
396caf
	    puts ("m68k-hitachi-hiuxwe2");
396caf
	  else puts ("unknown-hitachi-hiuxwe2");
396caf
	  exit (0);
396caf
	}
396caf
EOF
396caf
	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
396caf
		{ echo "$SYSTEM_NAME"; exit; }
396caf
	echo unknown-hitachi-hiuxwe2
396caf
	exit ;;
396caf
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
396caf
	echo hppa1.1-hp-bsd
396caf
	exit ;;
396caf
    9000/8??:4.3bsd:*:*)
396caf
	echo hppa1.0-hp-bsd
396caf
	exit ;;
396caf
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
396caf
	echo hppa1.0-hp-mpeix
396caf
	exit ;;
396caf
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
396caf
	echo hppa1.1-hp-osf
396caf
	exit ;;
396caf
    hp8??:OSF1:*:*)
396caf
	echo hppa1.0-hp-osf
396caf
	exit ;;
396caf
    i*86:OSF1:*:*)
396caf
	if [ -x /usr/sbin/sysversion ] ; then
396caf
	    echo ${UNAME_MACHINE}-unknown-osf1mk
396caf
	else
396caf
	    echo ${UNAME_MACHINE}-unknown-osf1
396caf
	fi
396caf
	exit ;;
396caf
    parisc*:Lites*:*:*)
396caf
	echo hppa1.1-hp-lites
396caf
	exit ;;
396caf
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
396caf
	echo c1-convex-bsd
396caf
	exit ;;
396caf
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
396caf
	if getsysinfo -f scalar_acc
396caf
	then echo c32-convex-bsd
396caf
	else echo c2-convex-bsd
396caf
	fi
396caf
	exit ;;
396caf
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
396caf
	echo c34-convex-bsd
396caf
	exit ;;
396caf
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
396caf
	echo c38-convex-bsd
396caf
	exit ;;
396caf
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
396caf
	echo c4-convex-bsd
396caf
	exit ;;
396caf
    CRAY*Y-MP:*:*:*)
396caf
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
396caf
	exit ;;
396caf
    CRAY*[A-Z]90:*:*:*)
396caf
	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
396caf
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
396caf
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
396caf
	      -e 's/\.[^.]*$/.X/'
396caf
	exit ;;
396caf
    CRAY*TS:*:*:*)
396caf
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
396caf
	exit ;;
396caf
    CRAY*T3E:*:*:*)
396caf
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
396caf
	exit ;;
396caf
    CRAY*SV1:*:*:*)
396caf
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
396caf
	exit ;;
396caf
    *:UNICOS/mp:*:*)
396caf
	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
396caf
	exit ;;
396caf
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
396caf
	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
396caf
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
396caf
	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
396caf
	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
396caf
	exit ;;
396caf
    5000:UNIX_System_V:4.*:*)
396caf
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
396caf
	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
396caf
	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
396caf
	exit ;;
396caf
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
396caf
	exit ;;
396caf
    sparc*:BSD/OS:*:*)
396caf
	echo sparc-unknown-bsdi${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:BSD/OS:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:FreeBSD:*:*)
396caf
	UNAME_PROCESSOR=`/usr/bin/uname -p`
396caf
	case ${UNAME_PROCESSOR} in
396caf
	    amd64)
396caf
		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
396caf
	    *)
396caf
		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
396caf
	esac
396caf
	exit ;;
396caf
    i*:CYGWIN*:*)
396caf
	echo ${UNAME_MACHINE}-pc-cygwin
396caf
	exit ;;
396caf
    *:MINGW64*:*)
396caf
	echo ${UNAME_MACHINE}-pc-mingw64
396caf
	exit ;;
396caf
    *:MINGW*:*)
396caf
	echo ${UNAME_MACHINE}-pc-mingw32
396caf
	exit ;;
396caf
    *:MSYS*:*)
396caf
	echo ${UNAME_MACHINE}-pc-msys
396caf
	exit ;;
396caf
    i*:windows32*:*)
396caf
	# uname -m includes "-pc" on this system.
396caf
	echo ${UNAME_MACHINE}-mingw32
396caf
	exit ;;
396caf
    i*:PW*:*)
396caf
	echo ${UNAME_MACHINE}-pc-pw32
396caf
	exit ;;
396caf
    *:Interix*:*)
396caf
	case ${UNAME_MACHINE} in
396caf
	    x86)
396caf
		echo i586-pc-interix${UNAME_RELEASE}
396caf
		exit ;;
396caf
	    authenticamd | genuineintel | EM64T)
396caf
		echo x86_64-unknown-interix${UNAME_RELEASE}
396caf
		exit ;;
396caf
	    IA64)
396caf
		echo ia64-unknown-interix${UNAME_RELEASE}
396caf
		exit ;;
396caf
	esac ;;
396caf
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
396caf
	echo i${UNAME_MACHINE}-pc-mks
396caf
	exit ;;
396caf
    8664:Windows_NT:*)
396caf
	echo x86_64-pc-mks
396caf
	exit ;;
396caf
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
396caf
	# How do we know it's Interix rather than the generic POSIX subsystem?
396caf
	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
396caf
	# UNAME_MACHINE based on the output of uname instead of i386?
396caf
	echo i586-pc-interix
396caf
	exit ;;
396caf
    i*:UWIN*:*)
396caf
	echo ${UNAME_MACHINE}-pc-uwin
396caf
	exit ;;
396caf
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
396caf
	echo x86_64-unknown-cygwin
396caf
	exit ;;
396caf
    p*:CYGWIN*:*)
396caf
	echo powerpcle-unknown-cygwin
396caf
	exit ;;
396caf
    prep*:SunOS:5.*:*)
396caf
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
396caf
	exit ;;
396caf
    *:GNU:*:*)
396caf
	# the GNU system
396caf
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
396caf
	exit ;;
396caf
    *:GNU/*:*:*)
396caf
	# other systems with GNU libc and userland
396caf
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
396caf
	exit ;;
396caf
    i*86:Minix:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-minix
396caf
	exit ;;
396caf
    aarch64:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    aarch64_be:Linux:*:*)
396caf
	UNAME_MACHINE=aarch64_be
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    alpha:Linux:*:*)
396caf
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
396caf
	  EV5)   UNAME_MACHINE=alphaev5 ;;
396caf
	  EV56)  UNAME_MACHINE=alphaev56 ;;
396caf
	  PCA56) UNAME_MACHINE=alphapca56 ;;
396caf
	  PCA57) UNAME_MACHINE=alphapca56 ;;
396caf
	  EV6)   UNAME_MACHINE=alphaev6 ;;
396caf
	  EV67)  UNAME_MACHINE=alphaev67 ;;
396caf
	  EV68*) UNAME_MACHINE=alphaev68 ;;
396caf
	esac
396caf
	objdump --private-headers /bin/sh | grep -q ld.so.1
396caf
	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    arc:Linux:*:* | arceb:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    arm*:Linux:*:*)
396caf
	eval $set_cc_for_build
396caf
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
396caf
	    | grep -q __ARM_EABI__
396caf
	then
396caf
	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	else
396caf
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
396caf
		| grep -q __ARM_PCS_VFP
396caf
	    then
396caf
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
396caf
	    else
396caf
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
396caf
	    fi
396caf
	fi
396caf
	exit ;;
396caf
    avr32*:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    cris:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
396caf
	exit ;;
396caf
    crisv32:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
396caf
	exit ;;
396caf
    e2k:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    frv:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    hexagon:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    i*86:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
396caf
	exit ;;
396caf
    ia64:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    k1om:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    m32r*:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    m68*:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    mips:Linux:*:* | mips64:Linux:*:*)
396caf
	eval $set_cc_for_build
396caf
	sed 's/^	//' << EOF >$dummy.c
396caf
	#undef CPU
396caf
	#undef ${UNAME_MACHINE}
396caf
	#undef ${UNAME_MACHINE}el
396caf
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
396caf
	CPU=${UNAME_MACHINE}el
396caf
	#else
396caf
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
396caf
	CPU=${UNAME_MACHINE}
396caf
	#else
396caf
	CPU=
396caf
	#endif
396caf
	#endif
396caf
EOF
396caf
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
396caf
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
396caf
	;;
396caf
    mips64el:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    openrisc*:Linux:*:*)
396caf
	echo or1k-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    or32:Linux:*:* | or1k*:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    padre:Linux:*:*)
396caf
	echo sparc-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    parisc64:Linux:*:* | hppa64:Linux:*:*)
396caf
	echo hppa64-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    parisc:Linux:*:* | hppa:Linux:*:*)
396caf
	# Look for CPU level
396caf
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
396caf
	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
396caf
	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
396caf
	  *)    echo hppa-unknown-linux-${LIBC} ;;
396caf
	esac
396caf
	exit ;;
396caf
    ppc64:Linux:*:*)
396caf
	echo powerpc64-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    ppc:Linux:*:*)
396caf
	echo powerpc-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    ppc64le:Linux:*:*)
396caf
	echo powerpc64le-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    ppcle:Linux:*:*)
396caf
	echo powerpcle-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    riscv32:Linux:*:* | riscv64:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    s390:Linux:*:* | s390x:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
396caf
	exit ;;
396caf
    sh64*:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    sh*:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    sparc:Linux:*:* | sparc64:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    tile*:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    vax:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
396caf
	exit ;;
396caf
    x86_64:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
396caf
	exit ;;
396caf
    xtensa*:Linux:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
396caf
	exit ;;
396caf
    i*86:DYNIX/ptx:4*:*)
396caf
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
396caf
	# earlier versions are messed up and put the nodename in both
396caf
	# sysname and nodename.
396caf
	echo i386-sequent-sysv4
396caf
	exit ;;
396caf
    i*86:UNIX_SV:4.2MP:2.*)
396caf
	# Unixware is an offshoot of SVR4, but it has its own version
396caf
	# number series starting with 2...
396caf
	# I am not positive that other SVR4 systems won't match this,
396caf
	# I just have to hope.  -- rms.
396caf
	# Use sysv4.2uw... so that sysv4* matches it.
396caf
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
396caf
	exit ;;
396caf
    i*86:OS/2:*:*)
396caf
	# If we were able to find `uname', then EMX Unix compatibility
396caf
	# is probably installed.
396caf
	echo ${UNAME_MACHINE}-pc-os2-emx
396caf
	exit ;;
396caf
    i*86:XTS-300:*:STOP)
396caf
	echo ${UNAME_MACHINE}-unknown-stop
396caf
	exit ;;
396caf
    i*86:atheos:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-atheos
396caf
	exit ;;
396caf
    i*86:syllable:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-syllable
396caf
	exit ;;
396caf
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
396caf
	echo i386-unknown-lynxos${UNAME_RELEASE}
396caf
	exit ;;
396caf
    i*86:*DOS:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
396caf
	exit ;;
396caf
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
396caf
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
396caf
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
396caf
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
396caf
	else
396caf
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
396caf
	fi
396caf
	exit ;;
396caf
    i*86:*:5:[678]*)
396caf
	# UnixWare 7.x, OpenUNIX and OpenServer 6.
396caf
	case `/bin/uname -X | grep "^Machine"` in
396caf
	    *486*)	     UNAME_MACHINE=i486 ;;
396caf
	    *Pentium)	     UNAME_MACHINE=i586 ;;
396caf
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
396caf
	esac
396caf
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
396caf
	exit ;;
396caf
    i*86:*:3.2:*)
396caf
	if test -f /usr/options/cb.name; then
396caf
		UNAME_REL=`sed -n 's/.*Version //p' 
396caf
		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
396caf
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
396caf
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
396caf
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
396caf
		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
396caf
			&& UNAME_MACHINE=i586
396caf
		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
396caf
			&& UNAME_MACHINE=i686
396caf
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
396caf
			&& UNAME_MACHINE=i686
396caf
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
396caf
	else
396caf
		echo ${UNAME_MACHINE}-pc-sysv32
396caf
	fi
396caf
	exit ;;
396caf
    pc:*:*:*)
396caf
	# Left here for compatibility:
396caf
	# uname -m prints for DJGPP always 'pc', but it prints nothing about
396caf
	# the processor, so we play safe by assuming i586.
396caf
	# Note: whatever this is, it MUST be the same as what config.sub
396caf
	# prints for the "djgpp" host, or else GDB configure will decide that
396caf
	# this is a cross-build.
396caf
	echo i586-pc-msdosdjgpp
396caf
	exit ;;
396caf
    Intel:Mach:3*:*)
396caf
	echo i386-pc-mach3
396caf
	exit ;;
396caf
    paragon:*:*:*)
396caf
	echo i860-intel-osf1
396caf
	exit ;;
396caf
    i860:*:4.*:*) # i860-SVR4
396caf
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
396caf
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
396caf
	else # Add other i860-SVR4 vendors below as they are discovered.
396caf
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
396caf
	fi
396caf
	exit ;;
396caf
    mini*:CTIX:SYS*5:*)
396caf
	# "miniframe"
396caf
	echo m68010-convergent-sysv
396caf
	exit ;;
396caf
    mc68k:UNIX:SYSTEM5:3.51m)
396caf
	echo m68k-convergent-sysv
396caf
	exit ;;
396caf
    M680?0:D-NIX:5.3:*)
396caf
	echo m68k-diab-dnix
396caf
	exit ;;
396caf
    M68*:*:R3V[5678]*:*)
396caf
	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
396caf
    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
396caf
	OS_REL=''
396caf
	test -r /etc/.relid \
396caf
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
396caf
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
396caf
	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
396caf
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
396caf
	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
396caf
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
396caf
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
396caf
	  && { echo i486-ncr-sysv4; exit; } ;;
396caf
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
396caf
	OS_REL='.3'
396caf
	test -r /etc/.relid \
396caf
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
396caf
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
396caf
	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
396caf
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
396caf
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
396caf
	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
396caf
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
396caf
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
396caf
	echo m68k-unknown-lynxos${UNAME_RELEASE}
396caf
	exit ;;
396caf
    mc68030:UNIX_System_V:4.*:*)
396caf
	echo m68k-atari-sysv4
396caf
	exit ;;
396caf
    TSUNAMI:LynxOS:2.*:*)
396caf
	echo sparc-unknown-lynxos${UNAME_RELEASE}
396caf
	exit ;;
396caf
    rs6000:LynxOS:2.*:*)
396caf
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
396caf
	exit ;;
396caf
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
396caf
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
396caf
	exit ;;
396caf
    SM[BE]S:UNIX_SV:*:*)
396caf
	echo mips-dde-sysv${UNAME_RELEASE}
396caf
	exit ;;
396caf
    RM*:ReliantUNIX-*:*:*)
396caf
	echo mips-sni-sysv4
396caf
	exit ;;
396caf
    RM*:SINIX-*:*:*)
396caf
	echo mips-sni-sysv4
396caf
	exit ;;
396caf
    *:SINIX-*:*:*)
396caf
	if uname -p 2>/dev/null >/dev/null ; then
396caf
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
396caf
		echo ${UNAME_MACHINE}-sni-sysv4
396caf
	else
396caf
		echo ns32k-sni-sysv
396caf
	fi
396caf
	exit ;;
396caf
    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
396caf
			# says <Richard.M.Bartel@ccMail.Census.GOV>
396caf
	echo i586-unisys-sysv4
396caf
	exit ;;
396caf
    *:UNIX_System_V:4*:FTX*)
396caf
	# From Gerald Hewes <hewes@openmarket.com>.
396caf
	# How about differentiating between stratus architectures? -djm
396caf
	echo hppa1.1-stratus-sysv4
396caf
	exit ;;
396caf
    *:*:*:FTX*)
396caf
	# From seanf@swdc.stratus.com.
396caf
	echo i860-stratus-sysv4
396caf
	exit ;;
396caf
    i*86:VOS:*:*)
396caf
	# From Paul.Green@stratus.com.
396caf
	echo ${UNAME_MACHINE}-stratus-vos
396caf
	exit ;;
396caf
    *:VOS:*:*)
396caf
	# From Paul.Green@stratus.com.
396caf
	echo hppa1.1-stratus-vos
396caf
	exit ;;
396caf
    mc68*:A/UX:*:*)
396caf
	echo m68k-apple-aux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    news*:NEWS-OS:6*:*)
396caf
	echo mips-sony-newsos6
396caf
	exit ;;
396caf
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
396caf
	if [ -d /usr/nec ]; then
396caf
		echo mips-nec-sysv${UNAME_RELEASE}
396caf
	else
396caf
		echo mips-unknown-sysv${UNAME_RELEASE}
396caf
	fi
396caf
	exit ;;
396caf
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
396caf
	echo powerpc-be-beos
396caf
	exit ;;
396caf
    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
396caf
	echo powerpc-apple-beos
396caf
	exit ;;
396caf
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
396caf
	echo i586-pc-beos
396caf
	exit ;;
396caf
    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
396caf
	echo i586-pc-haiku
396caf
	exit ;;
396caf
    x86_64:Haiku:*:*)
396caf
	echo x86_64-unknown-haiku
396caf
	exit ;;
396caf
    SX-4:SUPER-UX:*:*)
396caf
	echo sx4-nec-superux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    SX-5:SUPER-UX:*:*)
396caf
	echo sx5-nec-superux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    SX-6:SUPER-UX:*:*)
396caf
	echo sx6-nec-superux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    SX-7:SUPER-UX:*:*)
396caf
	echo sx7-nec-superux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    SX-8:SUPER-UX:*:*)
396caf
	echo sx8-nec-superux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    SX-8R:SUPER-UX:*:*)
396caf
	echo sx8r-nec-superux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    SX-ACE:SUPER-UX:*:*)
396caf
	echo sxace-nec-superux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    Power*:Rhapsody:*:*)
396caf
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:Rhapsody:*:*)
396caf
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:Darwin:*:*)
396caf
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
396caf
	eval $set_cc_for_build
396caf
	if test "$UNAME_PROCESSOR" = unknown ; then
396caf
	    UNAME_PROCESSOR=powerpc
396caf
	fi
396caf
	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
396caf
	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
396caf
		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
396caf
		    (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
396caf
		    grep IS_64BIT_ARCH >/dev/null
396caf
		then
396caf
		    case $UNAME_PROCESSOR in
396caf
			i386) UNAME_PROCESSOR=x86_64 ;;
396caf
			powerpc) UNAME_PROCESSOR=powerpc64 ;;
396caf
		    esac
396caf
		fi
396caf
	    fi
396caf
	elif test "$UNAME_PROCESSOR" = i386 ; then
396caf
	    # Avoid executing cc on OS X 10.9, as it ships with a stub
396caf
	    # that puts up a graphical alert prompting to install
396caf
	    # developer tools.  Any system running Mac OS X 10.7 or
396caf
	    # later (Darwin 11 and later) is required to have a 64-bit
396caf
	    # processor. This is not true of the ARM version of Darwin
396caf
	    # that Apple uses in portable devices.
396caf
	    UNAME_PROCESSOR=x86_64
396caf
	fi
396caf
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
396caf
	UNAME_PROCESSOR=`uname -p`
396caf
	if test "$UNAME_PROCESSOR" = x86; then
396caf
		UNAME_PROCESSOR=i386
396caf
		UNAME_MACHINE=pc
396caf
	fi
396caf
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:QNX:*:4*)
396caf
	echo i386-pc-qnx
396caf
	exit ;;
396caf
    NEO-?:NONSTOP_KERNEL:*:*)
396caf
	echo neo-tandem-nsk${UNAME_RELEASE}
396caf
	exit ;;
396caf
    NSE-*:NONSTOP_KERNEL:*:*)
396caf
	echo nse-tandem-nsk${UNAME_RELEASE}
396caf
	exit ;;
396caf
    NSR-?:NONSTOP_KERNEL:*:*)
396caf
	echo nsr-tandem-nsk${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:NonStop-UX:*:*)
396caf
	echo mips-compaq-nonstopux
396caf
	exit ;;
396caf
    BS2000:POSIX*:*:*)
396caf
	echo bs2000-siemens-sysv
396caf
	exit ;;
396caf
    DS/*:UNIX_System_V:*:*)
396caf
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:Plan9:*:*)
396caf
	# "uname -m" is not consistent, so use $cputype instead. 386
396caf
	# is converted to i386 for consistency with other x86
396caf
	# operating systems.
396caf
	if test "$cputype" = 386; then
396caf
	    UNAME_MACHINE=i386
396caf
	else
396caf
	    UNAME_MACHINE="$cputype"
396caf
	fi
396caf
	echo ${UNAME_MACHINE}-unknown-plan9
396caf
	exit ;;
396caf
    *:TOPS-10:*:*)
396caf
	echo pdp10-unknown-tops10
396caf
	exit ;;
396caf
    *:TENEX:*:*)
396caf
	echo pdp10-unknown-tenex
396caf
	exit ;;
396caf
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
396caf
	echo pdp10-dec-tops20
396caf
	exit ;;
396caf
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
396caf
	echo pdp10-xkl-tops20
396caf
	exit ;;
396caf
    *:TOPS-20:*:*)
396caf
	echo pdp10-unknown-tops20
396caf
	exit ;;
396caf
    *:ITS:*:*)
396caf
	echo pdp10-unknown-its
396caf
	exit ;;
396caf
    SEI:*:*:SEIUX)
396caf
	echo mips-sei-seiux${UNAME_RELEASE}
396caf
	exit ;;
396caf
    *:DragonFly:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
396caf
	exit ;;
396caf
    *:*VMS:*:*)
396caf
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
396caf
	case "${UNAME_MACHINE}" in
396caf
	    A*) echo alpha-dec-vms ; exit ;;
396caf
	    I*) echo ia64-dec-vms ; exit ;;
396caf
	    V*) echo vax-dec-vms ; exit ;;
396caf
	esac ;;
396caf
    *:XENIX:*:SysV)
396caf
	echo i386-pc-xenix
396caf
	exit ;;
396caf
    i*86:skyos:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
396caf
	exit ;;
396caf
    i*86:rdos:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-rdos
396caf
	exit ;;
396caf
    i*86:AROS:*:*)
396caf
	echo ${UNAME_MACHINE}-pc-aros
396caf
	exit ;;
396caf
    x86_64:VMkernel:*:*)
396caf
	echo ${UNAME_MACHINE}-unknown-esx
396caf
	exit ;;
396caf
    amd64:Isilon\ OneFS:*:*)
396caf
	echo x86_64-unknown-onefs
396caf
	exit ;;
396caf
esac
396caf
396caf
cat >&2 <
396caf
$0: unable to guess system type
396caf
396caf
This script (version $timestamp), has failed to recognize the
396caf
operating system you are using. If your script is old, overwrite
396caf
config.guess and config.sub with the latest versions from:
396caf
396caf
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
396caf
and
396caf
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
396caf
396caf
If $0 has already been updated, send the following data and any
396caf
information you think might be pertinent to config-patches@gnu.org to
396caf
provide the necessary information to handle your system.
396caf
396caf
config.guess timestamp = $timestamp
396caf
396caf
uname -m = `(uname -m) 2>/dev/null || echo unknown`
396caf
uname -r = `(uname -r) 2>/dev/null || echo unknown`
396caf
uname -s = `(uname -s) 2>/dev/null || echo unknown`
396caf
uname -v = `(uname -v) 2>/dev/null || echo unknown`
396caf
396caf
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
396caf
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
396caf
396caf
hostinfo               = `(hostinfo) 2>/dev/null`
396caf
/bin/universe          = `(/bin/universe) 2>/dev/null`
396caf
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
396caf
/bin/arch              = `(/bin/arch) 2>/dev/null`
396caf
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
396caf
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
396caf
396caf
UNAME_MACHINE = ${UNAME_MACHINE}
396caf
UNAME_RELEASE = ${UNAME_RELEASE}
396caf
UNAME_SYSTEM  = ${UNAME_SYSTEM}
396caf
UNAME_VERSION = ${UNAME_VERSION}
396caf
EOF
396caf
396caf
exit 1
396caf
396caf
# Local variables:
396caf
# eval: (add-hook 'write-file-hooks 'time-stamp)
396caf
# time-stamp-start: "timestamp='"
396caf
# time-stamp-format: "%:y-%02m-%02d"
396caf
# time-stamp-end: "'"
396caf
# End: