config.guess revision ffe57424
1ffe57424Smrg#!/usr/bin/sh
217ca54c3Smrg# Attempt to guess a canonical system name.
3ffe57424Smrg#   Copyright 1992-2016 Free Software Foundation, Inc.
417ca54c3Smrg
5ffe57424Smrgtimestamp='2016-10-02'
617ca54c3Smrg
717ca54c3Smrg# This file is free software; you can redistribute it and/or modify it
817ca54c3Smrg# under the terms of the GNU General Public License as published by
917ca54c3Smrg# the Free Software Foundation; either version 3 of the License, or
1017ca54c3Smrg# (at your option) any later version.
1117ca54c3Smrg#
1217ca54c3Smrg# This program is distributed in the hope that it will be useful, but
1317ca54c3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
1417ca54c3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1517ca54c3Smrg# General Public License for more details.
1617ca54c3Smrg#
1717ca54c3Smrg# You should have received a copy of the GNU General Public License
18ffe57424Smrg# along with this program; if not, see <http://www.gnu.org/licenses/>.
1917ca54c3Smrg#
2017ca54c3Smrg# As a special exception to the GNU General Public License, if you
2117ca54c3Smrg# distribute this file as part of a program that contains a
2217ca54c3Smrg# configuration script generated by Autoconf, you may include it under
2317ca54c3Smrg# the same distribution terms that you use for the rest of that
2417ca54c3Smrg# program.  This Exception is an additional permission under section 7
2517ca54c3Smrg# of the GNU General Public License, version 3 ("GPLv3").
2617ca54c3Smrg#
2717ca54c3Smrg# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2817ca54c3Smrg#
2917ca54c3Smrg# You can get the latest version of this script from:
30ffe57424Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
3117ca54c3Smrg#
3217ca54c3Smrg# Please send patches to <config-patches@gnu.org>.
3317ca54c3Smrg
3417ca54c3Smrg
3517ca54c3Smrgme=`echo "$0" | sed -e 's,.*/,,'`
3617ca54c3Smrg
3717ca54c3Smrgusage="\
3817ca54c3SmrgUsage: $0 [OPTION]
3917ca54c3Smrg
4017ca54c3SmrgOutput the configuration name of the system \`$me' is run on.
4117ca54c3Smrg
42ffe57424SmrgOperation modes:
4317ca54c3Smrg  -h, --help         print this help, then exit
4417ca54c3Smrg  -t, --time-stamp   print date of last modification, then exit
4517ca54c3Smrg  -v, --version      print version number, then exit
4617ca54c3Smrg
4717ca54c3SmrgReport bugs and patches to <config-patches@gnu.org>."
4817ca54c3Smrg
4917ca54c3Smrgversion="\
5017ca54c3SmrgGNU config.guess ($timestamp)
5117ca54c3Smrg
5217ca54c3SmrgOriginally written by Per Bothner.
53ffe57424SmrgCopyright 1992-2016 Free Software Foundation, Inc.
5417ca54c3Smrg
5517ca54c3SmrgThis is free software; see the source for copying conditions.  There is NO
5617ca54c3Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
5717ca54c3Smrg
5817ca54c3Smrghelp="
5917ca54c3SmrgTry \`$me --help' for more information."
6017ca54c3Smrg
6117ca54c3Smrg# Parse command line
6217ca54c3Smrgwhile test $# -gt 0 ; do
6317ca54c3Smrg  case $1 in
6417ca54c3Smrg    --time-stamp | --time* | -t )
6517ca54c3Smrg       echo "$timestamp" ; exit ;;
6617ca54c3Smrg    --version | -v )
6717ca54c3Smrg       echo "$version" ; exit ;;
6817ca54c3Smrg    --help | --h* | -h )
6917ca54c3Smrg       echo "$usage"; exit ;;
7017ca54c3Smrg    -- )     # Stop option processing
7117ca54c3Smrg       shift; break ;;
7217ca54c3Smrg    - )	# Use stdin as input.
7317ca54c3Smrg       break ;;
7417ca54c3Smrg    -* )
7517ca54c3Smrg       echo "$me: invalid option $1$help" >&2
7617ca54c3Smrg       exit 1 ;;
7717ca54c3Smrg    * )
7817ca54c3Smrg       break ;;
7917ca54c3Smrg  esac
8017ca54c3Smrgdone
8117ca54c3Smrg
8217ca54c3Smrgif test $# != 0; then
8317ca54c3Smrg  echo "$me: too many arguments$help" >&2
8417ca54c3Smrg  exit 1
8517ca54c3Smrgfi
8617ca54c3Smrg
87f2ea6e01Smrgtrap 'exit 1' 1 2 15
88f2ea6e01Smrg
8917ca54c3Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
9017ca54c3Smrg# compiler to aid in system detection is discouraged as it requires
9117ca54c3Smrg# temporary files to be created and, as you can see below, it is a
9217ca54c3Smrg# headache to deal with in a portable fashion.
9317ca54c3Smrg
9417ca54c3Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
9517ca54c3Smrg# use `HOST_CC' if defined, but it is deprecated.
9617ca54c3Smrg
9717ca54c3Smrg# Portable tmp directory creation inspired by the Autoconf team.
9817ca54c3Smrg
99f2ea6e01Smrgset_cc_for_build='
100f2ea6e01Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
101f2ea6e01Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
102f2ea6e01Smrg: ${TMPDIR=/tmp} ;
103f2ea6e01Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
104f2ea6e01Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
105f2ea6e01Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
106f2ea6e01Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
107f2ea6e01Smrgdummy=$tmp/dummy ;
108f2ea6e01Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109f2ea6e01Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
110ffe57424Smrg ,,)    echo "int x;" > $dummy.c ;
111f2ea6e01Smrg	for c in cc gcc c89 c99 ; do
112ffe57424Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
113f2ea6e01Smrg	     CC_FOR_BUILD="$c"; break ;
114f2ea6e01Smrg	  fi ;
115f2ea6e01Smrg	done ;
116f2ea6e01Smrg	if test x"$CC_FOR_BUILD" = x ; then
117f2ea6e01Smrg	  CC_FOR_BUILD=no_compiler_found ;
118f2ea6e01Smrg	fi
119f2ea6e01Smrg	;;
120f2ea6e01Smrg ,,*)   CC_FOR_BUILD=$CC ;;
121f2ea6e01Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
122f2ea6e01Smrgesac ; set_cc_for_build= ;'
12317ca54c3Smrg
12417ca54c3Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
12517ca54c3Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
126f2ea6e01Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
12717ca54c3Smrg	PATH=$PATH:/.attbin ; export PATH
12817ca54c3Smrgfi
12917ca54c3Smrg
13017ca54c3SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
13117ca54c3SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
13217ca54c3SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
13317ca54c3SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
13417ca54c3Smrg
135ffe57424Smrgcase "${UNAME_SYSTEM}" in
13617ca54c3SmrgLinux|GNU|GNU/*)
13717ca54c3Smrg	# If the system lacks a compiler, then just pick glibc.
13817ca54c3Smrg	# We could probably try harder.
13917ca54c3Smrg	LIBC=gnu
14017ca54c3Smrg
141ffe57424Smrg	eval $set_cc_for_build
142ffe57424Smrg	cat <<-EOF > $dummy.c
14317ca54c3Smrg	#include <features.h>
14417ca54c3Smrg	#if defined(__UCLIBC__)
14517ca54c3Smrg	LIBC=uclibc
14617ca54c3Smrg	#elif defined(__dietlibc__)
14717ca54c3Smrg	LIBC=dietlibc
14817ca54c3Smrg	#else
14917ca54c3Smrg	LIBC=gnu
15017ca54c3Smrg	#endif
15117ca54c3Smrg	EOF
152ffe57424Smrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
15317ca54c3Smrg	;;
15417ca54c3Smrgesac
15517ca54c3Smrg
15617ca54c3Smrg# Note: order is significant - the case branches are not exclusive.
15717ca54c3Smrg
158ffe57424Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
15917ca54c3Smrg    *:NetBSD:*:*)
16017ca54c3Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
16117ca54c3Smrg	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
16217ca54c3Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
16317ca54c3Smrg	# switched to ELF, *-*-netbsd* would select the old
16417ca54c3Smrg	# object file format.  This provides both forward
16517ca54c3Smrg	# compatibility and a consistent mechanism for selecting the
16617ca54c3Smrg	# object file format.
16717ca54c3Smrg	#
16817ca54c3Smrg	# Note: NetBSD doesn't particularly care about the vendor
16917ca54c3Smrg	# portion of the name.  We always set it to "unknown".
17017ca54c3Smrg	sysctl="sysctl -n hw.machine_arch"
17117ca54c3Smrg	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
172ffe57424Smrg	    /sbin/$sysctl 2>/dev/null || \
173ffe57424Smrg	    /usr/sbin/$sysctl 2>/dev/null || \
17417ca54c3Smrg	    echo unknown)`
175ffe57424Smrg	case "${UNAME_MACHINE_ARCH}" in
17617ca54c3Smrg	    armeb) machine=armeb-unknown ;;
17717ca54c3Smrg	    arm*) machine=arm-unknown ;;
17817ca54c3Smrg	    sh3el) machine=shl-unknown ;;
17917ca54c3Smrg	    sh3eb) machine=sh-unknown ;;
18017ca54c3Smrg	    sh5el) machine=sh5le-unknown ;;
18117ca54c3Smrg	    earmv*)
182ffe57424Smrg		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
183ffe57424Smrg		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
184ffe57424Smrg		machine=${arch}${endian}-unknown
18517ca54c3Smrg		;;
186ffe57424Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
18717ca54c3Smrg	esac
18817ca54c3Smrg	# The Operating System including object format, if it has switched
18917ca54c3Smrg	# to ELF recently (or will in the future) and ABI.
190ffe57424Smrg	case "${UNAME_MACHINE_ARCH}" in
19117ca54c3Smrg	    earm*)
19217ca54c3Smrg		os=netbsdelf
19317ca54c3Smrg		;;
19417ca54c3Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
195ffe57424Smrg		eval $set_cc_for_build
19617ca54c3Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
19717ca54c3Smrg			| grep -q __ELF__
19817ca54c3Smrg		then
19917ca54c3Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
20017ca54c3Smrg		    # Return netbsd for either.  FIX?
20117ca54c3Smrg		    os=netbsd
20217ca54c3Smrg		else
20317ca54c3Smrg		    os=netbsdelf
20417ca54c3Smrg		fi
20517ca54c3Smrg		;;
20617ca54c3Smrg	    *)
20717ca54c3Smrg		os=netbsd
20817ca54c3Smrg		;;
20917ca54c3Smrg	esac
21017ca54c3Smrg	# Determine ABI tags.
211ffe57424Smrg	case "${UNAME_MACHINE_ARCH}" in
21217ca54c3Smrg	    earm*)
21317ca54c3Smrg		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
214ffe57424Smrg		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
21517ca54c3Smrg		;;
21617ca54c3Smrg	esac
21717ca54c3Smrg	# The OS release
21817ca54c3Smrg	# Debian GNU/NetBSD machines have a different userland, and
21917ca54c3Smrg	# thus, need a distinct triplet. However, they do not need
22017ca54c3Smrg	# kernel version information, so it can be replaced with a
22117ca54c3Smrg	# suitable tag, in the style of linux-gnu.
222ffe57424Smrg	case "${UNAME_VERSION}" in
22317ca54c3Smrg	    Debian*)
22417ca54c3Smrg		release='-gnu'
22517ca54c3Smrg		;;
22617ca54c3Smrg	    *)
227ffe57424Smrg		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
22817ca54c3Smrg		;;
22917ca54c3Smrg	esac
23017ca54c3Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
23117ca54c3Smrg	# contains redundant information, the shorter form:
23217ca54c3Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
233ffe57424Smrg	echo "${machine}-${os}${release}${abi}"
23417ca54c3Smrg	exit ;;
23517ca54c3Smrg    *:Bitrig:*:*)
23617ca54c3Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
237ffe57424Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
23817ca54c3Smrg	exit ;;
23917ca54c3Smrg    *:OpenBSD:*:*)
24017ca54c3Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
241ffe57424Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
24217ca54c3Smrg	exit ;;
24317ca54c3Smrg    *:LibertyBSD:*:*)
24417ca54c3Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
245ffe57424Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
24617ca54c3Smrg	exit ;;
24717ca54c3Smrg    *:ekkoBSD:*:*)
248ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
24917ca54c3Smrg	exit ;;
25017ca54c3Smrg    *:SolidBSD:*:*)
251ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
25217ca54c3Smrg	exit ;;
25317ca54c3Smrg    macppc:MirBSD:*:*)
254ffe57424Smrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
25517ca54c3Smrg	exit ;;
25617ca54c3Smrg    *:MirBSD:*:*)
257ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
25817ca54c3Smrg	exit ;;
25917ca54c3Smrg    *:Sortix:*:*)
260ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-sortix
26117ca54c3Smrg	exit ;;
26217ca54c3Smrg    alpha:OSF1:*:*)
26317ca54c3Smrg	case $UNAME_RELEASE in
26417ca54c3Smrg	*4.0)
26517ca54c3Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
26617ca54c3Smrg		;;
26717ca54c3Smrg	*5.*)
26817ca54c3Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
26917ca54c3Smrg		;;
27017ca54c3Smrg	esac
27117ca54c3Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
27217ca54c3Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
27317ca54c3Smrg	# covers most systems running today.  This code pipes the CPU
27417ca54c3Smrg	# types through head -n 1, so we only detect the type of CPU 0.
27517ca54c3Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
27617ca54c3Smrg	case "$ALPHA_CPU_TYPE" in
27717ca54c3Smrg	    "EV4 (21064)")
27817ca54c3Smrg		UNAME_MACHINE=alpha ;;
27917ca54c3Smrg	    "EV4.5 (21064)")
28017ca54c3Smrg		UNAME_MACHINE=alpha ;;
28117ca54c3Smrg	    "LCA4 (21066/21068)")
28217ca54c3Smrg		UNAME_MACHINE=alpha ;;
28317ca54c3Smrg	    "EV5 (21164)")
28417ca54c3Smrg		UNAME_MACHINE=alphaev5 ;;
28517ca54c3Smrg	    "EV5.6 (21164A)")
28617ca54c3Smrg		UNAME_MACHINE=alphaev56 ;;
28717ca54c3Smrg	    "EV5.6 (21164PC)")
28817ca54c3Smrg		UNAME_MACHINE=alphapca56 ;;
28917ca54c3Smrg	    "EV5.7 (21164PC)")
29017ca54c3Smrg		UNAME_MACHINE=alphapca57 ;;
29117ca54c3Smrg	    "EV6 (21264)")
29217ca54c3Smrg		UNAME_MACHINE=alphaev6 ;;
29317ca54c3Smrg	    "EV6.7 (21264A)")
29417ca54c3Smrg		UNAME_MACHINE=alphaev67 ;;
29517ca54c3Smrg	    "EV6.8CB (21264C)")
29617ca54c3Smrg		UNAME_MACHINE=alphaev68 ;;
29717ca54c3Smrg	    "EV6.8AL (21264B)")
29817ca54c3Smrg		UNAME_MACHINE=alphaev68 ;;
29917ca54c3Smrg	    "EV6.8CX (21264D)")
30017ca54c3Smrg		UNAME_MACHINE=alphaev68 ;;
30117ca54c3Smrg	    "EV6.9A (21264/EV69A)")
30217ca54c3Smrg		UNAME_MACHINE=alphaev69 ;;
30317ca54c3Smrg	    "EV7 (21364)")
30417ca54c3Smrg		UNAME_MACHINE=alphaev7 ;;
30517ca54c3Smrg	    "EV7.9 (21364A)")
30617ca54c3Smrg		UNAME_MACHINE=alphaev79 ;;
30717ca54c3Smrg	esac
30817ca54c3Smrg	# A Pn.n version is a patched version.
30917ca54c3Smrg	# A Vn.n version is a released version.
31017ca54c3Smrg	# A Tn.n version is a released field test version.
31117ca54c3Smrg	# A Xn.n version is an unreleased experimental baselevel.
31217ca54c3Smrg	# 1.2 uses "1.2" for uname -r.
313ffe57424Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
31417ca54c3Smrg	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
31517ca54c3Smrg	exitcode=$?
31617ca54c3Smrg	trap '' 0
31717ca54c3Smrg	exit $exitcode ;;
318ffe57424Smrg    Alpha\ *:Windows_NT*:*)
319ffe57424Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
320ffe57424Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
321ffe57424Smrg	# of the specific Alpha model?
322ffe57424Smrg	echo alpha-pc-interix
323ffe57424Smrg	exit ;;
324ffe57424Smrg    21064:Windows_NT:50:3)
325ffe57424Smrg	echo alpha-dec-winnt3.5
326ffe57424Smrg	exit ;;
32717ca54c3Smrg    Amiga*:UNIX_System_V:4.0:*)
32817ca54c3Smrg	echo m68k-unknown-sysv4
32917ca54c3Smrg	exit ;;
33017ca54c3Smrg    *:[Aa]miga[Oo][Ss]:*:*)
331ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
33217ca54c3Smrg	exit ;;
33317ca54c3Smrg    *:[Mm]orph[Oo][Ss]:*:*)
334ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-morphos
33517ca54c3Smrg	exit ;;
33617ca54c3Smrg    *:OS/390:*:*)
33717ca54c3Smrg	echo i370-ibm-openedition
33817ca54c3Smrg	exit ;;
33917ca54c3Smrg    *:z/VM:*:*)
34017ca54c3Smrg	echo s390-ibm-zvmoe
34117ca54c3Smrg	exit ;;
34217ca54c3Smrg    *:OS400:*:*)
34317ca54c3Smrg	echo powerpc-ibm-os400
34417ca54c3Smrg	exit ;;
34517ca54c3Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
346ffe57424Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
34717ca54c3Smrg	exit ;;
34817ca54c3Smrg    arm*:riscos:*:*|arm*:RISCOS:*:*)
34917ca54c3Smrg	echo arm-unknown-riscos
35017ca54c3Smrg	exit ;;
35117ca54c3Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
35217ca54c3Smrg	echo hppa1.1-hitachi-hiuxmpp
35317ca54c3Smrg	exit ;;
35417ca54c3Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
35517ca54c3Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
35617ca54c3Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
35717ca54c3Smrg		echo pyramid-pyramid-sysv3
35817ca54c3Smrg	else
35917ca54c3Smrg		echo pyramid-pyramid-bsd
36017ca54c3Smrg	fi
36117ca54c3Smrg	exit ;;
36217ca54c3Smrg    NILE*:*:*:dcosx)
36317ca54c3Smrg	echo pyramid-pyramid-svr4
36417ca54c3Smrg	exit ;;
36517ca54c3Smrg    DRS?6000:unix:4.0:6*)
36617ca54c3Smrg	echo sparc-icl-nx6
36717ca54c3Smrg	exit ;;
36817ca54c3Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
36917ca54c3Smrg	case `/usr/bin/uname -p` in
37017ca54c3Smrg	    sparc) echo sparc-icl-nx7; exit ;;
37117ca54c3Smrg	esac ;;
37217ca54c3Smrg    s390x:SunOS:*:*)
373ffe57424Smrg	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
37417ca54c3Smrg	exit ;;
37517ca54c3Smrg    sun4H:SunOS:5.*:*)
376ffe57424Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
37717ca54c3Smrg	exit ;;
37817ca54c3Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
379ffe57424Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
38017ca54c3Smrg	exit ;;
38117ca54c3Smrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
382ffe57424Smrg	echo i386-pc-auroraux${UNAME_RELEASE}
38317ca54c3Smrg	exit ;;
38417ca54c3Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
385ffe57424Smrg	eval $set_cc_for_build
386f2ea6e01Smrg	SUN_ARCH=i386
387f2ea6e01Smrg	# If there is a compiler, see if it is configured for 64-bit objects.
388f2ea6e01Smrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
389f2ea6e01Smrg	# This test works for both compilers.
390f2ea6e01Smrg	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
391f2ea6e01Smrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
392f2ea6e01Smrg		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
393f2ea6e01Smrg		grep IS_64BIT_ARCH >/dev/null
394f2ea6e01Smrg	    then
395f2ea6e01Smrg		SUN_ARCH=x86_64
396f2ea6e01Smrg	    fi
397f2ea6e01Smrg	fi
398ffe57424Smrg	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
39917ca54c3Smrg	exit ;;
40017ca54c3Smrg    sun4*:SunOS:6*:*)
40117ca54c3Smrg	# According to config.sub, this is the proper way to canonicalize
40217ca54c3Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
40317ca54c3Smrg	# it's likely to be more like Solaris than SunOS4.
404ffe57424Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
40517ca54c3Smrg	exit ;;
40617ca54c3Smrg    sun4*:SunOS:*:*)
40717ca54c3Smrg	case "`/usr/bin/arch -k`" in
40817ca54c3Smrg	    Series*|S4*)
40917ca54c3Smrg		UNAME_RELEASE=`uname -v`
41017ca54c3Smrg		;;
41117ca54c3Smrg	esac
41217ca54c3Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
413ffe57424Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
41417ca54c3Smrg	exit ;;
41517ca54c3Smrg    sun3*:SunOS:*:*)
416ffe57424Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
41717ca54c3Smrg	exit ;;
41817ca54c3Smrg    sun*:*:4.2BSD:*)
41917ca54c3Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
420ffe57424Smrg	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
42117ca54c3Smrg	case "`/bin/arch`" in
42217ca54c3Smrg	    sun3)
423ffe57424Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
42417ca54c3Smrg		;;
42517ca54c3Smrg	    sun4)
426ffe57424Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
42717ca54c3Smrg		;;
42817ca54c3Smrg	esac
42917ca54c3Smrg	exit ;;
43017ca54c3Smrg    aushp:SunOS:*:*)
431ffe57424Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
43217ca54c3Smrg	exit ;;
43317ca54c3Smrg    # The situation for MiNT is a little confusing.  The machine name
43417ca54c3Smrg    # can be virtually everything (everything which is not
43517ca54c3Smrg    # "atarist" or "atariste" at least should have a processor
43617ca54c3Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
43717ca54c3Smrg    # to the lowercase version "mint" (or "freemint").  Finally
43817ca54c3Smrg    # the system name "TOS" denotes a system which is actually not
43917ca54c3Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
44017ca54c3Smrg    # be no problem.
44117ca54c3Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
442ffe57424Smrg	echo m68k-atari-mint${UNAME_RELEASE}
44317ca54c3Smrg	exit ;;
44417ca54c3Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
445ffe57424Smrg	echo m68k-atari-mint${UNAME_RELEASE}
44617ca54c3Smrg	exit ;;
44717ca54c3Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
448ffe57424Smrg	echo m68k-atari-mint${UNAME_RELEASE}
44917ca54c3Smrg	exit ;;
45017ca54c3Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
451ffe57424Smrg	echo m68k-milan-mint${UNAME_RELEASE}
45217ca54c3Smrg	exit ;;
45317ca54c3Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
454ffe57424Smrg	echo m68k-hades-mint${UNAME_RELEASE}
45517ca54c3Smrg	exit ;;
45617ca54c3Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
457ffe57424Smrg	echo m68k-unknown-mint${UNAME_RELEASE}
45817ca54c3Smrg	exit ;;
45917ca54c3Smrg    m68k:machten:*:*)
460ffe57424Smrg	echo m68k-apple-machten${UNAME_RELEASE}
46117ca54c3Smrg	exit ;;
46217ca54c3Smrg    powerpc:machten:*:*)
463ffe57424Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
46417ca54c3Smrg	exit ;;
46517ca54c3Smrg    RISC*:Mach:*:*)
46617ca54c3Smrg	echo mips-dec-mach_bsd4.3
46717ca54c3Smrg	exit ;;
46817ca54c3Smrg    RISC*:ULTRIX:*:*)
469ffe57424Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
47017ca54c3Smrg	exit ;;
47117ca54c3Smrg    VAX*:ULTRIX*:*:*)
472ffe57424Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
47317ca54c3Smrg	exit ;;
47417ca54c3Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
475ffe57424Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
47617ca54c3Smrg	exit ;;
47717ca54c3Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
478ffe57424Smrg	eval $set_cc_for_build
479ffe57424Smrg	sed 's/^	//' << EOF >$dummy.c
48017ca54c3Smrg#ifdef __cplusplus
48117ca54c3Smrg#include <stdio.h>  /* for printf() prototype */
48217ca54c3Smrg	int main (int argc, char *argv[]) {
48317ca54c3Smrg#else
48417ca54c3Smrg	int main (argc, argv) int argc; char *argv[]; {
48517ca54c3Smrg#endif
48617ca54c3Smrg	#if defined (host_mips) && defined (MIPSEB)
48717ca54c3Smrg	#if defined (SYSTYPE_SYSV)
488ffe57424Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
48917ca54c3Smrg	#endif
49017ca54c3Smrg	#if defined (SYSTYPE_SVR4)
491ffe57424Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
49217ca54c3Smrg	#endif
49317ca54c3Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
494ffe57424Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
49517ca54c3Smrg	#endif
49617ca54c3Smrg	#endif
49717ca54c3Smrg	  exit (-1);
49817ca54c3Smrg	}
49917ca54c3SmrgEOF
500ffe57424Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
501ffe57424Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
502ffe57424Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
50317ca54c3Smrg	    { echo "$SYSTEM_NAME"; exit; }
504ffe57424Smrg	echo mips-mips-riscos${UNAME_RELEASE}
50517ca54c3Smrg	exit ;;
50617ca54c3Smrg    Motorola:PowerMAX_OS:*:*)
50717ca54c3Smrg	echo powerpc-motorola-powermax
50817ca54c3Smrg	exit ;;
50917ca54c3Smrg    Motorola:*:4.3:PL8-*)
51017ca54c3Smrg	echo powerpc-harris-powermax
51117ca54c3Smrg	exit ;;
51217ca54c3Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
51317ca54c3Smrg	echo powerpc-harris-powermax
51417ca54c3Smrg	exit ;;
51517ca54c3Smrg    Night_Hawk:Power_UNIX:*:*)
51617ca54c3Smrg	echo powerpc-harris-powerunix
51717ca54c3Smrg	exit ;;
51817ca54c3Smrg    m88k:CX/UX:7*:*)
51917ca54c3Smrg	echo m88k-harris-cxux7
52017ca54c3Smrg	exit ;;
52117ca54c3Smrg    m88k:*:4*:R4*)
52217ca54c3Smrg	echo m88k-motorola-sysv4
52317ca54c3Smrg	exit ;;
52417ca54c3Smrg    m88k:*:3*:R3*)
52517ca54c3Smrg	echo m88k-motorola-sysv3
52617ca54c3Smrg	exit ;;
52717ca54c3Smrg    AViiON:dgux:*:*)
52817ca54c3Smrg	# DG/UX returns AViiON for all architectures
52917ca54c3Smrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
530ffe57424Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
53117ca54c3Smrg	then
532ffe57424Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
533ffe57424Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
53417ca54c3Smrg	    then
535ffe57424Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
53617ca54c3Smrg	    else
537ffe57424Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
53817ca54c3Smrg	    fi
53917ca54c3Smrg	else
540ffe57424Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
54117ca54c3Smrg	fi
54217ca54c3Smrg	exit ;;
54317ca54c3Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
54417ca54c3Smrg	echo m88k-dolphin-sysv3
54517ca54c3Smrg	exit ;;
54617ca54c3Smrg    M88*:*:R3*:*)
54717ca54c3Smrg	# Delta 88k system running SVR3
54817ca54c3Smrg	echo m88k-motorola-sysv3
54917ca54c3Smrg	exit ;;
55017ca54c3Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
55117ca54c3Smrg	echo m88k-tektronix-sysv3
55217ca54c3Smrg	exit ;;
55317ca54c3Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
55417ca54c3Smrg	echo m68k-tektronix-bsd
55517ca54c3Smrg	exit ;;
55617ca54c3Smrg    *:IRIX*:*:*)
557ffe57424Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
55817ca54c3Smrg	exit ;;
55917ca54c3Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
56017ca54c3Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
56117ca54c3Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
56217ca54c3Smrg    i*86:AIX:*:*)
56317ca54c3Smrg	echo i386-ibm-aix
56417ca54c3Smrg	exit ;;
56517ca54c3Smrg    ia64:AIX:*:*)
56617ca54c3Smrg	if [ -x /usr/bin/oslevel ] ; then
56717ca54c3Smrg		IBM_REV=`/usr/bin/oslevel`
56817ca54c3Smrg	else
569ffe57424Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
57017ca54c3Smrg	fi
571ffe57424Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
57217ca54c3Smrg	exit ;;
57317ca54c3Smrg    *:AIX:2:3)
57417ca54c3Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
575ffe57424Smrg		eval $set_cc_for_build
576ffe57424Smrg		sed 's/^		//' << EOF >$dummy.c
57717ca54c3Smrg		#include <sys/systemcfg.h>
57817ca54c3Smrg
57917ca54c3Smrg		main()
58017ca54c3Smrg			{
58117ca54c3Smrg			if (!__power_pc())
58217ca54c3Smrg				exit(1);
58317ca54c3Smrg			puts("powerpc-ibm-aix3.2.5");
58417ca54c3Smrg			exit(0);
58517ca54c3Smrg			}
58617ca54c3SmrgEOF
587ffe57424Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
58817ca54c3Smrg		then
58917ca54c3Smrg			echo "$SYSTEM_NAME"
59017ca54c3Smrg		else
59117ca54c3Smrg			echo rs6000-ibm-aix3.2.5
59217ca54c3Smrg		fi
59317ca54c3Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
59417ca54c3Smrg		echo rs6000-ibm-aix3.2.4
59517ca54c3Smrg	else
59617ca54c3Smrg		echo rs6000-ibm-aix3.2
59717ca54c3Smrg	fi
59817ca54c3Smrg	exit ;;
59917ca54c3Smrg    *:AIX:*:[4567])
60017ca54c3Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
601ffe57424Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
60217ca54c3Smrg		IBM_ARCH=rs6000
60317ca54c3Smrg	else
60417ca54c3Smrg		IBM_ARCH=powerpc
60517ca54c3Smrg	fi
60617ca54c3Smrg	if [ -x /usr/bin/lslpp ] ; then
60717ca54c3Smrg		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
60817ca54c3Smrg			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
60917ca54c3Smrg	else
610ffe57424Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
61117ca54c3Smrg	fi
612ffe57424Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
61317ca54c3Smrg	exit ;;
61417ca54c3Smrg    *:AIX:*:*)
61517ca54c3Smrg	echo rs6000-ibm-aix
61617ca54c3Smrg	exit ;;
617ffe57424Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
61817ca54c3Smrg	echo romp-ibm-bsd4.4
61917ca54c3Smrg	exit ;;
62017ca54c3Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
621ffe57424Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
62217ca54c3Smrg	exit ;;                             # report: romp-ibm BSD 4.3
62317ca54c3Smrg    *:BOSX:*:*)
62417ca54c3Smrg	echo rs6000-bull-bosx
62517ca54c3Smrg	exit ;;
62617ca54c3Smrg    DPX/2?00:B.O.S.:*:*)
62717ca54c3Smrg	echo m68k-bull-sysv3
62817ca54c3Smrg	exit ;;
62917ca54c3Smrg    9000/[34]??:4.3bsd:1.*:*)
63017ca54c3Smrg	echo m68k-hp-bsd
63117ca54c3Smrg	exit ;;
63217ca54c3Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
63317ca54c3Smrg	echo m68k-hp-bsd4.4
63417ca54c3Smrg	exit ;;
63517ca54c3Smrg    9000/[34678]??:HP-UX:*:*)
636ffe57424Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
637ffe57424Smrg	case "${UNAME_MACHINE}" in
638ffe57424Smrg	    9000/31? )            HP_ARCH=m68000 ;;
639ffe57424Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
64017ca54c3Smrg	    9000/[678][0-9][0-9])
64117ca54c3Smrg		if [ -x /usr/bin/getconf ]; then
64217ca54c3Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
64317ca54c3Smrg		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
644ffe57424Smrg		    case "${sc_cpu_version}" in
64517ca54c3Smrg		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
64617ca54c3Smrg		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
64717ca54c3Smrg		      532)                      # CPU_PA_RISC2_0
648ffe57424Smrg			case "${sc_kernel_bits}" in
64917ca54c3Smrg			  32) HP_ARCH=hppa2.0n ;;
65017ca54c3Smrg			  64) HP_ARCH=hppa2.0w ;;
65117ca54c3Smrg			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
65217ca54c3Smrg			esac ;;
65317ca54c3Smrg		    esac
65417ca54c3Smrg		fi
655ffe57424Smrg		if [ "${HP_ARCH}" = "" ]; then
656ffe57424Smrg		    eval $set_cc_for_build
657ffe57424Smrg		    sed 's/^		//' << EOF >$dummy.c
65817ca54c3Smrg
65917ca54c3Smrg		#define _HPUX_SOURCE
66017ca54c3Smrg		#include <stdlib.h>
66117ca54c3Smrg		#include <unistd.h>
66217ca54c3Smrg
66317ca54c3Smrg		int main ()
66417ca54c3Smrg		{
66517ca54c3Smrg		#if defined(_SC_KERNEL_BITS)
66617ca54c3Smrg		    long bits = sysconf(_SC_KERNEL_BITS);
66717ca54c3Smrg		#endif
66817ca54c3Smrg		    long cpu  = sysconf (_SC_CPU_VERSION);
66917ca54c3Smrg
67017ca54c3Smrg		    switch (cpu)
67117ca54c3Smrg			{
67217ca54c3Smrg			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
67317ca54c3Smrg			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
67417ca54c3Smrg			case CPU_PA_RISC2_0:
67517ca54c3Smrg		#if defined(_SC_KERNEL_BITS)
67617ca54c3Smrg			    switch (bits)
67717ca54c3Smrg				{
67817ca54c3Smrg				case 64: puts ("hppa2.0w"); break;
67917ca54c3Smrg				case 32: puts ("hppa2.0n"); break;
68017ca54c3Smrg				default: puts ("hppa2.0"); break;
68117ca54c3Smrg				} break;
68217ca54c3Smrg		#else  /* !defined(_SC_KERNEL_BITS) */
68317ca54c3Smrg			    puts ("hppa2.0"); break;
68417ca54c3Smrg		#endif
68517ca54c3Smrg			default: puts ("hppa1.0"); break;
68617ca54c3Smrg			}
68717ca54c3Smrg		    exit (0);
68817ca54c3Smrg		}
68917ca54c3SmrgEOF
690ffe57424Smrg		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
69117ca54c3Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
69217ca54c3Smrg		fi ;;
69317ca54c3Smrg	esac
694ffe57424Smrg	if [ ${HP_ARCH} = hppa2.0w ]
69517ca54c3Smrg	then
696ffe57424Smrg	    eval $set_cc_for_build
69717ca54c3Smrg
69817ca54c3Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
69917ca54c3Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
70017ca54c3Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
70117ca54c3Smrg	    #
70217ca54c3Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
70317ca54c3Smrg	    # => hppa2.0w-hp-hpux11.23
70417ca54c3Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
70517ca54c3Smrg	    # => hppa64-hp-hpux11.23
70617ca54c3Smrg
70717ca54c3Smrg	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
70817ca54c3Smrg		grep -q __LP64__
70917ca54c3Smrg	    then
71017ca54c3Smrg		HP_ARCH=hppa2.0w
71117ca54c3Smrg	    else
71217ca54c3Smrg		HP_ARCH=hppa64
71317ca54c3Smrg	    fi
71417ca54c3Smrg	fi
715ffe57424Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
71617ca54c3Smrg	exit ;;
71717ca54c3Smrg    ia64:HP-UX:*:*)
718ffe57424Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
719ffe57424Smrg	echo ia64-hp-hpux${HPUX_REV}
72017ca54c3Smrg	exit ;;
72117ca54c3Smrg    3050*:HI-UX:*:*)
722ffe57424Smrg	eval $set_cc_for_build
723ffe57424Smrg	sed 's/^	//' << EOF >$dummy.c
72417ca54c3Smrg	#include <unistd.h>
72517ca54c3Smrg	int
72617ca54c3Smrg	main ()
72717ca54c3Smrg	{
72817ca54c3Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
72917ca54c3Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
73017ca54c3Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
73117ca54c3Smrg	     results, however.  */
73217ca54c3Smrg	  if (CPU_IS_PA_RISC (cpu))
73317ca54c3Smrg	    {
73417ca54c3Smrg	      switch (cpu)
73517ca54c3Smrg		{
73617ca54c3Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
73717ca54c3Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
73817ca54c3Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
73917ca54c3Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
74017ca54c3Smrg		}
74117ca54c3Smrg	    }
74217ca54c3Smrg	  else if (CPU_IS_HP_MC68K (cpu))
74317ca54c3Smrg	    puts ("m68k-hitachi-hiuxwe2");
74417ca54c3Smrg	  else puts ("unknown-hitachi-hiuxwe2");
74517ca54c3Smrg	  exit (0);
74617ca54c3Smrg	}
74717ca54c3SmrgEOF
748ffe57424Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
74917ca54c3Smrg		{ echo "$SYSTEM_NAME"; exit; }
75017ca54c3Smrg	echo unknown-hitachi-hiuxwe2
75117ca54c3Smrg	exit ;;
752ffe57424Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
75317ca54c3Smrg	echo hppa1.1-hp-bsd
75417ca54c3Smrg	exit ;;
75517ca54c3Smrg    9000/8??:4.3bsd:*:*)
75617ca54c3Smrg	echo hppa1.0-hp-bsd
75717ca54c3Smrg	exit ;;
75817ca54c3Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
75917ca54c3Smrg	echo hppa1.0-hp-mpeix
76017ca54c3Smrg	exit ;;
761ffe57424Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
76217ca54c3Smrg	echo hppa1.1-hp-osf
76317ca54c3Smrg	exit ;;
76417ca54c3Smrg    hp8??:OSF1:*:*)
76517ca54c3Smrg	echo hppa1.0-hp-osf
76617ca54c3Smrg	exit ;;
76717ca54c3Smrg    i*86:OSF1:*:*)
76817ca54c3Smrg	if [ -x /usr/sbin/sysversion ] ; then
769ffe57424Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
77017ca54c3Smrg	else
771ffe57424Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
77217ca54c3Smrg	fi
77317ca54c3Smrg	exit ;;
77417ca54c3Smrg    parisc*:Lites*:*:*)
77517ca54c3Smrg	echo hppa1.1-hp-lites
77617ca54c3Smrg	exit ;;
77717ca54c3Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
77817ca54c3Smrg	echo c1-convex-bsd
77917ca54c3Smrg	exit ;;
78017ca54c3Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
78117ca54c3Smrg	if getsysinfo -f scalar_acc
78217ca54c3Smrg	then echo c32-convex-bsd
78317ca54c3Smrg	else echo c2-convex-bsd
78417ca54c3Smrg	fi
78517ca54c3Smrg	exit ;;
78617ca54c3Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
78717ca54c3Smrg	echo c34-convex-bsd
78817ca54c3Smrg	exit ;;
78917ca54c3Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
79017ca54c3Smrg	echo c38-convex-bsd
79117ca54c3Smrg	exit ;;
79217ca54c3Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
79317ca54c3Smrg	echo c4-convex-bsd
79417ca54c3Smrg	exit ;;
79517ca54c3Smrg    CRAY*Y-MP:*:*:*)
796ffe57424Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
79717ca54c3Smrg	exit ;;
79817ca54c3Smrg    CRAY*[A-Z]90:*:*:*)
799ffe57424Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
80017ca54c3Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
80117ca54c3Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
80217ca54c3Smrg	      -e 's/\.[^.]*$/.X/'
80317ca54c3Smrg	exit ;;
80417ca54c3Smrg    CRAY*TS:*:*:*)
805ffe57424Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
80617ca54c3Smrg	exit ;;
80717ca54c3Smrg    CRAY*T3E:*:*:*)
808ffe57424Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
80917ca54c3Smrg	exit ;;
81017ca54c3Smrg    CRAY*SV1:*:*:*)
811ffe57424Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
81217ca54c3Smrg	exit ;;
81317ca54c3Smrg    *:UNICOS/mp:*:*)
814ffe57424Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
81517ca54c3Smrg	exit ;;
81617ca54c3Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
81717ca54c3Smrg	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
81817ca54c3Smrg	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
819ffe57424Smrg	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
82017ca54c3Smrg	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
82117ca54c3Smrg	exit ;;
82217ca54c3Smrg    5000:UNIX_System_V:4.*:*)
82317ca54c3Smrg	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
824ffe57424Smrg	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
82517ca54c3Smrg	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
82617ca54c3Smrg	exit ;;
82717ca54c3Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
828ffe57424Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
82917ca54c3Smrg	exit ;;
83017ca54c3Smrg    sparc*:BSD/OS:*:*)
831ffe57424Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
83217ca54c3Smrg	exit ;;
83317ca54c3Smrg    *:BSD/OS:*:*)
834ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
835ea1d6981Smrg	exit ;;
83617ca54c3Smrg    *:FreeBSD:*:*)
83717ca54c3Smrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
838ffe57424Smrg	case ${UNAME_PROCESSOR} in
83917ca54c3Smrg	    amd64)
840ffe57424Smrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
841ffe57424Smrg	    *)
842ffe57424Smrg		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
84317ca54c3Smrg	esac
84417ca54c3Smrg	exit ;;
84517ca54c3Smrg    i*:CYGWIN*:*)
846ffe57424Smrg	echo ${UNAME_MACHINE}-pc-cygwin
84717ca54c3Smrg	exit ;;
84817ca54c3Smrg    *:MINGW64*:*)
849ffe57424Smrg	echo ${UNAME_MACHINE}-pc-mingw64
85017ca54c3Smrg	exit ;;
85117ca54c3Smrg    *:MINGW*:*)
852ffe57424Smrg	echo ${UNAME_MACHINE}-pc-mingw32
85317ca54c3Smrg	exit ;;
85417ca54c3Smrg    *:MSYS*:*)
855ffe57424Smrg	echo ${UNAME_MACHINE}-pc-msys
856ffe57424Smrg	exit ;;
857ffe57424Smrg    i*:windows32*:*)
858ffe57424Smrg	# uname -m includes "-pc" on this system.
859ffe57424Smrg	echo ${UNAME_MACHINE}-mingw32
86017ca54c3Smrg	exit ;;
86117ca54c3Smrg    i*:PW*:*)
862ffe57424Smrg	echo ${UNAME_MACHINE}-pc-pw32
86317ca54c3Smrg	exit ;;
86417ca54c3Smrg    *:Interix*:*)
865ffe57424Smrg	case ${UNAME_MACHINE} in
86617ca54c3Smrg	    x86)
867ffe57424Smrg		echo i586-pc-interix${UNAME_RELEASE}
86817ca54c3Smrg		exit ;;
86917ca54c3Smrg	    authenticamd | genuineintel | EM64T)
870ffe57424Smrg		echo x86_64-unknown-interix${UNAME_RELEASE}
87117ca54c3Smrg		exit ;;
87217ca54c3Smrg	    IA64)
873ffe57424Smrg		echo ia64-unknown-interix${UNAME_RELEASE}
87417ca54c3Smrg		exit ;;
87517ca54c3Smrg	esac ;;
876ffe57424Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
877ffe57424Smrg	echo i${UNAME_MACHINE}-pc-mks
878ffe57424Smrg	exit ;;
879ffe57424Smrg    8664:Windows_NT:*)
880ffe57424Smrg	echo x86_64-pc-mks
881ffe57424Smrg	exit ;;
882ffe57424Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
883ffe57424Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
884ffe57424Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
885ffe57424Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
886ffe57424Smrg	echo i586-pc-interix
887ffe57424Smrg	exit ;;
88817ca54c3Smrg    i*:UWIN*:*)
889ffe57424Smrg	echo ${UNAME_MACHINE}-pc-uwin
89017ca54c3Smrg	exit ;;
89117ca54c3Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
89217ca54c3Smrg	echo x86_64-unknown-cygwin
89317ca54c3Smrg	exit ;;
894ffe57424Smrg    p*:CYGWIN*:*)
895ffe57424Smrg	echo powerpcle-unknown-cygwin
896ffe57424Smrg	exit ;;
89717ca54c3Smrg    prep*:SunOS:5.*:*)
898ffe57424Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
89917ca54c3Smrg	exit ;;
90017ca54c3Smrg    *:GNU:*:*)
90117ca54c3Smrg	# the GNU system
902ffe57424Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
90317ca54c3Smrg	exit ;;
90417ca54c3Smrg    *:GNU/*:*:*)
90517ca54c3Smrg	# other systems with GNU libc and userland
906ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
90717ca54c3Smrg	exit ;;
908f2ea6e01Smrg    i*86:Minix:*:*)
909ffe57424Smrg	echo ${UNAME_MACHINE}-pc-minix
91017ca54c3Smrg	exit ;;
91117ca54c3Smrg    aarch64:Linux:*:*)
912ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
91317ca54c3Smrg	exit ;;
91417ca54c3Smrg    aarch64_be:Linux:*:*)
91517ca54c3Smrg	UNAME_MACHINE=aarch64_be
916ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
91717ca54c3Smrg	exit ;;
91817ca54c3Smrg    alpha:Linux:*:*)
91917ca54c3Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
92017ca54c3Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
92117ca54c3Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
92217ca54c3Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
92317ca54c3Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
92417ca54c3Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
92517ca54c3Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
92617ca54c3Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
92717ca54c3Smrg	esac
92817ca54c3Smrg	objdump --private-headers /bin/sh | grep -q ld.so.1
92917ca54c3Smrg	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
930ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
93117ca54c3Smrg	exit ;;
93217ca54c3Smrg    arc:Linux:*:* | arceb:Linux:*:*)
933ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
93417ca54c3Smrg	exit ;;
93517ca54c3Smrg    arm*:Linux:*:*)
936ffe57424Smrg	eval $set_cc_for_build
93717ca54c3Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
93817ca54c3Smrg	    | grep -q __ARM_EABI__
93917ca54c3Smrg	then
940ffe57424Smrg	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
94117ca54c3Smrg	else
94217ca54c3Smrg	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
94317ca54c3Smrg		| grep -q __ARM_PCS_VFP
94417ca54c3Smrg	    then
945ffe57424Smrg		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
94617ca54c3Smrg	    else
947ffe57424Smrg		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
94817ca54c3Smrg	    fi
94917ca54c3Smrg	fi
95017ca54c3Smrg	exit ;;
95117ca54c3Smrg    avr32*:Linux:*:*)
952ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
95317ca54c3Smrg	exit ;;
95417ca54c3Smrg    cris:Linux:*:*)
955ffe57424Smrg	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
95617ca54c3Smrg	exit ;;
95717ca54c3Smrg    crisv32:Linux:*:*)
958ffe57424Smrg	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
95917ca54c3Smrg	exit ;;
96017ca54c3Smrg    e2k:Linux:*:*)
961ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
96217ca54c3Smrg	exit ;;
96317ca54c3Smrg    frv:Linux:*:*)
964ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
96517ca54c3Smrg	exit ;;
96617ca54c3Smrg    hexagon:Linux:*:*)
967ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
96817ca54c3Smrg	exit ;;
96917ca54c3Smrg    i*86:Linux:*:*)
970ffe57424Smrg	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
97117ca54c3Smrg	exit ;;
97217ca54c3Smrg    ia64:Linux:*:*)
973ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
97417ca54c3Smrg	exit ;;
97517ca54c3Smrg    k1om:Linux:*:*)
976ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
97717ca54c3Smrg	exit ;;
97817ca54c3Smrg    m32r*:Linux:*:*)
979ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
98017ca54c3Smrg	exit ;;
98117ca54c3Smrg    m68*:Linux:*:*)
982ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
98317ca54c3Smrg	exit ;;
98417ca54c3Smrg    mips:Linux:*:* | mips64:Linux:*:*)
985ffe57424Smrg	eval $set_cc_for_build
986ffe57424Smrg	sed 's/^	//' << EOF >$dummy.c
98717ca54c3Smrg	#undef CPU
98817ca54c3Smrg	#undef ${UNAME_MACHINE}
98917ca54c3Smrg	#undef ${UNAME_MACHINE}el
99017ca54c3Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
99117ca54c3Smrg	CPU=${UNAME_MACHINE}el
99217ca54c3Smrg	#else
99317ca54c3Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
99417ca54c3Smrg	CPU=${UNAME_MACHINE}
99517ca54c3Smrg	#else
99617ca54c3Smrg	CPU=
99717ca54c3Smrg	#endif
99817ca54c3Smrg	#endif
99917ca54c3SmrgEOF
1000ffe57424Smrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
1001ffe57424Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
100217ca54c3Smrg	;;
100317ca54c3Smrg    mips64el:Linux:*:*)
1004ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
100517ca54c3Smrg	exit ;;
100617ca54c3Smrg    openrisc*:Linux:*:*)
1007ffe57424Smrg	echo or1k-unknown-linux-${LIBC}
100817ca54c3Smrg	exit ;;
100917ca54c3Smrg    or32:Linux:*:* | or1k*:Linux:*:*)
1010ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
101117ca54c3Smrg	exit ;;
101217ca54c3Smrg    padre:Linux:*:*)
1013ffe57424Smrg	echo sparc-unknown-linux-${LIBC}
101417ca54c3Smrg	exit ;;
101517ca54c3Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
1016ffe57424Smrg	echo hppa64-unknown-linux-${LIBC}
101717ca54c3Smrg	exit ;;
101817ca54c3Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
101917ca54c3Smrg	# Look for CPU level
102017ca54c3Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1021ffe57424Smrg	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1022ffe57424Smrg	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1023ffe57424Smrg	  *)    echo hppa-unknown-linux-${LIBC} ;;
102417ca54c3Smrg	esac
102517ca54c3Smrg	exit ;;
102617ca54c3Smrg    ppc64:Linux:*:*)
1027ffe57424Smrg	echo powerpc64-unknown-linux-${LIBC}
102817ca54c3Smrg	exit ;;
102917ca54c3Smrg    ppc:Linux:*:*)
1030ffe57424Smrg	echo powerpc-unknown-linux-${LIBC}
103117ca54c3Smrg	exit ;;
103217ca54c3Smrg    ppc64le:Linux:*:*)
1033ffe57424Smrg	echo powerpc64le-unknown-linux-${LIBC}
103417ca54c3Smrg	exit ;;
103517ca54c3Smrg    ppcle:Linux:*:*)
1036ffe57424Smrg	echo powerpcle-unknown-linux-${LIBC}
103717ca54c3Smrg	exit ;;
103817ca54c3Smrg    riscv32:Linux:*:* | riscv64:Linux:*:*)
1039ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
104017ca54c3Smrg	exit ;;
104117ca54c3Smrg    s390:Linux:*:* | s390x:Linux:*:*)
1042ffe57424Smrg	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
104317ca54c3Smrg	exit ;;
104417ca54c3Smrg    sh64*:Linux:*:*)
1045ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
104617ca54c3Smrg	exit ;;
104717ca54c3Smrg    sh*:Linux:*:*)
1048ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
104917ca54c3Smrg	exit ;;
105017ca54c3Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
1051ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
105217ca54c3Smrg	exit ;;
105317ca54c3Smrg    tile*:Linux:*:*)
1054ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
105517ca54c3Smrg	exit ;;
105617ca54c3Smrg    vax:Linux:*:*)
1057ffe57424Smrg	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
105817ca54c3Smrg	exit ;;
105917ca54c3Smrg    x86_64:Linux:*:*)
1060ffe57424Smrg	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
106117ca54c3Smrg	exit ;;
106217ca54c3Smrg    xtensa*:Linux:*:*)
1063ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
106417ca54c3Smrg	exit ;;
106517ca54c3Smrg    i*86:DYNIX/ptx:4*:*)
106617ca54c3Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
106717ca54c3Smrg	# earlier versions are messed up and put the nodename in both
106817ca54c3Smrg	# sysname and nodename.
106917ca54c3Smrg	echo i386-sequent-sysv4
107017ca54c3Smrg	exit ;;
107117ca54c3Smrg    i*86:UNIX_SV:4.2MP:2.*)
107217ca54c3Smrg	# Unixware is an offshoot of SVR4, but it has its own version
107317ca54c3Smrg	# number series starting with 2...
107417ca54c3Smrg	# I am not positive that other SVR4 systems won't match this,
107517ca54c3Smrg	# I just have to hope.  -- rms.
107617ca54c3Smrg	# Use sysv4.2uw... so that sysv4* matches it.
1077ffe57424Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
107817ca54c3Smrg	exit ;;
107917ca54c3Smrg    i*86:OS/2:*:*)
108017ca54c3Smrg	# If we were able to find `uname', then EMX Unix compatibility
108117ca54c3Smrg	# is probably installed.
1082ffe57424Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
108317ca54c3Smrg	exit ;;
108417ca54c3Smrg    i*86:XTS-300:*:STOP)
1085ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-stop
108617ca54c3Smrg	exit ;;
108717ca54c3Smrg    i*86:atheos:*:*)
1088ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-atheos
108917ca54c3Smrg	exit ;;
109017ca54c3Smrg    i*86:syllable:*:*)
1091ffe57424Smrg	echo ${UNAME_MACHINE}-pc-syllable
109217ca54c3Smrg	exit ;;
109317ca54c3Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1094ffe57424Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
109517ca54c3Smrg	exit ;;
109617ca54c3Smrg    i*86:*DOS:*:*)
1097ffe57424Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
109817ca54c3Smrg	exit ;;
1099ffe57424Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1100ffe57424Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
110117ca54c3Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1102ffe57424Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
110317ca54c3Smrg	else
1104ffe57424Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
110517ca54c3Smrg	fi
110617ca54c3Smrg	exit ;;
110717ca54c3Smrg    i*86:*:5:[678]*)
110817ca54c3Smrg	# UnixWare 7.x, OpenUNIX and OpenServer 6.
110917ca54c3Smrg	case `/bin/uname -X | grep "^Machine"` in
111017ca54c3Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
111117ca54c3Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
111217ca54c3Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
111317ca54c3Smrg	esac
1114ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
111517ca54c3Smrg	exit ;;
111617ca54c3Smrg    i*86:*:3.2:*)
111717ca54c3Smrg	if test -f /usr/options/cb.name; then
111817ca54c3Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1119ffe57424Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
112017ca54c3Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
112117ca54c3Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
112217ca54c3Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
112317ca54c3Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
112417ca54c3Smrg			&& UNAME_MACHINE=i586
112517ca54c3Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
112617ca54c3Smrg			&& UNAME_MACHINE=i686
112717ca54c3Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
112817ca54c3Smrg			&& UNAME_MACHINE=i686
1129ffe57424Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
113017ca54c3Smrg	else
1131ffe57424Smrg		echo ${UNAME_MACHINE}-pc-sysv32
113217ca54c3Smrg	fi
113317ca54c3Smrg	exit ;;
113417ca54c3Smrg    pc:*:*:*)
113517ca54c3Smrg	# Left here for compatibility:
113617ca54c3Smrg	# uname -m prints for DJGPP always 'pc', but it prints nothing about
113717ca54c3Smrg	# the processor, so we play safe by assuming i586.
113817ca54c3Smrg	# Note: whatever this is, it MUST be the same as what config.sub
113917ca54c3Smrg	# prints for the "djgpp" host, or else GDB configure will decide that
114017ca54c3Smrg	# this is a cross-build.
114117ca54c3Smrg	echo i586-pc-msdosdjgpp
114217ca54c3Smrg	exit ;;
114317ca54c3Smrg    Intel:Mach:3*:*)
114417ca54c3Smrg	echo i386-pc-mach3
114517ca54c3Smrg	exit ;;
114617ca54c3Smrg    paragon:*:*:*)
114717ca54c3Smrg	echo i860-intel-osf1
114817ca54c3Smrg	exit ;;
114917ca54c3Smrg    i860:*:4.*:*) # i860-SVR4
115017ca54c3Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1151ffe57424Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
115217ca54c3Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
1153ffe57424Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
115417ca54c3Smrg	fi
115517ca54c3Smrg	exit ;;
115617ca54c3Smrg    mini*:CTIX:SYS*5:*)
115717ca54c3Smrg	# "miniframe"
115817ca54c3Smrg	echo m68010-convergent-sysv
115917ca54c3Smrg	exit ;;
116017ca54c3Smrg    mc68k:UNIX:SYSTEM5:3.51m)
116117ca54c3Smrg	echo m68k-convergent-sysv
116217ca54c3Smrg	exit ;;
116317ca54c3Smrg    M680?0:D-NIX:5.3:*)
116417ca54c3Smrg	echo m68k-diab-dnix
116517ca54c3Smrg	exit ;;
116617ca54c3Smrg    M68*:*:R3V[5678]*:*)
116717ca54c3Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
116817ca54c3Smrg    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)
116917ca54c3Smrg	OS_REL=''
117017ca54c3Smrg	test -r /etc/.relid \
117117ca54c3Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
117217ca54c3Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1173ffe57424Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
117417ca54c3Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1175ffe57424Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
117617ca54c3Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
117717ca54c3Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
117817ca54c3Smrg	  && { echo i486-ncr-sysv4; exit; } ;;
117917ca54c3Smrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
118017ca54c3Smrg	OS_REL='.3'
118117ca54c3Smrg	test -r /etc/.relid \
118217ca54c3Smrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
118317ca54c3Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1184ffe57424Smrg	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
118517ca54c3Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1186ffe57424Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
118717ca54c3Smrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1188ffe57424Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
118917ca54c3Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1190ffe57424Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
119117ca54c3Smrg	exit ;;
119217ca54c3Smrg    mc68030:UNIX_System_V:4.*:*)
119317ca54c3Smrg	echo m68k-atari-sysv4
119417ca54c3Smrg	exit ;;
119517ca54c3Smrg    TSUNAMI:LynxOS:2.*:*)
1196ffe57424Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
119717ca54c3Smrg	exit ;;
119817ca54c3Smrg    rs6000:LynxOS:2.*:*)
1199ffe57424Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
120017ca54c3Smrg	exit ;;
120117ca54c3Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1202ffe57424Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
120317ca54c3Smrg	exit ;;
120417ca54c3Smrg    SM[BE]S:UNIX_SV:*:*)
1205ffe57424Smrg	echo mips-dde-sysv${UNAME_RELEASE}
120617ca54c3Smrg	exit ;;
120717ca54c3Smrg    RM*:ReliantUNIX-*:*:*)
120817ca54c3Smrg	echo mips-sni-sysv4
120917ca54c3Smrg	exit ;;
121017ca54c3Smrg    RM*:SINIX-*:*:*)
121117ca54c3Smrg	echo mips-sni-sysv4
121217ca54c3Smrg	exit ;;
121317ca54c3Smrg    *:SINIX-*:*:*)
121417ca54c3Smrg	if uname -p 2>/dev/null >/dev/null ; then
121517ca54c3Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1216ffe57424Smrg		echo ${UNAME_MACHINE}-sni-sysv4
121717ca54c3Smrg	else
121817ca54c3Smrg		echo ns32k-sni-sysv
121917ca54c3Smrg	fi
122017ca54c3Smrg	exit ;;
122117ca54c3Smrg    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
122217ca54c3Smrg			# says <Richard.M.Bartel@ccMail.Census.GOV>
122317ca54c3Smrg	echo i586-unisys-sysv4
122417ca54c3Smrg	exit ;;
122517ca54c3Smrg    *:UNIX_System_V:4*:FTX*)
122617ca54c3Smrg	# From Gerald Hewes <hewes@openmarket.com>.
122717ca54c3Smrg	# How about differentiating between stratus architectures? -djm
122817ca54c3Smrg	echo hppa1.1-stratus-sysv4
122917ca54c3Smrg	exit ;;
123017ca54c3Smrg    *:*:*:FTX*)
123117ca54c3Smrg	# From seanf@swdc.stratus.com.
123217ca54c3Smrg	echo i860-stratus-sysv4
123317ca54c3Smrg	exit ;;
123417ca54c3Smrg    i*86:VOS:*:*)
123517ca54c3Smrg	# From Paul.Green@stratus.com.
1236ffe57424Smrg	echo ${UNAME_MACHINE}-stratus-vos
123717ca54c3Smrg	exit ;;
123817ca54c3Smrg    *:VOS:*:*)
123917ca54c3Smrg	# From Paul.Green@stratus.com.
124017ca54c3Smrg	echo hppa1.1-stratus-vos
124117ca54c3Smrg	exit ;;
124217ca54c3Smrg    mc68*:A/UX:*:*)
1243ffe57424Smrg	echo m68k-apple-aux${UNAME_RELEASE}
124417ca54c3Smrg	exit ;;
124517ca54c3Smrg    news*:NEWS-OS:6*:*)
124617ca54c3Smrg	echo mips-sony-newsos6
124717ca54c3Smrg	exit ;;
124817ca54c3Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
124917ca54c3Smrg	if [ -d /usr/nec ]; then
1250ffe57424Smrg		echo mips-nec-sysv${UNAME_RELEASE}
125117ca54c3Smrg	else
1252ffe57424Smrg		echo mips-unknown-sysv${UNAME_RELEASE}
125317ca54c3Smrg	fi
125417ca54c3Smrg	exit ;;
125517ca54c3Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
125617ca54c3Smrg	echo powerpc-be-beos
125717ca54c3Smrg	exit ;;
125817ca54c3Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
125917ca54c3Smrg	echo powerpc-apple-beos
126017ca54c3Smrg	exit ;;
126117ca54c3Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
126217ca54c3Smrg	echo i586-pc-beos
126317ca54c3Smrg	exit ;;
126417ca54c3Smrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
126517ca54c3Smrg	echo i586-pc-haiku
126617ca54c3Smrg	exit ;;
126717ca54c3Smrg    x86_64:Haiku:*:*)
126817ca54c3Smrg	echo x86_64-unknown-haiku
126917ca54c3Smrg	exit ;;
127017ca54c3Smrg    SX-4:SUPER-UX:*:*)
1271ffe57424Smrg	echo sx4-nec-superux${UNAME_RELEASE}
127217ca54c3Smrg	exit ;;
127317ca54c3Smrg    SX-5:SUPER-UX:*:*)
1274ffe57424Smrg	echo sx5-nec-superux${UNAME_RELEASE}
127517ca54c3Smrg	exit ;;
127617ca54c3Smrg    SX-6:SUPER-UX:*:*)
1277ffe57424Smrg	echo sx6-nec-superux${UNAME_RELEASE}
127817ca54c3Smrg	exit ;;
127917ca54c3Smrg    SX-7:SUPER-UX:*:*)
1280ffe57424Smrg	echo sx7-nec-superux${UNAME_RELEASE}
128117ca54c3Smrg	exit ;;
128217ca54c3Smrg    SX-8:SUPER-UX:*:*)
1283ffe57424Smrg	echo sx8-nec-superux${UNAME_RELEASE}
128417ca54c3Smrg	exit ;;
128517ca54c3Smrg    SX-8R:SUPER-UX:*:*)
1286ffe57424Smrg	echo sx8r-nec-superux${UNAME_RELEASE}
128717ca54c3Smrg	exit ;;
128817ca54c3Smrg    SX-ACE:SUPER-UX:*:*)
1289ffe57424Smrg	echo sxace-nec-superux${UNAME_RELEASE}
129017ca54c3Smrg	exit ;;
129117ca54c3Smrg    Power*:Rhapsody:*:*)
1292ffe57424Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
129317ca54c3Smrg	exit ;;
129417ca54c3Smrg    *:Rhapsody:*:*)
1295ffe57424Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
129617ca54c3Smrg	exit ;;
129717ca54c3Smrg    *:Darwin:*:*)
129817ca54c3Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1299ffe57424Smrg	eval $set_cc_for_build
130017ca54c3Smrg	if test "$UNAME_PROCESSOR" = unknown ; then
130117ca54c3Smrg	    UNAME_PROCESSOR=powerpc
130217ca54c3Smrg	fi
1303ffe57424Smrg	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
130417ca54c3Smrg	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
130517ca54c3Smrg		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1306ffe57424Smrg		    (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1307ffe57424Smrg		    grep IS_64BIT_ARCH >/dev/null
130817ca54c3Smrg		then
130917ca54c3Smrg		    case $UNAME_PROCESSOR in
131017ca54c3Smrg			i386) UNAME_PROCESSOR=x86_64 ;;
131117ca54c3Smrg			powerpc) UNAME_PROCESSOR=powerpc64 ;;
131217ca54c3Smrg		    esac
131317ca54c3Smrg		fi
131417ca54c3Smrg	    fi
131517ca54c3Smrg	elif test "$UNAME_PROCESSOR" = i386 ; then
131617ca54c3Smrg	    # Avoid executing cc on OS X 10.9, as it ships with a stub
131717ca54c3Smrg	    # that puts up a graphical alert prompting to install
131817ca54c3Smrg	    # developer tools.  Any system running Mac OS X 10.7 or
131917ca54c3Smrg	    # later (Darwin 11 and later) is required to have a 64-bit
132017ca54c3Smrg	    # processor. This is not true of the ARM version of Darwin
132117ca54c3Smrg	    # that Apple uses in portable devices.
132217ca54c3Smrg	    UNAME_PROCESSOR=x86_64
132317ca54c3Smrg	fi
1324ffe57424Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
132517ca54c3Smrg	exit ;;
132617ca54c3Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
132717ca54c3Smrg	UNAME_PROCESSOR=`uname -p`
132817ca54c3Smrg	if test "$UNAME_PROCESSOR" = x86; then
132917ca54c3Smrg		UNAME_PROCESSOR=i386
133017ca54c3Smrg		UNAME_MACHINE=pc
133117ca54c3Smrg	fi
1332ffe57424Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
133317ca54c3Smrg	exit ;;
133417ca54c3Smrg    *:QNX:*:4*)
133517ca54c3Smrg	echo i386-pc-qnx
133617ca54c3Smrg	exit ;;
1337ffe57424Smrg    NEO-?:NONSTOP_KERNEL:*:*)
1338ffe57424Smrg	echo neo-tandem-nsk${UNAME_RELEASE}
133917ca54c3Smrg	exit ;;
134017ca54c3Smrg    NSE-*:NONSTOP_KERNEL:*:*)
1341ffe57424Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
134217ca54c3Smrg	exit ;;
1343ffe57424Smrg    NSR-?:NONSTOP_KERNEL:*:*)
1344ffe57424Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
134517ca54c3Smrg	exit ;;
134617ca54c3Smrg    *:NonStop-UX:*:*)
134717ca54c3Smrg	echo mips-compaq-nonstopux
134817ca54c3Smrg	exit ;;
134917ca54c3Smrg    BS2000:POSIX*:*:*)
135017ca54c3Smrg	echo bs2000-siemens-sysv
135117ca54c3Smrg	exit ;;
135217ca54c3Smrg    DS/*:UNIX_System_V:*:*)
1353ffe57424Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
135417ca54c3Smrg	exit ;;
135517ca54c3Smrg    *:Plan9:*:*)
135617ca54c3Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
135717ca54c3Smrg	# is converted to i386 for consistency with other x86
135817ca54c3Smrg	# operating systems.
135917ca54c3Smrg	if test "$cputype" = 386; then
136017ca54c3Smrg	    UNAME_MACHINE=i386
136117ca54c3Smrg	else
136217ca54c3Smrg	    UNAME_MACHINE="$cputype"
136317ca54c3Smrg	fi
1364ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-plan9
136517ca54c3Smrg	exit ;;
136617ca54c3Smrg    *:TOPS-10:*:*)
136717ca54c3Smrg	echo pdp10-unknown-tops10
136817ca54c3Smrg	exit ;;
136917ca54c3Smrg    *:TENEX:*:*)
137017ca54c3Smrg	echo pdp10-unknown-tenex
137117ca54c3Smrg	exit ;;
137217ca54c3Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
137317ca54c3Smrg	echo pdp10-dec-tops20
137417ca54c3Smrg	exit ;;
137517ca54c3Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
137617ca54c3Smrg	echo pdp10-xkl-tops20
137717ca54c3Smrg	exit ;;
137817ca54c3Smrg    *:TOPS-20:*:*)
137917ca54c3Smrg	echo pdp10-unknown-tops20
138017ca54c3Smrg	exit ;;
138117ca54c3Smrg    *:ITS:*:*)
138217ca54c3Smrg	echo pdp10-unknown-its
138317ca54c3Smrg	exit ;;
138417ca54c3Smrg    SEI:*:*:SEIUX)
1385ffe57424Smrg	echo mips-sei-seiux${UNAME_RELEASE}
138617ca54c3Smrg	exit ;;
138717ca54c3Smrg    *:DragonFly:*:*)
1388ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
138917ca54c3Smrg	exit ;;
139017ca54c3Smrg    *:*VMS:*:*)
139117ca54c3Smrg	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1392ffe57424Smrg	case "${UNAME_MACHINE}" in
139317ca54c3Smrg	    A*) echo alpha-dec-vms ; exit ;;
139417ca54c3Smrg	    I*) echo ia64-dec-vms ; exit ;;
139517ca54c3Smrg	    V*) echo vax-dec-vms ; exit ;;
139617ca54c3Smrg	esac ;;
139717ca54c3Smrg    *:XENIX:*:SysV)
139817ca54c3Smrg	echo i386-pc-xenix
139917ca54c3Smrg	exit ;;
140017ca54c3Smrg    i*86:skyos:*:*)
1401ffe57424Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
140217ca54c3Smrg	exit ;;
140317ca54c3Smrg    i*86:rdos:*:*)
1404ffe57424Smrg	echo ${UNAME_MACHINE}-pc-rdos
140517ca54c3Smrg	exit ;;
140617ca54c3Smrg    i*86:AROS:*:*)
1407ffe57424Smrg	echo ${UNAME_MACHINE}-pc-aros
140817ca54c3Smrg	exit ;;
140917ca54c3Smrg    x86_64:VMkernel:*:*)
1410ffe57424Smrg	echo ${UNAME_MACHINE}-unknown-esx
141117ca54c3Smrg	exit ;;
141217ca54c3Smrg    amd64:Isilon\ OneFS:*:*)
141317ca54c3Smrg	echo x86_64-unknown-onefs
141417ca54c3Smrg	exit ;;
141517ca54c3Smrgesac
141617ca54c3Smrg
141717ca54c3Smrgcat >&2 <<EOF
1418ffe57424Smrg$0: unable to guess system type
141917ca54c3Smrg
142017ca54c3SmrgThis script (version $timestamp), has failed to recognize the
1421ffe57424Smrgoperating system you are using. If your script is old, overwrite
1422ffe57424Smrgconfig.guess and config.sub with the latest versions from:
142317ca54c3Smrg
1424ffe57424Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
142517ca54c3Smrgand
1426ffe57424Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
142717ca54c3Smrg
142817ca54c3SmrgIf $0 has already been updated, send the following data and any
142917ca54c3Smrginformation you think might be pertinent to config-patches@gnu.org to
143017ca54c3Smrgprovide the necessary information to handle your system.
143117ca54c3Smrg
143217ca54c3Smrgconfig.guess timestamp = $timestamp
143317ca54c3Smrg
143417ca54c3Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
143517ca54c3Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
143617ca54c3Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
143717ca54c3Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
143817ca54c3Smrg
143917ca54c3Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
144017ca54c3Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
144117ca54c3Smrg
144217ca54c3Smrghostinfo               = `(hostinfo) 2>/dev/null`
144317ca54c3Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
144417ca54c3Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
144517ca54c3Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
144617ca54c3Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
144717ca54c3Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
144817ca54c3Smrg
1449ffe57424SmrgUNAME_MACHINE = ${UNAME_MACHINE}
1450ffe57424SmrgUNAME_RELEASE = ${UNAME_RELEASE}
1451ffe57424SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
1452ffe57424SmrgUNAME_VERSION = ${UNAME_VERSION}
145317ca54c3SmrgEOF
145417ca54c3Smrg
145517ca54c3Smrgexit 1
145617ca54c3Smrg
145717ca54c3Smrg# Local variables:
1458ffe57424Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
145917ca54c3Smrg# time-stamp-start: "timestamp='"
146017ca54c3Smrg# time-stamp-format: "%:y-%02m-%02d"
146117ca54c3Smrg# time-stamp-end: "'"
146217ca54c3Smrg# End:
1463