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