config.guess revision c44a0236
1a850946eSmrg#! /bin/sh
2a850946eSmrg# Attempt to guess a canonical system name.
3c44a0236Smrg#   Copyright 1992-2018 Free Software Foundation, Inc.
4a850946eSmrg
5c44a0236Smrgtimestamp='2018-03-01'
6a850946eSmrg
7a850946eSmrg# This file is free software; you can redistribute it and/or modify it
8a850946eSmrg# under the terms of the GNU General Public License as published by
99511053fSmrg# the Free Software Foundation; either version 3 of the License, or
10a850946eSmrg# (at your option) any later version.
11a850946eSmrg#
12a850946eSmrg# This program is distributed in the hope that it will be useful, but
13a850946eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
14a850946eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15a850946eSmrg# General Public License for more details.
16a850946eSmrg#
17a850946eSmrg# You should have received a copy of the GNU General Public License
18c44a0236Smrg# along with this program; if not, see <https://www.gnu.org/licenses/>.
19a850946eSmrg#
20a850946eSmrg# As a special exception to the GNU General Public License, if you
21a850946eSmrg# distribute this file as part of a program that contains a
22a850946eSmrg# configuration script generated by Autoconf, you may include it under
239511053fSmrg# the same distribution terms that you use for the rest of that
249511053fSmrg# program.  This Exception is an additional permission under section 7
259511053fSmrg# of the GNU General Public License, version 3 ("GPLv3").
26a850946eSmrg#
27c44a0236Smrg# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
28a850946eSmrg#
297dff02feSmrg# You can get the latest version of this script from:
30c44a0236Smrg# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
319511053fSmrg#
32c44a0236Smrg# Please send patches to <config-patches@gnu.org>.
339511053fSmrg
34a850946eSmrg
35a850946eSmrgme=`echo "$0" | sed -e 's,.*/,,'`
36a850946eSmrg
37a850946eSmrgusage="\
38a850946eSmrgUsage: $0 [OPTION]
39a850946eSmrg
40a850946eSmrgOutput the configuration name of the system \`$me' is run on.
41a850946eSmrg
42c44a0236SmrgOptions:
43a850946eSmrg  -h, --help         print this help, then exit
44a850946eSmrg  -t, --time-stamp   print date of last modification, then exit
45a850946eSmrg  -v, --version      print version number, then exit
46a850946eSmrg
47a850946eSmrgReport bugs and patches to <config-patches@gnu.org>."
48a850946eSmrg
49a850946eSmrgversion="\
50a850946eSmrgGNU config.guess ($timestamp)
51a850946eSmrg
52a850946eSmrgOriginally written by Per Bothner.
53c44a0236SmrgCopyright 1992-2018 Free Software Foundation, Inc.
54a850946eSmrg
55a850946eSmrgThis is free software; see the source for copying conditions.  There is NO
56a850946eSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
57a850946eSmrg
58a850946eSmrghelp="
59a850946eSmrgTry \`$me --help' for more information."
60a850946eSmrg
61a850946eSmrg# Parse command line
62a850946eSmrgwhile test $# -gt 0 ; do
63a850946eSmrg  case $1 in
64a850946eSmrg    --time-stamp | --time* | -t )
6570f7c90cSmrg       echo "$timestamp" ; exit ;;
66a850946eSmrg    --version | -v )
6770f7c90cSmrg       echo "$version" ; exit ;;
68a850946eSmrg    --help | --h* | -h )
6970f7c90cSmrg       echo "$usage"; exit ;;
70a850946eSmrg    -- )     # Stop option processing
71a850946eSmrg       shift; break ;;
72a850946eSmrg    - )	# Use stdin as input.
73a850946eSmrg       break ;;
74a850946eSmrg    -* )
75a850946eSmrg       echo "$me: invalid option $1$help" >&2
76a850946eSmrg       exit 1 ;;
77a850946eSmrg    * )
78a850946eSmrg       break ;;
79a850946eSmrg  esac
80a850946eSmrgdone
81a850946eSmrg
82a850946eSmrgif test $# != 0; then
83a850946eSmrg  echo "$me: too many arguments$help" >&2
84a850946eSmrg  exit 1
85a850946eSmrgfi
86a850946eSmrg
879511053fSmrgtrap 'exit 1' 1 2 15
88a850946eSmrg
89a850946eSmrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
90a850946eSmrg# compiler to aid in system detection is discouraged as it requires
91a850946eSmrg# temporary files to be created and, as you can see below, it is a
92a850946eSmrg# headache to deal with in a portable fashion.
93a850946eSmrg
94a850946eSmrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
95a850946eSmrg# use `HOST_CC' if defined, but it is deprecated.
96a850946eSmrg
97a850946eSmrg# Portable tmp directory creation inspired by the Autoconf team.
98a850946eSmrg
99a850946eSmrgset_cc_for_build='
100a850946eSmrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
1019511053fSmrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
102a850946eSmrg: ${TMPDIR=/tmp} ;
10370f7c90cSmrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
104a850946eSmrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
105a850946eSmrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
106a850946eSmrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
107a850946eSmrgdummy=$tmp/dummy ;
108a850946eSmrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
109a850946eSmrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
110c44a0236Smrg ,,)    echo "int x;" > "$dummy.c" ;
111a850946eSmrg	for c in cc gcc c89 c99 ; do
112c44a0236Smrg	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
113a850946eSmrg	     CC_FOR_BUILD="$c"; break ;
114a850946eSmrg	  fi ;
115a850946eSmrg	done ;
116a850946eSmrg	if test x"$CC_FOR_BUILD" = x ; then
117a850946eSmrg	  CC_FOR_BUILD=no_compiler_found ;
118a850946eSmrg	fi
119a850946eSmrg	;;
120a850946eSmrg ,,*)   CC_FOR_BUILD=$CC ;;
121a850946eSmrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
12270f7c90cSmrgesac ; set_cc_for_build= ;'
123a850946eSmrg
124a850946eSmrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
125a850946eSmrg# (ghazi@noc.rutgers.edu 1994-08-24)
126a850946eSmrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
127a850946eSmrg	PATH=$PATH:/.attbin ; export PATH
128a850946eSmrgfi
129a850946eSmrg
130a850946eSmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
131a850946eSmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
132a850946eSmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
133a850946eSmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
134a850946eSmrg
135c44a0236Smrgcase "$UNAME_SYSTEM" in
1369511053fSmrgLinux|GNU|GNU/*)
1379511053fSmrg	# If the system lacks a compiler, then just pick glibc.
1389511053fSmrg	# We could probably try harder.
1399511053fSmrg	LIBC=gnu
1409511053fSmrg
141c44a0236Smrg	eval "$set_cc_for_build"
142c44a0236Smrg	cat <<-EOF > "$dummy.c"
1439511053fSmrg	#include <features.h>
1449511053fSmrg	#if defined(__UCLIBC__)
1459511053fSmrg	LIBC=uclibc
1469511053fSmrg	#elif defined(__dietlibc__)
1479511053fSmrg	LIBC=dietlibc
1489511053fSmrg	#else
1499511053fSmrg	LIBC=gnu
1509511053fSmrg	#endif
1519511053fSmrg	EOF
152c44a0236Smrg	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
153c44a0236Smrg
154c44a0236Smrg	# If ldd exists, use it to detect musl libc.
155c44a0236Smrg	if command -v ldd >/dev/null && \
156c44a0236Smrg		ldd --version 2>&1 | grep -q ^musl
157c44a0236Smrg	then
158c44a0236Smrg	    LIBC=musl
159c44a0236Smrg	fi
1609511053fSmrg	;;
1619511053fSmrgesac
1629511053fSmrg
163a850946eSmrg# Note: order is significant - the case branches are not exclusive.
164a850946eSmrg
165c44a0236Smrgcase "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
166a850946eSmrg    *:NetBSD:*:*)
167a850946eSmrg	# NetBSD (nbsd) targets should (where applicable) match one or
1689511053fSmrg	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
169a850946eSmrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
170a850946eSmrg	# switched to ELF, *-*-netbsd* would select the old
171a850946eSmrg	# object file format.  This provides both forward
172a850946eSmrg	# compatibility and a consistent mechanism for selecting the
173a850946eSmrg	# object file format.
174a850946eSmrg	#
175a850946eSmrg	# Note: NetBSD doesn't particularly care about the vendor
176a850946eSmrg	# portion of the name.  We always set it to "unknown".
177a850946eSmrg	sysctl="sysctl -n hw.machine_arch"
178c44a0236Smrg	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
179c44a0236Smrg	    "/sbin/$sysctl" 2>/dev/null || \
180c44a0236Smrg	    "/usr/sbin/$sysctl" 2>/dev/null || \
181c44a0236Smrg	    echo unknown)`
182c44a0236Smrg	case "$UNAME_MACHINE_ARCH" in
183a850946eSmrg	    armeb) machine=armeb-unknown ;;
184a850946eSmrg	    arm*) machine=arm-unknown ;;
185a850946eSmrg	    sh3el) machine=shl-unknown ;;
186a850946eSmrg	    sh3eb) machine=sh-unknown ;;
18770f7c90cSmrg	    sh5el) machine=sh5le-unknown ;;
188c44a0236Smrg	    earmv*)
189c44a0236Smrg		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
190c44a0236Smrg		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
191c44a0236Smrg		machine="${arch}${endian}"-unknown
192c44a0236Smrg		;;
193c44a0236Smrg	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
194a850946eSmrg	esac
195a850946eSmrg	# The Operating System including object format, if it has switched
196c44a0236Smrg	# to ELF recently (or will in the future) and ABI.
197c44a0236Smrg	case "$UNAME_MACHINE_ARCH" in
198c44a0236Smrg	    earm*)
199c44a0236Smrg		os=netbsdelf
200c44a0236Smrg		;;
201a850946eSmrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
202c44a0236Smrg		eval "$set_cc_for_build"
203a850946eSmrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
2047dff02feSmrg			| grep -q __ELF__
205a850946eSmrg		then
206a850946eSmrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
207a850946eSmrg		    # Return netbsd for either.  FIX?
208a850946eSmrg		    os=netbsd
209a850946eSmrg		else
210a850946eSmrg		    os=netbsdelf
211a850946eSmrg		fi
212a850946eSmrg		;;
213a850946eSmrg	    *)
2149511053fSmrg		os=netbsd
215a850946eSmrg		;;
216a850946eSmrg	esac
217c44a0236Smrg	# Determine ABI tags.
218c44a0236Smrg	case "$UNAME_MACHINE_ARCH" in
219c44a0236Smrg	    earm*)
220c44a0236Smrg		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
221c44a0236Smrg		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
222c44a0236Smrg		;;
223c44a0236Smrg	esac
224a850946eSmrg	# The OS release
225a850946eSmrg	# Debian GNU/NetBSD machines have a different userland, and
226a850946eSmrg	# thus, need a distinct triplet. However, they do not need
227a850946eSmrg	# kernel version information, so it can be replaced with a
228a850946eSmrg	# suitable tag, in the style of linux-gnu.
229c44a0236Smrg	case "$UNAME_VERSION" in
230a850946eSmrg	    Debian*)
231a850946eSmrg		release='-gnu'
232a850946eSmrg		;;
233a850946eSmrg	    *)
234c44a0236Smrg		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
235a850946eSmrg		;;
236a850946eSmrg	esac
237a850946eSmrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
238a850946eSmrg	# contains redundant information, the shorter form:
239a850946eSmrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
240c44a0236Smrg	echo "$machine-${os}${release}${abi}"
24170f7c90cSmrg	exit ;;
2429511053fSmrg    *:Bitrig:*:*)
2439511053fSmrg	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
244c44a0236Smrg	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
2459511053fSmrg	exit ;;
246a850946eSmrg    *:OpenBSD:*:*)
24770f7c90cSmrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
248c44a0236Smrg	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
249c44a0236Smrg	exit ;;
250c44a0236Smrg    *:LibertyBSD:*:*)
251c44a0236Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
252c44a0236Smrg	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
253c44a0236Smrg	exit ;;
254c44a0236Smrg    *:MidnightBSD:*:*)
255c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
25670f7c90cSmrg	exit ;;
25770f7c90cSmrg    *:ekkoBSD:*:*)
258c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
25970f7c90cSmrg	exit ;;
26070f7c90cSmrg    *:SolidBSD:*:*)
261c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
26270f7c90cSmrg	exit ;;
26370f7c90cSmrg    macppc:MirBSD:*:*)
264c44a0236Smrg	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
26570f7c90cSmrg	exit ;;
26670f7c90cSmrg    *:MirBSD:*:*)
267c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
26870f7c90cSmrg	exit ;;
269c44a0236Smrg    *:Sortix:*:*)
270c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-sortix
271c44a0236Smrg	exit ;;
272c44a0236Smrg    *:Redox:*:*)
273c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-redox
274c44a0236Smrg	exit ;;
275c44a0236Smrg    mips:OSF1:*.*)
276c44a0236Smrg        echo mips-dec-osf1
277c44a0236Smrg        exit ;;
278a850946eSmrg    alpha:OSF1:*:*)
27970f7c90cSmrg	case $UNAME_RELEASE in
28070f7c90cSmrg	*4.0)
281a850946eSmrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
28270f7c90cSmrg		;;
28370f7c90cSmrg	*5.*)
2849511053fSmrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
28570f7c90cSmrg		;;
28670f7c90cSmrg	esac
287a850946eSmrg	# According to Compaq, /usr/sbin/psrinfo has been available on
288a850946eSmrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
289a850946eSmrg	# covers most systems running today.  This code pipes the CPU
290a850946eSmrg	# types through head -n 1, so we only detect the type of CPU 0.
291a850946eSmrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
292a850946eSmrg	case "$ALPHA_CPU_TYPE" in
293a850946eSmrg	    "EV4 (21064)")
294c44a0236Smrg		UNAME_MACHINE=alpha ;;
295a850946eSmrg	    "EV4.5 (21064)")
296c44a0236Smrg		UNAME_MACHINE=alpha ;;
297a850946eSmrg	    "LCA4 (21066/21068)")
298c44a0236Smrg		UNAME_MACHINE=alpha ;;
299a850946eSmrg	    "EV5 (21164)")
300c44a0236Smrg		UNAME_MACHINE=alphaev5 ;;
301a850946eSmrg	    "EV5.6 (21164A)")
302c44a0236Smrg		UNAME_MACHINE=alphaev56 ;;
303a850946eSmrg	    "EV5.6 (21164PC)")
304c44a0236Smrg		UNAME_MACHINE=alphapca56 ;;
305a850946eSmrg	    "EV5.7 (21164PC)")
306c44a0236Smrg		UNAME_MACHINE=alphapca57 ;;
307a850946eSmrg	    "EV6 (21264)")
308c44a0236Smrg		UNAME_MACHINE=alphaev6 ;;
309a850946eSmrg	    "EV6.7 (21264A)")
310c44a0236Smrg		UNAME_MACHINE=alphaev67 ;;
311a850946eSmrg	    "EV6.8CB (21264C)")
312c44a0236Smrg		UNAME_MACHINE=alphaev68 ;;
313a850946eSmrg	    "EV6.8AL (21264B)")
314c44a0236Smrg		UNAME_MACHINE=alphaev68 ;;
315a850946eSmrg	    "EV6.8CX (21264D)")
316c44a0236Smrg		UNAME_MACHINE=alphaev68 ;;
317a850946eSmrg	    "EV6.9A (21264/EV69A)")
318c44a0236Smrg		UNAME_MACHINE=alphaev69 ;;
319a850946eSmrg	    "EV7 (21364)")
320c44a0236Smrg		UNAME_MACHINE=alphaev7 ;;
321a850946eSmrg	    "EV7.9 (21364A)")
322c44a0236Smrg		UNAME_MACHINE=alphaev79 ;;
323a850946eSmrg	esac
32470f7c90cSmrg	# A Pn.n version is a patched version.
325a850946eSmrg	# A Vn.n version is a released version.
326a850946eSmrg	# A Tn.n version is a released field test version.
327a850946eSmrg	# A Xn.n version is an unreleased experimental baselevel.
328a850946eSmrg	# 1.2 uses "1.2" for uname -r.
329c44a0236Smrg	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
3309511053fSmrg	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
3319511053fSmrg	exitcode=$?
3329511053fSmrg	trap '' 0
3339511053fSmrg	exit $exitcode ;;
334a850946eSmrg    Amiga*:UNIX_System_V:4.0:*)
335a850946eSmrg	echo m68k-unknown-sysv4
33670f7c90cSmrg	exit ;;
337a850946eSmrg    *:[Aa]miga[Oo][Ss]:*:*)
338c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-amigaos
33970f7c90cSmrg	exit ;;
340a850946eSmrg    *:[Mm]orph[Oo][Ss]:*:*)
341c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-morphos
34270f7c90cSmrg	exit ;;
343a850946eSmrg    *:OS/390:*:*)
344a850946eSmrg	echo i370-ibm-openedition
34570f7c90cSmrg	exit ;;
34670f7c90cSmrg    *:z/VM:*:*)
34770f7c90cSmrg	echo s390-ibm-zvmoe
34870f7c90cSmrg	exit ;;
34970f7c90cSmrg    *:OS400:*:*)
3509511053fSmrg	echo powerpc-ibm-os400
35170f7c90cSmrg	exit ;;
352a850946eSmrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
353c44a0236Smrg	echo arm-acorn-riscix"$UNAME_RELEASE"
35470f7c90cSmrg	exit ;;
3559511053fSmrg    arm*:riscos:*:*|arm*:RISCOS:*:*)
35670f7c90cSmrg	echo arm-unknown-riscos
35770f7c90cSmrg	exit ;;
358a850946eSmrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
359a850946eSmrg	echo hppa1.1-hitachi-hiuxmpp
36070f7c90cSmrg	exit ;;
361a850946eSmrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
362a850946eSmrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
363a850946eSmrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
364a850946eSmrg		echo pyramid-pyramid-sysv3
365a850946eSmrg	else
366a850946eSmrg		echo pyramid-pyramid-bsd
367a850946eSmrg	fi
36870f7c90cSmrg	exit ;;
369a850946eSmrg    NILE*:*:*:dcosx)
370a850946eSmrg	echo pyramid-pyramid-svr4
37170f7c90cSmrg	exit ;;
372a850946eSmrg    DRS?6000:unix:4.0:6*)
373a850946eSmrg	echo sparc-icl-nx6
37470f7c90cSmrg	exit ;;
37570f7c90cSmrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
376a850946eSmrg	case `/usr/bin/uname -p` in
37770f7c90cSmrg	    sparc) echo sparc-icl-nx7; exit ;;
378a850946eSmrg	esac ;;
37970f7c90cSmrg    s390x:SunOS:*:*)
380c44a0236Smrg	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
38170f7c90cSmrg	exit ;;
382a850946eSmrg    sun4H:SunOS:5.*:*)
383c44a0236Smrg	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
38470f7c90cSmrg	exit ;;
385a850946eSmrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
386c44a0236Smrg	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
38770f7c90cSmrg	exit ;;
3887dff02feSmrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
389c44a0236Smrg	echo i386-pc-auroraux"$UNAME_RELEASE"
3907dff02feSmrg	exit ;;
39170f7c90cSmrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
392c44a0236Smrg	eval "$set_cc_for_build"
393c44a0236Smrg	SUN_ARCH=i386
39470f7c90cSmrg	# If there is a compiler, see if it is configured for 64-bit objects.
39570f7c90cSmrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
39670f7c90cSmrg	# This test works for both compilers.
397c44a0236Smrg	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
39870f7c90cSmrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
399c44a0236Smrg		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
40070f7c90cSmrg		grep IS_64BIT_ARCH >/dev/null
40170f7c90cSmrg	    then
402c44a0236Smrg		SUN_ARCH=x86_64
40370f7c90cSmrg	    fi
40470f7c90cSmrg	fi
405c44a0236Smrg	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
40670f7c90cSmrg	exit ;;
407a850946eSmrg    sun4*:SunOS:6*:*)
408a850946eSmrg	# According to config.sub, this is the proper way to canonicalize
409a850946eSmrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
410a850946eSmrg	# it's likely to be more like Solaris than SunOS4.
411c44a0236Smrg	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
41270f7c90cSmrg	exit ;;
413a850946eSmrg    sun4*:SunOS:*:*)
414a850946eSmrg	case "`/usr/bin/arch -k`" in
415a850946eSmrg	    Series*|S4*)
416a850946eSmrg		UNAME_RELEASE=`uname -v`
417a850946eSmrg		;;
418a850946eSmrg	esac
419a850946eSmrg	# Japanese Language versions have a version number like `4.1.3-JL'.
420c44a0236Smrg	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
42170f7c90cSmrg	exit ;;
422a850946eSmrg    sun3*:SunOS:*:*)
423c44a0236Smrg	echo m68k-sun-sunos"$UNAME_RELEASE"
42470f7c90cSmrg	exit ;;
425a850946eSmrg    sun*:*:4.2BSD:*)
426a850946eSmrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
427c44a0236Smrg	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
428a850946eSmrg	case "`/bin/arch`" in
429a850946eSmrg	    sun3)
430c44a0236Smrg		echo m68k-sun-sunos"$UNAME_RELEASE"
431a850946eSmrg		;;
432a850946eSmrg	    sun4)
433c44a0236Smrg		echo sparc-sun-sunos"$UNAME_RELEASE"
434a850946eSmrg		;;
435a850946eSmrg	esac
43670f7c90cSmrg	exit ;;
437a850946eSmrg    aushp:SunOS:*:*)
438c44a0236Smrg	echo sparc-auspex-sunos"$UNAME_RELEASE"
43970f7c90cSmrg	exit ;;
440a850946eSmrg    # The situation for MiNT is a little confusing.  The machine name
441a850946eSmrg    # can be virtually everything (everything which is not
442a850946eSmrg    # "atarist" or "atariste" at least should have a processor
443a850946eSmrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
444a850946eSmrg    # to the lowercase version "mint" (or "freemint").  Finally
445a850946eSmrg    # the system name "TOS" denotes a system which is actually not
446a850946eSmrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
447a850946eSmrg    # be no problem.
448a850946eSmrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
449c44a0236Smrg	echo m68k-atari-mint"$UNAME_RELEASE"
45070f7c90cSmrg	exit ;;
451a850946eSmrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
452c44a0236Smrg	echo m68k-atari-mint"$UNAME_RELEASE"
4539511053fSmrg	exit ;;
454a850946eSmrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
455c44a0236Smrg	echo m68k-atari-mint"$UNAME_RELEASE"
45670f7c90cSmrg	exit ;;
457a850946eSmrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
458c44a0236Smrg	echo m68k-milan-mint"$UNAME_RELEASE"
4599511053fSmrg	exit ;;
460a850946eSmrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
461c44a0236Smrg	echo m68k-hades-mint"$UNAME_RELEASE"
4629511053fSmrg	exit ;;
463a850946eSmrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
464c44a0236Smrg	echo m68k-unknown-mint"$UNAME_RELEASE"
4659511053fSmrg	exit ;;
46670f7c90cSmrg    m68k:machten:*:*)
467c44a0236Smrg	echo m68k-apple-machten"$UNAME_RELEASE"
46870f7c90cSmrg	exit ;;
469a850946eSmrg    powerpc:machten:*:*)
470c44a0236Smrg	echo powerpc-apple-machten"$UNAME_RELEASE"
47170f7c90cSmrg	exit ;;
472a850946eSmrg    RISC*:Mach:*:*)
473a850946eSmrg	echo mips-dec-mach_bsd4.3
47470f7c90cSmrg	exit ;;
475a850946eSmrg    RISC*:ULTRIX:*:*)
476c44a0236Smrg	echo mips-dec-ultrix"$UNAME_RELEASE"
47770f7c90cSmrg	exit ;;
478a850946eSmrg    VAX*:ULTRIX*:*:*)
479c44a0236Smrg	echo vax-dec-ultrix"$UNAME_RELEASE"
48070f7c90cSmrg	exit ;;
481a850946eSmrg    2020:CLIX:*:* | 2430:CLIX:*:*)
482c44a0236Smrg	echo clipper-intergraph-clix"$UNAME_RELEASE"
48370f7c90cSmrg	exit ;;
484a850946eSmrg    mips:*:*:UMIPS | mips:*:*:RISCos)
485c44a0236Smrg	eval "$set_cc_for_build"
486c44a0236Smrg	sed 's/^	//' << EOF > "$dummy.c"
487a850946eSmrg#ifdef __cplusplus
488a850946eSmrg#include <stdio.h>  /* for printf() prototype */
489a850946eSmrg	int main (int argc, char *argv[]) {
490a850946eSmrg#else
491a850946eSmrg	int main (argc, argv) int argc; char *argv[]; {
492a850946eSmrg#endif
493a850946eSmrg	#if defined (host_mips) && defined (MIPSEB)
494a850946eSmrg	#if defined (SYSTYPE_SYSV)
495c44a0236Smrg	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
496a850946eSmrg	#endif
497a850946eSmrg	#if defined (SYSTYPE_SVR4)
498c44a0236Smrg	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
499a850946eSmrg	#endif
500a850946eSmrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
501c44a0236Smrg	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
502a850946eSmrg	#endif
503a850946eSmrg	#endif
504a850946eSmrg	  exit (-1);
505a850946eSmrg	}
506a850946eSmrgEOF
507c44a0236Smrg	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
508c44a0236Smrg	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
509c44a0236Smrg	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
51070f7c90cSmrg	    { echo "$SYSTEM_NAME"; exit; }
511c44a0236Smrg	echo mips-mips-riscos"$UNAME_RELEASE"
51270f7c90cSmrg	exit ;;
513a850946eSmrg    Motorola:PowerMAX_OS:*:*)
514a850946eSmrg	echo powerpc-motorola-powermax
51570f7c90cSmrg	exit ;;
516a850946eSmrg    Motorola:*:4.3:PL8-*)
517a850946eSmrg	echo powerpc-harris-powermax
51870f7c90cSmrg	exit ;;
519a850946eSmrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
520a850946eSmrg	echo powerpc-harris-powermax
52170f7c90cSmrg	exit ;;
522a850946eSmrg    Night_Hawk:Power_UNIX:*:*)
523a850946eSmrg	echo powerpc-harris-powerunix
52470f7c90cSmrg	exit ;;
525a850946eSmrg    m88k:CX/UX:7*:*)
526a850946eSmrg	echo m88k-harris-cxux7
52770f7c90cSmrg	exit ;;
528a850946eSmrg    m88k:*:4*:R4*)
529a850946eSmrg	echo m88k-motorola-sysv4
53070f7c90cSmrg	exit ;;
531a850946eSmrg    m88k:*:3*:R3*)
532a850946eSmrg	echo m88k-motorola-sysv3
53370f7c90cSmrg	exit ;;
534a850946eSmrg    AViiON:dgux:*:*)
5359511053fSmrg	# DG/UX returns AViiON for all architectures
5369511053fSmrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
537c44a0236Smrg	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
538a850946eSmrg	then
539c44a0236Smrg	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
540c44a0236Smrg	       [ "$TARGET_BINARY_INTERFACE"x = x ]
541a850946eSmrg	    then
542c44a0236Smrg		echo m88k-dg-dgux"$UNAME_RELEASE"
543a850946eSmrg	    else
544c44a0236Smrg		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
545a850946eSmrg	    fi
546a850946eSmrg	else
547c44a0236Smrg	    echo i586-dg-dgux"$UNAME_RELEASE"
548a850946eSmrg	fi
5499511053fSmrg	exit ;;
550a850946eSmrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
551a850946eSmrg	echo m88k-dolphin-sysv3
55270f7c90cSmrg	exit ;;
553a850946eSmrg    M88*:*:R3*:*)
554a850946eSmrg	# Delta 88k system running SVR3
555a850946eSmrg	echo m88k-motorola-sysv3
55670f7c90cSmrg	exit ;;
557a850946eSmrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
558a850946eSmrg	echo m88k-tektronix-sysv3
55970f7c90cSmrg	exit ;;
560a850946eSmrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
561a850946eSmrg	echo m68k-tektronix-bsd
56270f7c90cSmrg	exit ;;
563a850946eSmrg    *:IRIX*:*:*)
564c44a0236Smrg	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
56570f7c90cSmrg	exit ;;
566a850946eSmrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
56770f7c90cSmrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
56870f7c90cSmrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
569a850946eSmrg    i*86:AIX:*:*)
570a850946eSmrg	echo i386-ibm-aix
57170f7c90cSmrg	exit ;;
572a850946eSmrg    ia64:AIX:*:*)
573a850946eSmrg	if [ -x /usr/bin/oslevel ] ; then
574a850946eSmrg		IBM_REV=`/usr/bin/oslevel`
575a850946eSmrg	else
576c44a0236Smrg		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
577a850946eSmrg	fi
578c44a0236Smrg	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
57970f7c90cSmrg	exit ;;
580a850946eSmrg    *:AIX:2:3)
581a850946eSmrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
582c44a0236Smrg		eval "$set_cc_for_build"
583c44a0236Smrg		sed 's/^		//' << EOF > "$dummy.c"
584a850946eSmrg		#include <sys/systemcfg.h>
585a850946eSmrg
586a850946eSmrg		main()
587a850946eSmrg			{
588a850946eSmrg			if (!__power_pc())
589a850946eSmrg				exit(1);
590a850946eSmrg			puts("powerpc-ibm-aix3.2.5");
591a850946eSmrg			exit(0);
592a850946eSmrg			}
593a850946eSmrgEOF
594c44a0236Smrg		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
59570f7c90cSmrg		then
59670f7c90cSmrg			echo "$SYSTEM_NAME"
59770f7c90cSmrg		else
59870f7c90cSmrg			echo rs6000-ibm-aix3.2.5
59970f7c90cSmrg		fi
600a850946eSmrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
601a850946eSmrg		echo rs6000-ibm-aix3.2.4
602a850946eSmrg	else
603a850946eSmrg		echo rs6000-ibm-aix3.2
604a850946eSmrg	fi
60570f7c90cSmrg	exit ;;
60669a1fe56Smrg    *:AIX:*:[4567])
607a850946eSmrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
608c44a0236Smrg	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
609a850946eSmrg		IBM_ARCH=rs6000
610a850946eSmrg	else
611a850946eSmrg		IBM_ARCH=powerpc
612a850946eSmrg	fi
613c44a0236Smrg	if [ -x /usr/bin/lslpp ] ; then
614c44a0236Smrg		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
615c44a0236Smrg			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
616a850946eSmrg	else
617c44a0236Smrg		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
618a850946eSmrg	fi
619c44a0236Smrg	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
62070f7c90cSmrg	exit ;;
621a850946eSmrg    *:AIX:*:*)
622a850946eSmrg	echo rs6000-ibm-aix
62370f7c90cSmrg	exit ;;
624c44a0236Smrg    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
625a850946eSmrg	echo romp-ibm-bsd4.4
62670f7c90cSmrg	exit ;;
627a850946eSmrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
628c44a0236Smrg	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
62970f7c90cSmrg	exit ;;                             # report: romp-ibm BSD 4.3
630a850946eSmrg    *:BOSX:*:*)
631a850946eSmrg	echo rs6000-bull-bosx
63270f7c90cSmrg	exit ;;
633a850946eSmrg    DPX/2?00:B.O.S.:*:*)
634a850946eSmrg	echo m68k-bull-sysv3
63570f7c90cSmrg	exit ;;
636a850946eSmrg    9000/[34]??:4.3bsd:1.*:*)
637a850946eSmrg	echo m68k-hp-bsd
63870f7c90cSmrg	exit ;;
639a850946eSmrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
640a850946eSmrg	echo m68k-hp-bsd4.4
64170f7c90cSmrg	exit ;;
642a850946eSmrg    9000/[34678]??:HP-UX:*:*)
643c44a0236Smrg	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
644c44a0236Smrg	case "$UNAME_MACHINE" in
645c44a0236Smrg	    9000/31?)            HP_ARCH=m68000 ;;
646c44a0236Smrg	    9000/[34]??)         HP_ARCH=m68k ;;
647a850946eSmrg	    9000/[678][0-9][0-9])
648a850946eSmrg		if [ -x /usr/bin/getconf ]; then
649a850946eSmrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
6509511053fSmrg		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
651c44a0236Smrg		    case "$sc_cpu_version" in
652c44a0236Smrg		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
653c44a0236Smrg		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
6549511053fSmrg		      532)                      # CPU_PA_RISC2_0
655c44a0236Smrg			case "$sc_kernel_bits" in
656c44a0236Smrg			  32) HP_ARCH=hppa2.0n ;;
657c44a0236Smrg			  64) HP_ARCH=hppa2.0w ;;
658c44a0236Smrg			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
6599511053fSmrg			esac ;;
6609511053fSmrg		    esac
661a850946eSmrg		fi
662c44a0236Smrg		if [ "$HP_ARCH" = "" ]; then
663c44a0236Smrg		    eval "$set_cc_for_build"
664c44a0236Smrg		    sed 's/^		//' << EOF > "$dummy.c"
665a850946eSmrg
6669511053fSmrg		#define _HPUX_SOURCE
6679511053fSmrg		#include <stdlib.h>
6689511053fSmrg		#include <unistd.h>
669a850946eSmrg
6709511053fSmrg		int main ()
6719511053fSmrg		{
6729511053fSmrg		#if defined(_SC_KERNEL_BITS)
6739511053fSmrg		    long bits = sysconf(_SC_KERNEL_BITS);
6749511053fSmrg		#endif
6759511053fSmrg		    long cpu  = sysconf (_SC_CPU_VERSION);
676a850946eSmrg
6779511053fSmrg		    switch (cpu)
6789511053fSmrg			{
6799511053fSmrg			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
6809511053fSmrg			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
6819511053fSmrg			case CPU_PA_RISC2_0:
6829511053fSmrg		#if defined(_SC_KERNEL_BITS)
6839511053fSmrg			    switch (bits)
6849511053fSmrg				{
6859511053fSmrg				case 64: puts ("hppa2.0w"); break;
6869511053fSmrg				case 32: puts ("hppa2.0n"); break;
6879511053fSmrg				default: puts ("hppa2.0"); break;
6889511053fSmrg				} break;
6899511053fSmrg		#else  /* !defined(_SC_KERNEL_BITS) */
6909511053fSmrg			    puts ("hppa2.0"); break;
6919511053fSmrg		#endif
6929511053fSmrg			default: puts ("hppa1.0"); break;
6939511053fSmrg			}
6949511053fSmrg		    exit (0);
6959511053fSmrg		}
696a850946eSmrgEOF
697c44a0236Smrg		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
698a850946eSmrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
699a850946eSmrg		fi ;;
700a850946eSmrg	esac
701c44a0236Smrg	if [ "$HP_ARCH" = hppa2.0w ]
702a850946eSmrg	then
703c44a0236Smrg	    eval "$set_cc_for_build"
70470f7c90cSmrg
70570f7c90cSmrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
70670f7c90cSmrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
70770f7c90cSmrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
70870f7c90cSmrg	    #
70970f7c90cSmrg	    # $ CC_FOR_BUILD=cc ./config.guess
71070f7c90cSmrg	    # => hppa2.0w-hp-hpux11.23
71170f7c90cSmrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
71270f7c90cSmrg	    # => hppa64-hp-hpux11.23
71370f7c90cSmrg
714c44a0236Smrg	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
7157dff02feSmrg		grep -q __LP64__
716a850946eSmrg	    then
717c44a0236Smrg		HP_ARCH=hppa2.0w
718a850946eSmrg	    else
719c44a0236Smrg		HP_ARCH=hppa64
720a850946eSmrg	    fi
721a850946eSmrg	fi
722c44a0236Smrg	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
72370f7c90cSmrg	exit ;;
724a850946eSmrg    ia64:HP-UX:*:*)
725c44a0236Smrg	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
726c44a0236Smrg	echo ia64-hp-hpux"$HPUX_REV"
72770f7c90cSmrg	exit ;;
728a850946eSmrg    3050*:HI-UX:*:*)
729c44a0236Smrg	eval "$set_cc_for_build"
730c44a0236Smrg	sed 's/^	//' << EOF > "$dummy.c"
731a850946eSmrg	#include <unistd.h>
732a850946eSmrg	int
733a850946eSmrg	main ()
734a850946eSmrg	{
735a850946eSmrg	  long cpu = sysconf (_SC_CPU_VERSION);
736a850946eSmrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
737a850946eSmrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
738a850946eSmrg	     results, however.  */
739a850946eSmrg	  if (CPU_IS_PA_RISC (cpu))
740a850946eSmrg	    {
741a850946eSmrg	      switch (cpu)
742a850946eSmrg		{
743a850946eSmrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
744a850946eSmrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
745a850946eSmrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
746a850946eSmrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
747a850946eSmrg		}
748a850946eSmrg	    }
749a850946eSmrg	  else if (CPU_IS_HP_MC68K (cpu))
750a850946eSmrg	    puts ("m68k-hitachi-hiuxwe2");
751a850946eSmrg	  else puts ("unknown-hitachi-hiuxwe2");
752a850946eSmrg	  exit (0);
753a850946eSmrg	}
754a850946eSmrgEOF
755c44a0236Smrg	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
75670f7c90cSmrg		{ echo "$SYSTEM_NAME"; exit; }
757a850946eSmrg	echo unknown-hitachi-hiuxwe2
75870f7c90cSmrg	exit ;;
759c44a0236Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
760a850946eSmrg	echo hppa1.1-hp-bsd
76170f7c90cSmrg	exit ;;
762a850946eSmrg    9000/8??:4.3bsd:*:*)
763a850946eSmrg	echo hppa1.0-hp-bsd
76470f7c90cSmrg	exit ;;
765a850946eSmrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
766a850946eSmrg	echo hppa1.0-hp-mpeix
76770f7c90cSmrg	exit ;;
768c44a0236Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
769a850946eSmrg	echo hppa1.1-hp-osf
77070f7c90cSmrg	exit ;;
771a850946eSmrg    hp8??:OSF1:*:*)
772a850946eSmrg	echo hppa1.0-hp-osf
77370f7c90cSmrg	exit ;;
774a850946eSmrg    i*86:OSF1:*:*)
775a850946eSmrg	if [ -x /usr/sbin/sysversion ] ; then
776c44a0236Smrg	    echo "$UNAME_MACHINE"-unknown-osf1mk
777a850946eSmrg	else
778c44a0236Smrg	    echo "$UNAME_MACHINE"-unknown-osf1
779a850946eSmrg	fi
78070f7c90cSmrg	exit ;;
781a850946eSmrg    parisc*:Lites*:*:*)
782a850946eSmrg	echo hppa1.1-hp-lites
78370f7c90cSmrg	exit ;;
784a850946eSmrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
785a850946eSmrg	echo c1-convex-bsd
7869511053fSmrg	exit ;;
787a850946eSmrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
788a850946eSmrg	if getsysinfo -f scalar_acc
789a850946eSmrg	then echo c32-convex-bsd
790a850946eSmrg	else echo c2-convex-bsd
791a850946eSmrg	fi
7929511053fSmrg	exit ;;
793a850946eSmrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
794a850946eSmrg	echo c34-convex-bsd
7959511053fSmrg	exit ;;
796a850946eSmrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
797a850946eSmrg	echo c38-convex-bsd
7989511053fSmrg	exit ;;
799a850946eSmrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
800a850946eSmrg	echo c4-convex-bsd
8019511053fSmrg	exit ;;
802a850946eSmrg    CRAY*Y-MP:*:*:*)
803c44a0236Smrg	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
80470f7c90cSmrg	exit ;;
805a850946eSmrg    CRAY*[A-Z]90:*:*:*)
806c44a0236Smrg	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
807a850946eSmrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
808a850946eSmrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
809a850946eSmrg	      -e 's/\.[^.]*$/.X/'
81070f7c90cSmrg	exit ;;
811a850946eSmrg    CRAY*TS:*:*:*)
812c44a0236Smrg	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
81370f7c90cSmrg	exit ;;
814a850946eSmrg    CRAY*T3E:*:*:*)
815c44a0236Smrg	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
81670f7c90cSmrg	exit ;;
817a850946eSmrg    CRAY*SV1:*:*:*)
818c44a0236Smrg	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
81970f7c90cSmrg	exit ;;
820a850946eSmrg    *:UNICOS/mp:*:*)
821c44a0236Smrg	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
82270f7c90cSmrg	exit ;;
823a850946eSmrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
824c44a0236Smrg	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
825c44a0236Smrg	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
826c44a0236Smrg	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
8279511053fSmrg	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
8289511053fSmrg	exit ;;
82970f7c90cSmrg    5000:UNIX_System_V:4.*:*)
830c44a0236Smrg	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
831c44a0236Smrg	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
8329511053fSmrg	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
83370f7c90cSmrg	exit ;;
834a850946eSmrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
835c44a0236Smrg	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
83670f7c90cSmrg	exit ;;
837a850946eSmrg    sparc*:BSD/OS:*:*)
838c44a0236Smrg	echo sparc-unknown-bsdi"$UNAME_RELEASE"
83970f7c90cSmrg	exit ;;
840a850946eSmrg    *:BSD/OS:*:*)
841c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
84270f7c90cSmrg	exit ;;
84370f7c90cSmrg    *:FreeBSD:*:*)
8449511053fSmrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
845c44a0236Smrg	case "$UNAME_PROCESSOR" in
84670f7c90cSmrg	    amd64)
847c44a0236Smrg		UNAME_PROCESSOR=x86_64 ;;
848c44a0236Smrg	    i386)
849c44a0236Smrg		UNAME_PROCESSOR=i586 ;;
85070f7c90cSmrg	esac
851c44a0236Smrg	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
85270f7c90cSmrg	exit ;;
853a850946eSmrg    i*:CYGWIN*:*)
854c44a0236Smrg	echo "$UNAME_MACHINE"-pc-cygwin
85570f7c90cSmrg	exit ;;
8569511053fSmrg    *:MINGW64*:*)
857c44a0236Smrg	echo "$UNAME_MACHINE"-pc-mingw64
8589511053fSmrg	exit ;;
85970f7c90cSmrg    *:MINGW*:*)
860c44a0236Smrg	echo "$UNAME_MACHINE"-pc-mingw32
8619511053fSmrg	exit ;;
862c44a0236Smrg    *:MSYS*:*)
863c44a0236Smrg	echo "$UNAME_MACHINE"-pc-msys
86470f7c90cSmrg	exit ;;
865a850946eSmrg    i*:PW*:*)
866c44a0236Smrg	echo "$UNAME_MACHINE"-pc-pw32
86770f7c90cSmrg	exit ;;
8687dff02feSmrg    *:Interix*:*)
869c44a0236Smrg	case "$UNAME_MACHINE" in
87070f7c90cSmrg	    x86)
871c44a0236Smrg		echo i586-pc-interix"$UNAME_RELEASE"
87270f7c90cSmrg		exit ;;
8737dff02feSmrg	    authenticamd | genuineintel | EM64T)
874c44a0236Smrg		echo x86_64-unknown-interix"$UNAME_RELEASE"
87570f7c90cSmrg		exit ;;
87670f7c90cSmrg	    IA64)
877c44a0236Smrg		echo ia64-unknown-interix"$UNAME_RELEASE"
87870f7c90cSmrg		exit ;;
87970f7c90cSmrg	esac ;;
880a850946eSmrg    i*:UWIN*:*)
881c44a0236Smrg	echo "$UNAME_MACHINE"-pc-uwin
88270f7c90cSmrg	exit ;;
88370f7c90cSmrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
88470f7c90cSmrg	echo x86_64-unknown-cygwin
88570f7c90cSmrg	exit ;;
886a850946eSmrg    prep*:SunOS:5.*:*)
887c44a0236Smrg	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
88870f7c90cSmrg	exit ;;
889a850946eSmrg    *:GNU:*:*)
89070f7c90cSmrg	# the GNU system
891c44a0236Smrg	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
89270f7c90cSmrg	exit ;;
89370f7c90cSmrg    *:GNU/*:*:*)
89470f7c90cSmrg	# other systems with GNU libc and userland
895c44a0236Smrg	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
89670f7c90cSmrg	exit ;;
897a850946eSmrg    i*86:Minix:*:*)
898c44a0236Smrg	echo "$UNAME_MACHINE"-pc-minix
89970f7c90cSmrg	exit ;;
9009511053fSmrg    aarch64:Linux:*:*)
901c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
9029511053fSmrg	exit ;;
9039511053fSmrg    aarch64_be:Linux:*:*)
9049511053fSmrg	UNAME_MACHINE=aarch64_be
905c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
9069511053fSmrg	exit ;;
9077dff02feSmrg    alpha:Linux:*:*)
9087dff02feSmrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
9097dff02feSmrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
9107dff02feSmrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
9117dff02feSmrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
9127dff02feSmrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
9137dff02feSmrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
9147dff02feSmrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
9157dff02feSmrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
9169511053fSmrg	esac
9177dff02feSmrg	objdump --private-headers /bin/sh | grep -q ld.so.1
918c44a0236Smrg	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
919c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
9209511053fSmrg	exit ;;
9219511053fSmrg    arc:Linux:*:* | arceb:Linux:*:*)
922c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
9237dff02feSmrg	exit ;;
924a850946eSmrg    arm*:Linux:*:*)
925c44a0236Smrg	eval "$set_cc_for_build"
92670f7c90cSmrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
92770f7c90cSmrg	    | grep -q __ARM_EABI__
92870f7c90cSmrg	then
929c44a0236Smrg	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
93070f7c90cSmrg	else
9319511053fSmrg	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
9329511053fSmrg		| grep -q __ARM_PCS_VFP
9339511053fSmrg	    then
934c44a0236Smrg		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
9359511053fSmrg	    else
936c44a0236Smrg		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
9379511053fSmrg	    fi
93870f7c90cSmrg	fi
93970f7c90cSmrg	exit ;;
94070f7c90cSmrg    avr32*:Linux:*:*)
941c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
94270f7c90cSmrg	exit ;;
943a850946eSmrg    cris:Linux:*:*)
944c44a0236Smrg	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
94570f7c90cSmrg	exit ;;
94670f7c90cSmrg    crisv32:Linux:*:*)
947c44a0236Smrg	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
948c44a0236Smrg	exit ;;
949c44a0236Smrg    e2k:Linux:*:*)
950c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
95170f7c90cSmrg	exit ;;
95270f7c90cSmrg    frv:Linux:*:*)
953c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
9549511053fSmrg	exit ;;
9559511053fSmrg    hexagon:Linux:*:*)
956c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
95770f7c90cSmrg	exit ;;
9587dff02feSmrg    i*86:Linux:*:*)
959c44a0236Smrg	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
9607dff02feSmrg	exit ;;
961a850946eSmrg    ia64:Linux:*:*)
962c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
963c44a0236Smrg	exit ;;
964c44a0236Smrg    k1om:Linux:*:*)
965c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
96670f7c90cSmrg	exit ;;
96770f7c90cSmrg    m32r*:Linux:*:*)
968c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
96970f7c90cSmrg	exit ;;
970a850946eSmrg    m68*:Linux:*:*)
971c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
97270f7c90cSmrg	exit ;;
9737dff02feSmrg    mips:Linux:*:* | mips64:Linux:*:*)
974c44a0236Smrg	eval "$set_cc_for_build"
975c44a0236Smrg	sed 's/^	//' << EOF > "$dummy.c"
976a850946eSmrg	#undef CPU
9777dff02feSmrg	#undef ${UNAME_MACHINE}
9787dff02feSmrg	#undef ${UNAME_MACHINE}el
979a850946eSmrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
9807dff02feSmrg	CPU=${UNAME_MACHINE}el
981a850946eSmrg	#else
982a850946eSmrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
9837dff02feSmrg	CPU=${UNAME_MACHINE}
984a850946eSmrg	#else
985a850946eSmrg	CPU=
986a850946eSmrg	#endif
987a850946eSmrg	#endif
988a850946eSmrgEOF
989c44a0236Smrg	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
990c44a0236Smrg	test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
991a850946eSmrg	;;
992c44a0236Smrg    mips64el:Linux:*:*)
993c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
9949511053fSmrg	exit ;;
995c44a0236Smrg    openrisc*:Linux:*:*)
996c44a0236Smrg	echo or1k-unknown-linux-"$LIBC"
997c44a0236Smrg	exit ;;
998c44a0236Smrg    or32:Linux:*:* | or1k*:Linux:*:*)
999c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
100070f7c90cSmrg	exit ;;
100170f7c90cSmrg    padre:Linux:*:*)
1002c44a0236Smrg	echo sparc-unknown-linux-"$LIBC"
100370f7c90cSmrg	exit ;;
10047dff02feSmrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
1005c44a0236Smrg	echo hppa64-unknown-linux-"$LIBC"
10067dff02feSmrg	exit ;;
1007a850946eSmrg    parisc:Linux:*:* | hppa:Linux:*:*)
1008a850946eSmrg	# Look for CPU level
1009a850946eSmrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1010c44a0236Smrg	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1011c44a0236Smrg	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1012c44a0236Smrg	  *)    echo hppa-unknown-linux-"$LIBC" ;;
1013a850946eSmrg	esac
101470f7c90cSmrg	exit ;;
10157dff02feSmrg    ppc64:Linux:*:*)
1016c44a0236Smrg	echo powerpc64-unknown-linux-"$LIBC"
10177dff02feSmrg	exit ;;
10187dff02feSmrg    ppc:Linux:*:*)
1019c44a0236Smrg	echo powerpc-unknown-linux-"$LIBC"
10209511053fSmrg	exit ;;
10219511053fSmrg    ppc64le:Linux:*:*)
1022c44a0236Smrg	echo powerpc64le-unknown-linux-"$LIBC"
10239511053fSmrg	exit ;;
10249511053fSmrg    ppcle:Linux:*:*)
1025c44a0236Smrg	echo powerpcle-unknown-linux-"$LIBC"
1026c44a0236Smrg	exit ;;
1027c44a0236Smrg    riscv32:Linux:*:* | riscv64:Linux:*:*)
1028c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
102970f7c90cSmrg	exit ;;
1030a850946eSmrg    s390:Linux:*:* | s390x:Linux:*:*)
1031c44a0236Smrg	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
103270f7c90cSmrg	exit ;;
1033a850946eSmrg    sh64*:Linux:*:*)
1034c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
103570f7c90cSmrg	exit ;;
1036a850946eSmrg    sh*:Linux:*:*)
1037c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
103870f7c90cSmrg	exit ;;
1039a850946eSmrg    sparc:Linux:*:* | sparc64:Linux:*:*)
1040c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
104170f7c90cSmrg	exit ;;
104269a1fe56Smrg    tile*:Linux:*:*)
1043c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
104469a1fe56Smrg	exit ;;
104570f7c90cSmrg    vax:Linux:*:*)
1046c44a0236Smrg	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
104770f7c90cSmrg	exit ;;
1048a850946eSmrg    x86_64:Linux:*:*)
1049c44a0236Smrg	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
105070f7c90cSmrg	exit ;;
105170f7c90cSmrg    xtensa*:Linux:*:*)
1052c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
105370f7c90cSmrg	exit ;;
1054a850946eSmrg    i*86:DYNIX/ptx:4*:*)
1055a850946eSmrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1056a850946eSmrg	# earlier versions are messed up and put the nodename in both
1057a850946eSmrg	# sysname and nodename.
1058a850946eSmrg	echo i386-sequent-sysv4
105970f7c90cSmrg	exit ;;
1060a850946eSmrg    i*86:UNIX_SV:4.2MP:2.*)
10619511053fSmrg	# Unixware is an offshoot of SVR4, but it has its own version
10629511053fSmrg	# number series starting with 2...
10639511053fSmrg	# I am not positive that other SVR4 systems won't match this,
1064a850946eSmrg	# I just have to hope.  -- rms.
10659511053fSmrg	# Use sysv4.2uw... so that sysv4* matches it.
1066c44a0236Smrg	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
106770f7c90cSmrg	exit ;;
1068a850946eSmrg    i*86:OS/2:*:*)
1069a850946eSmrg	# If we were able to find `uname', then EMX Unix compatibility
1070a850946eSmrg	# is probably installed.
1071c44a0236Smrg	echo "$UNAME_MACHINE"-pc-os2-emx
107270f7c90cSmrg	exit ;;
1073a850946eSmrg    i*86:XTS-300:*:STOP)
1074c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-stop
107570f7c90cSmrg	exit ;;
1076a850946eSmrg    i*86:atheos:*:*)
1077c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-atheos
107870f7c90cSmrg	exit ;;
107970f7c90cSmrg    i*86:syllable:*:*)
1080c44a0236Smrg	echo "$UNAME_MACHINE"-pc-syllable
108170f7c90cSmrg	exit ;;
10827dff02feSmrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1083c44a0236Smrg	echo i386-unknown-lynxos"$UNAME_RELEASE"
108470f7c90cSmrg	exit ;;
1085a850946eSmrg    i*86:*DOS:*:*)
1086c44a0236Smrg	echo "$UNAME_MACHINE"-pc-msdosdjgpp
108770f7c90cSmrg	exit ;;
1088c44a0236Smrg    i*86:*:4.*:*)
1089c44a0236Smrg	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1090a850946eSmrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1091c44a0236Smrg		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1092a850946eSmrg	else
1093c44a0236Smrg		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1094a850946eSmrg	fi
109570f7c90cSmrg	exit ;;
109670f7c90cSmrg    i*86:*:5:[678]*)
10979511053fSmrg	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1098a850946eSmrg	case `/bin/uname -X | grep "^Machine"` in
1099a850946eSmrg	    *486*)	     UNAME_MACHINE=i486 ;;
1100a850946eSmrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
1101a850946eSmrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1102a850946eSmrg	esac
1103c44a0236Smrg	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
110470f7c90cSmrg	exit ;;
1105a850946eSmrg    i*86:*:3.2:*)
1106a850946eSmrg	if test -f /usr/options/cb.name; then
1107a850946eSmrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1108c44a0236Smrg		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1109a850946eSmrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1110a850946eSmrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1111a850946eSmrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1112a850946eSmrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1113a850946eSmrg			&& UNAME_MACHINE=i586
1114a850946eSmrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1115a850946eSmrg			&& UNAME_MACHINE=i686
1116a850946eSmrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1117a850946eSmrg			&& UNAME_MACHINE=i686
1118c44a0236Smrg		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
1119a850946eSmrg	else
1120c44a0236Smrg		echo "$UNAME_MACHINE"-pc-sysv32
1121a850946eSmrg	fi
112270f7c90cSmrg	exit ;;
1123a850946eSmrg    pc:*:*:*)
1124a850946eSmrg	# Left here for compatibility:
11259511053fSmrg	# uname -m prints for DJGPP always 'pc', but it prints nothing about
11269511053fSmrg	# the processor, so we play safe by assuming i586.
112770f7c90cSmrg	# Note: whatever this is, it MUST be the same as what config.sub
1128c44a0236Smrg	# prints for the "djgpp" host, or else GDB configure will decide that
112970f7c90cSmrg	# this is a cross-build.
113070f7c90cSmrg	echo i586-pc-msdosdjgpp
11319511053fSmrg	exit ;;
1132a850946eSmrg    Intel:Mach:3*:*)
1133a850946eSmrg	echo i386-pc-mach3
113470f7c90cSmrg	exit ;;
1135a850946eSmrg    paragon:*:*:*)
1136a850946eSmrg	echo i860-intel-osf1
113770f7c90cSmrg	exit ;;
1138a850946eSmrg    i860:*:4.*:*) # i860-SVR4
1139a850946eSmrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1140c44a0236Smrg	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
1141a850946eSmrg	else # Add other i860-SVR4 vendors below as they are discovered.
1142c44a0236Smrg	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
1143a850946eSmrg	fi
114470f7c90cSmrg	exit ;;
1145a850946eSmrg    mini*:CTIX:SYS*5:*)
1146a850946eSmrg	# "miniframe"
1147a850946eSmrg	echo m68010-convergent-sysv
114870f7c90cSmrg	exit ;;
1149a850946eSmrg    mc68k:UNIX:SYSTEM5:3.51m)
1150a850946eSmrg	echo m68k-convergent-sysv
115170f7c90cSmrg	exit ;;
1152a850946eSmrg    M680?0:D-NIX:5.3:*)
1153a850946eSmrg	echo m68k-diab-dnix
115470f7c90cSmrg	exit ;;
115570f7c90cSmrg    M68*:*:R3V[5678]*:*)
115670f7c90cSmrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
115770f7c90cSmrg    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)
1158a850946eSmrg	OS_REL=''
1159a850946eSmrg	test -r /etc/.relid \
1160a850946eSmrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1161a850946eSmrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1162c44a0236Smrg	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1163a850946eSmrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1164c44a0236Smrg	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1165a850946eSmrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
11669511053fSmrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11679511053fSmrg	  && { echo i486-ncr-sysv4; exit; } ;;
116870f7c90cSmrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
116970f7c90cSmrg	OS_REL='.3'
117070f7c90cSmrg	test -r /etc/.relid \
117170f7c90cSmrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
117270f7c90cSmrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1173c44a0236Smrg	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
117470f7c90cSmrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1175c44a0236Smrg	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
117670f7c90cSmrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1177c44a0236Smrg	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1178a850946eSmrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1179c44a0236Smrg	echo m68k-unknown-lynxos"$UNAME_RELEASE"
118070f7c90cSmrg	exit ;;
1181a850946eSmrg    mc68030:UNIX_System_V:4.*:*)
1182a850946eSmrg	echo m68k-atari-sysv4
118370f7c90cSmrg	exit ;;
1184a850946eSmrg    TSUNAMI:LynxOS:2.*:*)
1185c44a0236Smrg	echo sparc-unknown-lynxos"$UNAME_RELEASE"
118670f7c90cSmrg	exit ;;
1187a850946eSmrg    rs6000:LynxOS:2.*:*)
1188c44a0236Smrg	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
118970f7c90cSmrg	exit ;;
11907dff02feSmrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1191c44a0236Smrg	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
119270f7c90cSmrg	exit ;;
1193a850946eSmrg    SM[BE]S:UNIX_SV:*:*)
1194c44a0236Smrg	echo mips-dde-sysv"$UNAME_RELEASE"
119570f7c90cSmrg	exit ;;
1196a850946eSmrg    RM*:ReliantUNIX-*:*:*)
1197a850946eSmrg	echo mips-sni-sysv4
119870f7c90cSmrg	exit ;;
1199a850946eSmrg    RM*:SINIX-*:*:*)
1200a850946eSmrg	echo mips-sni-sysv4
120170f7c90cSmrg	exit ;;
1202a850946eSmrg    *:SINIX-*:*:*)
1203a850946eSmrg	if uname -p 2>/dev/null >/dev/null ; then
1204a850946eSmrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1205c44a0236Smrg		echo "$UNAME_MACHINE"-sni-sysv4
1206a850946eSmrg	else
1207a850946eSmrg		echo ns32k-sni-sysv
1208a850946eSmrg	fi
120970f7c90cSmrg	exit ;;
12109511053fSmrg    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
12119511053fSmrg			# says <Richard.M.Bartel@ccMail.Census.GOV>
12129511053fSmrg	echo i586-unisys-sysv4
12139511053fSmrg	exit ;;
1214a850946eSmrg    *:UNIX_System_V:4*:FTX*)
1215a850946eSmrg	# From Gerald Hewes <hewes@openmarket.com>.
1216a850946eSmrg	# How about differentiating between stratus architectures? -djm
1217a850946eSmrg	echo hppa1.1-stratus-sysv4
121870f7c90cSmrg	exit ;;
1219a850946eSmrg    *:*:*:FTX*)
1220a850946eSmrg	# From seanf@swdc.stratus.com.
1221a850946eSmrg	echo i860-stratus-sysv4
122270f7c90cSmrg	exit ;;
122370f7c90cSmrg    i*86:VOS:*:*)
122470f7c90cSmrg	# From Paul.Green@stratus.com.
1225c44a0236Smrg	echo "$UNAME_MACHINE"-stratus-vos
122670f7c90cSmrg	exit ;;
1227a850946eSmrg    *:VOS:*:*)
1228a850946eSmrg	# From Paul.Green@stratus.com.
1229a850946eSmrg	echo hppa1.1-stratus-vos
123070f7c90cSmrg	exit ;;
1231a850946eSmrg    mc68*:A/UX:*:*)
1232c44a0236Smrg	echo m68k-apple-aux"$UNAME_RELEASE"
123370f7c90cSmrg	exit ;;
1234a850946eSmrg    news*:NEWS-OS:6*:*)
1235a850946eSmrg	echo mips-sony-newsos6
123670f7c90cSmrg	exit ;;
1237a850946eSmrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1238a850946eSmrg	if [ -d /usr/nec ]; then
1239c44a0236Smrg		echo mips-nec-sysv"$UNAME_RELEASE"
1240a850946eSmrg	else
1241c44a0236Smrg		echo mips-unknown-sysv"$UNAME_RELEASE"
1242a850946eSmrg	fi
12439511053fSmrg	exit ;;
1244a850946eSmrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1245a850946eSmrg	echo powerpc-be-beos
124670f7c90cSmrg	exit ;;
1247a850946eSmrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
1248a850946eSmrg	echo powerpc-apple-beos
124970f7c90cSmrg	exit ;;
1250a850946eSmrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1251a850946eSmrg	echo i586-pc-beos
125270f7c90cSmrg	exit ;;
125370f7c90cSmrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
125470f7c90cSmrg	echo i586-pc-haiku
125570f7c90cSmrg	exit ;;
12569511053fSmrg    x86_64:Haiku:*:*)
12579511053fSmrg	echo x86_64-unknown-haiku
12589511053fSmrg	exit ;;
1259a850946eSmrg    SX-4:SUPER-UX:*:*)
1260c44a0236Smrg	echo sx4-nec-superux"$UNAME_RELEASE"
126170f7c90cSmrg	exit ;;
1262a850946eSmrg    SX-5:SUPER-UX:*:*)
1263c44a0236Smrg	echo sx5-nec-superux"$UNAME_RELEASE"
126470f7c90cSmrg	exit ;;
1265a850946eSmrg    SX-6:SUPER-UX:*:*)
1266c44a0236Smrg	echo sx6-nec-superux"$UNAME_RELEASE"
126770f7c90cSmrg	exit ;;
126870f7c90cSmrg    SX-7:SUPER-UX:*:*)
1269c44a0236Smrg	echo sx7-nec-superux"$UNAME_RELEASE"
127070f7c90cSmrg	exit ;;
127170f7c90cSmrg    SX-8:SUPER-UX:*:*)
1272c44a0236Smrg	echo sx8-nec-superux"$UNAME_RELEASE"
127370f7c90cSmrg	exit ;;
127470f7c90cSmrg    SX-8R:SUPER-UX:*:*)
1275c44a0236Smrg	echo sx8r-nec-superux"$UNAME_RELEASE"
1276c44a0236Smrg	exit ;;
1277c44a0236Smrg    SX-ACE:SUPER-UX:*:*)
1278c44a0236Smrg	echo sxace-nec-superux"$UNAME_RELEASE"
127970f7c90cSmrg	exit ;;
1280a850946eSmrg    Power*:Rhapsody:*:*)
1281c44a0236Smrg	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
128270f7c90cSmrg	exit ;;
1283a850946eSmrg    *:Rhapsody:*:*)
1284c44a0236Smrg	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
128570f7c90cSmrg	exit ;;
1286a850946eSmrg    *:Darwin:*:*)
128770f7c90cSmrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1288c44a0236Smrg	eval "$set_cc_for_build"
12899511053fSmrg	if test "$UNAME_PROCESSOR" = unknown ; then
12909511053fSmrg	    UNAME_PROCESSOR=powerpc
12919511053fSmrg	fi
1292c44a0236Smrg	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1293c44a0236Smrg	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1294c44a0236Smrg		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1295c44a0236Smrg		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1296c44a0236Smrg		       grep IS_64BIT_ARCH >/dev/null
1297c44a0236Smrg		then
1298c44a0236Smrg		    case $UNAME_PROCESSOR in
1299c44a0236Smrg			i386) UNAME_PROCESSOR=x86_64 ;;
1300c44a0236Smrg			powerpc) UNAME_PROCESSOR=powerpc64 ;;
1301c44a0236Smrg		    esac
1302c44a0236Smrg		fi
1303c44a0236Smrg		# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1304c44a0236Smrg		if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1305c44a0236Smrg		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1306c44a0236Smrg		       grep IS_PPC >/dev/null
1307c44a0236Smrg		then
1308c44a0236Smrg		    UNAME_PROCESSOR=powerpc
1309c44a0236Smrg		fi
13109511053fSmrg	    fi
1311c44a0236Smrg	elif test "$UNAME_PROCESSOR" = i386 ; then
1312c44a0236Smrg	    # Avoid executing cc on OS X 10.9, as it ships with a stub
1313c44a0236Smrg	    # that puts up a graphical alert prompting to install
1314c44a0236Smrg	    # developer tools.  Any system running Mac OS X 10.7 or
1315c44a0236Smrg	    # later (Darwin 11 and later) is required to have a 64-bit
1316c44a0236Smrg	    # processor. This is not true of the ARM version of Darwin
1317c44a0236Smrg	    # that Apple uses in portable devices.
1318c44a0236Smrg	    UNAME_PROCESSOR=x86_64
13199511053fSmrg	fi
1320c44a0236Smrg	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
132170f7c90cSmrg	exit ;;
1322a850946eSmrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1323a850946eSmrg	UNAME_PROCESSOR=`uname -p`
1324c44a0236Smrg	if test "$UNAME_PROCESSOR" = x86; then
1325a850946eSmrg		UNAME_PROCESSOR=i386
1326a850946eSmrg		UNAME_MACHINE=pc
1327a850946eSmrg	fi
1328c44a0236Smrg	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
132970f7c90cSmrg	exit ;;
1330a850946eSmrg    *:QNX:*:4*)
1331a850946eSmrg	echo i386-pc-qnx
133270f7c90cSmrg	exit ;;
1333c44a0236Smrg    NEO-*:NONSTOP_KERNEL:*:*)
1334c44a0236Smrg	echo neo-tandem-nsk"$UNAME_RELEASE"
13359511053fSmrg	exit ;;
13369511053fSmrg    NSE-*:NONSTOP_KERNEL:*:*)
1337c44a0236Smrg	echo nse-tandem-nsk"$UNAME_RELEASE"
1338c44a0236Smrg	exit ;;
1339c44a0236Smrg    NSR-*:NONSTOP_KERNEL:*:*)
1340c44a0236Smrg	echo nsr-tandem-nsk"$UNAME_RELEASE"
134170f7c90cSmrg	exit ;;
1342c44a0236Smrg    NSV-*:NONSTOP_KERNEL:*:*)
1343c44a0236Smrg	echo nsv-tandem-nsk"$UNAME_RELEASE"
1344c44a0236Smrg	exit ;;
1345c44a0236Smrg    NSX-*:NONSTOP_KERNEL:*:*)
1346c44a0236Smrg	echo nsx-tandem-nsk"$UNAME_RELEASE"
134770f7c90cSmrg	exit ;;
1348a850946eSmrg    *:NonStop-UX:*:*)
1349a850946eSmrg	echo mips-compaq-nonstopux
135070f7c90cSmrg	exit ;;
1351a850946eSmrg    BS2000:POSIX*:*:*)
1352a850946eSmrg	echo bs2000-siemens-sysv
135370f7c90cSmrg	exit ;;
1354a850946eSmrg    DS/*:UNIX_System_V:*:*)
1355c44a0236Smrg	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
135670f7c90cSmrg	exit ;;
1357a850946eSmrg    *:Plan9:*:*)
1358a850946eSmrg	# "uname -m" is not consistent, so use $cputype instead. 386
1359a850946eSmrg	# is converted to i386 for consistency with other x86
1360a850946eSmrg	# operating systems.
1361c44a0236Smrg	if test "$cputype" = 386; then
1362a850946eSmrg	    UNAME_MACHINE=i386
1363a850946eSmrg	else
1364a850946eSmrg	    UNAME_MACHINE="$cputype"
1365a850946eSmrg	fi
1366c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-plan9
136770f7c90cSmrg	exit ;;
1368a850946eSmrg    *:TOPS-10:*:*)
1369a850946eSmrg	echo pdp10-unknown-tops10
137070f7c90cSmrg	exit ;;
1371a850946eSmrg    *:TENEX:*:*)
1372a850946eSmrg	echo pdp10-unknown-tenex
137370f7c90cSmrg	exit ;;
1374a850946eSmrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1375a850946eSmrg	echo pdp10-dec-tops20
137670f7c90cSmrg	exit ;;
1377a850946eSmrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1378a850946eSmrg	echo pdp10-xkl-tops20
137970f7c90cSmrg	exit ;;
1380a850946eSmrg    *:TOPS-20:*:*)
1381a850946eSmrg	echo pdp10-unknown-tops20
138270f7c90cSmrg	exit ;;
1383a850946eSmrg    *:ITS:*:*)
1384a850946eSmrg	echo pdp10-unknown-its
138570f7c90cSmrg	exit ;;
1386a850946eSmrg    SEI:*:*:SEIUX)
1387c44a0236Smrg	echo mips-sei-seiux"$UNAME_RELEASE"
138870f7c90cSmrg	exit ;;
138970f7c90cSmrg    *:DragonFly:*:*)
1390c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
139170f7c90cSmrg	exit ;;
139270f7c90cSmrg    *:*VMS:*:*)
13939511053fSmrg	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1394c44a0236Smrg	case "$UNAME_MACHINE" in
139570f7c90cSmrg	    A*) echo alpha-dec-vms ; exit ;;
139670f7c90cSmrg	    I*) echo ia64-dec-vms ; exit ;;
139770f7c90cSmrg	    V*) echo vax-dec-vms ; exit ;;
139870f7c90cSmrg	esac ;;
139970f7c90cSmrg    *:XENIX:*:SysV)
140070f7c90cSmrg	echo i386-pc-xenix
140170f7c90cSmrg	exit ;;
140270f7c90cSmrg    i*86:skyos:*:*)
1403c44a0236Smrg	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
140470f7c90cSmrg	exit ;;
140570f7c90cSmrg    i*86:rdos:*:*)
1406c44a0236Smrg	echo "$UNAME_MACHINE"-pc-rdos
140770f7c90cSmrg	exit ;;
140870f7c90cSmrg    i*86:AROS:*:*)
1409c44a0236Smrg	echo "$UNAME_MACHINE"-pc-aros
141070f7c90cSmrg	exit ;;
14119511053fSmrg    x86_64:VMkernel:*:*)
1412c44a0236Smrg	echo "$UNAME_MACHINE"-unknown-esx
1413c44a0236Smrg	exit ;;
1414c44a0236Smrg    amd64:Isilon\ OneFS:*:*)
1415c44a0236Smrg	echo x86_64-unknown-onefs
14169511053fSmrg	exit ;;
1417a850946eSmrgesac
1418a850946eSmrg
1419c44a0236Smrgecho "$0: unable to guess system type" >&2
1420a850946eSmrg
1421c44a0236Smrgcase "$UNAME_MACHINE:$UNAME_SYSTEM" in
1422c44a0236Smrg    mips:Linux | mips64:Linux)
1423c44a0236Smrg	# If we got here on MIPS GNU/Linux, output extra information.
1424c44a0236Smrg	cat >&2 <<EOF
1425a850946eSmrg
1426c44a0236SmrgNOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1427c44a0236Smrgthe system type. Please install a C compiler and try again.
1428a850946eSmrgEOF
1429c44a0236Smrg	;;
1430c44a0236Smrgesac
1431a850946eSmrg
1432a850946eSmrgcat >&2 <<EOF
1433a850946eSmrg
1434c44a0236SmrgThis script (version $timestamp), has failed to recognize the
1435c44a0236Smrgoperating system you are using. If your script is old, overwrite *all*
1436c44a0236Smrgcopies of config.guess and config.sub with the latest versions from:
1437a850946eSmrg
1438c44a0236Smrg  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
143970f7c90cSmrgand
1440c44a0236Smrg  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1441a850946eSmrg
1442c44a0236SmrgIf $0 has already been updated, send the following data and any
1443c44a0236Smrginformation you think might be pertinent to config-patches@gnu.org to
1444c44a0236Smrgprovide the necessary information to handle your system.
1445a850946eSmrg
1446a850946eSmrgconfig.guess timestamp = $timestamp
1447a850946eSmrg
1448a850946eSmrguname -m = `(uname -m) 2>/dev/null || echo unknown`
1449a850946eSmrguname -r = `(uname -r) 2>/dev/null || echo unknown`
1450a850946eSmrguname -s = `(uname -s) 2>/dev/null || echo unknown`
1451a850946eSmrguname -v = `(uname -v) 2>/dev/null || echo unknown`
1452a850946eSmrg
1453a850946eSmrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1454a850946eSmrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
1455a850946eSmrg
1456a850946eSmrghostinfo               = `(hostinfo) 2>/dev/null`
1457a850946eSmrg/bin/universe          = `(/bin/universe) 2>/dev/null`
1458a850946eSmrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
1459a850946eSmrg/bin/arch              = `(/bin/arch) 2>/dev/null`
1460a850946eSmrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1461a850946eSmrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1462a850946eSmrg
1463c44a0236SmrgUNAME_MACHINE = "$UNAME_MACHINE"
1464c44a0236SmrgUNAME_RELEASE = "$UNAME_RELEASE"
1465c44a0236SmrgUNAME_SYSTEM  = "$UNAME_SYSTEM"
1466c44a0236SmrgUNAME_VERSION = "$UNAME_VERSION"
1467a850946eSmrgEOF
1468a850946eSmrg
1469a850946eSmrgexit 1
1470a850946eSmrg
1471a850946eSmrg# Local variables:
1472c44a0236Smrg# eval: (add-hook 'write-file-functions 'time-stamp)
1473a850946eSmrg# time-stamp-start: "timestamp='"
1474a850946eSmrg# time-stamp-format: "%:y-%02m-%02d"
1475a850946eSmrg# time-stamp-end: "'"
1476a850946eSmrg# End:
1477