1267843Sdelphij#! /bin/sh
2267843Sdelphij# Attempt to guess a canonical system name.
3267843Sdelphij#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4267843Sdelphij#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5267843Sdelphij#   2011, 2012 Free Software Foundation, Inc.
6267843Sdelphij
7267843Sdelphijtimestamp='2012-02-10'
8267843Sdelphij
9267843Sdelphij# This file is free software; you can redistribute it and/or modify it
10267843Sdelphij# under the terms of the GNU General Public License as published by
11267843Sdelphij# the Free Software Foundation; either version 2 of the License, or
12267843Sdelphij# (at your option) any later version.
13267843Sdelphij#
14267843Sdelphij# This program is distributed in the hope that it will be useful, but
15267843Sdelphij# WITHOUT ANY WARRANTY; without even the implied warranty of
16267843Sdelphij# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17267843Sdelphij# General Public License for more details.
18267843Sdelphij#
19267843Sdelphij# You should have received a copy of the GNU General Public License
20267843Sdelphij# along with this program; if not, see <http://www.gnu.org/licenses/>.
21267843Sdelphij#
22267843Sdelphij# As a special exception to the GNU General Public License, if you
23267843Sdelphij# distribute this file as part of a program that contains a
24267843Sdelphij# configuration script generated by Autoconf, you may include it under
25267843Sdelphij# the same distribution terms that you use for the rest of that program.
26267843Sdelphij
27267843Sdelphij
28267843Sdelphij# Originally written by Per Bothner.  Please send patches (context
29267843Sdelphij# diff format) to <config-patches@gnu.org> and include a ChangeLog
30267843Sdelphij# entry.
31267843Sdelphij#
32267843Sdelphij# This script attempts to guess a canonical system name similar to
33267843Sdelphij# config.sub.  If it succeeds, it prints the system name on stdout, and
34267843Sdelphij# exits with 0.  Otherwise, it exits with 1.
35267843Sdelphij#
36267843Sdelphij# You can get the latest version of this script from:
37267843Sdelphij# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
38267843Sdelphij
39267843Sdelphijme=`echo "$0" | sed -e 's,.*/,,'`
40267843Sdelphij
41267843Sdelphijusage="\
42267843SdelphijUsage: $0 [OPTION]
43267843Sdelphij
44267843SdelphijOutput the configuration name of the system \`$me' is run on.
45267843Sdelphij
46267843SdelphijOperation modes:
47267843Sdelphij  -h, --help         print this help, then exit
48267843Sdelphij  -t, --time-stamp   print date of last modification, then exit
49267843Sdelphij  -v, --version      print version number, then exit
50267843Sdelphij
51267843SdelphijReport bugs and patches to <config-patches@gnu.org>."
52267843Sdelphij
53267843Sdelphijversion="\
54267843SdelphijGNU config.guess ($timestamp)
55267843Sdelphij
56267843SdelphijOriginally written by Per Bothner.
57267843SdelphijCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
58267843Sdelphij2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
59267843SdelphijFree Software Foundation, Inc.
60267843Sdelphij
61267843SdelphijThis is free software; see the source for copying conditions.  There is NO
62267843Sdelphijwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
63267843Sdelphij
64267843Sdelphijhelp="
65267843SdelphijTry \`$me --help' for more information."
66267843Sdelphij
67267843Sdelphij# Parse command line
68267843Sdelphijwhile test $# -gt 0 ; do
69267843Sdelphij  case $1 in
70267843Sdelphij    --time-stamp | --time* | -t )
71267843Sdelphij       echo "$timestamp" ; exit ;;
72267843Sdelphij    --version | -v )
73267843Sdelphij       echo "$version" ; exit ;;
74267843Sdelphij    --help | --h* | -h )
75267843Sdelphij       echo "$usage"; exit ;;
76267843Sdelphij    -- )     # Stop option processing
77267843Sdelphij       shift; break ;;
78267843Sdelphij    - )	# Use stdin as input.
79267843Sdelphij       break ;;
80267843Sdelphij    -* )
81267843Sdelphij       echo "$me: invalid option $1$help" >&2
82267843Sdelphij       exit 1 ;;
83267843Sdelphij    * )
84267843Sdelphij       break ;;
85267843Sdelphij  esac
86267843Sdelphijdone
87267843Sdelphij
88267843Sdelphijif test $# != 0; then
89267843Sdelphij  echo "$me: too many arguments$help" >&2
90267843Sdelphij  exit 1
91267843Sdelphijfi
92267843Sdelphij
93267843Sdelphijtrap 'exit 1' 1 2 15
94267843Sdelphij
95267843Sdelphij# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
96267843Sdelphij# compiler to aid in system detection is discouraged as it requires
97267843Sdelphij# temporary files to be created and, as you can see below, it is a
98267843Sdelphij# headache to deal with in a portable fashion.
99267843Sdelphij
100267843Sdelphij# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
101267843Sdelphij# use `HOST_CC' if defined, but it is deprecated.
102267843Sdelphij
103267843Sdelphij# Portable tmp directory creation inspired by the Autoconf team.
104267843Sdelphij
105267843Sdelphijset_cc_for_build='
106267843Sdelphijtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107267843Sdelphijtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108267843Sdelphij: ${TMPDIR=/tmp} ;
109267843Sdelphij { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110267843Sdelphij { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111267843Sdelphij { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112267843Sdelphij { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
113267843Sdelphijdummy=$tmp/dummy ;
114267843Sdelphijtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
115267843Sdelphijcase $CC_FOR_BUILD,$HOST_CC,$CC in
116267843Sdelphij ,,)    echo "int x;" > $dummy.c ;
117267843Sdelphij	for c in cc gcc c89 c99 ; do
118267843Sdelphij	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
119267843Sdelphij	     CC_FOR_BUILD="$c"; break ;
120267843Sdelphij	  fi ;
121267843Sdelphij	done ;
122267843Sdelphij	if test x"$CC_FOR_BUILD" = x ; then
123267843Sdelphij	  CC_FOR_BUILD=no_compiler_found ;
124267843Sdelphij	fi
125267843Sdelphij	;;
126267843Sdelphij ,,*)   CC_FOR_BUILD=$CC ;;
127267843Sdelphij ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
128267843Sdelphijesac ; set_cc_for_build= ;'
129267843Sdelphij
130267843Sdelphij# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
131267843Sdelphij# (ghazi@noc.rutgers.edu 1994-08-24)
132267843Sdelphijif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
133267843Sdelphij	PATH=$PATH:/.attbin ; export PATH
134267843Sdelphijfi
135267843Sdelphij
136267843SdelphijUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
137267843SdelphijUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138267843SdelphijUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
139267843SdelphijUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140267843Sdelphij
141267843Sdelphij# Note: order is significant - the case branches are not exclusive.
142267843Sdelphij
143267843Sdelphijcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
144267843Sdelphij    *:NetBSD:*:*)
145267843Sdelphij	# NetBSD (nbsd) targets should (where applicable) match one or
146267843Sdelphij	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
147267843Sdelphij	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
148267843Sdelphij	# switched to ELF, *-*-netbsd* would select the old
149267843Sdelphij	# object file format.  This provides both forward
150267843Sdelphij	# compatibility and a consistent mechanism for selecting the
151267843Sdelphij	# object file format.
152267843Sdelphij	#
153267843Sdelphij	# Note: NetBSD doesn't particularly care about the vendor
154267843Sdelphij	# portion of the name.  We always set it to "unknown".
155267843Sdelphij	sysctl="sysctl -n hw.machine_arch"
156267843Sdelphij	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
157267843Sdelphij	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
158267843Sdelphij	case "${UNAME_MACHINE_ARCH}" in
159267843Sdelphij	    armeb) machine=armeb-unknown ;;
160267843Sdelphij	    arm*) machine=arm-unknown ;;
161267843Sdelphij	    sh3el) machine=shl-unknown ;;
162267843Sdelphij	    sh3eb) machine=sh-unknown ;;
163267843Sdelphij	    sh5el) machine=sh5le-unknown ;;
164267843Sdelphij	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
165267843Sdelphij	esac
166267843Sdelphij	# The Operating System including object format, if it has switched
167267843Sdelphij	# to ELF recently, or will in the future.
168267843Sdelphij	case "${UNAME_MACHINE_ARCH}" in
169267843Sdelphij	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
170267843Sdelphij		eval $set_cc_for_build
171267843Sdelphij		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
172267843Sdelphij			| grep -q __ELF__
173267843Sdelphij		then
174267843Sdelphij		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
175267843Sdelphij		    # Return netbsd for either.  FIX?
176267843Sdelphij		    os=netbsd
177267843Sdelphij		else
178267843Sdelphij		    os=netbsdelf
179267843Sdelphij		fi
180267843Sdelphij		;;
181267843Sdelphij	    *)
182267843Sdelphij		os=netbsd
183267843Sdelphij		;;
184267843Sdelphij	esac
185267843Sdelphij	# The OS release
186267843Sdelphij	# Debian GNU/NetBSD machines have a different userland, and
187267843Sdelphij	# thus, need a distinct triplet. However, they do not need
188267843Sdelphij	# kernel version information, so it can be replaced with a
189267843Sdelphij	# suitable tag, in the style of linux-gnu.
190267843Sdelphij	case "${UNAME_VERSION}" in
191267843Sdelphij	    Debian*)
192267843Sdelphij		release='-gnu'
193267843Sdelphij		;;
194267843Sdelphij	    *)
195267843Sdelphij		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
196267843Sdelphij		;;
197267843Sdelphij	esac
198267843Sdelphij	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
199267843Sdelphij	# contains redundant information, the shorter form:
200267843Sdelphij	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201267843Sdelphij	echo "${machine}-${os}${release}"
202267843Sdelphij	exit ;;
203267843Sdelphij    *:OpenBSD:*:*)
204267843Sdelphij	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205267843Sdelphij	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
206267843Sdelphij	exit ;;
207267843Sdelphij    *:ekkoBSD:*:*)
208267843Sdelphij	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
209267843Sdelphij	exit ;;
210267843Sdelphij    *:SolidBSD:*:*)
211267843Sdelphij	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
212267843Sdelphij	exit ;;
213267843Sdelphij    macppc:MirBSD:*:*)
214267843Sdelphij	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
215267843Sdelphij	exit ;;
216267843Sdelphij    *:MirBSD:*:*)
217267843Sdelphij	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
218267843Sdelphij	exit ;;
219267843Sdelphij    alpha:OSF1:*:*)
220267843Sdelphij	case $UNAME_RELEASE in
221267843Sdelphij	*4.0)
222267843Sdelphij		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
223267843Sdelphij		;;
224267843Sdelphij	*5.*)
225267843Sdelphij		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
226267843Sdelphij		;;
227267843Sdelphij	esac
228267843Sdelphij	# According to Compaq, /usr/sbin/psrinfo has been available on
229267843Sdelphij	# OSF/1 and Tru64 systems produced since 1995.  I hope that
230267843Sdelphij	# covers most systems running today.  This code pipes the CPU
231267843Sdelphij	# types through head -n 1, so we only detect the type of CPU 0.
232267843Sdelphij	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
233267843Sdelphij	case "$ALPHA_CPU_TYPE" in
234267843Sdelphij	    "EV4 (21064)")
235267843Sdelphij		UNAME_MACHINE="alpha" ;;
236267843Sdelphij	    "EV4.5 (21064)")
237267843Sdelphij		UNAME_MACHINE="alpha" ;;
238267843Sdelphij	    "LCA4 (21066/21068)")
239267843Sdelphij		UNAME_MACHINE="alpha" ;;
240267843Sdelphij	    "EV5 (21164)")
241267843Sdelphij		UNAME_MACHINE="alphaev5" ;;
242267843Sdelphij	    "EV5.6 (21164A)")
243267843Sdelphij		UNAME_MACHINE="alphaev56" ;;
244267843Sdelphij	    "EV5.6 (21164PC)")
245267843Sdelphij		UNAME_MACHINE="alphapca56" ;;
246267843Sdelphij	    "EV5.7 (21164PC)")
247267843Sdelphij		UNAME_MACHINE="alphapca57" ;;
248267843Sdelphij	    "EV6 (21264)")
249267843Sdelphij		UNAME_MACHINE="alphaev6" ;;
250267843Sdelphij	    "EV6.7 (21264A)")
251267843Sdelphij		UNAME_MACHINE="alphaev67" ;;
252267843Sdelphij	    "EV6.8CB (21264C)")
253267843Sdelphij		UNAME_MACHINE="alphaev68" ;;
254267843Sdelphij	    "EV6.8AL (21264B)")
255267843Sdelphij		UNAME_MACHINE="alphaev68" ;;
256267843Sdelphij	    "EV6.8CX (21264D)")
257267843Sdelphij		UNAME_MACHINE="alphaev68" ;;
258267843Sdelphij	    "EV6.9A (21264/EV69A)")
259267843Sdelphij		UNAME_MACHINE="alphaev69" ;;
260267843Sdelphij	    "EV7 (21364)")
261267843Sdelphij		UNAME_MACHINE="alphaev7" ;;
262267843Sdelphij	    "EV7.9 (21364A)")
263267843Sdelphij		UNAME_MACHINE="alphaev79" ;;
264267843Sdelphij	esac
265267843Sdelphij	# A Pn.n version is a patched version.
266267843Sdelphij	# A Vn.n version is a released version.
267267843Sdelphij	# A Tn.n version is a released field test version.
268267843Sdelphij	# A Xn.n version is an unreleased experimental baselevel.
269267843Sdelphij	# 1.2 uses "1.2" for uname -r.
270267843Sdelphij	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
271267843Sdelphij	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
272267843Sdelphij	exitcode=$?
273267843Sdelphij	trap '' 0
274267843Sdelphij	exit $exitcode ;;
275267843Sdelphij    Alpha\ *:Windows_NT*:*)
276267843Sdelphij	# How do we know it's Interix rather than the generic POSIX subsystem?
277267843Sdelphij	# Should we change UNAME_MACHINE based on the output of uname instead
278267843Sdelphij	# of the specific Alpha model?
279267843Sdelphij	echo alpha-pc-interix
280267843Sdelphij	exit ;;
281267843Sdelphij    21064:Windows_NT:50:3)
282267843Sdelphij	echo alpha-dec-winnt3.5
283267843Sdelphij	exit ;;
284267843Sdelphij    Amiga*:UNIX_System_V:4.0:*)
285267843Sdelphij	echo m68k-unknown-sysv4
286267843Sdelphij	exit ;;
287267843Sdelphij    *:[Aa]miga[Oo][Ss]:*:*)
288267843Sdelphij	echo ${UNAME_MACHINE}-unknown-amigaos
289267843Sdelphij	exit ;;
290267843Sdelphij    *:[Mm]orph[Oo][Ss]:*:*)
291267843Sdelphij	echo ${UNAME_MACHINE}-unknown-morphos
292267843Sdelphij	exit ;;
293267843Sdelphij    *:OS/390:*:*)
294267843Sdelphij	echo i370-ibm-openedition
295267843Sdelphij	exit ;;
296267843Sdelphij    *:z/VM:*:*)
297267843Sdelphij	echo s390-ibm-zvmoe
298267843Sdelphij	exit ;;
299267843Sdelphij    *:OS400:*:*)
300267843Sdelphij	echo powerpc-ibm-os400
301267843Sdelphij	exit ;;
302267843Sdelphij    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
303267843Sdelphij	echo arm-acorn-riscix${UNAME_RELEASE}
304267843Sdelphij	exit ;;
305267843Sdelphij    arm:riscos:*:*|arm:RISCOS:*:*)
306267843Sdelphij	echo arm-unknown-riscos
307267843Sdelphij	exit ;;
308267843Sdelphij    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
309267843Sdelphij	echo hppa1.1-hitachi-hiuxmpp
310267843Sdelphij	exit ;;
311267843Sdelphij    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
312267843Sdelphij	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
313267843Sdelphij	if test "`(/bin/universe) 2>/dev/null`" = att ; then
314267843Sdelphij		echo pyramid-pyramid-sysv3
315267843Sdelphij	else
316267843Sdelphij		echo pyramid-pyramid-bsd
317267843Sdelphij	fi
318267843Sdelphij	exit ;;
319267843Sdelphij    NILE*:*:*:dcosx)
320267843Sdelphij	echo pyramid-pyramid-svr4
321267843Sdelphij	exit ;;
322267843Sdelphij    DRS?6000:unix:4.0:6*)
323267843Sdelphij	echo sparc-icl-nx6
324267843Sdelphij	exit ;;
325267843Sdelphij    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
326267843Sdelphij	case `/usr/bin/uname -p` in
327267843Sdelphij	    sparc) echo sparc-icl-nx7; exit ;;
328267843Sdelphij	esac ;;
329267843Sdelphij    s390x:SunOS:*:*)
330267843Sdelphij	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
331267843Sdelphij	exit ;;
332267843Sdelphij    sun4H:SunOS:5.*:*)
333267843Sdelphij	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334267843Sdelphij	exit ;;
335267843Sdelphij    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
336267843Sdelphij	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
337267843Sdelphij	exit ;;
338267843Sdelphij    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
339267843Sdelphij	echo i386-pc-auroraux${UNAME_RELEASE}
340267843Sdelphij	exit ;;
341267843Sdelphij    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
342267843Sdelphij	eval $set_cc_for_build
343267843Sdelphij	SUN_ARCH="i386"
344267843Sdelphij	# If there is a compiler, see if it is configured for 64-bit objects.
345267843Sdelphij	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
346267843Sdelphij	# This test works for both compilers.
347267843Sdelphij	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
348267843Sdelphij	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
349267843Sdelphij		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
350267843Sdelphij		grep IS_64BIT_ARCH >/dev/null
351267843Sdelphij	    then
352267843Sdelphij		SUN_ARCH="x86_64"
353267843Sdelphij	    fi
354267843Sdelphij	fi
355267843Sdelphij	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
356267843Sdelphij	exit ;;
357267843Sdelphij    sun4*:SunOS:6*:*)
358267843Sdelphij	# According to config.sub, this is the proper way to canonicalize
359267843Sdelphij	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
360267843Sdelphij	# it's likely to be more like Solaris than SunOS4.
361267843Sdelphij	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
362267843Sdelphij	exit ;;
363267843Sdelphij    sun4*:SunOS:*:*)
364267843Sdelphij	case "`/usr/bin/arch -k`" in
365267843Sdelphij	    Series*|S4*)
366267843Sdelphij		UNAME_RELEASE=`uname -v`
367267843Sdelphij		;;
368267843Sdelphij	esac
369267843Sdelphij	# Japanese Language versions have a version number like `4.1.3-JL'.
370267843Sdelphij	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
371267843Sdelphij	exit ;;
372267843Sdelphij    sun3*:SunOS:*:*)
373267843Sdelphij	echo m68k-sun-sunos${UNAME_RELEASE}
374267843Sdelphij	exit ;;
375267843Sdelphij    sun*:*:4.2BSD:*)
376267843Sdelphij	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
377267843Sdelphij	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
378267843Sdelphij	case "`/bin/arch`" in
379267843Sdelphij	    sun3)
380267843Sdelphij		echo m68k-sun-sunos${UNAME_RELEASE}
381267843Sdelphij		;;
382267843Sdelphij	    sun4)
383267843Sdelphij		echo sparc-sun-sunos${UNAME_RELEASE}
384267843Sdelphij		;;
385267843Sdelphij	esac
386267843Sdelphij	exit ;;
387267843Sdelphij    aushp:SunOS:*:*)
388267843Sdelphij	echo sparc-auspex-sunos${UNAME_RELEASE}
389267843Sdelphij	exit ;;
390267843Sdelphij    # The situation for MiNT is a little confusing.  The machine name
391267843Sdelphij    # can be virtually everything (everything which is not
392267843Sdelphij    # "atarist" or "atariste" at least should have a processor
393267843Sdelphij    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
394267843Sdelphij    # to the lowercase version "mint" (or "freemint").  Finally
395267843Sdelphij    # the system name "TOS" denotes a system which is actually not
396267843Sdelphij    # MiNT.  But MiNT is downward compatible to TOS, so this should
397267843Sdelphij    # be no problem.
398267843Sdelphij    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
399267843Sdelphij	echo m68k-atari-mint${UNAME_RELEASE}
400267843Sdelphij	exit ;;
401267843Sdelphij    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
402267843Sdelphij	echo m68k-atari-mint${UNAME_RELEASE}
403267843Sdelphij	exit ;;
404267843Sdelphij    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
405267843Sdelphij	echo m68k-atari-mint${UNAME_RELEASE}
406267843Sdelphij	exit ;;
407267843Sdelphij    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
408267843Sdelphij	echo m68k-milan-mint${UNAME_RELEASE}
409267843Sdelphij	exit ;;
410267843Sdelphij    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
411267843Sdelphij	echo m68k-hades-mint${UNAME_RELEASE}
412267843Sdelphij	exit ;;
413267843Sdelphij    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
414267843Sdelphij	echo m68k-unknown-mint${UNAME_RELEASE}
415267843Sdelphij	exit ;;
416267843Sdelphij    m68k:machten:*:*)
417267843Sdelphij	echo m68k-apple-machten${UNAME_RELEASE}
418267843Sdelphij	exit ;;
419267843Sdelphij    powerpc:machten:*:*)
420267843Sdelphij	echo powerpc-apple-machten${UNAME_RELEASE}
421267843Sdelphij	exit ;;
422267843Sdelphij    RISC*:Mach:*:*)
423267843Sdelphij	echo mips-dec-mach_bsd4.3
424267843Sdelphij	exit ;;
425267843Sdelphij    RISC*:ULTRIX:*:*)
426267843Sdelphij	echo mips-dec-ultrix${UNAME_RELEASE}
427267843Sdelphij	exit ;;
428267843Sdelphij    VAX*:ULTRIX*:*:*)
429267843Sdelphij	echo vax-dec-ultrix${UNAME_RELEASE}
430267843Sdelphij	exit ;;
431267843Sdelphij    2020:CLIX:*:* | 2430:CLIX:*:*)
432267843Sdelphij	echo clipper-intergraph-clix${UNAME_RELEASE}
433267843Sdelphij	exit ;;
434267843Sdelphij    mips:*:*:UMIPS | mips:*:*:RISCos)
435267843Sdelphij	eval $set_cc_for_build
436267843Sdelphij	sed 's/^	//' << EOF >$dummy.c
437267843Sdelphij#ifdef __cplusplus
438267843Sdelphij#include <stdio.h>  /* for printf() prototype */
439267843Sdelphij	int main (int argc, char *argv[]) {
440267843Sdelphij#else
441267843Sdelphij	int main (argc, argv) int argc; char *argv[]; {
442267843Sdelphij#endif
443267843Sdelphij	#if defined (host_mips) && defined (MIPSEB)
444267843Sdelphij	#if defined (SYSTYPE_SYSV)
445267843Sdelphij	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
446267843Sdelphij	#endif
447267843Sdelphij	#if defined (SYSTYPE_SVR4)
448267843Sdelphij	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
449267843Sdelphij	#endif
450267843Sdelphij	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
451267843Sdelphij	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
452267843Sdelphij	#endif
453267843Sdelphij	#endif
454267843Sdelphij	  exit (-1);
455267843Sdelphij	}
456267843SdelphijEOF
457267843Sdelphij	$CC_FOR_BUILD -o $dummy $dummy.c &&
458267843Sdelphij	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
459267843Sdelphij	  SYSTEM_NAME=`$dummy $dummyarg` &&
460267843Sdelphij	    { echo "$SYSTEM_NAME"; exit; }
461267843Sdelphij	echo mips-mips-riscos${UNAME_RELEASE}
462267843Sdelphij	exit ;;
463267843Sdelphij    Motorola:PowerMAX_OS:*:*)
464267843Sdelphij	echo powerpc-motorola-powermax
465267843Sdelphij	exit ;;
466267843Sdelphij    Motorola:*:4.3:PL8-*)
467267843Sdelphij	echo powerpc-harris-powermax
468267843Sdelphij	exit ;;
469267843Sdelphij    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
470267843Sdelphij	echo powerpc-harris-powermax
471267843Sdelphij	exit ;;
472267843Sdelphij    Night_Hawk:Power_UNIX:*:*)
473267843Sdelphij	echo powerpc-harris-powerunix
474267843Sdelphij	exit ;;
475267843Sdelphij    m88k:CX/UX:7*:*)
476267843Sdelphij	echo m88k-harris-cxux7
477267843Sdelphij	exit ;;
478267843Sdelphij    m88k:*:4*:R4*)
479267843Sdelphij	echo m88k-motorola-sysv4
480267843Sdelphij	exit ;;
481267843Sdelphij    m88k:*:3*:R3*)
482267843Sdelphij	echo m88k-motorola-sysv3
483267843Sdelphij	exit ;;
484267843Sdelphij    AViiON:dgux:*:*)
485267843Sdelphij	# DG/UX returns AViiON for all architectures
486267843Sdelphij	UNAME_PROCESSOR=`/usr/bin/uname -p`
487267843Sdelphij	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
488267843Sdelphij	then
489267843Sdelphij	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
490267843Sdelphij	       [ ${TARGET_BINARY_INTERFACE}x = x ]
491267843Sdelphij	    then
492267843Sdelphij		echo m88k-dg-dgux${UNAME_RELEASE}
493267843Sdelphij	    else
494267843Sdelphij		echo m88k-dg-dguxbcs${UNAME_RELEASE}
495267843Sdelphij	    fi
496267843Sdelphij	else
497267843Sdelphij	    echo i586-dg-dgux${UNAME_RELEASE}
498267843Sdelphij	fi
499267843Sdelphij	exit ;;
500267843Sdelphij    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
501267843Sdelphij	echo m88k-dolphin-sysv3
502267843Sdelphij	exit ;;
503267843Sdelphij    M88*:*:R3*:*)
504267843Sdelphij	# Delta 88k system running SVR3
505267843Sdelphij	echo m88k-motorola-sysv3
506267843Sdelphij	exit ;;
507267843Sdelphij    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
508267843Sdelphij	echo m88k-tektronix-sysv3
509267843Sdelphij	exit ;;
510267843Sdelphij    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
511267843Sdelphij	echo m68k-tektronix-bsd
512267843Sdelphij	exit ;;
513267843Sdelphij    *:IRIX*:*:*)
514267843Sdelphij	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
515267843Sdelphij	exit ;;
516267843Sdelphij    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
517267843Sdelphij	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
518267843Sdelphij	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
519267843Sdelphij    i*86:AIX:*:*)
520267843Sdelphij	echo i386-ibm-aix
521267843Sdelphij	exit ;;
522267843Sdelphij    ia64:AIX:*:*)
523267843Sdelphij	if [ -x /usr/bin/oslevel ] ; then
524267843Sdelphij		IBM_REV=`/usr/bin/oslevel`
525267843Sdelphij	else
526267843Sdelphij		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
527267843Sdelphij	fi
528267843Sdelphij	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
529267843Sdelphij	exit ;;
530267843Sdelphij    *:AIX:2:3)
531267843Sdelphij	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
532267843Sdelphij		eval $set_cc_for_build
533267843Sdelphij		sed 's/^		//' << EOF >$dummy.c
534267843Sdelphij		#include <sys/systemcfg.h>
535267843Sdelphij
536267843Sdelphij		main()
537267843Sdelphij			{
538267843Sdelphij			if (!__power_pc())
539267843Sdelphij				exit(1);
540267843Sdelphij			puts("powerpc-ibm-aix3.2.5");
541267843Sdelphij			exit(0);
542267843Sdelphij			}
543267843SdelphijEOF
544267843Sdelphij		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
545267843Sdelphij		then
546267843Sdelphij			echo "$SYSTEM_NAME"
547267843Sdelphij		else
548267843Sdelphij			echo rs6000-ibm-aix3.2.5
549267843Sdelphij		fi
550267843Sdelphij	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
551267843Sdelphij		echo rs6000-ibm-aix3.2.4
552267843Sdelphij	else
553267843Sdelphij		echo rs6000-ibm-aix3.2
554267843Sdelphij	fi
555267843Sdelphij	exit ;;
556267843Sdelphij    *:AIX:*:[4567])
557267843Sdelphij	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
558267843Sdelphij	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
559267843Sdelphij		IBM_ARCH=rs6000
560267843Sdelphij	else
561267843Sdelphij		IBM_ARCH=powerpc
562267843Sdelphij	fi
563267843Sdelphij	if [ -x /usr/bin/oslevel ] ; then
564267843Sdelphij		IBM_REV=`/usr/bin/oslevel`
565267843Sdelphij	else
566267843Sdelphij		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
567267843Sdelphij	fi
568267843Sdelphij	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
569267843Sdelphij	exit ;;
570267843Sdelphij    *:AIX:*:*)
571267843Sdelphij	echo rs6000-ibm-aix
572267843Sdelphij	exit ;;
573267843Sdelphij    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
574267843Sdelphij	echo romp-ibm-bsd4.4
575267843Sdelphij	exit ;;
576267843Sdelphij    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
577267843Sdelphij	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
578267843Sdelphij	exit ;;                             # report: romp-ibm BSD 4.3
579267843Sdelphij    *:BOSX:*:*)
580267843Sdelphij	echo rs6000-bull-bosx
581267843Sdelphij	exit ;;
582267843Sdelphij    DPX/2?00:B.O.S.:*:*)
583267843Sdelphij	echo m68k-bull-sysv3
584267843Sdelphij	exit ;;
585267843Sdelphij    9000/[34]??:4.3bsd:1.*:*)
586267843Sdelphij	echo m68k-hp-bsd
587267843Sdelphij	exit ;;
588267843Sdelphij    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
589267843Sdelphij	echo m68k-hp-bsd4.4
590267843Sdelphij	exit ;;
591267843Sdelphij    9000/[34678]??:HP-UX:*:*)
592267843Sdelphij	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
593267843Sdelphij	case "${UNAME_MACHINE}" in
594267843Sdelphij	    9000/31? )            HP_ARCH=m68000 ;;
595267843Sdelphij	    9000/[34]?? )         HP_ARCH=m68k ;;
596267843Sdelphij	    9000/[678][0-9][0-9])
597267843Sdelphij		if [ -x /usr/bin/getconf ]; then
598267843Sdelphij		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
599267843Sdelphij		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
600267843Sdelphij		    case "${sc_cpu_version}" in
601267843Sdelphij		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
602267843Sdelphij		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
603267843Sdelphij		      532)                      # CPU_PA_RISC2_0
604267843Sdelphij			case "${sc_kernel_bits}" in
605267843Sdelphij			  32) HP_ARCH="hppa2.0n" ;;
606267843Sdelphij			  64) HP_ARCH="hppa2.0w" ;;
607267843Sdelphij			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
608267843Sdelphij			esac ;;
609267843Sdelphij		    esac
610267843Sdelphij		fi
611267843Sdelphij		if [ "${HP_ARCH}" = "" ]; then
612267843Sdelphij		    eval $set_cc_for_build
613267843Sdelphij		    sed 's/^		//' << EOF >$dummy.c
614267843Sdelphij
615267843Sdelphij		#define _HPUX_SOURCE
616267843Sdelphij		#include <stdlib.h>
617267843Sdelphij		#include <unistd.h>
618267843Sdelphij
619267843Sdelphij		int main ()
620267843Sdelphij		{
621267843Sdelphij		#if defined(_SC_KERNEL_BITS)
622267843Sdelphij		    long bits = sysconf(_SC_KERNEL_BITS);
623267843Sdelphij		#endif
624267843Sdelphij		    long cpu  = sysconf (_SC_CPU_VERSION);
625267843Sdelphij
626267843Sdelphij		    switch (cpu)
627267843Sdelphij			{
628267843Sdelphij			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
629267843Sdelphij			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
630267843Sdelphij			case CPU_PA_RISC2_0:
631267843Sdelphij		#if defined(_SC_KERNEL_BITS)
632267843Sdelphij			    switch (bits)
633267843Sdelphij				{
634267843Sdelphij				case 64: puts ("hppa2.0w"); break;
635267843Sdelphij				case 32: puts ("hppa2.0n"); break;
636267843Sdelphij				default: puts ("hppa2.0"); break;
637267843Sdelphij				} break;
638267843Sdelphij		#else  /* !defined(_SC_KERNEL_BITS) */
639267843Sdelphij			    puts ("hppa2.0"); break;
640267843Sdelphij		#endif
641267843Sdelphij			default: puts ("hppa1.0"); break;
642267843Sdelphij			}
643267843Sdelphij		    exit (0);
644267843Sdelphij		}
645267843SdelphijEOF
646267843Sdelphij		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
647267843Sdelphij		    test -z "$HP_ARCH" && HP_ARCH=hppa
648267843Sdelphij		fi ;;
649267843Sdelphij	esac
650267843Sdelphij	if [ ${HP_ARCH} = "hppa2.0w" ]
651267843Sdelphij	then
652267843Sdelphij	    eval $set_cc_for_build
653267843Sdelphij
654267843Sdelphij	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
655267843Sdelphij	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
656267843Sdelphij	    # generating 64-bit code.  GNU and HP use different nomenclature:
657267843Sdelphij	    #
658267843Sdelphij	    # $ CC_FOR_BUILD=cc ./config.guess
659267843Sdelphij	    # => hppa2.0w-hp-hpux11.23
660267843Sdelphij	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
661267843Sdelphij	    # => hppa64-hp-hpux11.23
662267843Sdelphij
663267843Sdelphij	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
664267843Sdelphij		grep -q __LP64__
665267843Sdelphij	    then
666267843Sdelphij		HP_ARCH="hppa2.0w"
667267843Sdelphij	    else
668267843Sdelphij		HP_ARCH="hppa64"
669267843Sdelphij	    fi
670267843Sdelphij	fi
671267843Sdelphij	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
672267843Sdelphij	exit ;;
673267843Sdelphij    ia64:HP-UX:*:*)
674267843Sdelphij	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
675267843Sdelphij	echo ia64-hp-hpux${HPUX_REV}
676267843Sdelphij	exit ;;
677267843Sdelphij    3050*:HI-UX:*:*)
678267843Sdelphij	eval $set_cc_for_build
679267843Sdelphij	sed 's/^	//' << EOF >$dummy.c
680267843Sdelphij	#include <unistd.h>
681267843Sdelphij	int
682267843Sdelphij	main ()
683267843Sdelphij	{
684267843Sdelphij	  long cpu = sysconf (_SC_CPU_VERSION);
685267843Sdelphij	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
686267843Sdelphij	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
687267843Sdelphij	     results, however.  */
688267843Sdelphij	  if (CPU_IS_PA_RISC (cpu))
689267843Sdelphij	    {
690267843Sdelphij	      switch (cpu)
691267843Sdelphij		{
692267843Sdelphij		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
693267843Sdelphij		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
694267843Sdelphij		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
695267843Sdelphij		  default: puts ("hppa-hitachi-hiuxwe2"); break;
696267843Sdelphij		}
697267843Sdelphij	    }
698267843Sdelphij	  else if (CPU_IS_HP_MC68K (cpu))
699267843Sdelphij	    puts ("m68k-hitachi-hiuxwe2");
700267843Sdelphij	  else puts ("unknown-hitachi-hiuxwe2");
701267843Sdelphij	  exit (0);
702267843Sdelphij	}
703267843SdelphijEOF
704267843Sdelphij	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
705267843Sdelphij		{ echo "$SYSTEM_NAME"; exit; }
706267843Sdelphij	echo unknown-hitachi-hiuxwe2
707267843Sdelphij	exit ;;
708267843Sdelphij    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
709267843Sdelphij	echo hppa1.1-hp-bsd
710267843Sdelphij	exit ;;
711267843Sdelphij    9000/8??:4.3bsd:*:*)
712267843Sdelphij	echo hppa1.0-hp-bsd
713267843Sdelphij	exit ;;
714267843Sdelphij    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
715267843Sdelphij	echo hppa1.0-hp-mpeix
716267843Sdelphij	exit ;;
717267843Sdelphij    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
718267843Sdelphij	echo hppa1.1-hp-osf
719267843Sdelphij	exit ;;
720267843Sdelphij    hp8??:OSF1:*:*)
721267843Sdelphij	echo hppa1.0-hp-osf
722267843Sdelphij	exit ;;
723267843Sdelphij    i*86:OSF1:*:*)
724267843Sdelphij	if [ -x /usr/sbin/sysversion ] ; then
725267843Sdelphij	    echo ${UNAME_MACHINE}-unknown-osf1mk
726267843Sdelphij	else
727267843Sdelphij	    echo ${UNAME_MACHINE}-unknown-osf1
728267843Sdelphij	fi
729267843Sdelphij	exit ;;
730267843Sdelphij    parisc*:Lites*:*:*)
731267843Sdelphij	echo hppa1.1-hp-lites
732267843Sdelphij	exit ;;
733267843Sdelphij    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
734267843Sdelphij	echo c1-convex-bsd
735267843Sdelphij	exit ;;
736267843Sdelphij    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
737267843Sdelphij	if getsysinfo -f scalar_acc
738267843Sdelphij	then echo c32-convex-bsd
739267843Sdelphij	else echo c2-convex-bsd
740267843Sdelphij	fi
741267843Sdelphij	exit ;;
742267843Sdelphij    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
743267843Sdelphij	echo c34-convex-bsd
744267843Sdelphij	exit ;;
745267843Sdelphij    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
746267843Sdelphij	echo c38-convex-bsd
747267843Sdelphij	exit ;;
748267843Sdelphij    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
749267843Sdelphij	echo c4-convex-bsd
750267843Sdelphij	exit ;;
751267843Sdelphij    CRAY*Y-MP:*:*:*)
752267843Sdelphij	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
753267843Sdelphij	exit ;;
754267843Sdelphij    CRAY*[A-Z]90:*:*:*)
755267843Sdelphij	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
756267843Sdelphij	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
757267843Sdelphij	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
758267843Sdelphij	      -e 's/\.[^.]*$/.X/'
759267843Sdelphij	exit ;;
760267843Sdelphij    CRAY*TS:*:*:*)
761267843Sdelphij	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
762267843Sdelphij	exit ;;
763267843Sdelphij    CRAY*T3E:*:*:*)
764267843Sdelphij	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
765267843Sdelphij	exit ;;
766267843Sdelphij    CRAY*SV1:*:*:*)
767267843Sdelphij	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
768267843Sdelphij	exit ;;
769267843Sdelphij    *:UNICOS/mp:*:*)
770267843Sdelphij	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
771267843Sdelphij	exit ;;
772267843Sdelphij    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
773267843Sdelphij	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
774267843Sdelphij	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
775267843Sdelphij	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
776267843Sdelphij	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
777267843Sdelphij	exit ;;
778267843Sdelphij    5000:UNIX_System_V:4.*:*)
779267843Sdelphij	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
780267843Sdelphij	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
781267843Sdelphij	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
782267843Sdelphij	exit ;;
783267843Sdelphij    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
784267843Sdelphij	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
785267843Sdelphij	exit ;;
786267843Sdelphij    sparc*:BSD/OS:*:*)
787267843Sdelphij	echo sparc-unknown-bsdi${UNAME_RELEASE}
788267843Sdelphij	exit ;;
789267843Sdelphij    *:BSD/OS:*:*)
790267843Sdelphij	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
791267843Sdelphij	exit ;;
792267843Sdelphij    *:FreeBSD:*:*)
793267843Sdelphij	UNAME_PROCESSOR=`/usr/bin/uname -p`
794267843Sdelphij	case ${UNAME_PROCESSOR} in
795267843Sdelphij	    amd64)
796267843Sdelphij		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797267843Sdelphij	    *)
798267843Sdelphij		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799267843Sdelphij	esac
800267843Sdelphij	exit ;;
801267843Sdelphij    i*:CYGWIN*:*)
802267843Sdelphij	echo ${UNAME_MACHINE}-pc-cygwin
803267843Sdelphij	exit ;;
804267843Sdelphij    *:MINGW*:*)
805267843Sdelphij	echo ${UNAME_MACHINE}-pc-mingw32
806267843Sdelphij	exit ;;
807267843Sdelphij    i*:MSYS*:*)
808267843Sdelphij	echo ${UNAME_MACHINE}-pc-msys
809267843Sdelphij	exit ;;
810267843Sdelphij    i*:windows32*:*)
811267843Sdelphij	# uname -m includes "-pc" on this system.
812267843Sdelphij	echo ${UNAME_MACHINE}-mingw32
813267843Sdelphij	exit ;;
814267843Sdelphij    i*:PW*:*)
815267843Sdelphij	echo ${UNAME_MACHINE}-pc-pw32
816267843Sdelphij	exit ;;
817267843Sdelphij    *:Interix*:*)
818267843Sdelphij	case ${UNAME_MACHINE} in
819267843Sdelphij	    x86)
820267843Sdelphij		echo i586-pc-interix${UNAME_RELEASE}
821267843Sdelphij		exit ;;
822267843Sdelphij	    authenticamd | genuineintel | EM64T)
823267843Sdelphij		echo x86_64-unknown-interix${UNAME_RELEASE}
824267843Sdelphij		exit ;;
825267843Sdelphij	    IA64)
826267843Sdelphij		echo ia64-unknown-interix${UNAME_RELEASE}
827267843Sdelphij		exit ;;
828267843Sdelphij	esac ;;
829267843Sdelphij    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
830267843Sdelphij	echo i${UNAME_MACHINE}-pc-mks
831267843Sdelphij	exit ;;
832267843Sdelphij    8664:Windows_NT:*)
833267843Sdelphij	echo x86_64-pc-mks
834267843Sdelphij	exit ;;
835267843Sdelphij    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
836267843Sdelphij	# How do we know it's Interix rather than the generic POSIX subsystem?
837267843Sdelphij	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
838267843Sdelphij	# UNAME_MACHINE based on the output of uname instead of i386?
839267843Sdelphij	echo i586-pc-interix
840267843Sdelphij	exit ;;
841267843Sdelphij    i*:UWIN*:*)
842267843Sdelphij	echo ${UNAME_MACHINE}-pc-uwin
843267843Sdelphij	exit ;;
844267843Sdelphij    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
845267843Sdelphij	echo x86_64-unknown-cygwin
846267843Sdelphij	exit ;;
847267843Sdelphij    p*:CYGWIN*:*)
848267843Sdelphij	echo powerpcle-unknown-cygwin
849267843Sdelphij	exit ;;
850267843Sdelphij    prep*:SunOS:5.*:*)
851267843Sdelphij	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
852267843Sdelphij	exit ;;
853267843Sdelphij    *:GNU:*:*)
854267843Sdelphij	# the GNU system
855267843Sdelphij	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
856267843Sdelphij	exit ;;
857267843Sdelphij    *:GNU/*:*:*)
858267843Sdelphij	# other systems with GNU libc and userland
859267843Sdelphij	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
860267843Sdelphij	exit ;;
861267843Sdelphij    i*86:Minix:*:*)
862267843Sdelphij	echo ${UNAME_MACHINE}-pc-minix
863267843Sdelphij	exit ;;
864267843Sdelphij    aarch64:Linux:*:*)
865267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
866267843Sdelphij	exit ;;
867267843Sdelphij    aarch64_be:Linux:*:*)
868267843Sdelphij	UNAME_MACHINE=aarch64_be
869267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
870267843Sdelphij	exit ;;
871267843Sdelphij    alpha:Linux:*:*)
872267843Sdelphij	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
873267843Sdelphij	  EV5)   UNAME_MACHINE=alphaev5 ;;
874267843Sdelphij	  EV56)  UNAME_MACHINE=alphaev56 ;;
875267843Sdelphij	  PCA56) UNAME_MACHINE=alphapca56 ;;
876267843Sdelphij	  PCA57) UNAME_MACHINE=alphapca56 ;;
877267843Sdelphij	  EV6)   UNAME_MACHINE=alphaev6 ;;
878267843Sdelphij	  EV67)  UNAME_MACHINE=alphaev67 ;;
879267843Sdelphij	  EV68*) UNAME_MACHINE=alphaev68 ;;
880267843Sdelphij	esac
881267843Sdelphij	objdump --private-headers /bin/sh | grep -q ld.so.1
882267843Sdelphij	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
883267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
884267843Sdelphij	exit ;;
885267843Sdelphij    arm*:Linux:*:*)
886267843Sdelphij	eval $set_cc_for_build
887267843Sdelphij	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
888267843Sdelphij	    | grep -q __ARM_EABI__
889267843Sdelphij	then
890267843Sdelphij	    echo ${UNAME_MACHINE}-unknown-linux-gnu
891267843Sdelphij	else
892267843Sdelphij	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
893267843Sdelphij		| grep -q __ARM_PCS_VFP
894267843Sdelphij	    then
895267843Sdelphij		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
896267843Sdelphij	    else
897267843Sdelphij		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
898267843Sdelphij	    fi
899267843Sdelphij	fi
900267843Sdelphij	exit ;;
901267843Sdelphij    avr32*:Linux:*:*)
902267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
903267843Sdelphij	exit ;;
904267843Sdelphij    cris:Linux:*:*)
905267843Sdelphij	echo ${UNAME_MACHINE}-axis-linux-gnu
906267843Sdelphij	exit ;;
907267843Sdelphij    crisv32:Linux:*:*)
908267843Sdelphij	echo ${UNAME_MACHINE}-axis-linux-gnu
909267843Sdelphij	exit ;;
910267843Sdelphij    frv:Linux:*:*)
911267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
912267843Sdelphij	exit ;;
913267843Sdelphij    hexagon:Linux:*:*)
914267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
915267843Sdelphij	exit ;;
916267843Sdelphij    i*86:Linux:*:*)
917267843Sdelphij	LIBC=gnu
918267843Sdelphij	eval $set_cc_for_build
919267843Sdelphij	sed 's/^	//' << EOF >$dummy.c
920267843Sdelphij	#ifdef __dietlibc__
921267843Sdelphij	LIBC=dietlibc
922267843Sdelphij	#endif
923267843SdelphijEOF
924267843Sdelphij	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
925267843Sdelphij	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
926267843Sdelphij	exit ;;
927267843Sdelphij    ia64:Linux:*:*)
928267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
929267843Sdelphij	exit ;;
930267843Sdelphij    m32r*:Linux:*:*)
931267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
932267843Sdelphij	exit ;;
933267843Sdelphij    m68*:Linux:*:*)
934267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
935267843Sdelphij	exit ;;
936267843Sdelphij    mips:Linux:*:* | mips64:Linux:*:*)
937267843Sdelphij	eval $set_cc_for_build
938267843Sdelphij	sed 's/^	//' << EOF >$dummy.c
939267843Sdelphij	#undef CPU
940267843Sdelphij	#undef ${UNAME_MACHINE}
941267843Sdelphij	#undef ${UNAME_MACHINE}el
942267843Sdelphij	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
943267843Sdelphij	CPU=${UNAME_MACHINE}el
944267843Sdelphij	#else
945267843Sdelphij	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
946267843Sdelphij	CPU=${UNAME_MACHINE}
947267843Sdelphij	#else
948267843Sdelphij	CPU=
949267843Sdelphij	#endif
950267843Sdelphij	#endif
951267843SdelphijEOF
952267843Sdelphij	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
953267843Sdelphij	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
954267843Sdelphij	;;
955267843Sdelphij    or32:Linux:*:*)
956267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
957267843Sdelphij	exit ;;
958267843Sdelphij    padre:Linux:*:*)
959267843Sdelphij	echo sparc-unknown-linux-gnu
960267843Sdelphij	exit ;;
961267843Sdelphij    parisc64:Linux:*:* | hppa64:Linux:*:*)
962267843Sdelphij	echo hppa64-unknown-linux-gnu
963267843Sdelphij	exit ;;
964267843Sdelphij    parisc:Linux:*:* | hppa:Linux:*:*)
965267843Sdelphij	# Look for CPU level
966267843Sdelphij	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
967267843Sdelphij	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
968267843Sdelphij	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
969267843Sdelphij	  *)    echo hppa-unknown-linux-gnu ;;
970267843Sdelphij	esac
971267843Sdelphij	exit ;;
972267843Sdelphij    ppc64:Linux:*:*)
973267843Sdelphij	echo powerpc64-unknown-linux-gnu
974267843Sdelphij	exit ;;
975267843Sdelphij    ppc:Linux:*:*)
976267843Sdelphij	echo powerpc-unknown-linux-gnu
977267843Sdelphij	exit ;;
978267843Sdelphij    s390:Linux:*:* | s390x:Linux:*:*)
979267843Sdelphij	echo ${UNAME_MACHINE}-ibm-linux
980267843Sdelphij	exit ;;
981267843Sdelphij    sh64*:Linux:*:*)
982267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
983267843Sdelphij	exit ;;
984267843Sdelphij    sh*:Linux:*:*)
985267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
986267843Sdelphij	exit ;;
987267843Sdelphij    sparc:Linux:*:* | sparc64:Linux:*:*)
988267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
989267843Sdelphij	exit ;;
990267843Sdelphij    tile*:Linux:*:*)
991267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
992267843Sdelphij	exit ;;
993267843Sdelphij    vax:Linux:*:*)
994267843Sdelphij	echo ${UNAME_MACHINE}-dec-linux-gnu
995267843Sdelphij	exit ;;
996267843Sdelphij    x86_64:Linux:*:*)
997267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
998267843Sdelphij	exit ;;
999267843Sdelphij    xtensa*:Linux:*:*)
1000267843Sdelphij	echo ${UNAME_MACHINE}-unknown-linux-gnu
1001267843Sdelphij	exit ;;
1002267843Sdelphij    i*86:DYNIX/ptx:4*:*)
1003267843Sdelphij	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1004267843Sdelphij	# earlier versions are messed up and put the nodename in both
1005267843Sdelphij	# sysname and nodename.
1006267843Sdelphij	echo i386-sequent-sysv4
1007267843Sdelphij	exit ;;
1008267843Sdelphij    i*86:UNIX_SV:4.2MP:2.*)
1009267843Sdelphij	# Unixware is an offshoot of SVR4, but it has its own version
1010267843Sdelphij	# number series starting with 2...
1011267843Sdelphij	# I am not positive that other SVR4 systems won't match this,
1012267843Sdelphij	# I just have to hope.  -- rms.
1013267843Sdelphij	# Use sysv4.2uw... so that sysv4* matches it.
1014267843Sdelphij	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1015267843Sdelphij	exit ;;
1016267843Sdelphij    i*86:OS/2:*:*)
1017267843Sdelphij	# If we were able to find `uname', then EMX Unix compatibility
1018267843Sdelphij	# is probably installed.
1019267843Sdelphij	echo ${UNAME_MACHINE}-pc-os2-emx
1020267843Sdelphij	exit ;;
1021267843Sdelphij    i*86:XTS-300:*:STOP)
1022267843Sdelphij	echo ${UNAME_MACHINE}-unknown-stop
1023267843Sdelphij	exit ;;
1024267843Sdelphij    i*86:atheos:*:*)
1025267843Sdelphij	echo ${UNAME_MACHINE}-unknown-atheos
1026267843Sdelphij	exit ;;
1027267843Sdelphij    i*86:syllable:*:*)
1028267843Sdelphij	echo ${UNAME_MACHINE}-pc-syllable
1029267843Sdelphij	exit ;;
1030267843Sdelphij    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1031267843Sdelphij	echo i386-unknown-lynxos${UNAME_RELEASE}
1032267843Sdelphij	exit ;;
1033267843Sdelphij    i*86:*DOS:*:*)
1034267843Sdelphij	echo ${UNAME_MACHINE}-pc-msdosdjgpp
1035267843Sdelphij	exit ;;
1036267843Sdelphij    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1037267843Sdelphij	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1038267843Sdelphij	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1039267843Sdelphij		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1040267843Sdelphij	else
1041267843Sdelphij		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1042267843Sdelphij	fi
1043267843Sdelphij	exit ;;
1044267843Sdelphij    i*86:*:5:[678]*)
1045267843Sdelphij	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1046267843Sdelphij	case `/bin/uname -X | grep "^Machine"` in
1047267843Sdelphij	    *486*)	     UNAME_MACHINE=i486 ;;
1048267843Sdelphij	    *Pentium)	     UNAME_MACHINE=i586 ;;
1049267843Sdelphij	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1050267843Sdelphij	esac
1051267843Sdelphij	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1052267843Sdelphij	exit ;;
1053267843Sdelphij    i*86:*:3.2:*)
1054267843Sdelphij	if test -f /usr/options/cb.name; then
1055267843Sdelphij		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1056267843Sdelphij		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1057267843Sdelphij	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1058267843Sdelphij		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1059267843Sdelphij		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1060267843Sdelphij		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1061267843Sdelphij			&& UNAME_MACHINE=i586
1062267843Sdelphij		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1063267843Sdelphij			&& UNAME_MACHINE=i686
1064267843Sdelphij		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1065267843Sdelphij			&& UNAME_MACHINE=i686
1066267843Sdelphij		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1067267843Sdelphij	else
1068267843Sdelphij		echo ${UNAME_MACHINE}-pc-sysv32
1069267843Sdelphij	fi
1070267843Sdelphij	exit ;;
1071267843Sdelphij    pc:*:*:*)
1072267843Sdelphij	# Left here for compatibility:
1073267843Sdelphij	# uname -m prints for DJGPP always 'pc', but it prints nothing about
1074267843Sdelphij	# the processor, so we play safe by assuming i586.
1075267843Sdelphij	# Note: whatever this is, it MUST be the same as what config.sub
1076267843Sdelphij	# prints for the "djgpp" host, or else GDB configury will decide that
1077267843Sdelphij	# this is a cross-build.
1078267843Sdelphij	echo i586-pc-msdosdjgpp
1079267843Sdelphij	exit ;;
1080267843Sdelphij    Intel:Mach:3*:*)
1081267843Sdelphij	echo i386-pc-mach3
1082267843Sdelphij	exit ;;
1083267843Sdelphij    paragon:*:*:*)
1084267843Sdelphij	echo i860-intel-osf1
1085267843Sdelphij	exit ;;
1086267843Sdelphij    i860:*:4.*:*) # i860-SVR4
1087267843Sdelphij	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1088267843Sdelphij	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1089267843Sdelphij	else # Add other i860-SVR4 vendors below as they are discovered.
1090267843Sdelphij	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1091267843Sdelphij	fi
1092267843Sdelphij	exit ;;
1093267843Sdelphij    mini*:CTIX:SYS*5:*)
1094267843Sdelphij	# "miniframe"
1095267843Sdelphij	echo m68010-convergent-sysv
1096267843Sdelphij	exit ;;
1097267843Sdelphij    mc68k:UNIX:SYSTEM5:3.51m)
1098267843Sdelphij	echo m68k-convergent-sysv
1099267843Sdelphij	exit ;;
1100267843Sdelphij    M680?0:D-NIX:5.3:*)
1101267843Sdelphij	echo m68k-diab-dnix
1102267843Sdelphij	exit ;;
1103267843Sdelphij    M68*:*:R3V[5678]*:*)
1104267843Sdelphij	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1105267843Sdelphij    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)
1106267843Sdelphij	OS_REL=''
1107267843Sdelphij	test -r /etc/.relid \
1108267843Sdelphij	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1109267843Sdelphij	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1110267843Sdelphij	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1111267843Sdelphij	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1112267843Sdelphij	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1113267843Sdelphij    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1114267843Sdelphij	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1115267843Sdelphij	  && { echo i486-ncr-sysv4; exit; } ;;
1116267843Sdelphij    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1117267843Sdelphij	OS_REL='.3'
1118267843Sdelphij	test -r /etc/.relid \
1119267843Sdelphij	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1120267843Sdelphij	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1121267843Sdelphij	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1122267843Sdelphij	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1123267843Sdelphij	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1124267843Sdelphij	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1125267843Sdelphij	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1126267843Sdelphij    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1127267843Sdelphij	echo m68k-unknown-lynxos${UNAME_RELEASE}
1128267843Sdelphij	exit ;;
1129267843Sdelphij    mc68030:UNIX_System_V:4.*:*)
1130267843Sdelphij	echo m68k-atari-sysv4
1131267843Sdelphij	exit ;;
1132267843Sdelphij    TSUNAMI:LynxOS:2.*:*)
1133267843Sdelphij	echo sparc-unknown-lynxos${UNAME_RELEASE}
1134267843Sdelphij	exit ;;
1135267843Sdelphij    rs6000:LynxOS:2.*:*)
1136267843Sdelphij	echo rs6000-unknown-lynxos${UNAME_RELEASE}
1137267843Sdelphij	exit ;;
1138267843Sdelphij    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1139267843Sdelphij	echo powerpc-unknown-lynxos${UNAME_RELEASE}
1140267843Sdelphij	exit ;;
1141267843Sdelphij    SM[BE]S:UNIX_SV:*:*)
1142267843Sdelphij	echo mips-dde-sysv${UNAME_RELEASE}
1143267843Sdelphij	exit ;;
1144267843Sdelphij    RM*:ReliantUNIX-*:*:*)
1145267843Sdelphij	echo mips-sni-sysv4
1146267843Sdelphij	exit ;;
1147267843Sdelphij    RM*:SINIX-*:*:*)
1148267843Sdelphij	echo mips-sni-sysv4
1149267843Sdelphij	exit ;;
1150267843Sdelphij    *:SINIX-*:*:*)
1151267843Sdelphij	if uname -p 2>/dev/null >/dev/null ; then
1152267843Sdelphij		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1153267843Sdelphij		echo ${UNAME_MACHINE}-sni-sysv4
1154267843Sdelphij	else
1155267843Sdelphij		echo ns32k-sni-sysv
1156267843Sdelphij	fi
1157267843Sdelphij	exit ;;
1158267843Sdelphij    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1159267843Sdelphij			# says <Richard.M.Bartel@ccMail.Census.GOV>
1160267843Sdelphij	echo i586-unisys-sysv4
1161267843Sdelphij	exit ;;
1162267843Sdelphij    *:UNIX_System_V:4*:FTX*)
1163267843Sdelphij	# From Gerald Hewes <hewes@openmarket.com>.
1164267843Sdelphij	# How about differentiating between stratus architectures? -djm
1165267843Sdelphij	echo hppa1.1-stratus-sysv4
1166267843Sdelphij	exit ;;
1167267843Sdelphij    *:*:*:FTX*)
1168267843Sdelphij	# From seanf@swdc.stratus.com.
1169267843Sdelphij	echo i860-stratus-sysv4
1170267843Sdelphij	exit ;;
1171267843Sdelphij    i*86:VOS:*:*)
1172267843Sdelphij	# From Paul.Green@stratus.com.
1173267843Sdelphij	echo ${UNAME_MACHINE}-stratus-vos
1174267843Sdelphij	exit ;;
1175267843Sdelphij    *:VOS:*:*)
1176267843Sdelphij	# From Paul.Green@stratus.com.
1177267843Sdelphij	echo hppa1.1-stratus-vos
1178267843Sdelphij	exit ;;
1179267843Sdelphij    mc68*:A/UX:*:*)
1180267843Sdelphij	echo m68k-apple-aux${UNAME_RELEASE}
1181267843Sdelphij	exit ;;
1182267843Sdelphij    news*:NEWS-OS:6*:*)
1183267843Sdelphij	echo mips-sony-newsos6
1184267843Sdelphij	exit ;;
1185267843Sdelphij    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1186267843Sdelphij	if [ -d /usr/nec ]; then
1187267843Sdelphij		echo mips-nec-sysv${UNAME_RELEASE}
1188267843Sdelphij	else
1189267843Sdelphij		echo mips-unknown-sysv${UNAME_RELEASE}
1190267843Sdelphij	fi
1191267843Sdelphij	exit ;;
1192267843Sdelphij    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1193267843Sdelphij	echo powerpc-be-beos
1194267843Sdelphij	exit ;;
1195267843Sdelphij    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
1196267843Sdelphij	echo powerpc-apple-beos
1197267843Sdelphij	exit ;;
1198267843Sdelphij    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1199267843Sdelphij	echo i586-pc-beos
1200267843Sdelphij	exit ;;
1201267843Sdelphij    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
1202267843Sdelphij	echo i586-pc-haiku
1203267843Sdelphij	exit ;;
1204267843Sdelphij    SX-4:SUPER-UX:*:*)
1205267843Sdelphij	echo sx4-nec-superux${UNAME_RELEASE}
1206267843Sdelphij	exit ;;
1207267843Sdelphij    SX-5:SUPER-UX:*:*)
1208267843Sdelphij	echo sx5-nec-superux${UNAME_RELEASE}
1209267843Sdelphij	exit ;;
1210267843Sdelphij    SX-6:SUPER-UX:*:*)
1211267843Sdelphij	echo sx6-nec-superux${UNAME_RELEASE}
1212267843Sdelphij	exit ;;
1213267843Sdelphij    SX-7:SUPER-UX:*:*)
1214267843Sdelphij	echo sx7-nec-superux${UNAME_RELEASE}
1215267843Sdelphij	exit ;;
1216267843Sdelphij    SX-8:SUPER-UX:*:*)
1217267843Sdelphij	echo sx8-nec-superux${UNAME_RELEASE}
1218267843Sdelphij	exit ;;
1219267843Sdelphij    SX-8R:SUPER-UX:*:*)
1220267843Sdelphij	echo sx8r-nec-superux${UNAME_RELEASE}
1221267843Sdelphij	exit ;;
1222267843Sdelphij    Power*:Rhapsody:*:*)
1223267843Sdelphij	echo powerpc-apple-rhapsody${UNAME_RELEASE}
1224267843Sdelphij	exit ;;
1225267843Sdelphij    *:Rhapsody:*:*)
1226267843Sdelphij	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1227267843Sdelphij	exit ;;
1228267843Sdelphij    *:Darwin:*:*)
1229267843Sdelphij	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1230267843Sdelphij	case $UNAME_PROCESSOR in
1231267843Sdelphij	    i386)
1232267843Sdelphij		eval $set_cc_for_build
1233267843Sdelphij		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1234267843Sdelphij		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1235267843Sdelphij		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1236267843Sdelphij		      grep IS_64BIT_ARCH >/dev/null
1237267843Sdelphij		  then
1238267843Sdelphij		      UNAME_PROCESSOR="x86_64"
1239267843Sdelphij		  fi
1240267843Sdelphij		fi ;;
1241267843Sdelphij	    unknown) UNAME_PROCESSOR=powerpc ;;
1242267843Sdelphij	esac
1243267843Sdelphij	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1244267843Sdelphij	exit ;;
1245267843Sdelphij    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1246267843Sdelphij	UNAME_PROCESSOR=`uname -p`
1247267843Sdelphij	if test "$UNAME_PROCESSOR" = "x86"; then
1248267843Sdelphij		UNAME_PROCESSOR=i386
1249267843Sdelphij		UNAME_MACHINE=pc
1250267843Sdelphij	fi
1251267843Sdelphij	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1252267843Sdelphij	exit ;;
1253267843Sdelphij    *:QNX:*:4*)
1254267843Sdelphij	echo i386-pc-qnx
1255267843Sdelphij	exit ;;
1256267843Sdelphij    NEO-?:NONSTOP_KERNEL:*:*)
1257267843Sdelphij	echo neo-tandem-nsk${UNAME_RELEASE}
1258267843Sdelphij	exit ;;
1259267843Sdelphij    NSE-?:NONSTOP_KERNEL:*:*)
1260267843Sdelphij	echo nse-tandem-nsk${UNAME_RELEASE}
1261267843Sdelphij	exit ;;
1262267843Sdelphij    NSR-?:NONSTOP_KERNEL:*:*)
1263267843Sdelphij	echo nsr-tandem-nsk${UNAME_RELEASE}
1264267843Sdelphij	exit ;;
1265267843Sdelphij    *:NonStop-UX:*:*)
1266267843Sdelphij	echo mips-compaq-nonstopux
1267267843Sdelphij	exit ;;
1268267843Sdelphij    BS2000:POSIX*:*:*)
1269267843Sdelphij	echo bs2000-siemens-sysv
1270267843Sdelphij	exit ;;
1271267843Sdelphij    DS/*:UNIX_System_V:*:*)
1272267843Sdelphij	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1273267843Sdelphij	exit ;;
1274267843Sdelphij    *:Plan9:*:*)
1275267843Sdelphij	# "uname -m" is not consistent, so use $cputype instead. 386
1276267843Sdelphij	# is converted to i386 for consistency with other x86
1277267843Sdelphij	# operating systems.
1278267843Sdelphij	if test "$cputype" = "386"; then
1279267843Sdelphij	    UNAME_MACHINE=i386
1280267843Sdelphij	else
1281267843Sdelphij	    UNAME_MACHINE="$cputype"
1282267843Sdelphij	fi
1283267843Sdelphij	echo ${UNAME_MACHINE}-unknown-plan9
1284267843Sdelphij	exit ;;
1285267843Sdelphij    *:TOPS-10:*:*)
1286267843Sdelphij	echo pdp10-unknown-tops10
1287267843Sdelphij	exit ;;
1288267843Sdelphij    *:TENEX:*:*)
1289267843Sdelphij	echo pdp10-unknown-tenex
1290267843Sdelphij	exit ;;
1291267843Sdelphij    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1292267843Sdelphij	echo pdp10-dec-tops20
1293267843Sdelphij	exit ;;
1294267843Sdelphij    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1295267843Sdelphij	echo pdp10-xkl-tops20
1296267843Sdelphij	exit ;;
1297267843Sdelphij    *:TOPS-20:*:*)
1298267843Sdelphij	echo pdp10-unknown-tops20
1299267843Sdelphij	exit ;;
1300267843Sdelphij    *:ITS:*:*)
1301267843Sdelphij	echo pdp10-unknown-its
1302267843Sdelphij	exit ;;
1303267843Sdelphij    SEI:*:*:SEIUX)
1304267843Sdelphij	echo mips-sei-seiux${UNAME_RELEASE}
1305267843Sdelphij	exit ;;
1306267843Sdelphij    *:DragonFly:*:*)
1307267843Sdelphij	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1308267843Sdelphij	exit ;;
1309267843Sdelphij    *:*VMS:*:*)
1310267843Sdelphij	UNAME_MACHINE=`(uname -p) 2>/dev/null`
1311267843Sdelphij	case "${UNAME_MACHINE}" in
1312267843Sdelphij	    A*) echo alpha-dec-vms ; exit ;;
1313267843Sdelphij	    I*) echo ia64-dec-vms ; exit ;;
1314267843Sdelphij	    V*) echo vax-dec-vms ; exit ;;
1315267843Sdelphij	esac ;;
1316267843Sdelphij    *:XENIX:*:SysV)
1317267843Sdelphij	echo i386-pc-xenix
1318267843Sdelphij	exit ;;
1319267843Sdelphij    i*86:skyos:*:*)
1320267843Sdelphij	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1321267843Sdelphij	exit ;;
1322267843Sdelphij    i*86:rdos:*:*)
1323267843Sdelphij	echo ${UNAME_MACHINE}-pc-rdos
1324267843Sdelphij	exit ;;
1325267843Sdelphij    i*86:AROS:*:*)
1326267843Sdelphij	echo ${UNAME_MACHINE}-pc-aros
1327267843Sdelphij	exit ;;
1328267843Sdelphij    x86_64:VMkernel:*:*)
1329267843Sdelphij	echo ${UNAME_MACHINE}-unknown-esx
1330267843Sdelphij	exit ;;
1331267843Sdelphijesac
1332267843Sdelphij
1333267843Sdelphij#echo '(No uname command or uname output not recognized.)' 1>&2
1334267843Sdelphij#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1335267843Sdelphij
1336267843Sdelphijeval $set_cc_for_build
1337267843Sdelphijcat >$dummy.c <<EOF
1338267843Sdelphij#ifdef _SEQUENT_
1339267843Sdelphij# include <sys/types.h>
1340267843Sdelphij# include <sys/utsname.h>
1341267843Sdelphij#endif
1342267843Sdelphijmain ()
1343267843Sdelphij{
1344267843Sdelphij#if defined (sony)
1345267843Sdelphij#if defined (MIPSEB)
1346267843Sdelphij  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1347267843Sdelphij     I don't know....  */
1348267843Sdelphij  printf ("mips-sony-bsd\n"); exit (0);
1349267843Sdelphij#else
1350267843Sdelphij#include <sys/param.h>
1351267843Sdelphij  printf ("m68k-sony-newsos%s\n",
1352267843Sdelphij#ifdef NEWSOS4
1353267843Sdelphij	"4"
1354267843Sdelphij#else
1355267843Sdelphij	""
1356267843Sdelphij#endif
1357267843Sdelphij	); exit (0);
1358267843Sdelphij#endif
1359267843Sdelphij#endif
1360267843Sdelphij
1361267843Sdelphij#if defined (__arm) && defined (__acorn) && defined (__unix)
1362267843Sdelphij  printf ("arm-acorn-riscix\n"); exit (0);
1363267843Sdelphij#endif
1364267843Sdelphij
1365267843Sdelphij#if defined (hp300) && !defined (hpux)
1366267843Sdelphij  printf ("m68k-hp-bsd\n"); exit (0);
1367267843Sdelphij#endif
1368267843Sdelphij
1369267843Sdelphij#if defined (NeXT)
1370267843Sdelphij#if !defined (__ARCHITECTURE__)
1371267843Sdelphij#define __ARCHITECTURE__ "m68k"
1372267843Sdelphij#endif
1373267843Sdelphij  int version;
1374267843Sdelphij  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1375267843Sdelphij  if (version < 4)
1376267843Sdelphij    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1377267843Sdelphij  else
1378267843Sdelphij    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1379267843Sdelphij  exit (0);
1380267843Sdelphij#endif
1381267843Sdelphij
1382267843Sdelphij#if defined (MULTIMAX) || defined (n16)
1383267843Sdelphij#if defined (UMAXV)
1384267843Sdelphij  printf ("ns32k-encore-sysv\n"); exit (0);
1385267843Sdelphij#else
1386267843Sdelphij#if defined (CMU)
1387267843Sdelphij  printf ("ns32k-encore-mach\n"); exit (0);
1388267843Sdelphij#else
1389267843Sdelphij  printf ("ns32k-encore-bsd\n"); exit (0);
1390267843Sdelphij#endif
1391267843Sdelphij#endif
1392267843Sdelphij#endif
1393267843Sdelphij
1394267843Sdelphij#if defined (__386BSD__)
1395267843Sdelphij  printf ("i386-pc-bsd\n"); exit (0);
1396267843Sdelphij#endif
1397267843Sdelphij
1398267843Sdelphij#if defined (sequent)
1399267843Sdelphij#if defined (i386)
1400267843Sdelphij  printf ("i386-sequent-dynix\n"); exit (0);
1401267843Sdelphij#endif
1402267843Sdelphij#if defined (ns32000)
1403267843Sdelphij  printf ("ns32k-sequent-dynix\n"); exit (0);
1404267843Sdelphij#endif
1405267843Sdelphij#endif
1406267843Sdelphij
1407267843Sdelphij#if defined (_SEQUENT_)
1408267843Sdelphij    struct utsname un;
1409267843Sdelphij
1410267843Sdelphij    uname(&un);
1411267843Sdelphij
1412267843Sdelphij    if (strncmp(un.version, "V2", 2) == 0) {
1413267843Sdelphij	printf ("i386-sequent-ptx2\n"); exit (0);
1414267843Sdelphij    }
1415267843Sdelphij    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1416267843Sdelphij	printf ("i386-sequent-ptx1\n"); exit (0);
1417267843Sdelphij    }
1418267843Sdelphij    printf ("i386-sequent-ptx\n"); exit (0);
1419267843Sdelphij
1420267843Sdelphij#endif
1421267843Sdelphij
1422267843Sdelphij#if defined (vax)
1423267843Sdelphij# if !defined (ultrix)
1424267843Sdelphij#  include <sys/param.h>
1425267843Sdelphij#  if defined (BSD)
1426267843Sdelphij#   if BSD == 43
1427267843Sdelphij      printf ("vax-dec-bsd4.3\n"); exit (0);
1428267843Sdelphij#   else
1429267843Sdelphij#    if BSD == 199006
1430267843Sdelphij      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1431267843Sdelphij#    else
1432267843Sdelphij      printf ("vax-dec-bsd\n"); exit (0);
1433267843Sdelphij#    endif
1434267843Sdelphij#   endif
1435267843Sdelphij#  else
1436267843Sdelphij    printf ("vax-dec-bsd\n"); exit (0);
1437267843Sdelphij#  endif
1438267843Sdelphij# else
1439267843Sdelphij    printf ("vax-dec-ultrix\n"); exit (0);
1440267843Sdelphij# endif
1441267843Sdelphij#endif
1442267843Sdelphij
1443267843Sdelphij#if defined (alliant) && defined (i860)
1444267843Sdelphij  printf ("i860-alliant-bsd\n"); exit (0);
1445267843Sdelphij#endif
1446267843Sdelphij
1447267843Sdelphij  exit (1);
1448267843Sdelphij}
1449267843SdelphijEOF
1450267843Sdelphij
1451267843Sdelphij$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1452267843Sdelphij	{ echo "$SYSTEM_NAME"; exit; }
1453267843Sdelphij
1454267843Sdelphij# Apollos put the system type in the environment.
1455267843Sdelphij
1456267843Sdelphijtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1457267843Sdelphij
1458267843Sdelphij# Convex versions that predate uname can use getsysinfo(1)
1459267843Sdelphij
1460267843Sdelphijif [ -x /usr/convex/getsysinfo ]
1461267843Sdelphijthen
1462267843Sdelphij    case `getsysinfo -f cpu_type` in
1463267843Sdelphij    c1*)
1464267843Sdelphij	echo c1-convex-bsd
1465267843Sdelphij	exit ;;
1466267843Sdelphij    c2*)
1467267843Sdelphij	if getsysinfo -f scalar_acc
1468267843Sdelphij	then echo c32-convex-bsd
1469267843Sdelphij	else echo c2-convex-bsd
1470267843Sdelphij	fi
1471267843Sdelphij	exit ;;
1472267843Sdelphij    c34*)
1473267843Sdelphij	echo c34-convex-bsd
1474267843Sdelphij	exit ;;
1475267843Sdelphij    c38*)
1476267843Sdelphij	echo c38-convex-bsd
1477267843Sdelphij	exit ;;
1478267843Sdelphij    c4*)
1479267843Sdelphij	echo c4-convex-bsd
1480267843Sdelphij	exit ;;
1481267843Sdelphij    esac
1482267843Sdelphijfi
1483267843Sdelphij
1484267843Sdelphijcat >&2 <<EOF
1485267843Sdelphij$0: unable to guess system type
1486267843Sdelphij
1487267843SdelphijThis script, last modified $timestamp, has failed to recognize
1488267843Sdelphijthe operating system you are using. It is advised that you
1489267843Sdelphijdownload the most up to date version of the config scripts from
1490267843Sdelphij
1491267843Sdelphij  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1492267843Sdelphijand
1493267843Sdelphij  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1494267843Sdelphij
1495267843SdelphijIf the version you run ($0) is already up to date, please
1496267843Sdelphijsend the following data and any information you think might be
1497267843Sdelphijpertinent to <config-patches@gnu.org> in order to provide the needed
1498267843Sdelphijinformation to handle your system.
1499267843Sdelphij
1500267843Sdelphijconfig.guess timestamp = $timestamp
1501267843Sdelphij
1502267843Sdelphijuname -m = `(uname -m) 2>/dev/null || echo unknown`
1503267843Sdelphijuname -r = `(uname -r) 2>/dev/null || echo unknown`
1504267843Sdelphijuname -s = `(uname -s) 2>/dev/null || echo unknown`
1505267843Sdelphijuname -v = `(uname -v) 2>/dev/null || echo unknown`
1506267843Sdelphij
1507267843Sdelphij/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1508267843Sdelphij/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
1509267843Sdelphij
1510267843Sdelphijhostinfo               = `(hostinfo) 2>/dev/null`
1511267843Sdelphij/bin/universe          = `(/bin/universe) 2>/dev/null`
1512267843Sdelphij/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
1513267843Sdelphij/bin/arch              = `(/bin/arch) 2>/dev/null`
1514267843Sdelphij/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1515267843Sdelphij/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1516267843Sdelphij
1517267843SdelphijUNAME_MACHINE = ${UNAME_MACHINE}
1518267843SdelphijUNAME_RELEASE = ${UNAME_RELEASE}
1519267843SdelphijUNAME_SYSTEM  = ${UNAME_SYSTEM}
1520267843SdelphijUNAME_VERSION = ${UNAME_VERSION}
1521267843SdelphijEOF
1522267843Sdelphij
1523267843Sdelphijexit 1
1524267843Sdelphij
1525267843Sdelphij# Local variables:
1526267843Sdelphij# eval: (add-hook 'write-file-hooks 'time-stamp)
1527267843Sdelphij# time-stamp-start: "timestamp='"
1528267843Sdelphij# time-stamp-format: "%:y-%02m-%02d"
1529267843Sdelphij# time-stamp-end: "'"
1530267843Sdelphij# End:
1531