config.guess revision 18552c8a
1301ea0f4Smrg#! /bin/sh
2301ea0f4Smrg# Attempt to guess a canonical system name.
318552c8aSmrg#   Copyright 1992-2014 Free Software Foundation, Inc.
4301ea0f4Smrg
518552c8aSmrgtimestamp='2014-02-12'
6301ea0f4Smrg
7301ea0f4Smrg# This file is free software; you can redistribute it and/or modify it
8301ea0f4Smrg# under the terms of the GNU General Public License as published by
918552c8aSmrg# the Free Software Foundation; either version 3 of the License, or
10301ea0f4Smrg# (at your option) any later version.
11301ea0f4Smrg#
12301ea0f4Smrg# This program is distributed in the hope that it will be useful, but
13301ea0f4Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
14301ea0f4Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15301ea0f4Smrg# General Public License for more details.
16301ea0f4Smrg#
17301ea0f4Smrg# You should have received a copy of the GNU General Public License
1818552c8aSmrg# along with this program; if not, see <http://www.gnu.org/licenses/>.
19301ea0f4Smrg#
20301ea0f4Smrg# As a special exception to the GNU General Public License, if you
21301ea0f4Smrg# distribute this file as part of a program that contains a
22301ea0f4Smrg# configuration script generated by Autoconf, you may include it under
2318552c8aSmrg# the same distribution terms that you use for the rest of that
2418552c8aSmrg# program.  This Exception is an additional permission under section 7
2518552c8aSmrg# of the GNU General Public License, version 3 ("GPLv3").
26301ea0f4Smrg#
2718552c8aSmrg# Originally written by Per Bothner.
28301ea0f4Smrg#
29213fdd94Smrg# You can get the latest version of this script from:
30213fdd94Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
3118552c8aSmrg#
3218552c8aSmrg# Please send patches with a ChangeLog entry to config-patches@gnu.org.
3318552c8aSmrg
34301ea0f4Smrg
35301ea0f4Smrgme=`echo "$0" | sed -e 's,.*/,,'`
36301ea0f4Smrg
37301ea0f4Smrgusage="\
38301ea0f4SmrgUsage: $0 [OPTION]
39301ea0f4Smrg
40301ea0f4SmrgOutput the configuration name of the system \`$me' is run on.
41301ea0f4Smrg
42301ea0f4SmrgOperation modes:
43301ea0f4Smrg  -h, --help         print this help, then exit
44301ea0f4Smrg  -t, --time-stamp   print date of last modification, then exit
45301ea0f4Smrg  -v, --version      print version number, then exit
46301ea0f4Smrg
47301ea0f4SmrgReport bugs and patches to <config-patches@gnu.org>."
48301ea0f4Smrg
49301ea0f4Smrgversion="\
50301ea0f4SmrgGNU config.guess ($timestamp)
51301ea0f4Smrg
52301ea0f4SmrgOriginally written by Per Bothner.
5318552c8aSmrgCopyright 1992-2014 Free Software Foundation, Inc.
54301ea0f4Smrg
55301ea0f4SmrgThis is free software; see the source for copying conditions.  There is NO
56301ea0f4Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
57301ea0f4Smrg
58301ea0f4Smrghelp="
59301ea0f4SmrgTry \`$me --help' for more information."
60301ea0f4Smrg
61301ea0f4Smrg# Parse command line
62301ea0f4Smrgwhile test $# -gt 0 ; do
63301ea0f4Smrg  case $1 in
64301ea0f4Smrg    --time-stamp | --time* | -t )
650cc67336Smrg       echo "$timestamp" ; exit ;;
66301ea0f4Smrg    --version | -v )
670cc67336Smrg       echo "$version" ; exit ;;
68301ea0f4Smrg    --help | --h* | -h )
690cc67336Smrg       echo "$usage"; exit ;;
70301ea0f4Smrg    -- )     # Stop option processing
71301ea0f4Smrg       shift; break ;;
72301ea0f4Smrg    - )	# Use stdin as input.
73301ea0f4Smrg       break ;;
74301ea0f4Smrg    -* )
75301ea0f4Smrg       echo "$me: invalid option $1$help" >&2
76301ea0f4Smrg       exit 1 ;;
77301ea0f4Smrg    * )
78301ea0f4Smrg       break ;;
79301ea0f4Smrg  esac
80301ea0f4Smrgdone
81301ea0f4Smrg
82301ea0f4Smrgif test $# != 0; then
83301ea0f4Smrg  echo "$me: too many arguments$help" >&2
84301ea0f4Smrg  exit 1
85301ea0f4Smrgfi
86301ea0f4Smrg
87301ea0f4Smrgtrap 'exit 1' 1 2 15
88301ea0f4Smrg
89301ea0f4Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
90301ea0f4Smrg# compiler to aid in system detection is discouraged as it requires
91301ea0f4Smrg# temporary files to be created and, as you can see below, it is a
92301ea0f4Smrg# headache to deal with in a portable fashion.
93301ea0f4Smrg
94301ea0f4Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
95301ea0f4Smrg# use `HOST_CC' if defined, but it is deprecated.
96301ea0f4Smrg
97301ea0f4Smrg# Portable tmp directory creation inspired by the Autoconf team.
98301ea0f4Smrg
99301ea0f4Smrgset_cc_for_build='
100301ea0f4Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
101301ea0f4Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
102301ea0f4Smrg: ${TMPDIR=/tmp} ;
1030cc67336Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
104301ea0f4Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
105301ea0f4Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
106301ea0f4Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
107301ea0f4Smrgdummy=$tmp/dummy ;
108301ea0f4Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109301ea0f4Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
110301ea0f4Smrg ,,)    echo "int x;" > $dummy.c ;
111301ea0f4Smrg	for c in cc gcc c89 c99 ; do
112301ea0f4Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
113301ea0f4Smrg	     CC_FOR_BUILD="$c"; break ;
114301ea0f4Smrg	  fi ;
115301ea0f4Smrg	done ;
116301ea0f4Smrg	if test x"$CC_FOR_BUILD" = x ; then
117301ea0f4Smrg	  CC_FOR_BUILD=no_compiler_found ;
118301ea0f4Smrg	fi
119301ea0f4Smrg	;;
120301ea0f4Smrg ,,*)   CC_FOR_BUILD=$CC ;;
121301ea0f4Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
1220cc67336Smrgesac ; set_cc_for_build= ;'
123301ea0f4Smrg
124301ea0f4Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
125301ea0f4Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
126301ea0f4Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
127301ea0f4Smrg	PATH=$PATH:/.attbin ; export PATH
128301ea0f4Smrgfi
129301ea0f4Smrg
130301ea0f4SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
131301ea0f4SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
132301ea0f4SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
133301ea0f4SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
134301ea0f4Smrg
13518552c8aSmrgcase "${UNAME_SYSTEM}" in
13618552c8aSmrgLinux|GNU|GNU/*)
13718552c8aSmrg	# If the system lacks a compiler, then just pick glibc.
13818552c8aSmrg	# We could probably try harder.
13918552c8aSmrg	LIBC=gnu
14018552c8aSmrg
14118552c8aSmrg	eval $set_cc_for_build
14218552c8aSmrg	cat <<-EOF > $dummy.c
14318552c8aSmrg	#include <features.h>
14418552c8aSmrg	#if defined(__UCLIBC__)
14518552c8aSmrg	LIBC=uclibc
14618552c8aSmrg	#elif defined(__dietlibc__)
14718552c8aSmrg	LIBC=dietlibc
14818552c8aSmrg	#else
14918552c8aSmrg	LIBC=gnu
15018552c8aSmrg	#endif
15118552c8aSmrg	EOF
15218552c8aSmrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
15318552c8aSmrg	;;
15418552c8aSmrgesac
15518552c8aSmrg
156301ea0f4Smrg# Note: order is significant - the case branches are not exclusive.
157301ea0f4Smrg
158301ea0f4Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
159301ea0f4Smrg    *:NetBSD:*:*)
160301ea0f4Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
161213fdd94Smrg	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
162301ea0f4Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
163301ea0f4Smrg	# switched to ELF, *-*-netbsd* would select the old
164301ea0f4Smrg	# object file format.  This provides both forward
165301ea0f4Smrg	# compatibility and a consistent mechanism for selecting the
166301ea0f4Smrg	# object file format.
167301ea0f4Smrg	#
168301ea0f4Smrg	# Note: NetBSD doesn't particularly care about the vendor
169301ea0f4Smrg	# portion of the name.  We always set it to "unknown".
170301ea0f4Smrg	sysctl="sysctl -n hw.machine_arch"
171301ea0f4Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
172301ea0f4Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
173301ea0f4Smrg	case "${UNAME_MACHINE_ARCH}" in
174301ea0f4Smrg	    armeb) machine=armeb-unknown ;;
175301ea0f4Smrg	    arm*) machine=arm-unknown ;;
176301ea0f4Smrg	    sh3el) machine=shl-unknown ;;
177301ea0f4Smrg	    sh3eb) machine=sh-unknown ;;
1780cc67336Smrg	    sh5el) machine=sh5le-unknown ;;
179301ea0f4Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
180301ea0f4Smrg	esac
181301ea0f4Smrg	# The Operating System including object format, if it has switched
182301ea0f4Smrg	# to ELF recently, or will in the future.
183301ea0f4Smrg	case "${UNAME_MACHINE_ARCH}" in
184301ea0f4Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
185301ea0f4Smrg		eval $set_cc_for_build
186301ea0f4Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
187213fdd94Smrg			| grep -q __ELF__
188301ea0f4Smrg		then
189301ea0f4Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
190301ea0f4Smrg		    # Return netbsd for either.  FIX?
191301ea0f4Smrg		    os=netbsd
192301ea0f4Smrg		else
193301ea0f4Smrg		    os=netbsdelf
194301ea0f4Smrg		fi
195301ea0f4Smrg		;;
196301ea0f4Smrg	    *)
197213fdd94Smrg		os=netbsd
198301ea0f4Smrg		;;
199301ea0f4Smrg	esac
200301ea0f4Smrg	# The OS release
201301ea0f4Smrg	# Debian GNU/NetBSD machines have a different userland, and
202301ea0f4Smrg	# thus, need a distinct triplet. However, they do not need
203301ea0f4Smrg	# kernel version information, so it can be replaced with a
204301ea0f4Smrg	# suitable tag, in the style of linux-gnu.
205301ea0f4Smrg	case "${UNAME_VERSION}" in
206301ea0f4Smrg	    Debian*)
207301ea0f4Smrg		release='-gnu'
208301ea0f4Smrg		;;
209301ea0f4Smrg	    *)
210301ea0f4Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
211301ea0f4Smrg		;;
212301ea0f4Smrg	esac
213301ea0f4Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
214301ea0f4Smrg	# contains redundant information, the shorter form:
215301ea0f4Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
216301ea0f4Smrg	echo "${machine}-${os}${release}"
2170cc67336Smrg	exit ;;
21818552c8aSmrg    *:Bitrig:*:*)
21918552c8aSmrg	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
22018552c8aSmrg	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
22118552c8aSmrg	exit ;;
222301ea0f4Smrg    *:OpenBSD:*:*)
2230cc67336Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
2240cc67336Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
2250cc67336Smrg	exit ;;
2260cc67336Smrg    *:ekkoBSD:*:*)
2270cc67336Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
2280cc67336Smrg	exit ;;
2290cc67336Smrg    *:SolidBSD:*:*)
2300cc67336Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
2310cc67336Smrg	exit ;;
2320cc67336Smrg    macppc:MirBSD:*:*)
2330cc67336Smrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
2340cc67336Smrg	exit ;;
2350cc67336Smrg    *:MirBSD:*:*)
2360cc67336Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
2370cc67336Smrg	exit ;;
238301ea0f4Smrg    alpha:OSF1:*:*)
2390cc67336Smrg	case $UNAME_RELEASE in
2400cc67336Smrg	*4.0)
241301ea0f4Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
2420cc67336Smrg		;;
2430cc67336Smrg	*5.*)
244213fdd94Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
2450cc67336Smrg		;;
2460cc67336Smrg	esac
247301ea0f4Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
248301ea0f4Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
249301ea0f4Smrg	# covers most systems running today.  This code pipes the CPU
250301ea0f4Smrg	# types through head -n 1, so we only detect the type of CPU 0.
251301ea0f4Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
252301ea0f4Smrg	case "$ALPHA_CPU_TYPE" in
253301ea0f4Smrg	    "EV4 (21064)")
254301ea0f4Smrg		UNAME_MACHINE="alpha" ;;
255301ea0f4Smrg	    "EV4.5 (21064)")
256301ea0f4Smrg		UNAME_MACHINE="alpha" ;;
257301ea0f4Smrg	    "LCA4 (21066/21068)")
258301ea0f4Smrg		UNAME_MACHINE="alpha" ;;
259301ea0f4Smrg	    "EV5 (21164)")
260301ea0f4Smrg		UNAME_MACHINE="alphaev5" ;;
261301ea0f4Smrg	    "EV5.6 (21164A)")
262301ea0f4Smrg		UNAME_MACHINE="alphaev56" ;;
263301ea0f4Smrg	    "EV5.6 (21164PC)")
264301ea0f4Smrg		UNAME_MACHINE="alphapca56" ;;
265301ea0f4Smrg	    "EV5.7 (21164PC)")
266301ea0f4Smrg		UNAME_MACHINE="alphapca57" ;;
267301ea0f4Smrg	    "EV6 (21264)")
268301ea0f4Smrg		UNAME_MACHINE="alphaev6" ;;
269301ea0f4Smrg	    "EV6.7 (21264A)")
270301ea0f4Smrg		UNAME_MACHINE="alphaev67" ;;
271301ea0f4Smrg	    "EV6.8CB (21264C)")
272301ea0f4Smrg		UNAME_MACHINE="alphaev68" ;;
273301ea0f4Smrg	    "EV6.8AL (21264B)")
274301ea0f4Smrg		UNAME_MACHINE="alphaev68" ;;
275301ea0f4Smrg	    "EV6.8CX (21264D)")
276301ea0f4Smrg		UNAME_MACHINE="alphaev68" ;;
277301ea0f4Smrg	    "EV6.9A (21264/EV69A)")
278301ea0f4Smrg		UNAME_MACHINE="alphaev69" ;;
279301ea0f4Smrg	    "EV7 (21364)")
280301ea0f4Smrg		UNAME_MACHINE="alphaev7" ;;
281301ea0f4Smrg	    "EV7.9 (21364A)")
282301ea0f4Smrg		UNAME_MACHINE="alphaev79" ;;
283301ea0f4Smrg	esac
2840cc67336Smrg	# A Pn.n version is a patched version.
285301ea0f4Smrg	# A Vn.n version is a released version.
286301ea0f4Smrg	# A Tn.n version is a released field test version.
287301ea0f4Smrg	# A Xn.n version is an unreleased experimental baselevel.
288301ea0f4Smrg	# 1.2 uses "1.2" for uname -r.
2890cc67336Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
290213fdd94Smrg	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
291213fdd94Smrg	exitcode=$?
292213fdd94Smrg	trap '' 0
293213fdd94Smrg	exit $exitcode ;;
294301ea0f4Smrg    Alpha\ *:Windows_NT*:*)
295301ea0f4Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
296301ea0f4Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
297301ea0f4Smrg	# of the specific Alpha model?
298301ea0f4Smrg	echo alpha-pc-interix
2990cc67336Smrg	exit ;;
300301ea0f4Smrg    21064:Windows_NT:50:3)
301301ea0f4Smrg	echo alpha-dec-winnt3.5
3020cc67336Smrg	exit ;;
303301ea0f4Smrg    Amiga*:UNIX_System_V:4.0:*)
304301ea0f4Smrg	echo m68k-unknown-sysv4
3050cc67336Smrg	exit ;;
306301ea0f4Smrg    *:[Aa]miga[Oo][Ss]:*:*)
307301ea0f4Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
3080cc67336Smrg	exit ;;
309301ea0f4Smrg    *:[Mm]orph[Oo][Ss]:*:*)
310301ea0f4Smrg	echo ${UNAME_MACHINE}-unknown-morphos
3110cc67336Smrg	exit ;;
312301ea0f4Smrg    *:OS/390:*:*)
313301ea0f4Smrg	echo i370-ibm-openedition
3140cc67336Smrg	exit ;;
3150cc67336Smrg    *:z/VM:*:*)
3160cc67336Smrg	echo s390-ibm-zvmoe
3170cc67336Smrg	exit ;;
3180cc67336Smrg    *:OS400:*:*)
319213fdd94Smrg	echo powerpc-ibm-os400
3200cc67336Smrg	exit ;;
321301ea0f4Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
322301ea0f4Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
3230cc67336Smrg	exit ;;
32418552c8aSmrg    arm*:riscos:*:*|arm*:RISCOS:*:*)
3250cc67336Smrg	echo arm-unknown-riscos
3260cc67336Smrg	exit ;;
327301ea0f4Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
328301ea0f4Smrg	echo hppa1.1-hitachi-hiuxmpp
3290cc67336Smrg	exit ;;
330301ea0f4Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
331301ea0f4Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
332301ea0f4Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
333301ea0f4Smrg		echo pyramid-pyramid-sysv3
334301ea0f4Smrg	else
335301ea0f4Smrg		echo pyramid-pyramid-bsd
336301ea0f4Smrg	fi
3370cc67336Smrg	exit ;;
338301ea0f4Smrg    NILE*:*:*:dcosx)
339301ea0f4Smrg	echo pyramid-pyramid-svr4
3400cc67336Smrg	exit ;;
341301ea0f4Smrg    DRS?6000:unix:4.0:6*)
342301ea0f4Smrg	echo sparc-icl-nx6
3430cc67336Smrg	exit ;;
3440cc67336Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
345301ea0f4Smrg	case `/usr/bin/uname -p` in
3460cc67336Smrg	    sparc) echo sparc-icl-nx7; exit ;;
347301ea0f4Smrg	esac ;;
348213fdd94Smrg    s390x:SunOS:*:*)
349213fdd94Smrg	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
350213fdd94Smrg	exit ;;
351301ea0f4Smrg    sun4H:SunOS:5.*:*)
352301ea0f4Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3530cc67336Smrg	exit ;;
354301ea0f4Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
355301ea0f4Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3560cc67336Smrg	exit ;;
357213fdd94Smrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
358213fdd94Smrg	echo i386-pc-auroraux${UNAME_RELEASE}
359213fdd94Smrg	exit ;;
3600cc67336Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
361213fdd94Smrg	eval $set_cc_for_build
362213fdd94Smrg	SUN_ARCH="i386"
363213fdd94Smrg	# If there is a compiler, see if it is configured for 64-bit objects.
364213fdd94Smrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
365213fdd94Smrg	# This test works for both compilers.
366213fdd94Smrg	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
367213fdd94Smrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
368213fdd94Smrg		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
369213fdd94Smrg		grep IS_64BIT_ARCH >/dev/null
370213fdd94Smrg	    then
371213fdd94Smrg		SUN_ARCH="x86_64"
372213fdd94Smrg	    fi
373213fdd94Smrg	fi
374213fdd94Smrg	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3750cc67336Smrg	exit ;;
376301ea0f4Smrg    sun4*:SunOS:6*:*)
377301ea0f4Smrg	# According to config.sub, this is the proper way to canonicalize
378301ea0f4Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
379301ea0f4Smrg	# it's likely to be more like Solaris than SunOS4.
380301ea0f4Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3810cc67336Smrg	exit ;;
382301ea0f4Smrg    sun4*:SunOS:*:*)
383301ea0f4Smrg	case "`/usr/bin/arch -k`" in
384301ea0f4Smrg	    Series*|S4*)
385301ea0f4Smrg		UNAME_RELEASE=`uname -v`
386301ea0f4Smrg		;;
387301ea0f4Smrg	esac
388301ea0f4Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
389301ea0f4Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
3900cc67336Smrg	exit ;;
391301ea0f4Smrg    sun3*:SunOS:*:*)
392301ea0f4Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
3930cc67336Smrg	exit ;;
394301ea0f4Smrg    sun*:*:4.2BSD:*)
395301ea0f4Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
396301ea0f4Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
397301ea0f4Smrg	case "`/bin/arch`" in
398301ea0f4Smrg	    sun3)
399301ea0f4Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
400301ea0f4Smrg		;;
401301ea0f4Smrg	    sun4)
402301ea0f4Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
403301ea0f4Smrg		;;
404301ea0f4Smrg	esac
4050cc67336Smrg	exit ;;
406301ea0f4Smrg    aushp:SunOS:*:*)
407301ea0f4Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
4080cc67336Smrg	exit ;;
409301ea0f4Smrg    # The situation for MiNT is a little confusing.  The machine name
410301ea0f4Smrg    # can be virtually everything (everything which is not
411301ea0f4Smrg    # "atarist" or "atariste" at least should have a processor
412301ea0f4Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
413301ea0f4Smrg    # to the lowercase version "mint" (or "freemint").  Finally
414301ea0f4Smrg    # the system name "TOS" denotes a system which is actually not
415301ea0f4Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
416301ea0f4Smrg    # be no problem.
417301ea0f4Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
418213fdd94Smrg	echo m68k-atari-mint${UNAME_RELEASE}
4190cc67336Smrg	exit ;;
420301ea0f4Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
421301ea0f4Smrg	echo m68k-atari-mint${UNAME_RELEASE}
422213fdd94Smrg	exit ;;
423301ea0f4Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
424213fdd94Smrg	echo m68k-atari-mint${UNAME_RELEASE}
4250cc67336Smrg	exit ;;
426301ea0f4Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
427213fdd94Smrg	echo m68k-milan-mint${UNAME_RELEASE}
428213fdd94Smrg	exit ;;
429301ea0f4Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
430213fdd94Smrg	echo m68k-hades-mint${UNAME_RELEASE}
431213fdd94Smrg	exit ;;
432301ea0f4Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
433213fdd94Smrg	echo m68k-unknown-mint${UNAME_RELEASE}
434213fdd94Smrg	exit ;;
4350cc67336Smrg    m68k:machten:*:*)
4360cc67336Smrg	echo m68k-apple-machten${UNAME_RELEASE}
4370cc67336Smrg	exit ;;
438301ea0f4Smrg    powerpc:machten:*:*)
439301ea0f4Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
4400cc67336Smrg	exit ;;
441301ea0f4Smrg    RISC*:Mach:*:*)
442301ea0f4Smrg	echo mips-dec-mach_bsd4.3
4430cc67336Smrg	exit ;;
444301ea0f4Smrg    RISC*:ULTRIX:*:*)
445301ea0f4Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
4460cc67336Smrg	exit ;;
447301ea0f4Smrg    VAX*:ULTRIX*:*:*)
448301ea0f4Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
4490cc67336Smrg	exit ;;
450301ea0f4Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
451301ea0f4Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
4520cc67336Smrg	exit ;;
453301ea0f4Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
454301ea0f4Smrg	eval $set_cc_for_build
455301ea0f4Smrg	sed 's/^	//' << EOF >$dummy.c
456301ea0f4Smrg#ifdef __cplusplus
457301ea0f4Smrg#include <stdio.h>  /* for printf() prototype */
458301ea0f4Smrg	int main (int argc, char *argv[]) {
459301ea0f4Smrg#else
460301ea0f4Smrg	int main (argc, argv) int argc; char *argv[]; {
461301ea0f4Smrg#endif
462301ea0f4Smrg	#if defined (host_mips) && defined (MIPSEB)
463301ea0f4Smrg	#if defined (SYSTYPE_SYSV)
464301ea0f4Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
465301ea0f4Smrg	#endif
466301ea0f4Smrg	#if defined (SYSTYPE_SVR4)
467301ea0f4Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
468301ea0f4Smrg	#endif
469301ea0f4Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
470301ea0f4Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
471301ea0f4Smrg	#endif
472301ea0f4Smrg	#endif
473301ea0f4Smrg	  exit (-1);
474301ea0f4Smrg	}
475301ea0f4SmrgEOF
4760cc67336Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
4770cc67336Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
4780cc67336Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
4790cc67336Smrg	    { echo "$SYSTEM_NAME"; exit; }
480301ea0f4Smrg	echo mips-mips-riscos${UNAME_RELEASE}
4810cc67336Smrg	exit ;;
482301ea0f4Smrg    Motorola:PowerMAX_OS:*:*)
483301ea0f4Smrg	echo powerpc-motorola-powermax
4840cc67336Smrg	exit ;;
485301ea0f4Smrg    Motorola:*:4.3:PL8-*)
486301ea0f4Smrg	echo powerpc-harris-powermax
4870cc67336Smrg	exit ;;
488301ea0f4Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
489301ea0f4Smrg	echo powerpc-harris-powermax
4900cc67336Smrg	exit ;;
491301ea0f4Smrg    Night_Hawk:Power_UNIX:*:*)
492301ea0f4Smrg	echo powerpc-harris-powerunix
4930cc67336Smrg	exit ;;
494301ea0f4Smrg    m88k:CX/UX:7*:*)
495301ea0f4Smrg	echo m88k-harris-cxux7
4960cc67336Smrg	exit ;;
497301ea0f4Smrg    m88k:*:4*:R4*)
498301ea0f4Smrg	echo m88k-motorola-sysv4
4990cc67336Smrg	exit ;;
500301ea0f4Smrg    m88k:*:3*:R3*)
501301ea0f4Smrg	echo m88k-motorola-sysv3
5020cc67336Smrg	exit ;;
503301ea0f4Smrg    AViiON:dgux:*:*)
504213fdd94Smrg	# DG/UX returns AViiON for all architectures
505213fdd94Smrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
506301ea0f4Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
507301ea0f4Smrg	then
508301ea0f4Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
509301ea0f4Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
510301ea0f4Smrg	    then
511301ea0f4Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
512301ea0f4Smrg	    else
513301ea0f4Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
514301ea0f4Smrg	    fi
515301ea0f4Smrg	else
516301ea0f4Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
517301ea0f4Smrg	fi
518213fdd94Smrg	exit ;;
519301ea0f4Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
520301ea0f4Smrg	echo m88k-dolphin-sysv3
5210cc67336Smrg	exit ;;
522301ea0f4Smrg    M88*:*:R3*:*)
523301ea0f4Smrg	# Delta 88k system running SVR3
524301ea0f4Smrg	echo m88k-motorola-sysv3
5250cc67336Smrg	exit ;;
526301ea0f4Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
527301ea0f4Smrg	echo m88k-tektronix-sysv3
5280cc67336Smrg	exit ;;
529301ea0f4Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
530301ea0f4Smrg	echo m68k-tektronix-bsd
5310cc67336Smrg	exit ;;
532301ea0f4Smrg    *:IRIX*:*:*)
533301ea0f4Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
5340cc67336Smrg	exit ;;
535301ea0f4Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
5360cc67336Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
5370cc67336Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
538301ea0f4Smrg    i*86:AIX:*:*)
539301ea0f4Smrg	echo i386-ibm-aix
5400cc67336Smrg	exit ;;
541301ea0f4Smrg    ia64:AIX:*:*)
542301ea0f4Smrg	if [ -x /usr/bin/oslevel ] ; then
543301ea0f4Smrg		IBM_REV=`/usr/bin/oslevel`
544301ea0f4Smrg	else
545301ea0f4Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
546301ea0f4Smrg	fi
547301ea0f4Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
5480cc67336Smrg	exit ;;
549301ea0f4Smrg    *:AIX:2:3)
550301ea0f4Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
551301ea0f4Smrg		eval $set_cc_for_build
552301ea0f4Smrg		sed 's/^		//' << EOF >$dummy.c
553301ea0f4Smrg		#include <sys/systemcfg.h>
554301ea0f4Smrg
555301ea0f4Smrg		main()
556301ea0f4Smrg			{
557301ea0f4Smrg			if (!__power_pc())
558301ea0f4Smrg				exit(1);
559301ea0f4Smrg			puts("powerpc-ibm-aix3.2.5");
560301ea0f4Smrg			exit(0);
561301ea0f4Smrg			}
562301ea0f4SmrgEOF
5630cc67336Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
5640cc67336Smrg		then
5650cc67336Smrg			echo "$SYSTEM_NAME"
5660cc67336Smrg		else
5670cc67336Smrg			echo rs6000-ibm-aix3.2.5
5680cc67336Smrg		fi
569301ea0f4Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
570301ea0f4Smrg		echo rs6000-ibm-aix3.2.4
571301ea0f4Smrg	else
572301ea0f4Smrg		echo rs6000-ibm-aix3.2
573301ea0f4Smrg	fi
5740cc67336Smrg	exit ;;
575213fdd94Smrg    *:AIX:*:[4567])
576301ea0f4Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
577301ea0f4Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
578301ea0f4Smrg		IBM_ARCH=rs6000
579301ea0f4Smrg	else
580301ea0f4Smrg		IBM_ARCH=powerpc
581301ea0f4Smrg	fi
582301ea0f4Smrg	if [ -x /usr/bin/oslevel ] ; then
583301ea0f4Smrg		IBM_REV=`/usr/bin/oslevel`
584301ea0f4Smrg	else
585301ea0f4Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
586301ea0f4Smrg	fi
587301ea0f4Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
5880cc67336Smrg	exit ;;
589301ea0f4Smrg    *:AIX:*:*)
590301ea0f4Smrg	echo rs6000-ibm-aix
5910cc67336Smrg	exit ;;
592301ea0f4Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
593301ea0f4Smrg	echo romp-ibm-bsd4.4
5940cc67336Smrg	exit ;;
595301ea0f4Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
596301ea0f4Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
5970cc67336Smrg	exit ;;                             # report: romp-ibm BSD 4.3
598301ea0f4Smrg    *:BOSX:*:*)
599301ea0f4Smrg	echo rs6000-bull-bosx
6000cc67336Smrg	exit ;;
601301ea0f4Smrg    DPX/2?00:B.O.S.:*:*)
602301ea0f4Smrg	echo m68k-bull-sysv3
6030cc67336Smrg	exit ;;
604301ea0f4Smrg    9000/[34]??:4.3bsd:1.*:*)
605301ea0f4Smrg	echo m68k-hp-bsd
6060cc67336Smrg	exit ;;
607301ea0f4Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
608301ea0f4Smrg	echo m68k-hp-bsd4.4
6090cc67336Smrg	exit ;;
610301ea0f4Smrg    9000/[34678]??:HP-UX:*:*)
611301ea0f4Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
612301ea0f4Smrg	case "${UNAME_MACHINE}" in
613301ea0f4Smrg	    9000/31? )            HP_ARCH=m68000 ;;
614301ea0f4Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
615301ea0f4Smrg	    9000/[678][0-9][0-9])
616301ea0f4Smrg		if [ -x /usr/bin/getconf ]; then
617301ea0f4Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
618213fdd94Smrg		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
619213fdd94Smrg		    case "${sc_cpu_version}" in
620213fdd94Smrg		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
621213fdd94Smrg		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
622213fdd94Smrg		      532)                      # CPU_PA_RISC2_0
623213fdd94Smrg			case "${sc_kernel_bits}" in
624213fdd94Smrg			  32) HP_ARCH="hppa2.0n" ;;
625213fdd94Smrg			  64) HP_ARCH="hppa2.0w" ;;
626301ea0f4Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
627213fdd94Smrg			esac ;;
628213fdd94Smrg		    esac
629301ea0f4Smrg		fi
630301ea0f4Smrg		if [ "${HP_ARCH}" = "" ]; then
631301ea0f4Smrg		    eval $set_cc_for_build
632213fdd94Smrg		    sed 's/^		//' << EOF >$dummy.c
633301ea0f4Smrg
634213fdd94Smrg		#define _HPUX_SOURCE
635213fdd94Smrg		#include <stdlib.h>
636213fdd94Smrg		#include <unistd.h>
637301ea0f4Smrg
638213fdd94Smrg		int main ()
639213fdd94Smrg		{
640213fdd94Smrg		#if defined(_SC_KERNEL_BITS)
641213fdd94Smrg		    long bits = sysconf(_SC_KERNEL_BITS);
642213fdd94Smrg		#endif
643213fdd94Smrg		    long cpu  = sysconf (_SC_CPU_VERSION);
644301ea0f4Smrg
645213fdd94Smrg		    switch (cpu)
646213fdd94Smrg			{
647213fdd94Smrg			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
648213fdd94Smrg			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
649213fdd94Smrg			case CPU_PA_RISC2_0:
650213fdd94Smrg		#if defined(_SC_KERNEL_BITS)
651213fdd94Smrg			    switch (bits)
652213fdd94Smrg				{
653213fdd94Smrg				case 64: puts ("hppa2.0w"); break;
654213fdd94Smrg				case 32: puts ("hppa2.0n"); break;
655213fdd94Smrg				default: puts ("hppa2.0"); break;
656213fdd94Smrg				} break;
657213fdd94Smrg		#else  /* !defined(_SC_KERNEL_BITS) */
658213fdd94Smrg			    puts ("hppa2.0"); break;
659213fdd94Smrg		#endif
660213fdd94Smrg			default: puts ("hppa1.0"); break;
661213fdd94Smrg			}
662213fdd94Smrg		    exit (0);
663213fdd94Smrg		}
664301ea0f4SmrgEOF
665301ea0f4Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
666301ea0f4Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
667301ea0f4Smrg		fi ;;
668301ea0f4Smrg	esac
669301ea0f4Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
670301ea0f4Smrg	then
6710cc67336Smrg	    eval $set_cc_for_build
6720cc67336Smrg
6730cc67336Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
6740cc67336Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
6750cc67336Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
6760cc67336Smrg	    #
6770cc67336Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
6780cc67336Smrg	    # => hppa2.0w-hp-hpux11.23
6790cc67336Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
6800cc67336Smrg	    # => hppa64-hp-hpux11.23
6810cc67336Smrg
6820cc67336Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
683213fdd94Smrg		grep -q __LP64__
684301ea0f4Smrg	    then
685301ea0f4Smrg		HP_ARCH="hppa2.0w"
686301ea0f4Smrg	    else
687301ea0f4Smrg		HP_ARCH="hppa64"
688301ea0f4Smrg	    fi
689301ea0f4Smrg	fi
690301ea0f4Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
6910cc67336Smrg	exit ;;
692301ea0f4Smrg    ia64:HP-UX:*:*)
693301ea0f4Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
694301ea0f4Smrg	echo ia64-hp-hpux${HPUX_REV}
6950cc67336Smrg	exit ;;
696301ea0f4Smrg    3050*:HI-UX:*:*)
697301ea0f4Smrg	eval $set_cc_for_build
698301ea0f4Smrg	sed 's/^	//' << EOF >$dummy.c
699301ea0f4Smrg	#include <unistd.h>
700301ea0f4Smrg	int
701301ea0f4Smrg	main ()
702301ea0f4Smrg	{
703301ea0f4Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
704301ea0f4Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
705301ea0f4Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
706301ea0f4Smrg	     results, however.  */
707301ea0f4Smrg	  if (CPU_IS_PA_RISC (cpu))
708301ea0f4Smrg	    {
709301ea0f4Smrg	      switch (cpu)
710301ea0f4Smrg		{
711301ea0f4Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
712301ea0f4Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
713301ea0f4Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
714301ea0f4Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
715301ea0f4Smrg		}
716301ea0f4Smrg	    }
717301ea0f4Smrg	  else if (CPU_IS_HP_MC68K (cpu))
718301ea0f4Smrg	    puts ("m68k-hitachi-hiuxwe2");
719301ea0f4Smrg	  else puts ("unknown-hitachi-hiuxwe2");
720301ea0f4Smrg	  exit (0);
721301ea0f4Smrg	}
722301ea0f4SmrgEOF
7230cc67336Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
7240cc67336Smrg		{ echo "$SYSTEM_NAME"; exit; }
725301ea0f4Smrg	echo unknown-hitachi-hiuxwe2
7260cc67336Smrg	exit ;;
727301ea0f4Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
728301ea0f4Smrg	echo hppa1.1-hp-bsd
7290cc67336Smrg	exit ;;
730301ea0f4Smrg    9000/8??:4.3bsd:*:*)
731301ea0f4Smrg	echo hppa1.0-hp-bsd
7320cc67336Smrg	exit ;;
733301ea0f4Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
734301ea0f4Smrg	echo hppa1.0-hp-mpeix
7350cc67336Smrg	exit ;;
736301ea0f4Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
737301ea0f4Smrg	echo hppa1.1-hp-osf
7380cc67336Smrg	exit ;;
739301ea0f4Smrg    hp8??:OSF1:*:*)
740301ea0f4Smrg	echo hppa1.0-hp-osf
7410cc67336Smrg	exit ;;
742301ea0f4Smrg    i*86:OSF1:*:*)
743301ea0f4Smrg	if [ -x /usr/sbin/sysversion ] ; then
744301ea0f4Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
745301ea0f4Smrg	else
746301ea0f4Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
747301ea0f4Smrg	fi
7480cc67336Smrg	exit ;;
749301ea0f4Smrg    parisc*:Lites*:*:*)
750301ea0f4Smrg	echo hppa1.1-hp-lites
7510cc67336Smrg	exit ;;
752301ea0f4Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
753301ea0f4Smrg	echo c1-convex-bsd
754213fdd94Smrg	exit ;;
755301ea0f4Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
756301ea0f4Smrg	if getsysinfo -f scalar_acc
757301ea0f4Smrg	then echo c32-convex-bsd
758301ea0f4Smrg	else echo c2-convex-bsd
759301ea0f4Smrg	fi
760213fdd94Smrg	exit ;;
761301ea0f4Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
762301ea0f4Smrg	echo c34-convex-bsd
763213fdd94Smrg	exit ;;
764301ea0f4Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
765301ea0f4Smrg	echo c38-convex-bsd
766213fdd94Smrg	exit ;;
767301ea0f4Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
768301ea0f4Smrg	echo c4-convex-bsd
769213fdd94Smrg	exit ;;
770301ea0f4Smrg    CRAY*Y-MP:*:*:*)
771301ea0f4Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7720cc67336Smrg	exit ;;
773301ea0f4Smrg    CRAY*[A-Z]90:*:*:*)
774301ea0f4Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
775301ea0f4Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
776301ea0f4Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
777301ea0f4Smrg	      -e 's/\.[^.]*$/.X/'
7780cc67336Smrg	exit ;;
779301ea0f4Smrg    CRAY*TS:*:*:*)
780301ea0f4Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7810cc67336Smrg	exit ;;
782301ea0f4Smrg    CRAY*T3E:*:*:*)
783301ea0f4Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7840cc67336Smrg	exit ;;
785301ea0f4Smrg    CRAY*SV1:*:*:*)
786301ea0f4Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7870cc67336Smrg	exit ;;
788301ea0f4Smrg    *:UNICOS/mp:*:*)
7890cc67336Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7900cc67336Smrg	exit ;;
791301ea0f4Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
792301ea0f4Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
793213fdd94Smrg	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
794213fdd94Smrg	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
795213fdd94Smrg	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
796213fdd94Smrg	exit ;;
7970cc67336Smrg    5000:UNIX_System_V:4.*:*)
798213fdd94Smrg	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
799213fdd94Smrg	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
800213fdd94Smrg	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
8010cc67336Smrg	exit ;;
802301ea0f4Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
803301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
8040cc67336Smrg	exit ;;
805301ea0f4Smrg    sparc*:BSD/OS:*:*)
806301ea0f4Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
8070cc67336Smrg	exit ;;
808301ea0f4Smrg    *:BSD/OS:*:*)
809301ea0f4Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
8100cc67336Smrg	exit ;;
8110cc67336Smrg    *:FreeBSD:*:*)
812213fdd94Smrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
813213fdd94Smrg	case ${UNAME_PROCESSOR} in
8140cc67336Smrg	    amd64)
8150cc67336Smrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
8160cc67336Smrg	    *)
817213fdd94Smrg		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
8180cc67336Smrg	esac
8190cc67336Smrg	exit ;;
820301ea0f4Smrg    i*:CYGWIN*:*)
821301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-cygwin
8220cc67336Smrg	exit ;;
82318552c8aSmrg    *:MINGW64*:*)
82418552c8aSmrg	echo ${UNAME_MACHINE}-pc-mingw64
82518552c8aSmrg	exit ;;
8260cc67336Smrg    *:MINGW*:*)
827301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-mingw32
8280cc67336Smrg	exit ;;
829213fdd94Smrg    i*:MSYS*:*)
830213fdd94Smrg	echo ${UNAME_MACHINE}-pc-msys
831213fdd94Smrg	exit ;;
8320cc67336Smrg    i*:windows32*:*)
833213fdd94Smrg	# uname -m includes "-pc" on this system.
834213fdd94Smrg	echo ${UNAME_MACHINE}-mingw32
8350cc67336Smrg	exit ;;
836301ea0f4Smrg    i*:PW*:*)
837301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-pw32
8380cc67336Smrg	exit ;;
839213fdd94Smrg    *:Interix*:*)
840213fdd94Smrg	case ${UNAME_MACHINE} in
8410cc67336Smrg	    x86)
8420cc67336Smrg		echo i586-pc-interix${UNAME_RELEASE}
8430cc67336Smrg		exit ;;
844213fdd94Smrg	    authenticamd | genuineintel | EM64T)
8450cc67336Smrg		echo x86_64-unknown-interix${UNAME_RELEASE}
8460cc67336Smrg		exit ;;
8470cc67336Smrg	    IA64)
8480cc67336Smrg		echo ia64-unknown-interix${UNAME_RELEASE}
8490cc67336Smrg		exit ;;
8500cc67336Smrg	esac ;;
851301ea0f4Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
852301ea0f4Smrg	echo i${UNAME_MACHINE}-pc-mks
8530cc67336Smrg	exit ;;
854213fdd94Smrg    8664:Windows_NT:*)
855213fdd94Smrg	echo x86_64-pc-mks
856213fdd94Smrg	exit ;;
857301ea0f4Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
858301ea0f4Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
859301ea0f4Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
860301ea0f4Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
861301ea0f4Smrg	echo i586-pc-interix
8620cc67336Smrg	exit ;;
863301ea0f4Smrg    i*:UWIN*:*)
864301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-uwin
8650cc67336Smrg	exit ;;
8660cc67336Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
8670cc67336Smrg	echo x86_64-unknown-cygwin
8680cc67336Smrg	exit ;;
869301ea0f4Smrg    p*:CYGWIN*:*)
870301ea0f4Smrg	echo powerpcle-unknown-cygwin
8710cc67336Smrg	exit ;;
872301ea0f4Smrg    prep*:SunOS:5.*:*)
873301ea0f4Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
8740cc67336Smrg	exit ;;
875301ea0f4Smrg    *:GNU:*:*)
8760cc67336Smrg	# the GNU system
87718552c8aSmrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
8780cc67336Smrg	exit ;;
8790cc67336Smrg    *:GNU/*:*:*)
8800cc67336Smrg	# other systems with GNU libc and userland
88118552c8aSmrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
8820cc67336Smrg	exit ;;
883301ea0f4Smrg    i*86:Minix:*:*)
884301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-minix
8850cc67336Smrg	exit ;;
88618552c8aSmrg    aarch64:Linux:*:*)
88718552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
88818552c8aSmrg	exit ;;
88918552c8aSmrg    aarch64_be:Linux:*:*)
89018552c8aSmrg	UNAME_MACHINE=aarch64_be
89118552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
89218552c8aSmrg	exit ;;
893213fdd94Smrg    alpha:Linux:*:*)
894213fdd94Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
895213fdd94Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
896213fdd94Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
897213fdd94Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
898213fdd94Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
899213fdd94Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
900213fdd94Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
901213fdd94Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
902213fdd94Smrg	esac
903213fdd94Smrg	objdump --private-headers /bin/sh | grep -q ld.so.1
90418552c8aSmrg	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
90518552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
90618552c8aSmrg	exit ;;
90718552c8aSmrg    arc:Linux:*:* | arceb:Linux:*:*)
90818552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909213fdd94Smrg	exit ;;
910301ea0f4Smrg    arm*:Linux:*:*)
9110cc67336Smrg	eval $set_cc_for_build
9120cc67336Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
9130cc67336Smrg	    | grep -q __ARM_EABI__
9140cc67336Smrg	then
91518552c8aSmrg	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9160cc67336Smrg	else
917213fdd94Smrg	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
918213fdd94Smrg		| grep -q __ARM_PCS_VFP
919213fdd94Smrg	    then
92018552c8aSmrg		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
921213fdd94Smrg	    else
92218552c8aSmrg		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
923213fdd94Smrg	    fi
9240cc67336Smrg	fi
9250cc67336Smrg	exit ;;
9260cc67336Smrg    avr32*:Linux:*:*)
92718552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9280cc67336Smrg	exit ;;
929301ea0f4Smrg    cris:Linux:*:*)
93018552c8aSmrg	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
9310cc67336Smrg	exit ;;
9320cc67336Smrg    crisv32:Linux:*:*)
93318552c8aSmrg	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
9340cc67336Smrg	exit ;;
9350cc67336Smrg    frv:Linux:*:*)
93618552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937213fdd94Smrg	exit ;;
938213fdd94Smrg    hexagon:Linux:*:*)
93918552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940213fdd94Smrg	exit ;;
941213fdd94Smrg    i*86:Linux:*:*)
94218552c8aSmrg	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
9430cc67336Smrg	exit ;;
944301ea0f4Smrg    ia64:Linux:*:*)
94518552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9460cc67336Smrg	exit ;;
9470cc67336Smrg    m32r*:Linux:*:*)
94818552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9490cc67336Smrg	exit ;;
950301ea0f4Smrg    m68*:Linux:*:*)
95118552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9520cc67336Smrg	exit ;;
953213fdd94Smrg    mips:Linux:*:* | mips64:Linux:*:*)
954301ea0f4Smrg	eval $set_cc_for_build
955301ea0f4Smrg	sed 's/^	//' << EOF >$dummy.c
956301ea0f4Smrg	#undef CPU
957213fdd94Smrg	#undef ${UNAME_MACHINE}
958213fdd94Smrg	#undef ${UNAME_MACHINE}el
959301ea0f4Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
960213fdd94Smrg	CPU=${UNAME_MACHINE}el
961301ea0f4Smrg	#else
962301ea0f4Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
963213fdd94Smrg	CPU=${UNAME_MACHINE}
964301ea0f4Smrg	#else
965301ea0f4Smrg	CPU=
966301ea0f4Smrg	#endif
967301ea0f4Smrg	#endif
968301ea0f4SmrgEOF
969213fdd94Smrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
97018552c8aSmrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
971301ea0f4Smrg	;;
97218552c8aSmrg    or1k:Linux:*:*)
97318552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
97418552c8aSmrg	exit ;;
9750cc67336Smrg    or32:Linux:*:*)
97618552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9770cc67336Smrg	exit ;;
978213fdd94Smrg    padre:Linux:*:*)
97918552c8aSmrg	echo sparc-unknown-linux-${LIBC}
9800cc67336Smrg	exit ;;
981213fdd94Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
98218552c8aSmrg	echo hppa64-unknown-linux-${LIBC}
9830cc67336Smrg	exit ;;
984301ea0f4Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
985301ea0f4Smrg	# Look for CPU level
986301ea0f4Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
98718552c8aSmrg	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
98818552c8aSmrg	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
98918552c8aSmrg	  *)    echo hppa-unknown-linux-${LIBC} ;;
990301ea0f4Smrg	esac
9910cc67336Smrg	exit ;;
992213fdd94Smrg    ppc64:Linux:*:*)
99318552c8aSmrg	echo powerpc64-unknown-linux-${LIBC}
994213fdd94Smrg	exit ;;
995213fdd94Smrg    ppc:Linux:*:*)
99618552c8aSmrg	echo powerpc-unknown-linux-${LIBC}
99718552c8aSmrg	exit ;;
99818552c8aSmrg    ppc64le:Linux:*:*)
99918552c8aSmrg	echo powerpc64le-unknown-linux-${LIBC}
100018552c8aSmrg	exit ;;
100118552c8aSmrg    ppcle:Linux:*:*)
100218552c8aSmrg	echo powerpcle-unknown-linux-${LIBC}
10030cc67336Smrg	exit ;;
1004301ea0f4Smrg    s390:Linux:*:* | s390x:Linux:*:*)
100518552c8aSmrg	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
10060cc67336Smrg	exit ;;
1007301ea0f4Smrg    sh64*:Linux:*:*)
100818552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
10090cc67336Smrg	exit ;;
1010301ea0f4Smrg    sh*:Linux:*:*)
101118552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
10120cc67336Smrg	exit ;;
1013301ea0f4Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
101418552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
10150cc67336Smrg	exit ;;
1016213fdd94Smrg    tile*:Linux:*:*)
101718552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1018213fdd94Smrg	exit ;;
10190cc67336Smrg    vax:Linux:*:*)
102018552c8aSmrg	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
10210cc67336Smrg	exit ;;
1022301ea0f4Smrg    x86_64:Linux:*:*)
102318552c8aSmrg	eval $set_cc_for_build
102418552c8aSmrg	X86_64_ABI=
102518552c8aSmrg	# If there is a compiler, see if it is configured for 32-bit objects.
102618552c8aSmrg	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
102718552c8aSmrg	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
102818552c8aSmrg		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
102918552c8aSmrg		grep IS_X32 >/dev/null
103018552c8aSmrg	    then
103118552c8aSmrg		X86_64_ABI=x32
103218552c8aSmrg	    fi
103318552c8aSmrg	fi
103418552c8aSmrg	echo x86_64-unknown-linux-gnu${X86_64_ABI}
10350cc67336Smrg	exit ;;
10360cc67336Smrg    xtensa*:Linux:*:*)
103718552c8aSmrg	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
10380cc67336Smrg	exit ;;
1039301ea0f4Smrg    i*86:DYNIX/ptx:4*:*)
1040301ea0f4Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1041301ea0f4Smrg	# earlier versions are messed up and put the nodename in both
1042301ea0f4Smrg	# sysname and nodename.
1043301ea0f4Smrg	echo i386-sequent-sysv4
10440cc67336Smrg	exit ;;
1045301ea0f4Smrg    i*86:UNIX_SV:4.2MP:2.*)
1046213fdd94Smrg	# Unixware is an offshoot of SVR4, but it has its own version
1047213fdd94Smrg	# number series starting with 2...
1048213fdd94Smrg	# I am not positive that other SVR4 systems won't match this,
1049301ea0f4Smrg	# I just have to hope.  -- rms.
1050213fdd94Smrg	# Use sysv4.2uw... so that sysv4* matches it.
1051301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
10520cc67336Smrg	exit ;;
1053301ea0f4Smrg    i*86:OS/2:*:*)
1054301ea0f4Smrg	# If we were able to find `uname', then EMX Unix compatibility
1055301ea0f4Smrg	# is probably installed.
1056301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
10570cc67336Smrg	exit ;;
1058301ea0f4Smrg    i*86:XTS-300:*:STOP)
1059301ea0f4Smrg	echo ${UNAME_MACHINE}-unknown-stop
10600cc67336Smrg	exit ;;
1061301ea0f4Smrg    i*86:atheos:*:*)
1062301ea0f4Smrg	echo ${UNAME_MACHINE}-unknown-atheos
10630cc67336Smrg	exit ;;
10640cc67336Smrg    i*86:syllable:*:*)
10650cc67336Smrg	echo ${UNAME_MACHINE}-pc-syllable
10660cc67336Smrg	exit ;;
1067213fdd94Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1068301ea0f4Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
10690cc67336Smrg	exit ;;
1070301ea0f4Smrg    i*86:*DOS:*:*)
1071301ea0f4Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
10720cc67336Smrg	exit ;;
1073301ea0f4Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1074301ea0f4Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1075301ea0f4Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1076301ea0f4Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1077301ea0f4Smrg	else
1078301ea0f4Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1079301ea0f4Smrg	fi
10800cc67336Smrg	exit ;;
10810cc67336Smrg    i*86:*:5:[678]*)
1082213fdd94Smrg	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1083301ea0f4Smrg	case `/bin/uname -X | grep "^Machine"` in
1084301ea0f4Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
1085301ea0f4Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
1086301ea0f4Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1087301ea0f4Smrg	esac
1088301ea0f4Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
10890cc67336Smrg	exit ;;
1090301ea0f4Smrg    i*86:*:3.2:*)
1091301ea0f4Smrg	if test -f /usr/options/cb.name; then
1092301ea0f4Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1093301ea0f4Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1094301ea0f4Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1095301ea0f4Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1096301ea0f4Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1097301ea0f4Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1098301ea0f4Smrg			&& UNAME_MACHINE=i586
1099301ea0f4Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1100301ea0f4Smrg			&& UNAME_MACHINE=i686
1101301ea0f4Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1102301ea0f4Smrg			&& UNAME_MACHINE=i686
1103301ea0f4Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1104301ea0f4Smrg	else
1105301ea0f4Smrg		echo ${UNAME_MACHINE}-pc-sysv32
1106301ea0f4Smrg	fi
11070cc67336Smrg	exit ;;
1108301ea0f4Smrg    pc:*:*:*)
1109301ea0f4Smrg	# Left here for compatibility:
1110213fdd94Smrg	# uname -m prints for DJGPP always 'pc', but it prints nothing about
1111213fdd94Smrg	# the processor, so we play safe by assuming i586.
1112213fdd94Smrg	# Note: whatever this is, it MUST be the same as what config.sub
1113213fdd94Smrg	# prints for the "djgpp" host, or else GDB configury will decide that
1114213fdd94Smrg	# this is a cross-build.
1115213fdd94Smrg	echo i586-pc-msdosdjgpp
1116213fdd94Smrg	exit ;;
1117301ea0f4Smrg    Intel:Mach:3*:*)
1118301ea0f4Smrg	echo i386-pc-mach3
11190cc67336Smrg	exit ;;
1120301ea0f4Smrg    paragon:*:*:*)
1121301ea0f4Smrg	echo i860-intel-osf1
11220cc67336Smrg	exit ;;
1123301ea0f4Smrg    i860:*:4.*:*) # i860-SVR4
1124301ea0f4Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1125301ea0f4Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1126301ea0f4Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
1127301ea0f4Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1128301ea0f4Smrg	fi
11290cc67336Smrg	exit ;;
1130301ea0f4Smrg    mini*:CTIX:SYS*5:*)
1131301ea0f4Smrg	# "miniframe"
1132301ea0f4Smrg	echo m68010-convergent-sysv
11330cc67336Smrg	exit ;;
1134301ea0f4Smrg    mc68k:UNIX:SYSTEM5:3.51m)
1135301ea0f4Smrg	echo m68k-convergent-sysv
11360cc67336Smrg	exit ;;
1137301ea0f4Smrg    M680?0:D-NIX:5.3:*)
1138301ea0f4Smrg	echo m68k-diab-dnix
11390cc67336Smrg	exit ;;
11400cc67336Smrg    M68*:*:R3V[5678]*:*)
11410cc67336Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
11420cc67336Smrg    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)
1143301ea0f4Smrg	OS_REL=''
1144301ea0f4Smrg	test -r /etc/.relid \
1145301ea0f4Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1146301ea0f4Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11470cc67336Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1148301ea0f4Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11490cc67336Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1150301ea0f4Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1151213fdd94Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1152213fdd94Smrg	  && { echo i486-ncr-sysv4; exit; } ;;
1153213fdd94Smrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1154213fdd94Smrg	OS_REL='.3'
1155213fdd94Smrg	test -r /etc/.relid \
1156213fdd94Smrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1157213fdd94Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1158213fdd94Smrg	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1159213fdd94Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1160213fdd94Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1161213fdd94Smrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1162213fdd94Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1163301ea0f4Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1164301ea0f4Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
11650cc67336Smrg	exit ;;
1166301ea0f4Smrg    mc68030:UNIX_System_V:4.*:*)
1167301ea0f4Smrg	echo m68k-atari-sysv4
11680cc67336Smrg	exit ;;
1169301ea0f4Smrg    TSUNAMI:LynxOS:2.*:*)
1170301ea0f4Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
11710cc67336Smrg	exit ;;
1172301ea0f4Smrg    rs6000:LynxOS:2.*:*)
1173301ea0f4Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
11740cc67336Smrg	exit ;;
1175213fdd94Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1176301ea0f4Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
11770cc67336Smrg	exit ;;
1178301ea0f4Smrg    SM[BE]S:UNIX_SV:*:*)
1179301ea0f4Smrg	echo mips-dde-sysv${UNAME_RELEASE}
11800cc67336Smrg	exit ;;
1181301ea0f4Smrg    RM*:ReliantUNIX-*:*:*)
1182301ea0f4Smrg	echo mips-sni-sysv4
11830cc67336Smrg	exit ;;
1184301ea0f4Smrg    RM*:SINIX-*:*:*)
1185301ea0f4Smrg	echo mips-sni-sysv4
11860cc67336Smrg	exit ;;
1187301ea0f4Smrg    *:SINIX-*:*:*)
1188301ea0f4Smrg	if uname -p 2>/dev/null >/dev/null ; then
1189301ea0f4Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1190301ea0f4Smrg		echo ${UNAME_MACHINE}-sni-sysv4
1191301ea0f4Smrg	else
1192301ea0f4Smrg		echo ns32k-sni-sysv
1193301ea0f4Smrg	fi
11940cc67336Smrg	exit ;;
1195213fdd94Smrg    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1196213fdd94Smrg			# says <Richard.M.Bartel@ccMail.Census.GOV>
1197213fdd94Smrg	echo i586-unisys-sysv4
1198213fdd94Smrg	exit ;;
1199301ea0f4Smrg    *:UNIX_System_V:4*:FTX*)
1200301ea0f4Smrg	# From Gerald Hewes <hewes@openmarket.com>.
1201301ea0f4Smrg	# How about differentiating between stratus architectures? -djm
1202301ea0f4Smrg	echo hppa1.1-stratus-sysv4
12030cc67336Smrg	exit ;;
1204301ea0f4Smrg    *:*:*:FTX*)
1205301ea0f4Smrg	# From seanf@swdc.stratus.com.
1206301ea0f4Smrg	echo i860-stratus-sysv4
12070cc67336Smrg	exit ;;
12080cc67336Smrg    i*86:VOS:*:*)
12090cc67336Smrg	# From Paul.Green@stratus.com.
12100cc67336Smrg	echo ${UNAME_MACHINE}-stratus-vos
12110cc67336Smrg	exit ;;
1212301ea0f4Smrg    *:VOS:*:*)
1213301ea0f4Smrg	# From Paul.Green@stratus.com.
1214301ea0f4Smrg	echo hppa1.1-stratus-vos
12150cc67336Smrg	exit ;;
1216301ea0f4Smrg    mc68*:A/UX:*:*)
1217301ea0f4Smrg	echo m68k-apple-aux${UNAME_RELEASE}
12180cc67336Smrg	exit ;;
1219301ea0f4Smrg    news*:NEWS-OS:6*:*)
1220301ea0f4Smrg	echo mips-sony-newsos6
12210cc67336Smrg	exit ;;
1222301ea0f4Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1223301ea0f4Smrg	if [ -d /usr/nec ]; then
1224213fdd94Smrg		echo mips-nec-sysv${UNAME_RELEASE}
1225301ea0f4Smrg	else
1226213fdd94Smrg		echo mips-unknown-sysv${UNAME_RELEASE}
1227301ea0f4Smrg	fi
1228213fdd94Smrg	exit ;;
1229301ea0f4Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1230301ea0f4Smrg	echo powerpc-be-beos
12310cc67336Smrg	exit ;;
1232301ea0f4Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
1233301ea0f4Smrg	echo powerpc-apple-beos
12340cc67336Smrg	exit ;;
1235301ea0f4Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1236301ea0f4Smrg	echo i586-pc-beos
12370cc67336Smrg	exit ;;
1238213fdd94Smrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
1239213fdd94Smrg	echo i586-pc-haiku
1240213fdd94Smrg	exit ;;
124118552c8aSmrg    x86_64:Haiku:*:*)
124218552c8aSmrg	echo x86_64-unknown-haiku
124318552c8aSmrg	exit ;;
1244301ea0f4Smrg    SX-4:SUPER-UX:*:*)
1245301ea0f4Smrg	echo sx4-nec-superux${UNAME_RELEASE}
12460cc67336Smrg	exit ;;
1247301ea0f4Smrg    SX-5:SUPER-UX:*:*)
1248301ea0f4Smrg	echo sx5-nec-superux${UNAME_RELEASE}
12490cc67336Smrg	exit ;;
1250301ea0f4Smrg    SX-6:SUPER-UX:*:*)
1251301ea0f4Smrg	echo sx6-nec-superux${UNAME_RELEASE}
12520cc67336Smrg	exit ;;
12530cc67336Smrg    SX-7:SUPER-UX:*:*)
12540cc67336Smrg	echo sx7-nec-superux${UNAME_RELEASE}
12550cc67336Smrg	exit ;;
12560cc67336Smrg    SX-8:SUPER-UX:*:*)
12570cc67336Smrg	echo sx8-nec-superux${UNAME_RELEASE}
12580cc67336Smrg	exit ;;
12590cc67336Smrg    SX-8R:SUPER-UX:*:*)
12600cc67336Smrg	echo sx8r-nec-superux${UNAME_RELEASE}
12610cc67336Smrg	exit ;;
1262301ea0f4Smrg    Power*:Rhapsody:*:*)
1263301ea0f4Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
12640cc67336Smrg	exit ;;
1265301ea0f4Smrg    *:Rhapsody:*:*)
1266301ea0f4Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
12670cc67336Smrg	exit ;;
1268301ea0f4Smrg    *:Darwin:*:*)
12690cc67336Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
127018552c8aSmrg	eval $set_cc_for_build
127118552c8aSmrg	if test "$UNAME_PROCESSOR" = unknown ; then
127218552c8aSmrg	    UNAME_PROCESSOR=powerpc
127318552c8aSmrg	fi
127418552c8aSmrg	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
127518552c8aSmrg	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
127618552c8aSmrg		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
127718552c8aSmrg		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
127818552c8aSmrg		    grep IS_64BIT_ARCH >/dev/null
127918552c8aSmrg		then
128018552c8aSmrg		    case $UNAME_PROCESSOR in
128118552c8aSmrg			i386) UNAME_PROCESSOR=x86_64 ;;
128218552c8aSmrg			powerpc) UNAME_PROCESSOR=powerpc64 ;;
128318552c8aSmrg		    esac
128418552c8aSmrg		fi
128518552c8aSmrg	    fi
128618552c8aSmrg	elif test "$UNAME_PROCESSOR" = i386 ; then
128718552c8aSmrg	    # Avoid executing cc on OS X 10.9, as it ships with a stub
128818552c8aSmrg	    # that puts up a graphical alert prompting to install
128918552c8aSmrg	    # developer tools.  Any system running Mac OS X 10.7 or
129018552c8aSmrg	    # later (Darwin 11 and later) is required to have a 64-bit
129118552c8aSmrg	    # processor. This is not true of the ARM version of Darwin
129218552c8aSmrg	    # that Apple uses in portable devices.
129318552c8aSmrg	    UNAME_PROCESSOR=x86_64
129418552c8aSmrg	fi
1295301ea0f4Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
12960cc67336Smrg	exit ;;
1297301ea0f4Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1298301ea0f4Smrg	UNAME_PROCESSOR=`uname -p`
1299301ea0f4Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
1300301ea0f4Smrg		UNAME_PROCESSOR=i386
1301301ea0f4Smrg		UNAME_MACHINE=pc
1302301ea0f4Smrg	fi
1303301ea0f4Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
13040cc67336Smrg	exit ;;
1305301ea0f4Smrg    *:QNX:*:4*)
1306301ea0f4Smrg	echo i386-pc-qnx
13070cc67336Smrg	exit ;;
1308213fdd94Smrg    NEO-?:NONSTOP_KERNEL:*:*)
1309213fdd94Smrg	echo neo-tandem-nsk${UNAME_RELEASE}
1310213fdd94Smrg	exit ;;
131118552c8aSmrg    NSE-*:NONSTOP_KERNEL:*:*)
13120cc67336Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
13130cc67336Smrg	exit ;;
13140cc67336Smrg    NSR-?:NONSTOP_KERNEL:*:*)
1315301ea0f4Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
13160cc67336Smrg	exit ;;
1317301ea0f4Smrg    *:NonStop-UX:*:*)
1318301ea0f4Smrg	echo mips-compaq-nonstopux
13190cc67336Smrg	exit ;;
1320301ea0f4Smrg    BS2000:POSIX*:*:*)
1321301ea0f4Smrg	echo bs2000-siemens-sysv
13220cc67336Smrg	exit ;;
1323301ea0f4Smrg    DS/*:UNIX_System_V:*:*)
1324301ea0f4Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
13250cc67336Smrg	exit ;;
1326301ea0f4Smrg    *:Plan9:*:*)
1327301ea0f4Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
1328301ea0f4Smrg	# is converted to i386 for consistency with other x86
1329301ea0f4Smrg	# operating systems.
1330301ea0f4Smrg	if test "$cputype" = "386"; then
1331301ea0f4Smrg	    UNAME_MACHINE=i386
1332301ea0f4Smrg	else
1333301ea0f4Smrg	    UNAME_MACHINE="$cputype"
1334301ea0f4Smrg	fi
1335301ea0f4Smrg	echo ${UNAME_MACHINE}-unknown-plan9
13360cc67336Smrg	exit ;;
1337301ea0f4Smrg    *:TOPS-10:*:*)
1338301ea0f4Smrg	echo pdp10-unknown-tops10
13390cc67336Smrg	exit ;;
1340301ea0f4Smrg    *:TENEX:*:*)
1341301ea0f4Smrg	echo pdp10-unknown-tenex
13420cc67336Smrg	exit ;;
1343301ea0f4Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1344301ea0f4Smrg	echo pdp10-dec-tops20
13450cc67336Smrg	exit ;;
1346301ea0f4Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1347301ea0f4Smrg	echo pdp10-xkl-tops20
13480cc67336Smrg	exit ;;
1349301ea0f4Smrg    *:TOPS-20:*:*)
1350301ea0f4Smrg	echo pdp10-unknown-tops20
13510cc67336Smrg	exit ;;
1352301ea0f4Smrg    *:ITS:*:*)
1353301ea0f4Smrg	echo pdp10-unknown-its
13540cc67336Smrg	exit ;;
1355301ea0f4Smrg    SEI:*:*:SEIUX)
1356213fdd94Smrg	echo mips-sei-seiux${UNAME_RELEASE}
13570cc67336Smrg	exit ;;
13580cc67336Smrg    *:DragonFly:*:*)
13590cc67336Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
13600cc67336Smrg	exit ;;
13610cc67336Smrg    *:*VMS:*:*)
1362213fdd94Smrg	UNAME_MACHINE=`(uname -p) 2>/dev/null`
13630cc67336Smrg	case "${UNAME_MACHINE}" in
13640cc67336Smrg	    A*) echo alpha-dec-vms ; exit ;;
13650cc67336Smrg	    I*) echo ia64-dec-vms ; exit ;;
13660cc67336Smrg	    V*) echo vax-dec-vms ; exit ;;
13670cc67336Smrg	esac ;;
13680cc67336Smrg    *:XENIX:*:SysV)
13690cc67336Smrg	echo i386-pc-xenix
13700cc67336Smrg	exit ;;
13710cc67336Smrg    i*86:skyos:*:*)
13720cc67336Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
13730cc67336Smrg	exit ;;
13740cc67336Smrg    i*86:rdos:*:*)
13750cc67336Smrg	echo ${UNAME_MACHINE}-pc-rdos
13760cc67336Smrg	exit ;;
1377213fdd94Smrg    i*86:AROS:*:*)
1378213fdd94Smrg	echo ${UNAME_MACHINE}-pc-aros
1379213fdd94Smrg	exit ;;
138018552c8aSmrg    x86_64:VMkernel:*:*)
138118552c8aSmrg	echo ${UNAME_MACHINE}-unknown-esx
13820cc67336Smrg	exit ;;
138318552c8aSmrgesac
1384301ea0f4Smrg
1385301ea0f4Smrgcat >&2 <<EOF
1386301ea0f4Smrg$0: unable to guess system type
1387301ea0f4Smrg
1388301ea0f4SmrgThis script, last modified $timestamp, has failed to recognize
1389301ea0f4Smrgthe operating system you are using. It is advised that you
1390301ea0f4Smrgdownload the most up to date version of the config scripts from
1391301ea0f4Smrg
13920cc67336Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
13930cc67336Smrgand
13940cc67336Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1395301ea0f4Smrg
1396301ea0f4SmrgIf the version you run ($0) is already up to date, please
1397301ea0f4Smrgsend the following data and any information you think might be
1398301ea0f4Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
1399301ea0f4Smrginformation to handle your system.
1400301ea0f4Smrg
1401301ea0f4Smrgconfig.guess timestamp = $timestamp
1402301ea0f4Smrg
1403301ea0f4Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
1404301ea0f4Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
1405301ea0f4Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
1406301ea0f4Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
1407301ea0f4Smrg
1408301ea0f4Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1409301ea0f4Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
1410301ea0f4Smrg
1411301ea0f4Smrghostinfo               = `(hostinfo) 2>/dev/null`
1412301ea0f4Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
1413301ea0f4Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
1414301ea0f4Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
1415301ea0f4Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1416301ea0f4Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1417301ea0f4Smrg
1418301ea0f4SmrgUNAME_MACHINE = ${UNAME_MACHINE}
1419301ea0f4SmrgUNAME_RELEASE = ${UNAME_RELEASE}
1420301ea0f4SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
1421301ea0f4SmrgUNAME_VERSION = ${UNAME_VERSION}
1422301ea0f4SmrgEOF
1423301ea0f4Smrg
1424301ea0f4Smrgexit 1
1425301ea0f4Smrg
1426301ea0f4Smrg# Local variables:
1427301ea0f4Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
1428301ea0f4Smrg# time-stamp-start: "timestamp='"
1429301ea0f4Smrg# time-stamp-format: "%:y-%02m-%02d"
1430301ea0f4Smrg# time-stamp-end: "'"
1431301ea0f4Smrg# End:
1432