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