config.guess revision 8903d43a
1e9554658Smrg#! /bin/sh
2e9554658Smrg# Attempt to guess a canonical system name.
3e9554658Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
48903d43aSmrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5c2b339b4Smrg#   Free Software Foundation, Inc.
6e9554658Smrg
78903d43aSmrgtimestamp='2010-08-21'
8e9554658Smrg
9e9554658Smrg# This file is free software; you can redistribute it and/or modify it
10e9554658Smrg# under the terms of the GNU General Public License as published by
11e9554658Smrg# the Free Software Foundation; either version 2 of the License, or
12e9554658Smrg# (at your option) any later version.
13e9554658Smrg#
14e9554658Smrg# This program is distributed in the hope that it will be useful, but
15e9554658Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
16e9554658Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17e9554658Smrg# General Public License for more details.
18e9554658Smrg#
19e9554658Smrg# You should have received a copy of the GNU General Public License
20e9554658Smrg# along with this program; if not, write to the Free Software
21e9554658Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22e9554658Smrg# 02110-1301, USA.
23e9554658Smrg#
24e9554658Smrg# As a special exception to the GNU General Public License, if you
25e9554658Smrg# distribute this file as part of a program that contains a
26e9554658Smrg# configuration script generated by Autoconf, you may include it under
27e9554658Smrg# the same distribution terms that you use for the rest of that program.
28e9554658Smrg
29e9554658Smrg
308903d43aSmrg# Originally written by Per Bothner.  Please send patches (context
318903d43aSmrg# diff format) to <config-patches@gnu.org> and include a ChangeLog
328903d43aSmrg# entry.
33e9554658Smrg#
34e9554658Smrg# This script attempts to guess a canonical system name similar to
35e9554658Smrg# config.sub.  If it succeeds, it prints the system name on stdout, and
36e9554658Smrg# exits with 0.  Otherwise, it exits with 1.
37e9554658Smrg#
388903d43aSmrg# You can get the latest version of this script from:
398903d43aSmrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
40e9554658Smrg
41e9554658Smrgme=`echo "$0" | sed -e 's,.*/,,'`
42e9554658Smrg
43e9554658Smrgusage="\
44e9554658SmrgUsage: $0 [OPTION]
45e9554658Smrg
46e9554658SmrgOutput the configuration name of the system \`$me' is run on.
47e9554658Smrg
48e9554658SmrgOperation modes:
49e9554658Smrg  -h, --help         print this help, then exit
50e9554658Smrg  -t, --time-stamp   print date of last modification, then exit
51e9554658Smrg  -v, --version      print version number, then exit
52e9554658Smrg
53e9554658SmrgReport bugs and patches to <config-patches@gnu.org>."
54e9554658Smrg
55e9554658Smrgversion="\
56e9554658SmrgGNU config.guess ($timestamp)
57e9554658Smrg
58e9554658SmrgOriginally written by Per Bothner.
598903d43aSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
608903d43aSmrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
618903d43aSmrgSoftware Foundation, Inc.
62e9554658Smrg
63e9554658SmrgThis is free software; see the source for copying conditions.  There is NO
64e9554658Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
65e9554658Smrg
66e9554658Smrghelp="
67e9554658SmrgTry \`$me --help' for more information."
68e9554658Smrg
69e9554658Smrg# Parse command line
70e9554658Smrgwhile test $# -gt 0 ; do
71e9554658Smrg  case $1 in
72e9554658Smrg    --time-stamp | --time* | -t )
73e9554658Smrg       echo "$timestamp" ; exit ;;
74e9554658Smrg    --version | -v )
75e9554658Smrg       echo "$version" ; exit ;;
76e9554658Smrg    --help | --h* | -h )
77e9554658Smrg       echo "$usage"; exit ;;
78e9554658Smrg    -- )     # Stop option processing
79e9554658Smrg       shift; break ;;
80e9554658Smrg    - )	# Use stdin as input.
81e9554658Smrg       break ;;
82e9554658Smrg    -* )
83e9554658Smrg       echo "$me: invalid option $1$help" >&2
84e9554658Smrg       exit 1 ;;
85e9554658Smrg    * )
86e9554658Smrg       break ;;
87e9554658Smrg  esac
88e9554658Smrgdone
89e9554658Smrg
90e9554658Smrgif test $# != 0; then
91e9554658Smrg  echo "$me: too many arguments$help" >&2
92e9554658Smrg  exit 1
93e9554658Smrgfi
94e9554658Smrg
958903d43aSmrgtrap 'exit 1' HUP INT TERM
96e9554658Smrg
97e9554658Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
98e9554658Smrg# compiler to aid in system detection is discouraged as it requires
99e9554658Smrg# temporary files to be created and, as you can see below, it is a
100e9554658Smrg# headache to deal with in a portable fashion.
101e9554658Smrg
102e9554658Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
103e9554658Smrg# use `HOST_CC' if defined, but it is deprecated.
104e9554658Smrg
105e9554658Smrg# Portable tmp directory creation inspired by the Autoconf team.
106e9554658Smrg
107e9554658Smrgset_cc_for_build='
108e9554658Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
1098903d43aSmrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
110e9554658Smrg: ${TMPDIR=/tmp} ;
111e9554658Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
112e9554658Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
113e9554658Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
114e9554658Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
115e9554658Smrgdummy=$tmp/dummy ;
116e9554658Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
117e9554658Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
118e9554658Smrg ,,)    echo "int x;" > $dummy.c ;
119e9554658Smrg	for c in cc gcc c89 c99 ; do
120e9554658Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
121e9554658Smrg	     CC_FOR_BUILD="$c"; break ;
122e9554658Smrg	  fi ;
123e9554658Smrg	done ;
124e9554658Smrg	if test x"$CC_FOR_BUILD" = x ; then
125e9554658Smrg	  CC_FOR_BUILD=no_compiler_found ;
126e9554658Smrg	fi
127e9554658Smrg	;;
128e9554658Smrg ,,*)   CC_FOR_BUILD=$CC ;;
129e9554658Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
130e9554658Smrgesac ; set_cc_for_build= ;'
131e9554658Smrg
132e9554658Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
133e9554658Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
134e9554658Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
135e9554658Smrg	PATH=$PATH:/.attbin ; export PATH
136e9554658Smrgfi
137e9554658Smrg
138e9554658SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
139e9554658SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
140e9554658SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
141e9554658SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142e9554658Smrg
143e9554658Smrg# Note: order is significant - the case branches are not exclusive.
144e9554658Smrg
145e9554658Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146e9554658Smrg    *:NetBSD:*:*)
147e9554658Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
148e9554658Smrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
149e9554658Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
150e9554658Smrg	# switched to ELF, *-*-netbsd* would select the old
151e9554658Smrg	# object file format.  This provides both forward
152e9554658Smrg	# compatibility and a consistent mechanism for selecting the
153e9554658Smrg	# object file format.
154e9554658Smrg	#
155e9554658Smrg	# Note: NetBSD doesn't particularly care about the vendor
156e9554658Smrg	# portion of the name.  We always set it to "unknown".
157e9554658Smrg	sysctl="sysctl -n hw.machine_arch"
158e9554658Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
159e9554658Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
160e9554658Smrg	case "${UNAME_MACHINE_ARCH}" in
161e9554658Smrg	    armeb) machine=armeb-unknown ;;
162e9554658Smrg	    arm*) machine=arm-unknown ;;
163e9554658Smrg	    sh3el) machine=shl-unknown ;;
164e9554658Smrg	    sh3eb) machine=sh-unknown ;;
165c2b339b4Smrg	    sh5el) machine=sh5le-unknown ;;
166e9554658Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
167e9554658Smrg	esac
168e9554658Smrg	# The Operating System including object format, if it has switched
169e9554658Smrg	# to ELF recently, or will in the future.
170e9554658Smrg	case "${UNAME_MACHINE_ARCH}" in
171e9554658Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
172e9554658Smrg		eval $set_cc_for_build
173e9554658Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
1748903d43aSmrg			| grep -q __ELF__
175e9554658Smrg		then
176e9554658Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
177e9554658Smrg		    # Return netbsd for either.  FIX?
178e9554658Smrg		    os=netbsd
179e9554658Smrg		else
180e9554658Smrg		    os=netbsdelf
181e9554658Smrg		fi
182e9554658Smrg		;;
183e9554658Smrg	    *)
184e9554658Smrg	        os=netbsd
185e9554658Smrg		;;
186e9554658Smrg	esac
187e9554658Smrg	# The OS release
188e9554658Smrg	# Debian GNU/NetBSD machines have a different userland, and
189e9554658Smrg	# thus, need a distinct triplet. However, they do not need
190e9554658Smrg	# kernel version information, so it can be replaced with a
191e9554658Smrg	# suitable tag, in the style of linux-gnu.
192e9554658Smrg	case "${UNAME_VERSION}" in
193e9554658Smrg	    Debian*)
194e9554658Smrg		release='-gnu'
195e9554658Smrg		;;
196e9554658Smrg	    *)
197e9554658Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
198e9554658Smrg		;;
199e9554658Smrg	esac
200e9554658Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
201e9554658Smrg	# contains redundant information, the shorter form:
202e9554658Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203e9554658Smrg	echo "${machine}-${os}${release}"
204e9554658Smrg	exit ;;
205e9554658Smrg    *:OpenBSD:*:*)
206e9554658Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
207e9554658Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
208e9554658Smrg	exit ;;
209e9554658Smrg    *:ekkoBSD:*:*)
210e9554658Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
211e9554658Smrg	exit ;;
212e9554658Smrg    *:SolidBSD:*:*)
213e9554658Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
214e9554658Smrg	exit ;;
215e9554658Smrg    macppc:MirBSD:*:*)
216e9554658Smrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
217e9554658Smrg	exit ;;
218e9554658Smrg    *:MirBSD:*:*)
219e9554658Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
220e9554658Smrg	exit ;;
221e9554658Smrg    alpha:OSF1:*:*)
222e9554658Smrg	case $UNAME_RELEASE in
223e9554658Smrg	*4.0)
224e9554658Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
225e9554658Smrg		;;
226e9554658Smrg	*5.*)
227e9554658Smrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
228e9554658Smrg		;;
229e9554658Smrg	esac
230e9554658Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
231e9554658Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
232e9554658Smrg	# covers most systems running today.  This code pipes the CPU
233e9554658Smrg	# types through head -n 1, so we only detect the type of CPU 0.
234e9554658Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
235e9554658Smrg	case "$ALPHA_CPU_TYPE" in
236e9554658Smrg	    "EV4 (21064)")
237e9554658Smrg		UNAME_MACHINE="alpha" ;;
238e9554658Smrg	    "EV4.5 (21064)")
239e9554658Smrg		UNAME_MACHINE="alpha" ;;
240e9554658Smrg	    "LCA4 (21066/21068)")
241e9554658Smrg		UNAME_MACHINE="alpha" ;;
242e9554658Smrg	    "EV5 (21164)")
243e9554658Smrg		UNAME_MACHINE="alphaev5" ;;
244e9554658Smrg	    "EV5.6 (21164A)")
245e9554658Smrg		UNAME_MACHINE="alphaev56" ;;
246e9554658Smrg	    "EV5.6 (21164PC)")
247e9554658Smrg		UNAME_MACHINE="alphapca56" ;;
248e9554658Smrg	    "EV5.7 (21164PC)")
249e9554658Smrg		UNAME_MACHINE="alphapca57" ;;
250e9554658Smrg	    "EV6 (21264)")
251e9554658Smrg		UNAME_MACHINE="alphaev6" ;;
252e9554658Smrg	    "EV6.7 (21264A)")
253e9554658Smrg		UNAME_MACHINE="alphaev67" ;;
254e9554658Smrg	    "EV6.8CB (21264C)")
255e9554658Smrg		UNAME_MACHINE="alphaev68" ;;
256e9554658Smrg	    "EV6.8AL (21264B)")
257e9554658Smrg		UNAME_MACHINE="alphaev68" ;;
258e9554658Smrg	    "EV6.8CX (21264D)")
259e9554658Smrg		UNAME_MACHINE="alphaev68" ;;
260e9554658Smrg	    "EV6.9A (21264/EV69A)")
261e9554658Smrg		UNAME_MACHINE="alphaev69" ;;
262e9554658Smrg	    "EV7 (21364)")
263e9554658Smrg		UNAME_MACHINE="alphaev7" ;;
264e9554658Smrg	    "EV7.9 (21364A)")
265e9554658Smrg		UNAME_MACHINE="alphaev79" ;;
266e9554658Smrg	esac
267e9554658Smrg	# A Pn.n version is a patched version.
268e9554658Smrg	# A Vn.n version is a released version.
269e9554658Smrg	# A Tn.n version is a released field test version.
270e9554658Smrg	# A Xn.n version is an unreleased experimental baselevel.
271e9554658Smrg	# 1.2 uses "1.2" for uname -r.
272e9554658Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273e9554658Smrg	exit ;;
274e9554658Smrg    Alpha\ *:Windows_NT*:*)
275e9554658Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
276e9554658Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
277e9554658Smrg	# of the specific Alpha model?
278e9554658Smrg	echo alpha-pc-interix
279e9554658Smrg	exit ;;
280e9554658Smrg    21064:Windows_NT:50:3)
281e9554658Smrg	echo alpha-dec-winnt3.5
282e9554658Smrg	exit ;;
283e9554658Smrg    Amiga*:UNIX_System_V:4.0:*)
284e9554658Smrg	echo m68k-unknown-sysv4
285e9554658Smrg	exit ;;
286e9554658Smrg    *:[Aa]miga[Oo][Ss]:*:*)
287e9554658Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
288e9554658Smrg	exit ;;
289e9554658Smrg    *:[Mm]orph[Oo][Ss]:*:*)
290e9554658Smrg	echo ${UNAME_MACHINE}-unknown-morphos
291e9554658Smrg	exit ;;
292e9554658Smrg    *:OS/390:*:*)
293e9554658Smrg	echo i370-ibm-openedition
294e9554658Smrg	exit ;;
295e9554658Smrg    *:z/VM:*:*)
296e9554658Smrg	echo s390-ibm-zvmoe
297e9554658Smrg	exit ;;
298e9554658Smrg    *:OS400:*:*)
299e9554658Smrg        echo powerpc-ibm-os400
300e9554658Smrg	exit ;;
301e9554658Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302e9554658Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
303e9554658Smrg	exit ;;
304e9554658Smrg    arm:riscos:*:*|arm:RISCOS:*:*)
305e9554658Smrg	echo arm-unknown-riscos
306e9554658Smrg	exit ;;
307e9554658Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
308e9554658Smrg	echo hppa1.1-hitachi-hiuxmpp
309e9554658Smrg	exit ;;
310e9554658Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
311e9554658Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
312e9554658Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
313e9554658Smrg		echo pyramid-pyramid-sysv3
314e9554658Smrg	else
315e9554658Smrg		echo pyramid-pyramid-bsd
316e9554658Smrg	fi
317e9554658Smrg	exit ;;
318e9554658Smrg    NILE*:*:*:dcosx)
319e9554658Smrg	echo pyramid-pyramid-svr4
320e9554658Smrg	exit ;;
321e9554658Smrg    DRS?6000:unix:4.0:6*)
322e9554658Smrg	echo sparc-icl-nx6
323e9554658Smrg	exit ;;
324e9554658Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
325e9554658Smrg	case `/usr/bin/uname -p` in
326e9554658Smrg	    sparc) echo sparc-icl-nx7; exit ;;
327e9554658Smrg	esac ;;
328c2b339b4Smrg    s390x:SunOS:*:*)
329c2b339b4Smrg	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330c2b339b4Smrg	exit ;;
331e9554658Smrg    sun4H:SunOS:5.*:*)
332e9554658Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
333e9554658Smrg	exit ;;
334e9554658Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
335e9554658Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336e9554658Smrg	exit ;;
3378903d43aSmrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
3388903d43aSmrg	echo i386-pc-auroraux${UNAME_RELEASE}
3398903d43aSmrg	exit ;;
340c2b339b4Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
341c2b339b4Smrg	eval $set_cc_for_build
342c2b339b4Smrg	SUN_ARCH="i386"
343c2b339b4Smrg	# If there is a compiler, see if it is configured for 64-bit objects.
344c2b339b4Smrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
345c2b339b4Smrg	# This test works for both compilers.
346c2b339b4Smrg	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
347c2b339b4Smrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
348c2b339b4Smrg		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
349c2b339b4Smrg		grep IS_64BIT_ARCH >/dev/null
350c2b339b4Smrg	    then
351c2b339b4Smrg		SUN_ARCH="x86_64"
352c2b339b4Smrg	    fi
353c2b339b4Smrg	fi
354c2b339b4Smrg	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
355e9554658Smrg	exit ;;
356e9554658Smrg    sun4*:SunOS:6*:*)
357e9554658Smrg	# According to config.sub, this is the proper way to canonicalize
358e9554658Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
359e9554658Smrg	# it's likely to be more like Solaris than SunOS4.
360e9554658Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
361e9554658Smrg	exit ;;
362e9554658Smrg    sun4*:SunOS:*:*)
363e9554658Smrg	case "`/usr/bin/arch -k`" in
364e9554658Smrg	    Series*|S4*)
365e9554658Smrg		UNAME_RELEASE=`uname -v`
366e9554658Smrg		;;
367e9554658Smrg	esac
368e9554658Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
369e9554658Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
370e9554658Smrg	exit ;;
371e9554658Smrg    sun3*:SunOS:*:*)
372e9554658Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
373e9554658Smrg	exit ;;
374e9554658Smrg    sun*:*:4.2BSD:*)
375e9554658Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
376e9554658Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
377e9554658Smrg	case "`/bin/arch`" in
378e9554658Smrg	    sun3)
379e9554658Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
380e9554658Smrg		;;
381e9554658Smrg	    sun4)
382e9554658Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
383e9554658Smrg		;;
384e9554658Smrg	esac
385e9554658Smrg	exit ;;
386e9554658Smrg    aushp:SunOS:*:*)
387e9554658Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
388e9554658Smrg	exit ;;
389e9554658Smrg    # The situation for MiNT is a little confusing.  The machine name
390e9554658Smrg    # can be virtually everything (everything which is not
391e9554658Smrg    # "atarist" or "atariste" at least should have a processor
392e9554658Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
393e9554658Smrg    # to the lowercase version "mint" (or "freemint").  Finally
394e9554658Smrg    # the system name "TOS" denotes a system which is actually not
395e9554658Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
396e9554658Smrg    # be no problem.
397e9554658Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398e9554658Smrg        echo m68k-atari-mint${UNAME_RELEASE}
399e9554658Smrg	exit ;;
400e9554658Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401e9554658Smrg	echo m68k-atari-mint${UNAME_RELEASE}
402e9554658Smrg        exit ;;
403e9554658Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404e9554658Smrg        echo m68k-atari-mint${UNAME_RELEASE}
405e9554658Smrg	exit ;;
406e9554658Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407e9554658Smrg        echo m68k-milan-mint${UNAME_RELEASE}
408e9554658Smrg        exit ;;
409e9554658Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410e9554658Smrg        echo m68k-hades-mint${UNAME_RELEASE}
411e9554658Smrg        exit ;;
412e9554658Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413e9554658Smrg        echo m68k-unknown-mint${UNAME_RELEASE}
414e9554658Smrg        exit ;;
415e9554658Smrg    m68k:machten:*:*)
416e9554658Smrg	echo m68k-apple-machten${UNAME_RELEASE}
417e9554658Smrg	exit ;;
418e9554658Smrg    powerpc:machten:*:*)
419e9554658Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
420e9554658Smrg	exit ;;
421e9554658Smrg    RISC*:Mach:*:*)
422e9554658Smrg	echo mips-dec-mach_bsd4.3
423e9554658Smrg	exit ;;
424e9554658Smrg    RISC*:ULTRIX:*:*)
425e9554658Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
426e9554658Smrg	exit ;;
427e9554658Smrg    VAX*:ULTRIX*:*:*)
428e9554658Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
429e9554658Smrg	exit ;;
430e9554658Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
431e9554658Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
432e9554658Smrg	exit ;;
433e9554658Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
434e9554658Smrg	eval $set_cc_for_build
435e9554658Smrg	sed 's/^	//' << EOF >$dummy.c
436e9554658Smrg#ifdef __cplusplus
437e9554658Smrg#include <stdio.h>  /* for printf() prototype */
438e9554658Smrg	int main (int argc, char *argv[]) {
439e9554658Smrg#else
440e9554658Smrg	int main (argc, argv) int argc; char *argv[]; {
441e9554658Smrg#endif
442e9554658Smrg	#if defined (host_mips) && defined (MIPSEB)
443e9554658Smrg	#if defined (SYSTYPE_SYSV)
444e9554658Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
445e9554658Smrg	#endif
446e9554658Smrg	#if defined (SYSTYPE_SVR4)
447e9554658Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
448e9554658Smrg	#endif
449e9554658Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
450e9554658Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
451e9554658Smrg	#endif
452e9554658Smrg	#endif
453e9554658Smrg	  exit (-1);
454e9554658Smrg	}
455e9554658SmrgEOF
456e9554658Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
457e9554658Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
458e9554658Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
459e9554658Smrg	    { echo "$SYSTEM_NAME"; exit; }
460e9554658Smrg	echo mips-mips-riscos${UNAME_RELEASE}
461e9554658Smrg	exit ;;
462e9554658Smrg    Motorola:PowerMAX_OS:*:*)
463e9554658Smrg	echo powerpc-motorola-powermax
464e9554658Smrg	exit ;;
465e9554658Smrg    Motorola:*:4.3:PL8-*)
466e9554658Smrg	echo powerpc-harris-powermax
467e9554658Smrg	exit ;;
468e9554658Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
469e9554658Smrg	echo powerpc-harris-powermax
470e9554658Smrg	exit ;;
471e9554658Smrg    Night_Hawk:Power_UNIX:*:*)
472e9554658Smrg	echo powerpc-harris-powerunix
473e9554658Smrg	exit ;;
474e9554658Smrg    m88k:CX/UX:7*:*)
475e9554658Smrg	echo m88k-harris-cxux7
476e9554658Smrg	exit ;;
477e9554658Smrg    m88k:*:4*:R4*)
478e9554658Smrg	echo m88k-motorola-sysv4
479e9554658Smrg	exit ;;
480e9554658Smrg    m88k:*:3*:R3*)
481e9554658Smrg	echo m88k-motorola-sysv3
482e9554658Smrg	exit ;;
483e9554658Smrg    AViiON:dgux:*:*)
484e9554658Smrg        # DG/UX returns AViiON for all architectures
485e9554658Smrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
486e9554658Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487e9554658Smrg	then
488e9554658Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
489e9554658Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
490e9554658Smrg	    then
491e9554658Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
492e9554658Smrg	    else
493e9554658Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
494e9554658Smrg	    fi
495e9554658Smrg	else
496e9554658Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
497e9554658Smrg	fi
498e9554658Smrg 	exit ;;
499e9554658Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
500e9554658Smrg	echo m88k-dolphin-sysv3
501e9554658Smrg	exit ;;
502e9554658Smrg    M88*:*:R3*:*)
503e9554658Smrg	# Delta 88k system running SVR3
504e9554658Smrg	echo m88k-motorola-sysv3
505e9554658Smrg	exit ;;
506e9554658Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
507e9554658Smrg	echo m88k-tektronix-sysv3
508e9554658Smrg	exit ;;
509e9554658Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
510e9554658Smrg	echo m68k-tektronix-bsd
511e9554658Smrg	exit ;;
512e9554658Smrg    *:IRIX*:*:*)
513e9554658Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
514e9554658Smrg	exit ;;
515e9554658Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
516e9554658Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
517e9554658Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
518e9554658Smrg    i*86:AIX:*:*)
519e9554658Smrg	echo i386-ibm-aix
520e9554658Smrg	exit ;;
521e9554658Smrg    ia64:AIX:*:*)
522e9554658Smrg	if [ -x /usr/bin/oslevel ] ; then
523e9554658Smrg		IBM_REV=`/usr/bin/oslevel`
524e9554658Smrg	else
525e9554658Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
526e9554658Smrg	fi
527e9554658Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
528e9554658Smrg	exit ;;
529e9554658Smrg    *:AIX:2:3)
530e9554658Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
531e9554658Smrg		eval $set_cc_for_build
532e9554658Smrg		sed 's/^		//' << EOF >$dummy.c
533e9554658Smrg		#include <sys/systemcfg.h>
534e9554658Smrg
535e9554658Smrg		main()
536e9554658Smrg			{
537e9554658Smrg			if (!__power_pc())
538e9554658Smrg				exit(1);
539e9554658Smrg			puts("powerpc-ibm-aix3.2.5");
540e9554658Smrg			exit(0);
541e9554658Smrg			}
542e9554658SmrgEOF
543e9554658Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
544e9554658Smrg		then
545e9554658Smrg			echo "$SYSTEM_NAME"
546e9554658Smrg		else
547e9554658Smrg			echo rs6000-ibm-aix3.2.5
548e9554658Smrg		fi
549e9554658Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
550e9554658Smrg		echo rs6000-ibm-aix3.2.4
551e9554658Smrg	else
552e9554658Smrg		echo rs6000-ibm-aix3.2
553e9554658Smrg	fi
554e9554658Smrg	exit ;;
5558903d43aSmrg    *:AIX:*:[4567])
556e9554658Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
557e9554658Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558e9554658Smrg		IBM_ARCH=rs6000
559e9554658Smrg	else
560e9554658Smrg		IBM_ARCH=powerpc
561e9554658Smrg	fi
562e9554658Smrg	if [ -x /usr/bin/oslevel ] ; then
563e9554658Smrg		IBM_REV=`/usr/bin/oslevel`
564e9554658Smrg	else
565e9554658Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
566e9554658Smrg	fi
567e9554658Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
568e9554658Smrg	exit ;;
569e9554658Smrg    *:AIX:*:*)
570e9554658Smrg	echo rs6000-ibm-aix
571e9554658Smrg	exit ;;
572e9554658Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
573e9554658Smrg	echo romp-ibm-bsd4.4
574e9554658Smrg	exit ;;
575e9554658Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
576e9554658Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
577e9554658Smrg	exit ;;                             # report: romp-ibm BSD 4.3
578e9554658Smrg    *:BOSX:*:*)
579e9554658Smrg	echo rs6000-bull-bosx
580e9554658Smrg	exit ;;
581e9554658Smrg    DPX/2?00:B.O.S.:*:*)
582e9554658Smrg	echo m68k-bull-sysv3
583e9554658Smrg	exit ;;
584e9554658Smrg    9000/[34]??:4.3bsd:1.*:*)
585e9554658Smrg	echo m68k-hp-bsd
586e9554658Smrg	exit ;;
587e9554658Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
588e9554658Smrg	echo m68k-hp-bsd4.4
589e9554658Smrg	exit ;;
590e9554658Smrg    9000/[34678]??:HP-UX:*:*)
591e9554658Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
592e9554658Smrg	case "${UNAME_MACHINE}" in
593e9554658Smrg	    9000/31? )            HP_ARCH=m68000 ;;
594e9554658Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
595e9554658Smrg	    9000/[678][0-9][0-9])
596e9554658Smrg		if [ -x /usr/bin/getconf ]; then
597e9554658Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
598e9554658Smrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599e9554658Smrg                    case "${sc_cpu_version}" in
600e9554658Smrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601e9554658Smrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602e9554658Smrg                      532)                      # CPU_PA_RISC2_0
603e9554658Smrg                        case "${sc_kernel_bits}" in
604e9554658Smrg                          32) HP_ARCH="hppa2.0n" ;;
605e9554658Smrg                          64) HP_ARCH="hppa2.0w" ;;
606e9554658Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
607e9554658Smrg                        esac ;;
608e9554658Smrg                    esac
609e9554658Smrg		fi
610e9554658Smrg		if [ "${HP_ARCH}" = "" ]; then
611e9554658Smrg		    eval $set_cc_for_build
612e9554658Smrg		    sed 's/^              //' << EOF >$dummy.c
613e9554658Smrg
614e9554658Smrg              #define _HPUX_SOURCE
615e9554658Smrg              #include <stdlib.h>
616e9554658Smrg              #include <unistd.h>
617e9554658Smrg
618e9554658Smrg              int main ()
619e9554658Smrg              {
620e9554658Smrg              #if defined(_SC_KERNEL_BITS)
621e9554658Smrg                  long bits = sysconf(_SC_KERNEL_BITS);
622e9554658Smrg              #endif
623e9554658Smrg                  long cpu  = sysconf (_SC_CPU_VERSION);
624e9554658Smrg
625e9554658Smrg                  switch (cpu)
626e9554658Smrg              	{
627e9554658Smrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628e9554658Smrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629e9554658Smrg              	case CPU_PA_RISC2_0:
630e9554658Smrg              #if defined(_SC_KERNEL_BITS)
631e9554658Smrg              	    switch (bits)
632e9554658Smrg              		{
633e9554658Smrg              		case 64: puts ("hppa2.0w"); break;
634e9554658Smrg              		case 32: puts ("hppa2.0n"); break;
635e9554658Smrg              		default: puts ("hppa2.0"); break;
636e9554658Smrg              		} break;
637e9554658Smrg              #else  /* !defined(_SC_KERNEL_BITS) */
638e9554658Smrg              	    puts ("hppa2.0"); break;
639e9554658Smrg              #endif
640e9554658Smrg              	default: puts ("hppa1.0"); break;
641e9554658Smrg              	}
642e9554658Smrg                  exit (0);
643e9554658Smrg              }
644e9554658SmrgEOF
645e9554658Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646e9554658Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
647e9554658Smrg		fi ;;
648e9554658Smrg	esac
649e9554658Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
650e9554658Smrg	then
651e9554658Smrg	    eval $set_cc_for_build
652e9554658Smrg
653e9554658Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
654e9554658Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
655e9554658Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
656e9554658Smrg	    #
657e9554658Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
658e9554658Smrg	    # => hppa2.0w-hp-hpux11.23
659e9554658Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
660e9554658Smrg	    # => hppa64-hp-hpux11.23
661e9554658Smrg
662e9554658Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
6638903d43aSmrg		grep -q __LP64__
664e9554658Smrg	    then
665e9554658Smrg		HP_ARCH="hppa2.0w"
666e9554658Smrg	    else
667e9554658Smrg		HP_ARCH="hppa64"
668e9554658Smrg	    fi
669e9554658Smrg	fi
670e9554658Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
671e9554658Smrg	exit ;;
672e9554658Smrg    ia64:HP-UX:*:*)
673e9554658Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
674e9554658Smrg	echo ia64-hp-hpux${HPUX_REV}
675e9554658Smrg	exit ;;
676e9554658Smrg    3050*:HI-UX:*:*)
677e9554658Smrg	eval $set_cc_for_build
678e9554658Smrg	sed 's/^	//' << EOF >$dummy.c
679e9554658Smrg	#include <unistd.h>
680e9554658Smrg	int
681e9554658Smrg	main ()
682e9554658Smrg	{
683e9554658Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
684e9554658Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
685e9554658Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
686e9554658Smrg	     results, however.  */
687e9554658Smrg	  if (CPU_IS_PA_RISC (cpu))
688e9554658Smrg	    {
689e9554658Smrg	      switch (cpu)
690e9554658Smrg		{
691e9554658Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
692e9554658Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
693e9554658Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
694e9554658Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
695e9554658Smrg		}
696e9554658Smrg	    }
697e9554658Smrg	  else if (CPU_IS_HP_MC68K (cpu))
698e9554658Smrg	    puts ("m68k-hitachi-hiuxwe2");
699e9554658Smrg	  else puts ("unknown-hitachi-hiuxwe2");
700e9554658Smrg	  exit (0);
701e9554658Smrg	}
702e9554658SmrgEOF
703e9554658Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
704e9554658Smrg		{ echo "$SYSTEM_NAME"; exit; }
705e9554658Smrg	echo unknown-hitachi-hiuxwe2
706e9554658Smrg	exit ;;
707e9554658Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
708e9554658Smrg	echo hppa1.1-hp-bsd
709e9554658Smrg	exit ;;
710e9554658Smrg    9000/8??:4.3bsd:*:*)
711e9554658Smrg	echo hppa1.0-hp-bsd
712e9554658Smrg	exit ;;
713e9554658Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
714e9554658Smrg	echo hppa1.0-hp-mpeix
715e9554658Smrg	exit ;;
716e9554658Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
717e9554658Smrg	echo hppa1.1-hp-osf
718e9554658Smrg	exit ;;
719e9554658Smrg    hp8??:OSF1:*:*)
720e9554658Smrg	echo hppa1.0-hp-osf
721e9554658Smrg	exit ;;
722e9554658Smrg    i*86:OSF1:*:*)
723e9554658Smrg	if [ -x /usr/sbin/sysversion ] ; then
724e9554658Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
725e9554658Smrg	else
726e9554658Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
727e9554658Smrg	fi
728e9554658Smrg	exit ;;
729e9554658Smrg    parisc*:Lites*:*:*)
730e9554658Smrg	echo hppa1.1-hp-lites
731e9554658Smrg	exit ;;
732e9554658Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733e9554658Smrg	echo c1-convex-bsd
734e9554658Smrg        exit ;;
735e9554658Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736e9554658Smrg	if getsysinfo -f scalar_acc
737e9554658Smrg	then echo c32-convex-bsd
738e9554658Smrg	else echo c2-convex-bsd
739e9554658Smrg	fi
740e9554658Smrg        exit ;;
741e9554658Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742e9554658Smrg	echo c34-convex-bsd
743e9554658Smrg        exit ;;
744e9554658Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745e9554658Smrg	echo c38-convex-bsd
746e9554658Smrg        exit ;;
747e9554658Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748e9554658Smrg	echo c4-convex-bsd
749e9554658Smrg        exit ;;
750e9554658Smrg    CRAY*Y-MP:*:*:*)
751e9554658Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752e9554658Smrg	exit ;;
753e9554658Smrg    CRAY*[A-Z]90:*:*:*)
754e9554658Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
755e9554658Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
756e9554658Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
757e9554658Smrg	      -e 's/\.[^.]*$/.X/'
758e9554658Smrg	exit ;;
759e9554658Smrg    CRAY*TS:*:*:*)
760e9554658Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
761e9554658Smrg	exit ;;
762e9554658Smrg    CRAY*T3E:*:*:*)
763e9554658Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
764e9554658Smrg	exit ;;
765e9554658Smrg    CRAY*SV1:*:*:*)
766e9554658Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
767e9554658Smrg	exit ;;
768e9554658Smrg    *:UNICOS/mp:*:*)
769e9554658Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
770e9554658Smrg	exit ;;
771e9554658Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772e9554658Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773e9554658Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774e9554658Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775e9554658Smrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776e9554658Smrg        exit ;;
777e9554658Smrg    5000:UNIX_System_V:4.*:*)
778e9554658Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779e9554658Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780e9554658Smrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781e9554658Smrg	exit ;;
782e9554658Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783e9554658Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
784e9554658Smrg	exit ;;
785e9554658Smrg    sparc*:BSD/OS:*:*)
786e9554658Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
787e9554658Smrg	exit ;;
788e9554658Smrg    *:BSD/OS:*:*)
789e9554658Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
790e9554658Smrg	exit ;;
791e9554658Smrg    *:FreeBSD:*:*)
792e9554658Smrg	case ${UNAME_MACHINE} in
793e9554658Smrg	    pc98)
794e9554658Smrg		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795e9554658Smrg	    amd64)
796e9554658Smrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797e9554658Smrg	    *)
798e9554658Smrg		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799e9554658Smrg	esac
800e9554658Smrg	exit ;;
801e9554658Smrg    i*:CYGWIN*:*)
802e9554658Smrg	echo ${UNAME_MACHINE}-pc-cygwin
803e9554658Smrg	exit ;;
804c2b339b4Smrg    *:MINGW*:*)
805e9554658Smrg	echo ${UNAME_MACHINE}-pc-mingw32
806e9554658Smrg	exit ;;
807e9554658Smrg    i*:windows32*:*)
808e9554658Smrg    	# uname -m includes "-pc" on this system.
809e9554658Smrg    	echo ${UNAME_MACHINE}-mingw32
810e9554658Smrg	exit ;;
811e9554658Smrg    i*:PW*:*)
812e9554658Smrg	echo ${UNAME_MACHINE}-pc-pw32
813e9554658Smrg	exit ;;
8148903d43aSmrg    *:Interix*:*)
815c2b339b4Smrg    	case ${UNAME_MACHINE} in
816c2b339b4Smrg	    x86)
817c2b339b4Smrg		echo i586-pc-interix${UNAME_RELEASE}
818c2b339b4Smrg		exit ;;
8198903d43aSmrg	    authenticamd | genuineintel | EM64T)
820c2b339b4Smrg		echo x86_64-unknown-interix${UNAME_RELEASE}
821c2b339b4Smrg		exit ;;
822c2b339b4Smrg	    IA64)
823c2b339b4Smrg		echo ia64-unknown-interix${UNAME_RELEASE}
824c2b339b4Smrg		exit ;;
825c2b339b4Smrg	esac ;;
826e9554658Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
827e9554658Smrg	echo i${UNAME_MACHINE}-pc-mks
828e9554658Smrg	exit ;;
8298903d43aSmrg    8664:Windows_NT:*)
8308903d43aSmrg	echo x86_64-pc-mks
8318903d43aSmrg	exit ;;
832e9554658Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
833e9554658Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
834e9554658Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
835e9554658Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
836e9554658Smrg	echo i586-pc-interix
837e9554658Smrg	exit ;;
838e9554658Smrg    i*:UWIN*:*)
839e9554658Smrg	echo ${UNAME_MACHINE}-pc-uwin
840e9554658Smrg	exit ;;
841e9554658Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
842e9554658Smrg	echo x86_64-unknown-cygwin
843e9554658Smrg	exit ;;
844e9554658Smrg    p*:CYGWIN*:*)
845e9554658Smrg	echo powerpcle-unknown-cygwin
846e9554658Smrg	exit ;;
847e9554658Smrg    prep*:SunOS:5.*:*)
848e9554658Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
849e9554658Smrg	exit ;;
850e9554658Smrg    *:GNU:*:*)
851e9554658Smrg	# the GNU system
852e9554658Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
853e9554658Smrg	exit ;;
854e9554658Smrg    *:GNU/*:*:*)
855e9554658Smrg	# other systems with GNU libc and userland
856e9554658Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
857e9554658Smrg	exit ;;
858e9554658Smrg    i*86:Minix:*:*)
859e9554658Smrg	echo ${UNAME_MACHINE}-pc-minix
860e9554658Smrg	exit ;;
8618903d43aSmrg    alpha:Linux:*:*)
8628903d43aSmrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
8638903d43aSmrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
8648903d43aSmrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
8658903d43aSmrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
8668903d43aSmrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
8678903d43aSmrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
8688903d43aSmrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
8698903d43aSmrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
8708903d43aSmrg        esac
8718903d43aSmrg	objdump --private-headers /bin/sh | grep -q ld.so.1
8728903d43aSmrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
8738903d43aSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
8748903d43aSmrg	exit ;;
875e9554658Smrg    arm*:Linux:*:*)
876c2b339b4Smrg	eval $set_cc_for_build
877c2b339b4Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
878c2b339b4Smrg	    | grep -q __ARM_EABI__
879c2b339b4Smrg	then
880c2b339b4Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnu
881c2b339b4Smrg	else
882c2b339b4Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
883c2b339b4Smrg	fi
884e9554658Smrg	exit ;;
885e9554658Smrg    avr32*:Linux:*:*)
886e9554658Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
887e9554658Smrg	exit ;;
888e9554658Smrg    cris:Linux:*:*)
889e9554658Smrg	echo cris-axis-linux-gnu
890e9554658Smrg	exit ;;
891e9554658Smrg    crisv32:Linux:*:*)
892e9554658Smrg	echo crisv32-axis-linux-gnu
893e9554658Smrg	exit ;;
894e9554658Smrg    frv:Linux:*:*)
895e9554658Smrg    	echo frv-unknown-linux-gnu
896e9554658Smrg	exit ;;
8978903d43aSmrg    i*86:Linux:*:*)
8988903d43aSmrg	LIBC=gnu
8998903d43aSmrg	eval $set_cc_for_build
9008903d43aSmrg	sed 's/^	//' << EOF >$dummy.c
9018903d43aSmrg	#ifdef __dietlibc__
9028903d43aSmrg	LIBC=dietlibc
9038903d43aSmrg	#endif
9048903d43aSmrgEOF
9058903d43aSmrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
9068903d43aSmrg	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
9078903d43aSmrg	exit ;;
908e9554658Smrg    ia64:Linux:*:*)
909e9554658Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
910e9554658Smrg	exit ;;
911e9554658Smrg    m32r*:Linux:*:*)
912e9554658Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
913e9554658Smrg	exit ;;
914e9554658Smrg    m68*:Linux:*:*)
915e9554658Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
916e9554658Smrg	exit ;;
9178903d43aSmrg    mips:Linux:*:* | mips64:Linux:*:*)
918e9554658Smrg	eval $set_cc_for_build
919e9554658Smrg	sed 's/^	//' << EOF >$dummy.c
920e9554658Smrg	#undef CPU
9218903d43aSmrg	#undef ${UNAME_MACHINE}
9228903d43aSmrg	#undef ${UNAME_MACHINE}el
923e9554658Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
9248903d43aSmrg	CPU=${UNAME_MACHINE}el
925e9554658Smrg	#else
926e9554658Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
9278903d43aSmrg	CPU=${UNAME_MACHINE}
928e9554658Smrg	#else
929e9554658Smrg	CPU=
930e9554658Smrg	#endif
931e9554658Smrg	#endif
932e9554658SmrgEOF
9338903d43aSmrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
934e9554658Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
935e9554658Smrg	;;
936e9554658Smrg    or32:Linux:*:*)
937e9554658Smrg	echo or32-unknown-linux-gnu
938e9554658Smrg	exit ;;
939c2b339b4Smrg    padre:Linux:*:*)
940c2b339b4Smrg	echo sparc-unknown-linux-gnu
941c2b339b4Smrg	exit ;;
9428903d43aSmrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
9438903d43aSmrg	echo hppa64-unknown-linux-gnu
9448903d43aSmrg	exit ;;
945e9554658Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
946e9554658Smrg	# Look for CPU level
947e9554658Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
948e9554658Smrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
949e9554658Smrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
950e9554658Smrg	  *)    echo hppa-unknown-linux-gnu ;;
951e9554658Smrg	esac
952e9554658Smrg	exit ;;
9538903d43aSmrg    ppc64:Linux:*:*)
9548903d43aSmrg	echo powerpc64-unknown-linux-gnu
9558903d43aSmrg	exit ;;
9568903d43aSmrg    ppc:Linux:*:*)
9578903d43aSmrg	echo powerpc-unknown-linux-gnu
958e9554658Smrg	exit ;;
959e9554658Smrg    s390:Linux:*:* | s390x:Linux:*:*)
960e9554658Smrg	echo ${UNAME_MACHINE}-ibm-linux
961e9554658Smrg	exit ;;
962e9554658Smrg    sh64*:Linux:*:*)
963e9554658Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
964e9554658Smrg	exit ;;
965e9554658Smrg    sh*:Linux:*:*)
966e9554658Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
967e9554658Smrg	exit ;;
968e9554658Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
969e9554658Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
970e9554658Smrg	exit ;;
9718903d43aSmrg    tile*:Linux:*:*)
9728903d43aSmrg	echo ${UNAME_MACHINE}-tilera-linux-gnu
9738903d43aSmrg	exit ;;
974e9554658Smrg    vax:Linux:*:*)
975e9554658Smrg	echo ${UNAME_MACHINE}-dec-linux-gnu
976e9554658Smrg	exit ;;
977e9554658Smrg    x86_64:Linux:*:*)
978e9554658Smrg	echo x86_64-unknown-linux-gnu
979e9554658Smrg	exit ;;
980c2b339b4Smrg    xtensa*:Linux:*:*)
981c2b339b4Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
982c2b339b4Smrg	exit ;;
983e9554658Smrg    i*86:DYNIX/ptx:4*:*)
984e9554658Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
985e9554658Smrg	# earlier versions are messed up and put the nodename in both
986e9554658Smrg	# sysname and nodename.
987e9554658Smrg	echo i386-sequent-sysv4
988e9554658Smrg	exit ;;
989e9554658Smrg    i*86:UNIX_SV:4.2MP:2.*)
990e9554658Smrg        # Unixware is an offshoot of SVR4, but it has its own version
991e9554658Smrg        # number series starting with 2...
992e9554658Smrg        # I am not positive that other SVR4 systems won't match this,
993e9554658Smrg	# I just have to hope.  -- rms.
994e9554658Smrg        # Use sysv4.2uw... so that sysv4* matches it.
995e9554658Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
996e9554658Smrg	exit ;;
997e9554658Smrg    i*86:OS/2:*:*)
998e9554658Smrg	# If we were able to find `uname', then EMX Unix compatibility
999e9554658Smrg	# is probably installed.
1000e9554658Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
1001e9554658Smrg	exit ;;
1002e9554658Smrg    i*86:XTS-300:*:STOP)
1003e9554658Smrg	echo ${UNAME_MACHINE}-unknown-stop
1004e9554658Smrg	exit ;;
1005e9554658Smrg    i*86:atheos:*:*)
1006e9554658Smrg	echo ${UNAME_MACHINE}-unknown-atheos
1007e9554658Smrg	exit ;;
1008e9554658Smrg    i*86:syllable:*:*)
1009e9554658Smrg	echo ${UNAME_MACHINE}-pc-syllable
1010e9554658Smrg	exit ;;
10118903d43aSmrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1012e9554658Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
1013e9554658Smrg	exit ;;
1014e9554658Smrg    i*86:*DOS:*:*)
1015e9554658Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
1016e9554658Smrg	exit ;;
1017e9554658Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1018e9554658Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1019e9554658Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1020e9554658Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1021e9554658Smrg	else
1022e9554658Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1023e9554658Smrg	fi
1024e9554658Smrg	exit ;;
1025e9554658Smrg    i*86:*:5:[678]*)
1026e9554658Smrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1027e9554658Smrg	case `/bin/uname -X | grep "^Machine"` in
1028e9554658Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
1029e9554658Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
1030e9554658Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1031e9554658Smrg	esac
1032e9554658Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1033e9554658Smrg	exit ;;
1034e9554658Smrg    i*86:*:3.2:*)
1035e9554658Smrg	if test -f /usr/options/cb.name; then
1036e9554658Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1037e9554658Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1038e9554658Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1039e9554658Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1040e9554658Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1041e9554658Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1042e9554658Smrg			&& UNAME_MACHINE=i586
1043e9554658Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1044e9554658Smrg			&& UNAME_MACHINE=i686
1045e9554658Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1046e9554658Smrg			&& UNAME_MACHINE=i686
1047e9554658Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1048e9554658Smrg	else
1049e9554658Smrg		echo ${UNAME_MACHINE}-pc-sysv32
1050e9554658Smrg	fi
1051e9554658Smrg	exit ;;
1052e9554658Smrg    pc:*:*:*)
1053e9554658Smrg	# Left here for compatibility:
1054e9554658Smrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1055c2b339b4Smrg        # the processor, so we play safe by assuming i586.
1056c2b339b4Smrg	# Note: whatever this is, it MUST be the same as what config.sub
1057c2b339b4Smrg	# prints for the "djgpp" host, or else GDB configury will decide that
1058c2b339b4Smrg	# this is a cross-build.
1059c2b339b4Smrg	echo i586-pc-msdosdjgpp
1060e9554658Smrg        exit ;;
1061e9554658Smrg    Intel:Mach:3*:*)
1062e9554658Smrg	echo i386-pc-mach3
1063e9554658Smrg	exit ;;
1064e9554658Smrg    paragon:*:*:*)
1065e9554658Smrg	echo i860-intel-osf1
1066e9554658Smrg	exit ;;
1067e9554658Smrg    i860:*:4.*:*) # i860-SVR4
1068e9554658Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1069e9554658Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1070e9554658Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
1071e9554658Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1072e9554658Smrg	fi
1073e9554658Smrg	exit ;;
1074e9554658Smrg    mini*:CTIX:SYS*5:*)
1075e9554658Smrg	# "miniframe"
1076e9554658Smrg	echo m68010-convergent-sysv
1077e9554658Smrg	exit ;;
1078e9554658Smrg    mc68k:UNIX:SYSTEM5:3.51m)
1079e9554658Smrg	echo m68k-convergent-sysv
1080e9554658Smrg	exit ;;
1081e9554658Smrg    M680?0:D-NIX:5.3:*)
1082e9554658Smrg	echo m68k-diab-dnix
1083e9554658Smrg	exit ;;
1084e9554658Smrg    M68*:*:R3V[5678]*:*)
1085e9554658Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1086e9554658Smrg    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)
1087e9554658Smrg	OS_REL=''
1088e9554658Smrg	test -r /etc/.relid \
1089e9554658Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1090e9554658Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1091e9554658Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1092e9554658Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1093e9554658Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1094e9554658Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1095e9554658Smrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1096e9554658Smrg          && { echo i486-ncr-sysv4; exit; } ;;
1097c2b339b4Smrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1098c2b339b4Smrg	OS_REL='.3'
1099c2b339b4Smrg	test -r /etc/.relid \
1100c2b339b4Smrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1101c2b339b4Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1102c2b339b4Smrg	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1103c2b339b4Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1104c2b339b4Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1105c2b339b4Smrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1106c2b339b4Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1107e9554658Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1108e9554658Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
1109e9554658Smrg	exit ;;
1110e9554658Smrg    mc68030:UNIX_System_V:4.*:*)
1111e9554658Smrg	echo m68k-atari-sysv4
1112e9554658Smrg	exit ;;
1113e9554658Smrg    TSUNAMI:LynxOS:2.*:*)
1114e9554658Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
1115e9554658Smrg	exit ;;
1116e9554658Smrg    rs6000:LynxOS:2.*:*)
1117e9554658Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
1118e9554658Smrg	exit ;;
11198903d43aSmrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1120e9554658Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
1121e9554658Smrg	exit ;;
1122e9554658Smrg    SM[BE]S:UNIX_SV:*:*)
1123e9554658Smrg	echo mips-dde-sysv${UNAME_RELEASE}
1124e9554658Smrg	exit ;;
1125e9554658Smrg    RM*:ReliantUNIX-*:*:*)
1126e9554658Smrg	echo mips-sni-sysv4
1127e9554658Smrg	exit ;;
1128e9554658Smrg    RM*:SINIX-*:*:*)
1129e9554658Smrg	echo mips-sni-sysv4
1130e9554658Smrg	exit ;;
1131e9554658Smrg    *:SINIX-*:*:*)
1132e9554658Smrg	if uname -p 2>/dev/null >/dev/null ; then
1133e9554658Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1134e9554658Smrg		echo ${UNAME_MACHINE}-sni-sysv4
1135e9554658Smrg	else
1136e9554658Smrg		echo ns32k-sni-sysv
1137e9554658Smrg	fi
1138e9554658Smrg	exit ;;
1139e9554658Smrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1140e9554658Smrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1141e9554658Smrg        echo i586-unisys-sysv4
1142e9554658Smrg        exit ;;
1143e9554658Smrg    *:UNIX_System_V:4*:FTX*)
1144e9554658Smrg	# From Gerald Hewes <hewes@openmarket.com>.
1145e9554658Smrg	# How about differentiating between stratus architectures? -djm
1146e9554658Smrg	echo hppa1.1-stratus-sysv4
1147e9554658Smrg	exit ;;
1148e9554658Smrg    *:*:*:FTX*)
1149e9554658Smrg	# From seanf@swdc.stratus.com.
1150e9554658Smrg	echo i860-stratus-sysv4
1151e9554658Smrg	exit ;;
1152e9554658Smrg    i*86:VOS:*:*)
1153e9554658Smrg	# From Paul.Green@stratus.com.
1154e9554658Smrg	echo ${UNAME_MACHINE}-stratus-vos
1155e9554658Smrg	exit ;;
1156e9554658Smrg    *:VOS:*:*)
1157e9554658Smrg	# From Paul.Green@stratus.com.
1158e9554658Smrg	echo hppa1.1-stratus-vos
1159e9554658Smrg	exit ;;
1160e9554658Smrg    mc68*:A/UX:*:*)
1161e9554658Smrg	echo m68k-apple-aux${UNAME_RELEASE}
1162e9554658Smrg	exit ;;
1163e9554658Smrg    news*:NEWS-OS:6*:*)
1164e9554658Smrg	echo mips-sony-newsos6
1165e9554658Smrg	exit ;;
1166e9554658Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1167e9554658Smrg	if [ -d /usr/nec ]; then
1168e9554658Smrg	        echo mips-nec-sysv${UNAME_RELEASE}
1169e9554658Smrg	else
1170e9554658Smrg	        echo mips-unknown-sysv${UNAME_RELEASE}
1171e9554658Smrg	fi
1172e9554658Smrg        exit ;;
1173e9554658Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1174e9554658Smrg	echo powerpc-be-beos
1175e9554658Smrg	exit ;;
1176e9554658Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
1177e9554658Smrg	echo powerpc-apple-beos
1178e9554658Smrg	exit ;;
1179e9554658Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1180e9554658Smrg	echo i586-pc-beos
1181e9554658Smrg	exit ;;
1182c2b339b4Smrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
1183c2b339b4Smrg	echo i586-pc-haiku
1184c2b339b4Smrg	exit ;;
1185e9554658Smrg    SX-4:SUPER-UX:*:*)
1186e9554658Smrg	echo sx4-nec-superux${UNAME_RELEASE}
1187e9554658Smrg	exit ;;
1188e9554658Smrg    SX-5:SUPER-UX:*:*)
1189e9554658Smrg	echo sx5-nec-superux${UNAME_RELEASE}
1190e9554658Smrg	exit ;;
1191e9554658Smrg    SX-6:SUPER-UX:*:*)
1192e9554658Smrg	echo sx6-nec-superux${UNAME_RELEASE}
1193e9554658Smrg	exit ;;
1194c2b339b4Smrg    SX-7:SUPER-UX:*:*)
1195c2b339b4Smrg	echo sx7-nec-superux${UNAME_RELEASE}
1196c2b339b4Smrg	exit ;;
1197c2b339b4Smrg    SX-8:SUPER-UX:*:*)
1198c2b339b4Smrg	echo sx8-nec-superux${UNAME_RELEASE}
1199c2b339b4Smrg	exit ;;
1200c2b339b4Smrg    SX-8R:SUPER-UX:*:*)
1201c2b339b4Smrg	echo sx8r-nec-superux${UNAME_RELEASE}
1202c2b339b4Smrg	exit ;;
1203e9554658Smrg    Power*:Rhapsody:*:*)
1204e9554658Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
1205e9554658Smrg	exit ;;
1206e9554658Smrg    *:Rhapsody:*:*)
1207e9554658Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1208e9554658Smrg	exit ;;
1209e9554658Smrg    *:Darwin:*:*)
1210e9554658Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1211e9554658Smrg	case $UNAME_PROCESSOR in
12128903d43aSmrg	    i386)
12138903d43aSmrg		eval $set_cc_for_build
12148903d43aSmrg		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
12158903d43aSmrg		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
12168903d43aSmrg		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
12178903d43aSmrg		      grep IS_64BIT_ARCH >/dev/null
12188903d43aSmrg		  then
12198903d43aSmrg		      UNAME_PROCESSOR="x86_64"
12208903d43aSmrg		  fi
12218903d43aSmrg		fi ;;
1222e9554658Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
1223e9554658Smrg	esac
1224e9554658Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1225e9554658Smrg	exit ;;
1226e9554658Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1227e9554658Smrg	UNAME_PROCESSOR=`uname -p`
1228e9554658Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
1229e9554658Smrg		UNAME_PROCESSOR=i386
1230e9554658Smrg		UNAME_MACHINE=pc
1231e9554658Smrg	fi
1232e9554658Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1233e9554658Smrg	exit ;;
1234e9554658Smrg    *:QNX:*:4*)
1235e9554658Smrg	echo i386-pc-qnx
1236e9554658Smrg	exit ;;
1237e9554658Smrg    NSE-?:NONSTOP_KERNEL:*:*)
1238e9554658Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
1239e9554658Smrg	exit ;;
1240e9554658Smrg    NSR-?:NONSTOP_KERNEL:*:*)
1241e9554658Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
1242e9554658Smrg	exit ;;
1243e9554658Smrg    *:NonStop-UX:*:*)
1244e9554658Smrg	echo mips-compaq-nonstopux
1245e9554658Smrg	exit ;;
1246e9554658Smrg    BS2000:POSIX*:*:*)
1247e9554658Smrg	echo bs2000-siemens-sysv
1248e9554658Smrg	exit ;;
1249e9554658Smrg    DS/*:UNIX_System_V:*:*)
1250e9554658Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1251e9554658Smrg	exit ;;
1252e9554658Smrg    *:Plan9:*:*)
1253e9554658Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
1254e9554658Smrg	# is converted to i386 for consistency with other x86
1255e9554658Smrg	# operating systems.
1256e9554658Smrg	if test "$cputype" = "386"; then
1257e9554658Smrg	    UNAME_MACHINE=i386
1258e9554658Smrg	else
1259e9554658Smrg	    UNAME_MACHINE="$cputype"
1260e9554658Smrg	fi
1261e9554658Smrg	echo ${UNAME_MACHINE}-unknown-plan9
1262e9554658Smrg	exit ;;
1263e9554658Smrg    *:TOPS-10:*:*)
1264e9554658Smrg	echo pdp10-unknown-tops10
1265e9554658Smrg	exit ;;
1266e9554658Smrg    *:TENEX:*:*)
1267e9554658Smrg	echo pdp10-unknown-tenex
1268e9554658Smrg	exit ;;
1269e9554658Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1270e9554658Smrg	echo pdp10-dec-tops20
1271e9554658Smrg	exit ;;
1272e9554658Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1273e9554658Smrg	echo pdp10-xkl-tops20
1274e9554658Smrg	exit ;;
1275e9554658Smrg    *:TOPS-20:*:*)
1276e9554658Smrg	echo pdp10-unknown-tops20
1277e9554658Smrg	exit ;;
1278e9554658Smrg    *:ITS:*:*)
1279e9554658Smrg	echo pdp10-unknown-its
1280e9554658Smrg	exit ;;
1281e9554658Smrg    SEI:*:*:SEIUX)
1282e9554658Smrg        echo mips-sei-seiux${UNAME_RELEASE}
1283e9554658Smrg	exit ;;
1284e9554658Smrg    *:DragonFly:*:*)
1285e9554658Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1286e9554658Smrg	exit ;;
1287e9554658Smrg    *:*VMS:*:*)
1288e9554658Smrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1289e9554658Smrg	case "${UNAME_MACHINE}" in
1290e9554658Smrg	    A*) echo alpha-dec-vms ; exit ;;
1291e9554658Smrg	    I*) echo ia64-dec-vms ; exit ;;
1292e9554658Smrg	    V*) echo vax-dec-vms ; exit ;;
1293e9554658Smrg	esac ;;
1294e9554658Smrg    *:XENIX:*:SysV)
1295e9554658Smrg	echo i386-pc-xenix
1296e9554658Smrg	exit ;;
1297e9554658Smrg    i*86:skyos:*:*)
1298e9554658Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1299e9554658Smrg	exit ;;
1300e9554658Smrg    i*86:rdos:*:*)
1301e9554658Smrg	echo ${UNAME_MACHINE}-pc-rdos
1302e9554658Smrg	exit ;;
1303c2b339b4Smrg    i*86:AROS:*:*)
1304c2b339b4Smrg	echo ${UNAME_MACHINE}-pc-aros
1305c2b339b4Smrg	exit ;;
1306e9554658Smrgesac
1307e9554658Smrg
1308e9554658Smrg#echo '(No uname command or uname output not recognized.)' 1>&2
1309e9554658Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1310e9554658Smrg
1311e9554658Smrgeval $set_cc_for_build
1312e9554658Smrgcat >$dummy.c <<EOF
1313e9554658Smrg#ifdef _SEQUENT_
1314e9554658Smrg# include <sys/types.h>
1315e9554658Smrg# include <sys/utsname.h>
1316e9554658Smrg#endif
1317e9554658Smrgmain ()
1318e9554658Smrg{
1319e9554658Smrg#if defined (sony)
1320e9554658Smrg#if defined (MIPSEB)
1321e9554658Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1322e9554658Smrg     I don't know....  */
1323e9554658Smrg  printf ("mips-sony-bsd\n"); exit (0);
1324e9554658Smrg#else
1325e9554658Smrg#include <sys/param.h>
1326e9554658Smrg  printf ("m68k-sony-newsos%s\n",
1327e9554658Smrg#ifdef NEWSOS4
1328e9554658Smrg          "4"
1329e9554658Smrg#else
1330e9554658Smrg	  ""
1331e9554658Smrg#endif
1332e9554658Smrg         ); exit (0);
1333e9554658Smrg#endif
1334e9554658Smrg#endif
1335e9554658Smrg
1336e9554658Smrg#if defined (__arm) && defined (__acorn) && defined (__unix)
1337e9554658Smrg  printf ("arm-acorn-riscix\n"); exit (0);
1338e9554658Smrg#endif
1339e9554658Smrg
1340e9554658Smrg#if defined (hp300) && !defined (hpux)
1341e9554658Smrg  printf ("m68k-hp-bsd\n"); exit (0);
1342e9554658Smrg#endif
1343e9554658Smrg
1344e9554658Smrg#if defined (NeXT)
1345e9554658Smrg#if !defined (__ARCHITECTURE__)
1346e9554658Smrg#define __ARCHITECTURE__ "m68k"
1347e9554658Smrg#endif
1348e9554658Smrg  int version;
1349e9554658Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1350e9554658Smrg  if (version < 4)
1351e9554658Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1352e9554658Smrg  else
1353e9554658Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1354e9554658Smrg  exit (0);
1355e9554658Smrg#endif
1356e9554658Smrg
1357e9554658Smrg#if defined (MULTIMAX) || defined (n16)
1358e9554658Smrg#if defined (UMAXV)
1359e9554658Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
1360e9554658Smrg#else
1361e9554658Smrg#if defined (CMU)
1362e9554658Smrg  printf ("ns32k-encore-mach\n"); exit (0);
1363e9554658Smrg#else
1364e9554658Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
1365e9554658Smrg#endif
1366e9554658Smrg#endif
1367e9554658Smrg#endif
1368e9554658Smrg
1369e9554658Smrg#if defined (__386BSD__)
1370e9554658Smrg  printf ("i386-pc-bsd\n"); exit (0);
1371e9554658Smrg#endif
1372e9554658Smrg
1373e9554658Smrg#if defined (sequent)
1374e9554658Smrg#if defined (i386)
1375e9554658Smrg  printf ("i386-sequent-dynix\n"); exit (0);
1376e9554658Smrg#endif
1377e9554658Smrg#if defined (ns32000)
1378e9554658Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
1379e9554658Smrg#endif
1380e9554658Smrg#endif
1381e9554658Smrg
1382e9554658Smrg#if defined (_SEQUENT_)
1383e9554658Smrg    struct utsname un;
1384e9554658Smrg
1385e9554658Smrg    uname(&un);
1386e9554658Smrg
1387e9554658Smrg    if (strncmp(un.version, "V2", 2) == 0) {
1388e9554658Smrg	printf ("i386-sequent-ptx2\n"); exit (0);
1389e9554658Smrg    }
1390e9554658Smrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1391e9554658Smrg	printf ("i386-sequent-ptx1\n"); exit (0);
1392e9554658Smrg    }
1393e9554658Smrg    printf ("i386-sequent-ptx\n"); exit (0);
1394e9554658Smrg
1395e9554658Smrg#endif
1396e9554658Smrg
1397e9554658Smrg#if defined (vax)
1398e9554658Smrg# if !defined (ultrix)
1399e9554658Smrg#  include <sys/param.h>
1400e9554658Smrg#  if defined (BSD)
1401e9554658Smrg#   if BSD == 43
1402e9554658Smrg      printf ("vax-dec-bsd4.3\n"); exit (0);
1403e9554658Smrg#   else
1404e9554658Smrg#    if BSD == 199006
1405e9554658Smrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1406e9554658Smrg#    else
1407e9554658Smrg      printf ("vax-dec-bsd\n"); exit (0);
1408e9554658Smrg#    endif
1409e9554658Smrg#   endif
1410e9554658Smrg#  else
1411e9554658Smrg    printf ("vax-dec-bsd\n"); exit (0);
1412e9554658Smrg#  endif
1413e9554658Smrg# else
1414e9554658Smrg    printf ("vax-dec-ultrix\n"); exit (0);
1415e9554658Smrg# endif
1416e9554658Smrg#endif
1417e9554658Smrg
1418e9554658Smrg#if defined (alliant) && defined (i860)
1419e9554658Smrg  printf ("i860-alliant-bsd\n"); exit (0);
1420e9554658Smrg#endif
1421e9554658Smrg
1422e9554658Smrg  exit (1);
1423e9554658Smrg}
1424e9554658SmrgEOF
1425e9554658Smrg
1426e9554658Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1427e9554658Smrg	{ echo "$SYSTEM_NAME"; exit; }
1428e9554658Smrg
1429e9554658Smrg# Apollos put the system type in the environment.
1430e9554658Smrg
1431e9554658Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1432e9554658Smrg
1433e9554658Smrg# Convex versions that predate uname can use getsysinfo(1)
1434e9554658Smrg
1435e9554658Smrgif [ -x /usr/convex/getsysinfo ]
1436e9554658Smrgthen
1437e9554658Smrg    case `getsysinfo -f cpu_type` in
1438e9554658Smrg    c1*)
1439e9554658Smrg	echo c1-convex-bsd
1440e9554658Smrg	exit ;;
1441e9554658Smrg    c2*)
1442e9554658Smrg	if getsysinfo -f scalar_acc
1443e9554658Smrg	then echo c32-convex-bsd
1444e9554658Smrg	else echo c2-convex-bsd
1445e9554658Smrg	fi
1446e9554658Smrg	exit ;;
1447e9554658Smrg    c34*)
1448e9554658Smrg	echo c34-convex-bsd
1449e9554658Smrg	exit ;;
1450e9554658Smrg    c38*)
1451e9554658Smrg	echo c38-convex-bsd
1452e9554658Smrg	exit ;;
1453e9554658Smrg    c4*)
1454e9554658Smrg	echo c4-convex-bsd
1455e9554658Smrg	exit ;;
1456e9554658Smrg    esac
1457e9554658Smrgfi
1458e9554658Smrg
1459e9554658Smrgcat >&2 <<EOF
1460e9554658Smrg$0: unable to guess system type
1461e9554658Smrg
1462e9554658SmrgThis script, last modified $timestamp, has failed to recognize
1463e9554658Smrgthe operating system you are using. It is advised that you
1464e9554658Smrgdownload the most up to date version of the config scripts from
1465e9554658Smrg
1466c2b339b4Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1467e9554658Smrgand
1468c2b339b4Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1469e9554658Smrg
1470e9554658SmrgIf the version you run ($0) is already up to date, please
1471e9554658Smrgsend the following data and any information you think might be
1472e9554658Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
1473e9554658Smrginformation to handle your system.
1474e9554658Smrg
1475e9554658Smrgconfig.guess timestamp = $timestamp
1476e9554658Smrg
1477e9554658Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
1478e9554658Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
1479e9554658Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
1480e9554658Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
1481e9554658Smrg
1482e9554658Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1483e9554658Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
1484e9554658Smrg
1485e9554658Smrghostinfo               = `(hostinfo) 2>/dev/null`
1486e9554658Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
1487e9554658Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
1488e9554658Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
1489e9554658Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1490e9554658Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1491e9554658Smrg
1492e9554658SmrgUNAME_MACHINE = ${UNAME_MACHINE}
1493e9554658SmrgUNAME_RELEASE = ${UNAME_RELEASE}
1494e9554658SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
1495e9554658SmrgUNAME_VERSION = ${UNAME_VERSION}
1496e9554658SmrgEOF
1497e9554658Smrg
1498e9554658Smrgexit 1
1499e9554658Smrg
1500e9554658Smrg# Local variables:
1501e9554658Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
1502e9554658Smrg# time-stamp-start: "timestamp='"
1503e9554658Smrg# time-stamp-format: "%:y-%02m-%02d"
1504e9554658Smrg# time-stamp-end: "'"
1505e9554658Smrg# End:
1506