Blame SOURCES/config.guess

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