config.guess revision 69a1fe56
1a850946eSmrg#! /bin/sh
2a850946eSmrg# Attempt to guess a canonical system name.
3a850946eSmrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
469a1fe56Smrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
570f7c90cSmrg#   Free Software Foundation, Inc.
6a850946eSmrg
769a1fe56Smrgtimestamp='2010-08-21'
8a850946eSmrg
9a850946eSmrg# This file is free software; you can redistribute it and/or modify it
10a850946eSmrg# under the terms of the GNU General Public License as published by
11a850946eSmrg# the Free Software Foundation; either version 2 of the License, or
12a850946eSmrg# (at your option) any later version.
13a850946eSmrg#
14a850946eSmrg# This program is distributed in the hope that it will be useful, but
15a850946eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
16a850946eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17a850946eSmrg# General Public License for more details.
18a850946eSmrg#
19a850946eSmrg# You should have received a copy of the GNU General Public License
20a850946eSmrg# along with this program; if not, write to the Free Software
2170f7c90cSmrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2270f7c90cSmrg# 02110-1301, USA.
23a850946eSmrg#
24a850946eSmrg# As a special exception to the GNU General Public License, if you
25a850946eSmrg# distribute this file as part of a program that contains a
26a850946eSmrg# configuration script generated by Autoconf, you may include it under
27a850946eSmrg# the same distribution terms that you use for the rest of that program.
28a850946eSmrg
2970f7c90cSmrg
307dff02feSmrg# Originally written by Per Bothner.  Please send patches (context
317dff02feSmrg# diff format) to <config-patches@gnu.org> and include a ChangeLog
327dff02feSmrg# entry.
33a850946eSmrg#
34a850946eSmrg# This script attempts to guess a canonical system name similar to
35a850946eSmrg# config.sub.  If it succeeds, it prints the system name on stdout, and
36a850946eSmrg# exits with 0.  Otherwise, it exits with 1.
37a850946eSmrg#
387dff02feSmrg# You can get the latest version of this script from:
397dff02feSmrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
40a850946eSmrg
41a850946eSmrgme=`echo "$0" | sed -e 's,.*/,,'`
42a850946eSmrg
43a850946eSmrgusage="\
44a850946eSmrgUsage: $0 [OPTION]
45a850946eSmrg
46a850946eSmrgOutput the configuration name of the system \`$me' is run on.
47a850946eSmrg
48a850946eSmrgOperation modes:
49a850946eSmrg  -h, --help         print this help, then exit
50a850946eSmrg  -t, --time-stamp   print date of last modification, then exit
51a850946eSmrg  -v, --version      print version number, then exit
52a850946eSmrg
53a850946eSmrgReport bugs and patches to <config-patches@gnu.org>."
54a850946eSmrg
55a850946eSmrgversion="\
56a850946eSmrgGNU config.guess ($timestamp)
57a850946eSmrg
58a850946eSmrgOriginally written by Per Bothner.
5969a1fe56SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
6069a1fe56Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
6169a1fe56SmrgSoftware Foundation, Inc.
62a850946eSmrg
63a850946eSmrgThis is free software; see the source for copying conditions.  There is NO
64a850946eSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
65a850946eSmrg
66a850946eSmrghelp="
67a850946eSmrgTry \`$me --help' for more information."
68a850946eSmrg
69a850946eSmrg# Parse command line
70a850946eSmrgwhile test $# -gt 0 ; do
71a850946eSmrg  case $1 in
72a850946eSmrg    --time-stamp | --time* | -t )
7370f7c90cSmrg       echo "$timestamp" ; exit ;;
74a850946eSmrg    --version | -v )
7570f7c90cSmrg       echo "$version" ; exit ;;
76a850946eSmrg    --help | --h* | -h )
7770f7c90cSmrg       echo "$usage"; exit ;;
78a850946eSmrg    -- )     # Stop option processing
79a850946eSmrg       shift; break ;;
80a850946eSmrg    - )	# Use stdin as input.
81a850946eSmrg       break ;;
82a850946eSmrg    -* )
83a850946eSmrg       echo "$me: invalid option $1$help" >&2
84a850946eSmrg       exit 1 ;;
85a850946eSmrg    * )
86a850946eSmrg       break ;;
87a850946eSmrg  esac
88a850946eSmrgdone
89a850946eSmrg
90a850946eSmrgif test $# != 0; then
91a850946eSmrg  echo "$me: too many arguments$help" >&2
92a850946eSmrg  exit 1
93a850946eSmrgfi
94a850946eSmrg
9569a1fe56Smrgtrap 'exit 1' HUP INT TERM
96a850946eSmrg
97a850946eSmrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
98a850946eSmrg# compiler to aid in system detection is discouraged as it requires
99a850946eSmrg# temporary files to be created and, as you can see below, it is a
100a850946eSmrg# headache to deal with in a portable fashion.
101a850946eSmrg
102a850946eSmrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
103a850946eSmrg# use `HOST_CC' if defined, but it is deprecated.
104a850946eSmrg
105a850946eSmrg# Portable tmp directory creation inspired by the Autoconf team.
106a850946eSmrg
107a850946eSmrgset_cc_for_build='
108a850946eSmrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
10969a1fe56Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
110a850946eSmrg: ${TMPDIR=/tmp} ;
11170f7c90cSmrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
112a850946eSmrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
113a850946eSmrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
114a850946eSmrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
115a850946eSmrgdummy=$tmp/dummy ;
116a850946eSmrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
117a850946eSmrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
118a850946eSmrg ,,)    echo "int x;" > $dummy.c ;
119a850946eSmrg	for c in cc gcc c89 c99 ; do
120a850946eSmrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
121a850946eSmrg	     CC_FOR_BUILD="$c"; break ;
122a850946eSmrg	  fi ;
123a850946eSmrg	done ;
124a850946eSmrg	if test x"$CC_FOR_BUILD" = x ; then
125a850946eSmrg	  CC_FOR_BUILD=no_compiler_found ;
126a850946eSmrg	fi
127a850946eSmrg	;;
128a850946eSmrg ,,*)   CC_FOR_BUILD=$CC ;;
129a850946eSmrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
13070f7c90cSmrgesac ; set_cc_for_build= ;'
131a850946eSmrg
132a850946eSmrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
133a850946eSmrg# (ghazi@noc.rutgers.edu 1994-08-24)
134a850946eSmrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
135a850946eSmrg	PATH=$PATH:/.attbin ; export PATH
136a850946eSmrgfi
137a850946eSmrg
138a850946eSmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
139a850946eSmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
140a850946eSmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
141a850946eSmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142a850946eSmrg
143a850946eSmrg# Note: order is significant - the case branches are not exclusive.
144a850946eSmrg
145a850946eSmrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146a850946eSmrg    *:NetBSD:*:*)
147a850946eSmrg	# NetBSD (nbsd) targets should (where applicable) match one or
148a850946eSmrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
149a850946eSmrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
150a850946eSmrg	# switched to ELF, *-*-netbsd* would select the old
151a850946eSmrg	# object file format.  This provides both forward
152a850946eSmrg	# compatibility and a consistent mechanism for selecting the
153a850946eSmrg	# object file format.
154a850946eSmrg	#
155a850946eSmrg	# Note: NetBSD doesn't particularly care about the vendor
156a850946eSmrg	# portion of the name.  We always set it to "unknown".
157a850946eSmrg	sysctl="sysctl -n hw.machine_arch"
158a850946eSmrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
159a850946eSmrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
160a850946eSmrg	case "${UNAME_MACHINE_ARCH}" in
161a850946eSmrg	    armeb) machine=armeb-unknown ;;
162a850946eSmrg	    arm*) machine=arm-unknown ;;
163a850946eSmrg	    sh3el) machine=shl-unknown ;;
164a850946eSmrg	    sh3eb) machine=sh-unknown ;;
16570f7c90cSmrg	    sh5el) machine=sh5le-unknown ;;
166a850946eSmrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
167a850946eSmrg	esac
168a850946eSmrg	# The Operating System including object format, if it has switched
169a850946eSmrg	# to ELF recently, or will in the future.
170a850946eSmrg	case "${UNAME_MACHINE_ARCH}" in
171a850946eSmrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
172a850946eSmrg		eval $set_cc_for_build
173a850946eSmrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
1747dff02feSmrg			| grep -q __ELF__
175a850946eSmrg		then
176a850946eSmrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
177a850946eSmrg		    # Return netbsd for either.  FIX?
178a850946eSmrg		    os=netbsd
179a850946eSmrg		else
180a850946eSmrg		    os=netbsdelf
181a850946eSmrg		fi
182a850946eSmrg		;;
183a850946eSmrg	    *)
184a850946eSmrg	        os=netbsd
185a850946eSmrg		;;
186a850946eSmrg	esac
187a850946eSmrg	# The OS release
188a850946eSmrg	# Debian GNU/NetBSD machines have a different userland, and
189a850946eSmrg	# thus, need a distinct triplet. However, they do not need
190a850946eSmrg	# kernel version information, so it can be replaced with a
191a850946eSmrg	# suitable tag, in the style of linux-gnu.
192a850946eSmrg	case "${UNAME_VERSION}" in
193a850946eSmrg	    Debian*)
194a850946eSmrg		release='-gnu'
195a850946eSmrg		;;
196a850946eSmrg	    *)
197a850946eSmrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
198a850946eSmrg		;;
199a850946eSmrg	esac
200a850946eSmrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
201a850946eSmrg	# contains redundant information, the shorter form:
202a850946eSmrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203a850946eSmrg	echo "${machine}-${os}${release}"
20470f7c90cSmrg	exit ;;
205a850946eSmrg    *:OpenBSD:*:*)
20670f7c90cSmrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
20770f7c90cSmrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
20870f7c90cSmrg	exit ;;
20970f7c90cSmrg    *:ekkoBSD:*:*)
21070f7c90cSmrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
21170f7c90cSmrg	exit ;;
21270f7c90cSmrg    *:SolidBSD:*:*)
21370f7c90cSmrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
21470f7c90cSmrg	exit ;;
21570f7c90cSmrg    macppc:MirBSD:*:*)
21670f7c90cSmrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
21770f7c90cSmrg	exit ;;
21870f7c90cSmrg    *:MirBSD:*:*)
21970f7c90cSmrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
22070f7c90cSmrg	exit ;;
221a850946eSmrg    alpha:OSF1:*:*)
22270f7c90cSmrg	case $UNAME_RELEASE in
22370f7c90cSmrg	*4.0)
224a850946eSmrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
22570f7c90cSmrg		;;
22670f7c90cSmrg	*5.*)
22770f7c90cSmrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
22870f7c90cSmrg		;;
22970f7c90cSmrg	esac
230a850946eSmrg	# According to Compaq, /usr/sbin/psrinfo has been available on
231a850946eSmrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
232a850946eSmrg	# covers most systems running today.  This code pipes the CPU
233a850946eSmrg	# types through head -n 1, so we only detect the type of CPU 0.
234a850946eSmrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
235a850946eSmrg	case "$ALPHA_CPU_TYPE" in
236a850946eSmrg	    "EV4 (21064)")
237a850946eSmrg		UNAME_MACHINE="alpha" ;;
238a850946eSmrg	    "EV4.5 (21064)")
239a850946eSmrg		UNAME_MACHINE="alpha" ;;
240a850946eSmrg	    "LCA4 (21066/21068)")
241a850946eSmrg		UNAME_MACHINE="alpha" ;;
242a850946eSmrg	    "EV5 (21164)")
243a850946eSmrg		UNAME_MACHINE="alphaev5" ;;
244a850946eSmrg	    "EV5.6 (21164A)")
245a850946eSmrg		UNAME_MACHINE="alphaev56" ;;
246a850946eSmrg	    "EV5.6 (21164PC)")
247a850946eSmrg		UNAME_MACHINE="alphapca56" ;;
248a850946eSmrg	    "EV5.7 (21164PC)")
249a850946eSmrg		UNAME_MACHINE="alphapca57" ;;
250a850946eSmrg	    "EV6 (21264)")
251a850946eSmrg		UNAME_MACHINE="alphaev6" ;;
252a850946eSmrg	    "EV6.7 (21264A)")
253a850946eSmrg		UNAME_MACHINE="alphaev67" ;;
254a850946eSmrg	    "EV6.8CB (21264C)")
255a850946eSmrg		UNAME_MACHINE="alphaev68" ;;
256a850946eSmrg	    "EV6.8AL (21264B)")
257a850946eSmrg		UNAME_MACHINE="alphaev68" ;;
258a850946eSmrg	    "EV6.8CX (21264D)")
259a850946eSmrg		UNAME_MACHINE="alphaev68" ;;
260a850946eSmrg	    "EV6.9A (21264/EV69A)")
261a850946eSmrg		UNAME_MACHINE="alphaev69" ;;
262a850946eSmrg	    "EV7 (21364)")
263a850946eSmrg		UNAME_MACHINE="alphaev7" ;;
264a850946eSmrg	    "EV7.9 (21364A)")
265a850946eSmrg		UNAME_MACHINE="alphaev79" ;;
266a850946eSmrg	esac
26770f7c90cSmrg	# A Pn.n version is a patched version.
268a850946eSmrg	# A Vn.n version is a released version.
269a850946eSmrg	# A Tn.n version is a released field test version.
270a850946eSmrg	# A Xn.n version is an unreleased experimental baselevel.
271a850946eSmrg	# 1.2 uses "1.2" for uname -r.
27270f7c90cSmrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27370f7c90cSmrg	exit ;;
274a850946eSmrg    Alpha\ *:Windows_NT*:*)
275a850946eSmrg	# How do we know it's Interix rather than the generic POSIX subsystem?
276a850946eSmrg	# Should we change UNAME_MACHINE based on the output of uname instead
277a850946eSmrg	# of the specific Alpha model?
278a850946eSmrg	echo alpha-pc-interix
27970f7c90cSmrg	exit ;;
280a850946eSmrg    21064:Windows_NT:50:3)
281a850946eSmrg	echo alpha-dec-winnt3.5
28270f7c90cSmrg	exit ;;
283a850946eSmrg    Amiga*:UNIX_System_V:4.0:*)
284a850946eSmrg	echo m68k-unknown-sysv4
28570f7c90cSmrg	exit ;;
286a850946eSmrg    *:[Aa]miga[Oo][Ss]:*:*)
287a850946eSmrg	echo ${UNAME_MACHINE}-unknown-amigaos
28870f7c90cSmrg	exit ;;
289a850946eSmrg    *:[Mm]orph[Oo][Ss]:*:*)
290a850946eSmrg	echo ${UNAME_MACHINE}-unknown-morphos
29170f7c90cSmrg	exit ;;
292a850946eSmrg    *:OS/390:*:*)
293a850946eSmrg	echo i370-ibm-openedition
29470f7c90cSmrg	exit ;;
29570f7c90cSmrg    *:z/VM:*:*)
29670f7c90cSmrg	echo s390-ibm-zvmoe
29770f7c90cSmrg	exit ;;
29870f7c90cSmrg    *:OS400:*:*)
29970f7c90cSmrg        echo powerpc-ibm-os400
30070f7c90cSmrg	exit ;;
301a850946eSmrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302a850946eSmrg	echo arm-acorn-riscix${UNAME_RELEASE}
30370f7c90cSmrg	exit ;;
30470f7c90cSmrg    arm:riscos:*:*|arm:RISCOS:*:*)
30570f7c90cSmrg	echo arm-unknown-riscos
30670f7c90cSmrg	exit ;;
307a850946eSmrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
308a850946eSmrg	echo hppa1.1-hitachi-hiuxmpp
30970f7c90cSmrg	exit ;;
310a850946eSmrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
311a850946eSmrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
312a850946eSmrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
313a850946eSmrg		echo pyramid-pyramid-sysv3
314a850946eSmrg	else
315a850946eSmrg		echo pyramid-pyramid-bsd
316a850946eSmrg	fi
31770f7c90cSmrg	exit ;;
318a850946eSmrg    NILE*:*:*:dcosx)
319a850946eSmrg	echo pyramid-pyramid-svr4
32070f7c90cSmrg	exit ;;
321a850946eSmrg    DRS?6000:unix:4.0:6*)
322a850946eSmrg	echo sparc-icl-nx6
32370f7c90cSmrg	exit ;;
32470f7c90cSmrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
325a850946eSmrg	case `/usr/bin/uname -p` in
32670f7c90cSmrg	    sparc) echo sparc-icl-nx7; exit ;;
327a850946eSmrg	esac ;;
32870f7c90cSmrg    s390x:SunOS:*:*)
32970f7c90cSmrg	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33070f7c90cSmrg	exit ;;
331a850946eSmrg    sun4H:SunOS:5.*:*)
332a850946eSmrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33370f7c90cSmrg	exit ;;
334a850946eSmrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
335a850946eSmrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33670f7c90cSmrg	exit ;;
3377dff02feSmrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
3387dff02feSmrg	echo i386-pc-auroraux${UNAME_RELEASE}
3397dff02feSmrg	exit ;;
34070f7c90cSmrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
34170f7c90cSmrg	eval $set_cc_for_build
34270f7c90cSmrg	SUN_ARCH="i386"
34370f7c90cSmrg	# If there is a compiler, see if it is configured for 64-bit objects.
34470f7c90cSmrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
34570f7c90cSmrg	# This test works for both compilers.
34670f7c90cSmrg	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
34770f7c90cSmrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
34870f7c90cSmrg		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
34970f7c90cSmrg		grep IS_64BIT_ARCH >/dev/null
35070f7c90cSmrg	    then
35170f7c90cSmrg		SUN_ARCH="x86_64"
35270f7c90cSmrg	    fi
35370f7c90cSmrg	fi
35470f7c90cSmrg	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
35570f7c90cSmrg	exit ;;
356a850946eSmrg    sun4*:SunOS:6*:*)
357a850946eSmrg	# According to config.sub, this is the proper way to canonicalize
358a850946eSmrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
359a850946eSmrg	# it's likely to be more like Solaris than SunOS4.
360a850946eSmrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
36170f7c90cSmrg	exit ;;
362a850946eSmrg    sun4*:SunOS:*:*)
363a850946eSmrg	case "`/usr/bin/arch -k`" in
364a850946eSmrg	    Series*|S4*)
365a850946eSmrg		UNAME_RELEASE=`uname -v`
366a850946eSmrg		;;
367a850946eSmrg	esac
368a850946eSmrg	# Japanese Language versions have a version number like `4.1.3-JL'.
369a850946eSmrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
37070f7c90cSmrg	exit ;;
371a850946eSmrg    sun3*:SunOS:*:*)
372a850946eSmrg	echo m68k-sun-sunos${UNAME_RELEASE}
37370f7c90cSmrg	exit ;;
374a850946eSmrg    sun*:*:4.2BSD:*)
375a850946eSmrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
376a850946eSmrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
377a850946eSmrg	case "`/bin/arch`" in
378a850946eSmrg	    sun3)
379a850946eSmrg		echo m68k-sun-sunos${UNAME_RELEASE}
380a850946eSmrg		;;
381a850946eSmrg	    sun4)
382a850946eSmrg		echo sparc-sun-sunos${UNAME_RELEASE}
383a850946eSmrg		;;
384a850946eSmrg	esac
38570f7c90cSmrg	exit ;;
386a850946eSmrg    aushp:SunOS:*:*)
387a850946eSmrg	echo sparc-auspex-sunos${UNAME_RELEASE}
38870f7c90cSmrg	exit ;;
389a850946eSmrg    # The situation for MiNT is a little confusing.  The machine name
390a850946eSmrg    # can be virtually everything (everything which is not
391a850946eSmrg    # "atarist" or "atariste" at least should have a processor
392a850946eSmrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
393a850946eSmrg    # to the lowercase version "mint" (or "freemint").  Finally
394a850946eSmrg    # the system name "TOS" denotes a system which is actually not
395a850946eSmrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
396a850946eSmrg    # be no problem.
397a850946eSmrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398a850946eSmrg        echo m68k-atari-mint${UNAME_RELEASE}
39970f7c90cSmrg	exit ;;
400a850946eSmrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401a850946eSmrg	echo m68k-atari-mint${UNAME_RELEASE}
40270f7c90cSmrg        exit ;;
403a850946eSmrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404a850946eSmrg        echo m68k-atari-mint${UNAME_RELEASE}
40570f7c90cSmrg	exit ;;
406a850946eSmrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407a850946eSmrg        echo m68k-milan-mint${UNAME_RELEASE}
40870f7c90cSmrg        exit ;;
409a850946eSmrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410a850946eSmrg        echo m68k-hades-mint${UNAME_RELEASE}
41170f7c90cSmrg        exit ;;
412a850946eSmrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413a850946eSmrg        echo m68k-unknown-mint${UNAME_RELEASE}
41470f7c90cSmrg        exit ;;
41570f7c90cSmrg    m68k:machten:*:*)
41670f7c90cSmrg	echo m68k-apple-machten${UNAME_RELEASE}
41770f7c90cSmrg	exit ;;
418a850946eSmrg    powerpc:machten:*:*)
419a850946eSmrg	echo powerpc-apple-machten${UNAME_RELEASE}
42070f7c90cSmrg	exit ;;
421a850946eSmrg    RISC*:Mach:*:*)
422a850946eSmrg	echo mips-dec-mach_bsd4.3
42370f7c90cSmrg	exit ;;
424a850946eSmrg    RISC*:ULTRIX:*:*)
425a850946eSmrg	echo mips-dec-ultrix${UNAME_RELEASE}
42670f7c90cSmrg	exit ;;
427a850946eSmrg    VAX*:ULTRIX*:*:*)
428a850946eSmrg	echo vax-dec-ultrix${UNAME_RELEASE}
42970f7c90cSmrg	exit ;;
430a850946eSmrg    2020:CLIX:*:* | 2430:CLIX:*:*)
431a850946eSmrg	echo clipper-intergraph-clix${UNAME_RELEASE}
43270f7c90cSmrg	exit ;;
433a850946eSmrg    mips:*:*:UMIPS | mips:*:*:RISCos)
434a850946eSmrg	eval $set_cc_for_build
435a850946eSmrg	sed 's/^	//' << EOF >$dummy.c
436a850946eSmrg#ifdef __cplusplus
437a850946eSmrg#include <stdio.h>  /* for printf() prototype */
438a850946eSmrg	int main (int argc, char *argv[]) {
439a850946eSmrg#else
440a850946eSmrg	int main (argc, argv) int argc; char *argv[]; {
441a850946eSmrg#endif
442a850946eSmrg	#if defined (host_mips) && defined (MIPSEB)
443a850946eSmrg	#if defined (SYSTYPE_SYSV)
444a850946eSmrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
445a850946eSmrg	#endif
446a850946eSmrg	#if defined (SYSTYPE_SVR4)
447a850946eSmrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
448a850946eSmrg	#endif
449a850946eSmrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
450a850946eSmrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
451a850946eSmrg	#endif
452a850946eSmrg	#endif
453a850946eSmrg	  exit (-1);
454a850946eSmrg	}
455a850946eSmrgEOF
45670f7c90cSmrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
45770f7c90cSmrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
45870f7c90cSmrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
45970f7c90cSmrg	    { echo "$SYSTEM_NAME"; exit; }
460a850946eSmrg	echo mips-mips-riscos${UNAME_RELEASE}
46170f7c90cSmrg	exit ;;
462a850946eSmrg    Motorola:PowerMAX_OS:*:*)
463a850946eSmrg	echo powerpc-motorola-powermax
46470f7c90cSmrg	exit ;;
465a850946eSmrg    Motorola:*:4.3:PL8-*)
466a850946eSmrg	echo powerpc-harris-powermax
46770f7c90cSmrg	exit ;;
468a850946eSmrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
469a850946eSmrg	echo powerpc-harris-powermax
47070f7c90cSmrg	exit ;;
471a850946eSmrg    Night_Hawk:Power_UNIX:*:*)
472a850946eSmrg	echo powerpc-harris-powerunix
47370f7c90cSmrg	exit ;;
474a850946eSmrg    m88k:CX/UX:7*:*)
475a850946eSmrg	echo m88k-harris-cxux7
47670f7c90cSmrg	exit ;;
477a850946eSmrg    m88k:*:4*:R4*)
478a850946eSmrg	echo m88k-motorola-sysv4
47970f7c90cSmrg	exit ;;
480a850946eSmrg    m88k:*:3*:R3*)
481a850946eSmrg	echo m88k-motorola-sysv3
48270f7c90cSmrg	exit ;;
483a850946eSmrg    AViiON:dgux:*:*)
484a850946eSmrg        # DG/UX returns AViiON for all architectures
485a850946eSmrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
486a850946eSmrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487a850946eSmrg	then
488a850946eSmrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
489a850946eSmrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
490a850946eSmrg	    then
491a850946eSmrg		echo m88k-dg-dgux${UNAME_RELEASE}
492a850946eSmrg	    else
493a850946eSmrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
494a850946eSmrg	    fi
495a850946eSmrg	else
496a850946eSmrg	    echo i586-dg-dgux${UNAME_RELEASE}
497a850946eSmrg	fi
49870f7c90cSmrg 	exit ;;
499a850946eSmrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
500a850946eSmrg	echo m88k-dolphin-sysv3
50170f7c90cSmrg	exit ;;
502a850946eSmrg    M88*:*:R3*:*)
503a850946eSmrg	# Delta 88k system running SVR3
504a850946eSmrg	echo m88k-motorola-sysv3
50570f7c90cSmrg	exit ;;
506a850946eSmrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
507a850946eSmrg	echo m88k-tektronix-sysv3
50870f7c90cSmrg	exit ;;
509a850946eSmrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
510a850946eSmrg	echo m68k-tektronix-bsd
51170f7c90cSmrg	exit ;;
512a850946eSmrg    *:IRIX*:*:*)
513a850946eSmrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
51470f7c90cSmrg	exit ;;
515a850946eSmrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
51670f7c90cSmrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
51770f7c90cSmrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
518a850946eSmrg    i*86:AIX:*:*)
519a850946eSmrg	echo i386-ibm-aix
52070f7c90cSmrg	exit ;;
521a850946eSmrg    ia64:AIX:*:*)
522a850946eSmrg	if [ -x /usr/bin/oslevel ] ; then
523a850946eSmrg		IBM_REV=`/usr/bin/oslevel`
524a850946eSmrg	else
525a850946eSmrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
526a850946eSmrg	fi
527a850946eSmrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
52870f7c90cSmrg	exit ;;
529a850946eSmrg    *:AIX:2:3)
530a850946eSmrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
531a850946eSmrg		eval $set_cc_for_build
532a850946eSmrg		sed 's/^		//' << EOF >$dummy.c
533a850946eSmrg		#include <sys/systemcfg.h>
534a850946eSmrg
535a850946eSmrg		main()
536a850946eSmrg			{
537a850946eSmrg			if (!__power_pc())
538a850946eSmrg				exit(1);
539a850946eSmrg			puts("powerpc-ibm-aix3.2.5");
540a850946eSmrg			exit(0);
541a850946eSmrg			}
542a850946eSmrgEOF
54370f7c90cSmrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
54470f7c90cSmrg		then
54570f7c90cSmrg			echo "$SYSTEM_NAME"
54670f7c90cSmrg		else
54770f7c90cSmrg			echo rs6000-ibm-aix3.2.5
54870f7c90cSmrg		fi
549a850946eSmrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
550a850946eSmrg		echo rs6000-ibm-aix3.2.4
551a850946eSmrg	else
552a850946eSmrg		echo rs6000-ibm-aix3.2
553a850946eSmrg	fi
55470f7c90cSmrg	exit ;;
55569a1fe56Smrg    *:AIX:*:[4567])
556a850946eSmrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
557a850946eSmrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558a850946eSmrg		IBM_ARCH=rs6000
559a850946eSmrg	else
560a850946eSmrg		IBM_ARCH=powerpc
561a850946eSmrg	fi
562a850946eSmrg	if [ -x /usr/bin/oslevel ] ; then
563a850946eSmrg		IBM_REV=`/usr/bin/oslevel`
564a850946eSmrg	else
565a850946eSmrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
566a850946eSmrg	fi
567a850946eSmrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
56870f7c90cSmrg	exit ;;
569a850946eSmrg    *:AIX:*:*)
570a850946eSmrg	echo rs6000-ibm-aix
57170f7c90cSmrg	exit ;;
572a850946eSmrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
573a850946eSmrg	echo romp-ibm-bsd4.4
57470f7c90cSmrg	exit ;;
575a850946eSmrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
576a850946eSmrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
57770f7c90cSmrg	exit ;;                             # report: romp-ibm BSD 4.3
578a850946eSmrg    *:BOSX:*:*)
579a850946eSmrg	echo rs6000-bull-bosx
58070f7c90cSmrg	exit ;;
581a850946eSmrg    DPX/2?00:B.O.S.:*:*)
582a850946eSmrg	echo m68k-bull-sysv3
58370f7c90cSmrg	exit ;;
584a850946eSmrg    9000/[34]??:4.3bsd:1.*:*)
585a850946eSmrg	echo m68k-hp-bsd
58670f7c90cSmrg	exit ;;
587a850946eSmrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
588a850946eSmrg	echo m68k-hp-bsd4.4
58970f7c90cSmrg	exit ;;
590a850946eSmrg    9000/[34678]??:HP-UX:*:*)
591a850946eSmrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
592a850946eSmrg	case "${UNAME_MACHINE}" in
593a850946eSmrg	    9000/31? )            HP_ARCH=m68000 ;;
594a850946eSmrg	    9000/[34]?? )         HP_ARCH=m68k ;;
595a850946eSmrg	    9000/[678][0-9][0-9])
596a850946eSmrg		if [ -x /usr/bin/getconf ]; then
597a850946eSmrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
598a850946eSmrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599a850946eSmrg                    case "${sc_cpu_version}" in
600a850946eSmrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601a850946eSmrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602a850946eSmrg                      532)                      # CPU_PA_RISC2_0
603a850946eSmrg                        case "${sc_kernel_bits}" in
604a850946eSmrg                          32) HP_ARCH="hppa2.0n" ;;
605a850946eSmrg                          64) HP_ARCH="hppa2.0w" ;;
606a850946eSmrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
607a850946eSmrg                        esac ;;
608a850946eSmrg                    esac
609a850946eSmrg		fi
610a850946eSmrg		if [ "${HP_ARCH}" = "" ]; then
611a850946eSmrg		    eval $set_cc_for_build
612a850946eSmrg		    sed 's/^              //' << EOF >$dummy.c
613a850946eSmrg
614a850946eSmrg              #define _HPUX_SOURCE
615a850946eSmrg              #include <stdlib.h>
616a850946eSmrg              #include <unistd.h>
617a850946eSmrg
618a850946eSmrg              int main ()
619a850946eSmrg              {
620a850946eSmrg              #if defined(_SC_KERNEL_BITS)
621a850946eSmrg                  long bits = sysconf(_SC_KERNEL_BITS);
622a850946eSmrg              #endif
623a850946eSmrg                  long cpu  = sysconf (_SC_CPU_VERSION);
624a850946eSmrg
625a850946eSmrg                  switch (cpu)
626a850946eSmrg              	{
627a850946eSmrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628a850946eSmrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629a850946eSmrg              	case CPU_PA_RISC2_0:
630a850946eSmrg              #if defined(_SC_KERNEL_BITS)
631a850946eSmrg              	    switch (bits)
632a850946eSmrg              		{
633a850946eSmrg              		case 64: puts ("hppa2.0w"); break;
634a850946eSmrg              		case 32: puts ("hppa2.0n"); break;
635a850946eSmrg              		default: puts ("hppa2.0"); break;
636a850946eSmrg              		} break;
637a850946eSmrg              #else  /* !defined(_SC_KERNEL_BITS) */
638a850946eSmrg              	    puts ("hppa2.0"); break;
639a850946eSmrg              #endif
640a850946eSmrg              	default: puts ("hppa1.0"); break;
641a850946eSmrg              	}
642a850946eSmrg                  exit (0);
643a850946eSmrg              }
644a850946eSmrgEOF
645a850946eSmrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646a850946eSmrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
647a850946eSmrg		fi ;;
648a850946eSmrg	esac
649a850946eSmrg	if [ ${HP_ARCH} = "hppa2.0w" ]
650a850946eSmrg	then
65170f7c90cSmrg	    eval $set_cc_for_build
65270f7c90cSmrg
65370f7c90cSmrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
65470f7c90cSmrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
65570f7c90cSmrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
65670f7c90cSmrg	    #
65770f7c90cSmrg	    # $ CC_FOR_BUILD=cc ./config.guess
65870f7c90cSmrg	    # => hppa2.0w-hp-hpux11.23
65970f7c90cSmrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
66070f7c90cSmrg	    # => hppa64-hp-hpux11.23
66170f7c90cSmrg
66270f7c90cSmrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
6637dff02feSmrg		grep -q __LP64__
664a850946eSmrg	    then
665a850946eSmrg		HP_ARCH="hppa2.0w"
666a850946eSmrg	    else
667a850946eSmrg		HP_ARCH="hppa64"
668a850946eSmrg	    fi
669a850946eSmrg	fi
670a850946eSmrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
67170f7c90cSmrg	exit ;;
672a850946eSmrg    ia64:HP-UX:*:*)
673a850946eSmrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
674a850946eSmrg	echo ia64-hp-hpux${HPUX_REV}
67570f7c90cSmrg	exit ;;
676a850946eSmrg    3050*:HI-UX:*:*)
677a850946eSmrg	eval $set_cc_for_build
678a850946eSmrg	sed 's/^	//' << EOF >$dummy.c
679a850946eSmrg	#include <unistd.h>
680a850946eSmrg	int
681a850946eSmrg	main ()
682a850946eSmrg	{
683a850946eSmrg	  long cpu = sysconf (_SC_CPU_VERSION);
684a850946eSmrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
685a850946eSmrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
686a850946eSmrg	     results, however.  */
687a850946eSmrg	  if (CPU_IS_PA_RISC (cpu))
688a850946eSmrg	    {
689a850946eSmrg	      switch (cpu)
690a850946eSmrg		{
691a850946eSmrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
692a850946eSmrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
693a850946eSmrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
694a850946eSmrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
695a850946eSmrg		}
696a850946eSmrg	    }
697a850946eSmrg	  else if (CPU_IS_HP_MC68K (cpu))
698a850946eSmrg	    puts ("m68k-hitachi-hiuxwe2");
699a850946eSmrg	  else puts ("unknown-hitachi-hiuxwe2");
700a850946eSmrg	  exit (0);
701a850946eSmrg	}
702a850946eSmrgEOF
70370f7c90cSmrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
70470f7c90cSmrg		{ echo "$SYSTEM_NAME"; exit; }
705a850946eSmrg	echo unknown-hitachi-hiuxwe2
70670f7c90cSmrg	exit ;;
707a850946eSmrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
708a850946eSmrg	echo hppa1.1-hp-bsd
70970f7c90cSmrg	exit ;;
710a850946eSmrg    9000/8??:4.3bsd:*:*)
711a850946eSmrg	echo hppa1.0-hp-bsd
71270f7c90cSmrg	exit ;;
713a850946eSmrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
714a850946eSmrg	echo hppa1.0-hp-mpeix
71570f7c90cSmrg	exit ;;
716a850946eSmrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
717a850946eSmrg	echo hppa1.1-hp-osf
71870f7c90cSmrg	exit ;;
719a850946eSmrg    hp8??:OSF1:*:*)
720a850946eSmrg	echo hppa1.0-hp-osf
72170f7c90cSmrg	exit ;;
722a850946eSmrg    i*86:OSF1:*:*)
723a850946eSmrg	if [ -x /usr/sbin/sysversion ] ; then
724a850946eSmrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
725a850946eSmrg	else
726a850946eSmrg	    echo ${UNAME_MACHINE}-unknown-osf1
727a850946eSmrg	fi
72870f7c90cSmrg	exit ;;
729a850946eSmrg    parisc*:Lites*:*:*)
730a850946eSmrg	echo hppa1.1-hp-lites
73170f7c90cSmrg	exit ;;
732a850946eSmrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733a850946eSmrg	echo c1-convex-bsd
73470f7c90cSmrg        exit ;;
735a850946eSmrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736a850946eSmrg	if getsysinfo -f scalar_acc
737a850946eSmrg	then echo c32-convex-bsd
738a850946eSmrg	else echo c2-convex-bsd
739a850946eSmrg	fi
74070f7c90cSmrg        exit ;;
741a850946eSmrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742a850946eSmrg	echo c34-convex-bsd
74370f7c90cSmrg        exit ;;
744a850946eSmrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745a850946eSmrg	echo c38-convex-bsd
74670f7c90cSmrg        exit ;;
747a850946eSmrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748a850946eSmrg	echo c4-convex-bsd
74970f7c90cSmrg        exit ;;
750a850946eSmrg    CRAY*Y-MP:*:*:*)
751a850946eSmrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
75270f7c90cSmrg	exit ;;
753a850946eSmrg    CRAY*[A-Z]90:*:*:*)
754a850946eSmrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
755a850946eSmrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
756a850946eSmrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
757a850946eSmrg	      -e 's/\.[^.]*$/.X/'
75870f7c90cSmrg	exit ;;
759a850946eSmrg    CRAY*TS:*:*:*)
760a850946eSmrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76170f7c90cSmrg	exit ;;
762a850946eSmrg    CRAY*T3E:*:*:*)
763a850946eSmrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76470f7c90cSmrg	exit ;;
765a850946eSmrg    CRAY*SV1:*:*:*)
766a850946eSmrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76770f7c90cSmrg	exit ;;
768a850946eSmrg    *:UNICOS/mp:*:*)
76970f7c90cSmrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
77070f7c90cSmrg	exit ;;
771a850946eSmrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772a850946eSmrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773a850946eSmrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774a850946eSmrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775a850946eSmrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
77670f7c90cSmrg        exit ;;
77770f7c90cSmrg    5000:UNIX_System_V:4.*:*)
77870f7c90cSmrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
77970f7c90cSmrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
78070f7c90cSmrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
78170f7c90cSmrg	exit ;;
782a850946eSmrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783a850946eSmrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
78470f7c90cSmrg	exit ;;
785a850946eSmrg    sparc*:BSD/OS:*:*)
786a850946eSmrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
78770f7c90cSmrg	exit ;;
788a850946eSmrg    *:BSD/OS:*:*)
789a850946eSmrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
79070f7c90cSmrg	exit ;;
79170f7c90cSmrg    *:FreeBSD:*:*)
79270f7c90cSmrg	case ${UNAME_MACHINE} in
79370f7c90cSmrg	    pc98)
79470f7c90cSmrg		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79570f7c90cSmrg	    amd64)
79670f7c90cSmrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79770f7c90cSmrg	    *)
79870f7c90cSmrg		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79970f7c90cSmrg	esac
80070f7c90cSmrg	exit ;;
801a850946eSmrg    i*:CYGWIN*:*)
802a850946eSmrg	echo ${UNAME_MACHINE}-pc-cygwin
80370f7c90cSmrg	exit ;;
80470f7c90cSmrg    *:MINGW*:*)
805a850946eSmrg	echo ${UNAME_MACHINE}-pc-mingw32
80670f7c90cSmrg	exit ;;
80770f7c90cSmrg    i*:windows32*:*)
80870f7c90cSmrg    	# uname -m includes "-pc" on this system.
80970f7c90cSmrg    	echo ${UNAME_MACHINE}-mingw32
81070f7c90cSmrg	exit ;;
811a850946eSmrg    i*:PW*:*)
812a850946eSmrg	echo ${UNAME_MACHINE}-pc-pw32
81370f7c90cSmrg	exit ;;
8147dff02feSmrg    *:Interix*:*)
81570f7c90cSmrg    	case ${UNAME_MACHINE} in
81670f7c90cSmrg	    x86)
81770f7c90cSmrg		echo i586-pc-interix${UNAME_RELEASE}
81870f7c90cSmrg		exit ;;
8197dff02feSmrg	    authenticamd | genuineintel | EM64T)
82070f7c90cSmrg		echo x86_64-unknown-interix${UNAME_RELEASE}
82170f7c90cSmrg		exit ;;
82270f7c90cSmrg	    IA64)
82370f7c90cSmrg		echo ia64-unknown-interix${UNAME_RELEASE}
82470f7c90cSmrg		exit ;;
82570f7c90cSmrg	esac ;;
826a850946eSmrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
827a850946eSmrg	echo i${UNAME_MACHINE}-pc-mks
82870f7c90cSmrg	exit ;;
8297dff02feSmrg    8664:Windows_NT:*)
8307dff02feSmrg	echo x86_64-pc-mks
8317dff02feSmrg	exit ;;
832a850946eSmrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
833a850946eSmrg	# How do we know it's Interix rather than the generic POSIX subsystem?
834a850946eSmrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
835a850946eSmrg	# UNAME_MACHINE based on the output of uname instead of i386?
836a850946eSmrg	echo i586-pc-interix
83770f7c90cSmrg	exit ;;
838a850946eSmrg    i*:UWIN*:*)
839a850946eSmrg	echo ${UNAME_MACHINE}-pc-uwin
84070f7c90cSmrg	exit ;;
84170f7c90cSmrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
84270f7c90cSmrg	echo x86_64-unknown-cygwin
84370f7c90cSmrg	exit ;;
844a850946eSmrg    p*:CYGWIN*:*)
845a850946eSmrg	echo powerpcle-unknown-cygwin
84670f7c90cSmrg	exit ;;
847a850946eSmrg    prep*:SunOS:5.*:*)
848a850946eSmrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
84970f7c90cSmrg	exit ;;
850a850946eSmrg    *:GNU:*:*)
85170f7c90cSmrg	# the GNU system
852a850946eSmrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
85370f7c90cSmrg	exit ;;
85470f7c90cSmrg    *:GNU/*:*:*)
85570f7c90cSmrg	# other systems with GNU libc and userland
85670f7c90cSmrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
85770f7c90cSmrg	exit ;;
858a850946eSmrg    i*86:Minix:*:*)
859a850946eSmrg	echo ${UNAME_MACHINE}-pc-minix
86070f7c90cSmrg	exit ;;
8617dff02feSmrg    alpha:Linux:*:*)
8627dff02feSmrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
8637dff02feSmrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
8647dff02feSmrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
8657dff02feSmrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
8667dff02feSmrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
8677dff02feSmrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
8687dff02feSmrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
8697dff02feSmrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
8707dff02feSmrg        esac
8717dff02feSmrg	objdump --private-headers /bin/sh | grep -q ld.so.1
8727dff02feSmrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
8737dff02feSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
8747dff02feSmrg	exit ;;
875a850946eSmrg    arm*:Linux:*:*)
87670f7c90cSmrg	eval $set_cc_for_build
87770f7c90cSmrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
87870f7c90cSmrg	    | grep -q __ARM_EABI__
87970f7c90cSmrg	then
88070f7c90cSmrg	    echo ${UNAME_MACHINE}-unknown-linux-gnu
88170f7c90cSmrg	else
88270f7c90cSmrg	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
88370f7c90cSmrg	fi
88470f7c90cSmrg	exit ;;
88570f7c90cSmrg    avr32*:Linux:*:*)
886a850946eSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
88770f7c90cSmrg	exit ;;
888a850946eSmrg    cris:Linux:*:*)
889a850946eSmrg	echo cris-axis-linux-gnu
89070f7c90cSmrg	exit ;;
89170f7c90cSmrg    crisv32:Linux:*:*)
89270f7c90cSmrg	echo crisv32-axis-linux-gnu
89370f7c90cSmrg	exit ;;
89470f7c90cSmrg    frv:Linux:*:*)
89570f7c90cSmrg    	echo frv-unknown-linux-gnu
89670f7c90cSmrg	exit ;;
8977dff02feSmrg    i*86:Linux:*:*)
8987dff02feSmrg	LIBC=gnu
8997dff02feSmrg	eval $set_cc_for_build
9007dff02feSmrg	sed 's/^	//' << EOF >$dummy.c
9017dff02feSmrg	#ifdef __dietlibc__
9027dff02feSmrg	LIBC=dietlibc
9037dff02feSmrg	#endif
9047dff02feSmrgEOF
9057dff02feSmrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
9067dff02feSmrg	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
9077dff02feSmrg	exit ;;
908a850946eSmrg    ia64:Linux:*:*)
90970f7c90cSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
91070f7c90cSmrg	exit ;;
91170f7c90cSmrg    m32r*:Linux:*:*)
91270f7c90cSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
91370f7c90cSmrg	exit ;;
914a850946eSmrg    m68*:Linux:*:*)
915a850946eSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
91670f7c90cSmrg	exit ;;
9177dff02feSmrg    mips:Linux:*:* | mips64:Linux:*:*)
918a850946eSmrg	eval $set_cc_for_build
919a850946eSmrg	sed 's/^	//' << EOF >$dummy.c
920a850946eSmrg	#undef CPU
9217dff02feSmrg	#undef ${UNAME_MACHINE}
9227dff02feSmrg	#undef ${UNAME_MACHINE}el
923a850946eSmrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
9247dff02feSmrg	CPU=${UNAME_MACHINE}el
925a850946eSmrg	#else
926a850946eSmrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
9277dff02feSmrg	CPU=${UNAME_MACHINE}
928a850946eSmrg	#else
929a850946eSmrg	CPU=
930a850946eSmrg	#endif
931a850946eSmrg	#endif
932a850946eSmrgEOF
9337dff02feSmrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
93470f7c90cSmrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
935a850946eSmrg	;;
93670f7c90cSmrg    or32:Linux:*:*)
93770f7c90cSmrg	echo or32-unknown-linux-gnu
93870f7c90cSmrg	exit ;;
93970f7c90cSmrg    padre:Linux:*:*)
94070f7c90cSmrg	echo sparc-unknown-linux-gnu
94170f7c90cSmrg	exit ;;
9427dff02feSmrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
9437dff02feSmrg	echo hppa64-unknown-linux-gnu
9447dff02feSmrg	exit ;;
945a850946eSmrg    parisc:Linux:*:* | hppa:Linux:*:*)
946a850946eSmrg	# Look for CPU level
947a850946eSmrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
948a850946eSmrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
949a850946eSmrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
950a850946eSmrg	  *)    echo hppa-unknown-linux-gnu ;;
951a850946eSmrg	esac
95270f7c90cSmrg	exit ;;
9537dff02feSmrg    ppc64:Linux:*:*)
9547dff02feSmrg	echo powerpc64-unknown-linux-gnu
9557dff02feSmrg	exit ;;
9567dff02feSmrg    ppc:Linux:*:*)
9577dff02feSmrg	echo powerpc-unknown-linux-gnu
95870f7c90cSmrg	exit ;;
959a850946eSmrg    s390:Linux:*:* | s390x:Linux:*:*)
96070f7c90cSmrg	echo ${UNAME_MACHINE}-ibm-linux
96170f7c90cSmrg	exit ;;
962a850946eSmrg    sh64*:Linux:*:*)
963a850946eSmrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
96470f7c90cSmrg	exit ;;
965a850946eSmrg    sh*:Linux:*:*)
966a850946eSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
96770f7c90cSmrg	exit ;;
968a850946eSmrg    sparc:Linux:*:* | sparc64:Linux:*:*)
969a850946eSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
97070f7c90cSmrg	exit ;;
97169a1fe56Smrg    tile*:Linux:*:*)
97269a1fe56Smrg	echo ${UNAME_MACHINE}-tilera-linux-gnu
97369a1fe56Smrg	exit ;;
97470f7c90cSmrg    vax:Linux:*:*)
97570f7c90cSmrg	echo ${UNAME_MACHINE}-dec-linux-gnu
97670f7c90cSmrg	exit ;;
977a850946eSmrg    x86_64:Linux:*:*)
97870f7c90cSmrg	echo x86_64-unknown-linux-gnu
97970f7c90cSmrg	exit ;;
98070f7c90cSmrg    xtensa*:Linux:*:*)
98170f7c90cSmrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
98270f7c90cSmrg	exit ;;
983a850946eSmrg    i*86:DYNIX/ptx:4*:*)
984a850946eSmrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
985a850946eSmrg	# earlier versions are messed up and put the nodename in both
986a850946eSmrg	# sysname and nodename.
987a850946eSmrg	echo i386-sequent-sysv4
98870f7c90cSmrg	exit ;;
989a850946eSmrg    i*86:UNIX_SV:4.2MP:2.*)
990a850946eSmrg        # Unixware is an offshoot of SVR4, but it has its own version
991a850946eSmrg        # number series starting with 2...
992a850946eSmrg        # I am not positive that other SVR4 systems won't match this,
993a850946eSmrg	# I just have to hope.  -- rms.
994a850946eSmrg        # Use sysv4.2uw... so that sysv4* matches it.
995a850946eSmrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
99670f7c90cSmrg	exit ;;
997a850946eSmrg    i*86:OS/2:*:*)
998a850946eSmrg	# If we were able to find `uname', then EMX Unix compatibility
999a850946eSmrg	# is probably installed.
1000a850946eSmrg	echo ${UNAME_MACHINE}-pc-os2-emx
100170f7c90cSmrg	exit ;;
1002a850946eSmrg    i*86:XTS-300:*:STOP)
1003a850946eSmrg	echo ${UNAME_MACHINE}-unknown-stop
100470f7c90cSmrg	exit ;;
1005a850946eSmrg    i*86:atheos:*:*)
1006a850946eSmrg	echo ${UNAME_MACHINE}-unknown-atheos
100770f7c90cSmrg	exit ;;
100870f7c90cSmrg    i*86:syllable:*:*)
100970f7c90cSmrg	echo ${UNAME_MACHINE}-pc-syllable
101070f7c90cSmrg	exit ;;
10117dff02feSmrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1012a850946eSmrg	echo i386-unknown-lynxos${UNAME_RELEASE}
101370f7c90cSmrg	exit ;;
1014a850946eSmrg    i*86:*DOS:*:*)
1015a850946eSmrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
101670f7c90cSmrg	exit ;;
1017a850946eSmrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1018a850946eSmrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1019a850946eSmrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1020a850946eSmrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1021a850946eSmrg	else
1022a850946eSmrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1023a850946eSmrg	fi
102470f7c90cSmrg	exit ;;
102570f7c90cSmrg    i*86:*:5:[678]*)
102670f7c90cSmrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1027a850946eSmrg	case `/bin/uname -X | grep "^Machine"` in
1028a850946eSmrg	    *486*)	     UNAME_MACHINE=i486 ;;
1029a850946eSmrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
1030a850946eSmrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1031a850946eSmrg	esac
1032a850946eSmrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
103370f7c90cSmrg	exit ;;
1034a850946eSmrg    i*86:*:3.2:*)
1035a850946eSmrg	if test -f /usr/options/cb.name; then
1036a850946eSmrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1037a850946eSmrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1038a850946eSmrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1039a850946eSmrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1040a850946eSmrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1041a850946eSmrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1042a850946eSmrg			&& UNAME_MACHINE=i586
1043a850946eSmrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1044a850946eSmrg			&& UNAME_MACHINE=i686
1045a850946eSmrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1046a850946eSmrg			&& UNAME_MACHINE=i686
1047a850946eSmrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1048a850946eSmrg	else
1049a850946eSmrg		echo ${UNAME_MACHINE}-pc-sysv32
1050a850946eSmrg	fi
105170f7c90cSmrg	exit ;;
1052a850946eSmrg    pc:*:*:*)
1053a850946eSmrg	# Left here for compatibility:
1054a850946eSmrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
105570f7c90cSmrg        # the processor, so we play safe by assuming i586.
105670f7c90cSmrg	# Note: whatever this is, it MUST be the same as what config.sub
105770f7c90cSmrg	# prints for the "djgpp" host, or else GDB configury will decide that
105870f7c90cSmrg	# this is a cross-build.
105970f7c90cSmrg	echo i586-pc-msdosdjgpp
106070f7c90cSmrg        exit ;;
1061a850946eSmrg    Intel:Mach:3*:*)
1062a850946eSmrg	echo i386-pc-mach3
106370f7c90cSmrg	exit ;;
1064a850946eSmrg    paragon:*:*:*)
1065a850946eSmrg	echo i860-intel-osf1
106670f7c90cSmrg	exit ;;
1067a850946eSmrg    i860:*:4.*:*) # i860-SVR4
1068a850946eSmrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1069a850946eSmrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1070a850946eSmrg	else # Add other i860-SVR4 vendors below as they are discovered.
1071a850946eSmrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1072a850946eSmrg	fi
107370f7c90cSmrg	exit ;;
1074a850946eSmrg    mini*:CTIX:SYS*5:*)
1075a850946eSmrg	# "miniframe"
1076a850946eSmrg	echo m68010-convergent-sysv
107770f7c90cSmrg	exit ;;
1078a850946eSmrg    mc68k:UNIX:SYSTEM5:3.51m)
1079a850946eSmrg	echo m68k-convergent-sysv
108070f7c90cSmrg	exit ;;
1081a850946eSmrg    M680?0:D-NIX:5.3:*)
1082a850946eSmrg	echo m68k-diab-dnix
108370f7c90cSmrg	exit ;;
108470f7c90cSmrg    M68*:*:R3V[5678]*:*)
108570f7c90cSmrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
108670f7c90cSmrg    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)
1087a850946eSmrg	OS_REL=''
1088a850946eSmrg	test -r /etc/.relid \
1089a850946eSmrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1090a850946eSmrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
109170f7c90cSmrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1092a850946eSmrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
109370f7c90cSmrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1094a850946eSmrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1095a850946eSmrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
109670f7c90cSmrg          && { echo i486-ncr-sysv4; exit; } ;;
109770f7c90cSmrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
109870f7c90cSmrg	OS_REL='.3'
109970f7c90cSmrg	test -r /etc/.relid \
110070f7c90cSmrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
110170f7c90cSmrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
110270f7c90cSmrg	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
110370f7c90cSmrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
110470f7c90cSmrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
110570f7c90cSmrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
110670f7c90cSmrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1107a850946eSmrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1108a850946eSmrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
110970f7c90cSmrg	exit ;;
1110a850946eSmrg    mc68030:UNIX_System_V:4.*:*)
1111a850946eSmrg	echo m68k-atari-sysv4
111270f7c90cSmrg	exit ;;
1113a850946eSmrg    TSUNAMI:LynxOS:2.*:*)
1114a850946eSmrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
111570f7c90cSmrg	exit ;;
1116a850946eSmrg    rs6000:LynxOS:2.*:*)
1117a850946eSmrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
111870f7c90cSmrg	exit ;;
11197dff02feSmrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1120a850946eSmrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
112170f7c90cSmrg	exit ;;
1122a850946eSmrg    SM[BE]S:UNIX_SV:*:*)
1123a850946eSmrg	echo mips-dde-sysv${UNAME_RELEASE}
112470f7c90cSmrg	exit ;;
1125a850946eSmrg    RM*:ReliantUNIX-*:*:*)
1126a850946eSmrg	echo mips-sni-sysv4
112770f7c90cSmrg	exit ;;
1128a850946eSmrg    RM*:SINIX-*:*:*)
1129a850946eSmrg	echo mips-sni-sysv4
113070f7c90cSmrg	exit ;;
1131a850946eSmrg    *:SINIX-*:*:*)
1132a850946eSmrg	if uname -p 2>/dev/null >/dev/null ; then
1133a850946eSmrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1134a850946eSmrg		echo ${UNAME_MACHINE}-sni-sysv4
1135a850946eSmrg	else
1136a850946eSmrg		echo ns32k-sni-sysv
1137a850946eSmrg	fi
113870f7c90cSmrg	exit ;;
1139a850946eSmrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1140a850946eSmrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1141a850946eSmrg        echo i586-unisys-sysv4
114270f7c90cSmrg        exit ;;
1143a850946eSmrg    *:UNIX_System_V:4*:FTX*)
1144a850946eSmrg	# From Gerald Hewes <hewes@openmarket.com>.
1145a850946eSmrg	# How about differentiating between stratus architectures? -djm
1146a850946eSmrg	echo hppa1.1-stratus-sysv4
114770f7c90cSmrg	exit ;;
1148a850946eSmrg    *:*:*:FTX*)
1149a850946eSmrg	# From seanf@swdc.stratus.com.
1150a850946eSmrg	echo i860-stratus-sysv4
115170f7c90cSmrg	exit ;;
115270f7c90cSmrg    i*86:VOS:*:*)
115370f7c90cSmrg	# From Paul.Green@stratus.com.
115470f7c90cSmrg	echo ${UNAME_MACHINE}-stratus-vos
115570f7c90cSmrg	exit ;;
1156a850946eSmrg    *:VOS:*:*)
1157a850946eSmrg	# From Paul.Green@stratus.com.
1158a850946eSmrg	echo hppa1.1-stratus-vos
115970f7c90cSmrg	exit ;;
1160a850946eSmrg    mc68*:A/UX:*:*)
1161a850946eSmrg	echo m68k-apple-aux${UNAME_RELEASE}
116270f7c90cSmrg	exit ;;
1163a850946eSmrg    news*:NEWS-OS:6*:*)
1164a850946eSmrg	echo mips-sony-newsos6
116570f7c90cSmrg	exit ;;
1166a850946eSmrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1167a850946eSmrg	if [ -d /usr/nec ]; then
1168a850946eSmrg	        echo mips-nec-sysv${UNAME_RELEASE}
1169a850946eSmrg	else
1170a850946eSmrg	        echo mips-unknown-sysv${UNAME_RELEASE}
1171a850946eSmrg	fi
117270f7c90cSmrg        exit ;;
1173a850946eSmrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1174a850946eSmrg	echo powerpc-be-beos
117570f7c90cSmrg	exit ;;
1176a850946eSmrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
1177a850946eSmrg	echo powerpc-apple-beos
117870f7c90cSmrg	exit ;;
1179a850946eSmrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1180a850946eSmrg	echo i586-pc-beos
118170f7c90cSmrg	exit ;;
118270f7c90cSmrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
118370f7c90cSmrg	echo i586-pc-haiku
118470f7c90cSmrg	exit ;;
1185a850946eSmrg    SX-4:SUPER-UX:*:*)
1186a850946eSmrg	echo sx4-nec-superux${UNAME_RELEASE}
118770f7c90cSmrg	exit ;;
1188a850946eSmrg    SX-5:SUPER-UX:*:*)
1189a850946eSmrg	echo sx5-nec-superux${UNAME_RELEASE}
119070f7c90cSmrg	exit ;;
1191a850946eSmrg    SX-6:SUPER-UX:*:*)
1192a850946eSmrg	echo sx6-nec-superux${UNAME_RELEASE}
119370f7c90cSmrg	exit ;;
119470f7c90cSmrg    SX-7:SUPER-UX:*:*)
119570f7c90cSmrg	echo sx7-nec-superux${UNAME_RELEASE}
119670f7c90cSmrg	exit ;;
119770f7c90cSmrg    SX-8:SUPER-UX:*:*)
119870f7c90cSmrg	echo sx8-nec-superux${UNAME_RELEASE}
119970f7c90cSmrg	exit ;;
120070f7c90cSmrg    SX-8R:SUPER-UX:*:*)
120170f7c90cSmrg	echo sx8r-nec-superux${UNAME_RELEASE}
120270f7c90cSmrg	exit ;;
1203a850946eSmrg    Power*:Rhapsody:*:*)
1204a850946eSmrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
120570f7c90cSmrg	exit ;;
1206a850946eSmrg    *:Rhapsody:*:*)
1207a850946eSmrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
120870f7c90cSmrg	exit ;;
1209a850946eSmrg    *:Darwin:*:*)
121070f7c90cSmrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
121170f7c90cSmrg	case $UNAME_PROCESSOR in
12127dff02feSmrg	    i386)
12137dff02feSmrg		eval $set_cc_for_build
12147dff02feSmrg		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
12157dff02feSmrg		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
12167dff02feSmrg		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
12177dff02feSmrg		      grep IS_64BIT_ARCH >/dev/null
12187dff02feSmrg		  then
12197dff02feSmrg		      UNAME_PROCESSOR="x86_64"
12207dff02feSmrg		  fi
12217dff02feSmrg		fi ;;
122270f7c90cSmrg	    unknown) UNAME_PROCESSOR=powerpc ;;
1223a850946eSmrg	esac
1224a850946eSmrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
122570f7c90cSmrg	exit ;;
1226a850946eSmrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1227a850946eSmrg	UNAME_PROCESSOR=`uname -p`
1228a850946eSmrg	if test "$UNAME_PROCESSOR" = "x86"; then
1229a850946eSmrg		UNAME_PROCESSOR=i386
1230a850946eSmrg		UNAME_MACHINE=pc
1231a850946eSmrg	fi
1232a850946eSmrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
123370f7c90cSmrg	exit ;;
1234a850946eSmrg    *:QNX:*:4*)
1235a850946eSmrg	echo i386-pc-qnx
123670f7c90cSmrg	exit ;;
123770f7c90cSmrg    NSE-?:NONSTOP_KERNEL:*:*)
123870f7c90cSmrg	echo nse-tandem-nsk${UNAME_RELEASE}
123970f7c90cSmrg	exit ;;
124070f7c90cSmrg    NSR-?:NONSTOP_KERNEL:*:*)
1241a850946eSmrg	echo nsr-tandem-nsk${UNAME_RELEASE}
124270f7c90cSmrg	exit ;;
1243a850946eSmrg    *:NonStop-UX:*:*)
1244a850946eSmrg	echo mips-compaq-nonstopux
124570f7c90cSmrg	exit ;;
1246a850946eSmrg    BS2000:POSIX*:*:*)
1247a850946eSmrg	echo bs2000-siemens-sysv
124870f7c90cSmrg	exit ;;
1249a850946eSmrg    DS/*:UNIX_System_V:*:*)
1250a850946eSmrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
125170f7c90cSmrg	exit ;;
1252a850946eSmrg    *:Plan9:*:*)
1253a850946eSmrg	# "uname -m" is not consistent, so use $cputype instead. 386
1254a850946eSmrg	# is converted to i386 for consistency with other x86
1255a850946eSmrg	# operating systems.
1256a850946eSmrg	if test "$cputype" = "386"; then
1257a850946eSmrg	    UNAME_MACHINE=i386
1258a850946eSmrg	else
1259a850946eSmrg	    UNAME_MACHINE="$cputype"
1260a850946eSmrg	fi
1261a850946eSmrg	echo ${UNAME_MACHINE}-unknown-plan9
126270f7c90cSmrg	exit ;;
1263a850946eSmrg    *:TOPS-10:*:*)
1264a850946eSmrg	echo pdp10-unknown-tops10
126570f7c90cSmrg	exit ;;
1266a850946eSmrg    *:TENEX:*:*)
1267a850946eSmrg	echo pdp10-unknown-tenex
126870f7c90cSmrg	exit ;;
1269a850946eSmrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1270a850946eSmrg	echo pdp10-dec-tops20
127170f7c90cSmrg	exit ;;
1272a850946eSmrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1273a850946eSmrg	echo pdp10-xkl-tops20
127470f7c90cSmrg	exit ;;
1275a850946eSmrg    *:TOPS-20:*:*)
1276a850946eSmrg	echo pdp10-unknown-tops20
127770f7c90cSmrg	exit ;;
1278a850946eSmrg    *:ITS:*:*)
1279a850946eSmrg	echo pdp10-unknown-its
128070f7c90cSmrg	exit ;;
1281a850946eSmrg    SEI:*:*:SEIUX)
1282a850946eSmrg        echo mips-sei-seiux${UNAME_RELEASE}
128370f7c90cSmrg	exit ;;
128470f7c90cSmrg    *:DragonFly:*:*)
128570f7c90cSmrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
128670f7c90cSmrg	exit ;;
128770f7c90cSmrg    *:*VMS:*:*)
128870f7c90cSmrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
128970f7c90cSmrg	case "${UNAME_MACHINE}" in
129070f7c90cSmrg	    A*) echo alpha-dec-vms ; exit ;;
129170f7c90cSmrg	    I*) echo ia64-dec-vms ; exit ;;
129270f7c90cSmrg	    V*) echo vax-dec-vms ; exit ;;
129370f7c90cSmrg	esac ;;
129470f7c90cSmrg    *:XENIX:*:SysV)
129570f7c90cSmrg	echo i386-pc-xenix
129670f7c90cSmrg	exit ;;
129770f7c90cSmrg    i*86:skyos:*:*)
129870f7c90cSmrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
129970f7c90cSmrg	exit ;;
130070f7c90cSmrg    i*86:rdos:*:*)
130170f7c90cSmrg	echo ${UNAME_MACHINE}-pc-rdos
130270f7c90cSmrg	exit ;;
130370f7c90cSmrg    i*86:AROS:*:*)
130470f7c90cSmrg	echo ${UNAME_MACHINE}-pc-aros
130570f7c90cSmrg	exit ;;
1306a850946eSmrgesac
1307a850946eSmrg
1308a850946eSmrg#echo '(No uname command or uname output not recognized.)' 1>&2
1309a850946eSmrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1310a850946eSmrg
1311a850946eSmrgeval $set_cc_for_build
1312a850946eSmrgcat >$dummy.c <<EOF
1313a850946eSmrg#ifdef _SEQUENT_
1314a850946eSmrg# include <sys/types.h>
1315a850946eSmrg# include <sys/utsname.h>
1316a850946eSmrg#endif
1317a850946eSmrgmain ()
1318a850946eSmrg{
1319a850946eSmrg#if defined (sony)
1320a850946eSmrg#if defined (MIPSEB)
1321a850946eSmrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1322a850946eSmrg     I don't know....  */
1323a850946eSmrg  printf ("mips-sony-bsd\n"); exit (0);
1324a850946eSmrg#else
1325a850946eSmrg#include <sys/param.h>
1326a850946eSmrg  printf ("m68k-sony-newsos%s\n",
1327a850946eSmrg#ifdef NEWSOS4
1328a850946eSmrg          "4"
1329a850946eSmrg#else
1330a850946eSmrg	  ""
1331a850946eSmrg#endif
1332a850946eSmrg         ); exit (0);
1333a850946eSmrg#endif
1334a850946eSmrg#endif
1335a850946eSmrg
1336a850946eSmrg#if defined (__arm) && defined (__acorn) && defined (__unix)
133770f7c90cSmrg  printf ("arm-acorn-riscix\n"); exit (0);
1338a850946eSmrg#endif
1339a850946eSmrg
1340a850946eSmrg#if defined (hp300) && !defined (hpux)
1341a850946eSmrg  printf ("m68k-hp-bsd\n"); exit (0);
1342a850946eSmrg#endif
1343a850946eSmrg
1344a850946eSmrg#if defined (NeXT)
1345a850946eSmrg#if !defined (__ARCHITECTURE__)
1346a850946eSmrg#define __ARCHITECTURE__ "m68k"
1347a850946eSmrg#endif
1348a850946eSmrg  int version;
1349a850946eSmrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1350a850946eSmrg  if (version < 4)
1351a850946eSmrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1352a850946eSmrg  else
1353a850946eSmrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1354a850946eSmrg  exit (0);
1355a850946eSmrg#endif
1356a850946eSmrg
1357a850946eSmrg#if defined (MULTIMAX) || defined (n16)
1358a850946eSmrg#if defined (UMAXV)
1359a850946eSmrg  printf ("ns32k-encore-sysv\n"); exit (0);
1360a850946eSmrg#else
1361a850946eSmrg#if defined (CMU)
1362a850946eSmrg  printf ("ns32k-encore-mach\n"); exit (0);
1363a850946eSmrg#else
1364a850946eSmrg  printf ("ns32k-encore-bsd\n"); exit (0);
1365a850946eSmrg#endif
1366a850946eSmrg#endif
1367a850946eSmrg#endif
1368a850946eSmrg
1369a850946eSmrg#if defined (__386BSD__)
1370a850946eSmrg  printf ("i386-pc-bsd\n"); exit (0);
1371a850946eSmrg#endif
1372a850946eSmrg
1373a850946eSmrg#if defined (sequent)
1374a850946eSmrg#if defined (i386)
1375a850946eSmrg  printf ("i386-sequent-dynix\n"); exit (0);
1376a850946eSmrg#endif
1377a850946eSmrg#if defined (ns32000)
1378a850946eSmrg  printf ("ns32k-sequent-dynix\n"); exit (0);
1379a850946eSmrg#endif
1380a850946eSmrg#endif
1381a850946eSmrg
1382a850946eSmrg#if defined (_SEQUENT_)
1383a850946eSmrg    struct utsname un;
1384a850946eSmrg
1385a850946eSmrg    uname(&un);
1386a850946eSmrg
1387a850946eSmrg    if (strncmp(un.version, "V2", 2) == 0) {
1388a850946eSmrg	printf ("i386-sequent-ptx2\n"); exit (0);
1389a850946eSmrg    }
1390a850946eSmrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1391a850946eSmrg	printf ("i386-sequent-ptx1\n"); exit (0);
1392a850946eSmrg    }
1393a850946eSmrg    printf ("i386-sequent-ptx\n"); exit (0);
1394a850946eSmrg
1395a850946eSmrg#endif
1396a850946eSmrg
1397a850946eSmrg#if defined (vax)
1398a850946eSmrg# if !defined (ultrix)
1399a850946eSmrg#  include <sys/param.h>
1400a850946eSmrg#  if defined (BSD)
1401a850946eSmrg#   if BSD == 43
1402a850946eSmrg      printf ("vax-dec-bsd4.3\n"); exit (0);
1403a850946eSmrg#   else
1404a850946eSmrg#    if BSD == 199006
1405a850946eSmrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1406a850946eSmrg#    else
1407a850946eSmrg      printf ("vax-dec-bsd\n"); exit (0);
1408a850946eSmrg#    endif
1409a850946eSmrg#   endif
1410a850946eSmrg#  else
1411a850946eSmrg    printf ("vax-dec-bsd\n"); exit (0);
1412a850946eSmrg#  endif
1413a850946eSmrg# else
1414a850946eSmrg    printf ("vax-dec-ultrix\n"); exit (0);
1415a850946eSmrg# endif
1416a850946eSmrg#endif
1417a850946eSmrg
1418a850946eSmrg#if defined (alliant) && defined (i860)
1419a850946eSmrg  printf ("i860-alliant-bsd\n"); exit (0);
1420a850946eSmrg#endif
1421a850946eSmrg
1422a850946eSmrg  exit (1);
1423a850946eSmrg}
1424a850946eSmrgEOF
1425a850946eSmrg
142670f7c90cSmrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
142770f7c90cSmrg	{ echo "$SYSTEM_NAME"; exit; }
1428a850946eSmrg
1429a850946eSmrg# Apollos put the system type in the environment.
1430a850946eSmrg
143170f7c90cSmrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1432a850946eSmrg
1433a850946eSmrg# Convex versions that predate uname can use getsysinfo(1)
1434a850946eSmrg
1435a850946eSmrgif [ -x /usr/convex/getsysinfo ]
1436a850946eSmrgthen
1437a850946eSmrg    case `getsysinfo -f cpu_type` in
1438a850946eSmrg    c1*)
1439a850946eSmrg	echo c1-convex-bsd
144070f7c90cSmrg	exit ;;
1441a850946eSmrg    c2*)
1442a850946eSmrg	if getsysinfo -f scalar_acc
1443a850946eSmrg	then echo c32-convex-bsd
1444a850946eSmrg	else echo c2-convex-bsd
1445a850946eSmrg	fi
144670f7c90cSmrg	exit ;;
1447a850946eSmrg    c34*)
1448a850946eSmrg	echo c34-convex-bsd
144970f7c90cSmrg	exit ;;
1450a850946eSmrg    c38*)
1451a850946eSmrg	echo c38-convex-bsd
145270f7c90cSmrg	exit ;;
1453a850946eSmrg    c4*)
1454a850946eSmrg	echo c4-convex-bsd
145570f7c90cSmrg	exit ;;
1456a850946eSmrg    esac
1457a850946eSmrgfi
1458a850946eSmrg
1459a850946eSmrgcat >&2 <<EOF
1460a850946eSmrg$0: unable to guess system type
1461a850946eSmrg
1462a850946eSmrgThis script, last modified $timestamp, has failed to recognize
1463a850946eSmrgthe operating system you are using. It is advised that you
1464a850946eSmrgdownload the most up to date version of the config scripts from
1465a850946eSmrg
146670f7c90cSmrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
146770f7c90cSmrgand
146870f7c90cSmrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1469a850946eSmrg
1470a850946eSmrgIf the version you run ($0) is already up to date, please
1471a850946eSmrgsend the following data and any information you think might be
1472a850946eSmrgpertinent to <config-patches@gnu.org> in order to provide the needed
1473a850946eSmrginformation to handle your system.
1474a850946eSmrg
1475a850946eSmrgconfig.guess timestamp = $timestamp
1476a850946eSmrg
1477a850946eSmrguname -m = `(uname -m) 2>/dev/null || echo unknown`
1478a850946eSmrguname -r = `(uname -r) 2>/dev/null || echo unknown`
1479a850946eSmrguname -s = `(uname -s) 2>/dev/null || echo unknown`
1480a850946eSmrguname -v = `(uname -v) 2>/dev/null || echo unknown`
1481a850946eSmrg
1482a850946eSmrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1483a850946eSmrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
1484a850946eSmrg
1485a850946eSmrghostinfo               = `(hostinfo) 2>/dev/null`
1486a850946eSmrg/bin/universe          = `(/bin/universe) 2>/dev/null`
1487a850946eSmrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
1488a850946eSmrg/bin/arch              = `(/bin/arch) 2>/dev/null`
1489a850946eSmrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1490a850946eSmrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1491a850946eSmrg
1492a850946eSmrgUNAME_MACHINE = ${UNAME_MACHINE}
1493a850946eSmrgUNAME_RELEASE = ${UNAME_RELEASE}
1494a850946eSmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
1495a850946eSmrgUNAME_VERSION = ${UNAME_VERSION}
1496a850946eSmrgEOF
1497a850946eSmrg
1498a850946eSmrgexit 1
1499a850946eSmrg
1500a850946eSmrg# Local variables:
1501a850946eSmrg# eval: (add-hook 'write-file-hooks 'time-stamp)
1502a850946eSmrg# time-stamp-start: "timestamp='"
1503a850946eSmrg# time-stamp-format: "%:y-%02m-%02d"
1504a850946eSmrg# time-stamp-end: "'"
1505a850946eSmrg# End:
1506