config.guess revision 54569438
1692f60a7Smrg#! /bin/sh
2692f60a7Smrg# Attempt to guess a canonical system name.
3692f60a7Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
454569438Smrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
554569438Smrg#   Free Software Foundation, Inc.
6692f60a7Smrg
754569438Smrgtimestamp='2008-01-23'
8692f60a7Smrg
9692f60a7Smrg# This file is free software; you can redistribute it and/or modify it
10692f60a7Smrg# under the terms of the GNU General Public License as published by
11692f60a7Smrg# the Free Software Foundation; either version 2 of the License, or
12692f60a7Smrg# (at your option) any later version.
13692f60a7Smrg#
14692f60a7Smrg# This program is distributed in the hope that it will be useful, but
15692f60a7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
16692f60a7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17692f60a7Smrg# General Public License for more details.
18692f60a7Smrg#
19692f60a7Smrg# You should have received a copy of the GNU General Public License
20692f60a7Smrg# along with this program; if not, write to the Free Software
2154569438Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2254569438Smrg# 02110-1301, USA.
23692f60a7Smrg#
24692f60a7Smrg# As a special exception to the GNU General Public License, if you
25692f60a7Smrg# distribute this file as part of a program that contains a
26692f60a7Smrg# configuration script generated by Autoconf, you may include it under
27692f60a7Smrg# the same distribution terms that you use for the rest of that program.
28692f60a7Smrg
2954569438Smrg
30692f60a7Smrg# Originally written by Per Bothner <per@bothner.com>.
31692f60a7Smrg# Please send patches to <config-patches@gnu.org>.  Submit a context
32692f60a7Smrg# diff and a properly formatted ChangeLog entry.
33692f60a7Smrg#
34692f60a7Smrg# This script attempts to guess a canonical system name similar to
35692f60a7Smrg# config.sub.  If it succeeds, it prints the system name on stdout, and
36692f60a7Smrg# exits with 0.  Otherwise, it exits with 1.
37692f60a7Smrg#
38692f60a7Smrg# The plan is that this can be called by configure scripts if you
39692f60a7Smrg# don't specify an explicit build system type.
40692f60a7Smrg
41692f60a7Smrgme=`echo "$0" | sed -e 's,.*/,,'`
42692f60a7Smrg
43692f60a7Smrgusage="\
44692f60a7SmrgUsage: $0 [OPTION]
45692f60a7Smrg
46692f60a7SmrgOutput the configuration name of the system \`$me' is run on.
47692f60a7Smrg
48692f60a7SmrgOperation modes:
49692f60a7Smrg  -h, --help         print this help, then exit
50692f60a7Smrg  -t, --time-stamp   print date of last modification, then exit
51692f60a7Smrg  -v, --version      print version number, then exit
52692f60a7Smrg
53692f60a7SmrgReport bugs and patches to <config-patches@gnu.org>."
54692f60a7Smrg
55692f60a7Smrgversion="\
56692f60a7SmrgGNU config.guess ($timestamp)
57692f60a7Smrg
58692f60a7SmrgOriginally written by Per Bothner.
5954569438SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
6054569438Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
61692f60a7Smrg
62692f60a7SmrgThis is free software; see the source for copying conditions.  There is NO
63692f60a7Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
64692f60a7Smrg
65692f60a7Smrghelp="
66692f60a7SmrgTry \`$me --help' for more information."
67692f60a7Smrg
68692f60a7Smrg# Parse command line
69692f60a7Smrgwhile test $# -gt 0 ; do
70692f60a7Smrg  case $1 in
71692f60a7Smrg    --time-stamp | --time* | -t )
7254569438Smrg       echo "$timestamp" ; exit ;;
73692f60a7Smrg    --version | -v )
7454569438Smrg       echo "$version" ; exit ;;
75692f60a7Smrg    --help | --h* | -h )
7654569438Smrg       echo "$usage"; exit ;;
77692f60a7Smrg    -- )     # Stop option processing
78692f60a7Smrg       shift; break ;;
79692f60a7Smrg    - )	# Use stdin as input.
80692f60a7Smrg       break ;;
81692f60a7Smrg    -* )
82692f60a7Smrg       echo "$me: invalid option $1$help" >&2
83692f60a7Smrg       exit 1 ;;
84692f60a7Smrg    * )
85692f60a7Smrg       break ;;
86692f60a7Smrg  esac
87692f60a7Smrgdone
88692f60a7Smrg
89692f60a7Smrgif test $# != 0; then
90692f60a7Smrg  echo "$me: too many arguments$help" >&2
91692f60a7Smrg  exit 1
92692f60a7Smrgfi
93692f60a7Smrg
94692f60a7Smrgtrap 'exit 1' 1 2 15
95692f60a7Smrg
96692f60a7Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
97692f60a7Smrg# compiler to aid in system detection is discouraged as it requires
98692f60a7Smrg# temporary files to be created and, as you can see below, it is a
99692f60a7Smrg# headache to deal with in a portable fashion.
100692f60a7Smrg
101692f60a7Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
102692f60a7Smrg# use `HOST_CC' if defined, but it is deprecated.
103692f60a7Smrg
104692f60a7Smrg# Portable tmp directory creation inspired by the Autoconf team.
105692f60a7Smrg
106692f60a7Smrgset_cc_for_build='
107692f60a7Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
108692f60a7Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
109692f60a7Smrg: ${TMPDIR=/tmp} ;
11054569438Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
111692f60a7Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
112692f60a7Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
113692f60a7Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
114692f60a7Smrgdummy=$tmp/dummy ;
115692f60a7Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
116692f60a7Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
117692f60a7Smrg ,,)    echo "int x;" > $dummy.c ;
118692f60a7Smrg	for c in cc gcc c89 c99 ; do
119692f60a7Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
120692f60a7Smrg	     CC_FOR_BUILD="$c"; break ;
121692f60a7Smrg	  fi ;
122692f60a7Smrg	done ;
123692f60a7Smrg	if test x"$CC_FOR_BUILD" = x ; then
124692f60a7Smrg	  CC_FOR_BUILD=no_compiler_found ;
125692f60a7Smrg	fi
126692f60a7Smrg	;;
127692f60a7Smrg ,,*)   CC_FOR_BUILD=$CC ;;
128692f60a7Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
12954569438Smrgesac ; set_cc_for_build= ;'
130692f60a7Smrg
131692f60a7Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
132692f60a7Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
133692f60a7Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
134692f60a7Smrg	PATH=$PATH:/.attbin ; export PATH
135692f60a7Smrgfi
136692f60a7Smrg
137692f60a7SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
138692f60a7SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139692f60a7SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
140692f60a7SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141692f60a7Smrg
142692f60a7Smrg# Note: order is significant - the case branches are not exclusive.
143692f60a7Smrg
144692f60a7Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145692f60a7Smrg    *:NetBSD:*:*)
146692f60a7Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
147692f60a7Smrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
148692f60a7Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
149692f60a7Smrg	# switched to ELF, *-*-netbsd* would select the old
150692f60a7Smrg	# object file format.  This provides both forward
151692f60a7Smrg	# compatibility and a consistent mechanism for selecting the
152692f60a7Smrg	# object file format.
153692f60a7Smrg	#
154692f60a7Smrg	# Note: NetBSD doesn't particularly care about the vendor
155692f60a7Smrg	# portion of the name.  We always set it to "unknown".
156692f60a7Smrg	sysctl="sysctl -n hw.machine_arch"
157692f60a7Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
158692f60a7Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
159692f60a7Smrg	case "${UNAME_MACHINE_ARCH}" in
160692f60a7Smrg	    armeb) machine=armeb-unknown ;;
161692f60a7Smrg	    arm*) machine=arm-unknown ;;
162692f60a7Smrg	    sh3el) machine=shl-unknown ;;
163692f60a7Smrg	    sh3eb) machine=sh-unknown ;;
16454569438Smrg	    sh5el) machine=sh5le-unknown ;;
165692f60a7Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166692f60a7Smrg	esac
167692f60a7Smrg	# The Operating System including object format, if it has switched
168692f60a7Smrg	# to ELF recently, or will in the future.
169692f60a7Smrg	case "${UNAME_MACHINE_ARCH}" in
170692f60a7Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171692f60a7Smrg		eval $set_cc_for_build
172692f60a7Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173692f60a7Smrg			| grep __ELF__ >/dev/null
174692f60a7Smrg		then
175692f60a7Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176692f60a7Smrg		    # Return netbsd for either.  FIX?
177692f60a7Smrg		    os=netbsd
178692f60a7Smrg		else
179692f60a7Smrg		    os=netbsdelf
180692f60a7Smrg		fi
181692f60a7Smrg		;;
182692f60a7Smrg	    *)
183692f60a7Smrg	        os=netbsd
184692f60a7Smrg		;;
185692f60a7Smrg	esac
186692f60a7Smrg	# The OS release
187692f60a7Smrg	# Debian GNU/NetBSD machines have a different userland, and
188692f60a7Smrg	# thus, need a distinct triplet. However, they do not need
189692f60a7Smrg	# kernel version information, so it can be replaced with a
190692f60a7Smrg	# suitable tag, in the style of linux-gnu.
191692f60a7Smrg	case "${UNAME_VERSION}" in
192692f60a7Smrg	    Debian*)
193692f60a7Smrg		release='-gnu'
194692f60a7Smrg		;;
195692f60a7Smrg	    *)
196692f60a7Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
197692f60a7Smrg		;;
198692f60a7Smrg	esac
199692f60a7Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200692f60a7Smrg	# contains redundant information, the shorter form:
201692f60a7Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202692f60a7Smrg	echo "${machine}-${os}${release}"
20354569438Smrg	exit ;;
204692f60a7Smrg    *:OpenBSD:*:*)
20554569438Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
20654569438Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
20754569438Smrg	exit ;;
20854569438Smrg    *:ekkoBSD:*:*)
20954569438Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
21054569438Smrg	exit ;;
21154569438Smrg    *:SolidBSD:*:*)
21254569438Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
21354569438Smrg	exit ;;
21454569438Smrg    macppc:MirBSD:*:*)
21554569438Smrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
21654569438Smrg	exit ;;
21754569438Smrg    *:MirBSD:*:*)
21854569438Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
21954569438Smrg	exit ;;
220692f60a7Smrg    alpha:OSF1:*:*)
22154569438Smrg	case $UNAME_RELEASE in
22254569438Smrg	*4.0)
223692f60a7Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
22454569438Smrg		;;
22554569438Smrg	*5.*)
22654569438Smrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
22754569438Smrg		;;
22854569438Smrg	esac
229692f60a7Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
230692f60a7Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
231692f60a7Smrg	# covers most systems running today.  This code pipes the CPU
232692f60a7Smrg	# types through head -n 1, so we only detect the type of CPU 0.
233692f60a7Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234692f60a7Smrg	case "$ALPHA_CPU_TYPE" in
235692f60a7Smrg	    "EV4 (21064)")
236692f60a7Smrg		UNAME_MACHINE="alpha" ;;
237692f60a7Smrg	    "EV4.5 (21064)")
238692f60a7Smrg		UNAME_MACHINE="alpha" ;;
239692f60a7Smrg	    "LCA4 (21066/21068)")
240692f60a7Smrg		UNAME_MACHINE="alpha" ;;
241692f60a7Smrg	    "EV5 (21164)")
242692f60a7Smrg		UNAME_MACHINE="alphaev5" ;;
243692f60a7Smrg	    "EV5.6 (21164A)")
244692f60a7Smrg		UNAME_MACHINE="alphaev56" ;;
245692f60a7Smrg	    "EV5.6 (21164PC)")
246692f60a7Smrg		UNAME_MACHINE="alphapca56" ;;
247692f60a7Smrg	    "EV5.7 (21164PC)")
248692f60a7Smrg		UNAME_MACHINE="alphapca57" ;;
249692f60a7Smrg	    "EV6 (21264)")
250692f60a7Smrg		UNAME_MACHINE="alphaev6" ;;
251692f60a7Smrg	    "EV6.7 (21264A)")
252692f60a7Smrg		UNAME_MACHINE="alphaev67" ;;
253692f60a7Smrg	    "EV6.8CB (21264C)")
254692f60a7Smrg		UNAME_MACHINE="alphaev68" ;;
255692f60a7Smrg	    "EV6.8AL (21264B)")
256692f60a7Smrg		UNAME_MACHINE="alphaev68" ;;
257692f60a7Smrg	    "EV6.8CX (21264D)")
258692f60a7Smrg		UNAME_MACHINE="alphaev68" ;;
259692f60a7Smrg	    "EV6.9A (21264/EV69A)")
260692f60a7Smrg		UNAME_MACHINE="alphaev69" ;;
261692f60a7Smrg	    "EV7 (21364)")
262692f60a7Smrg		UNAME_MACHINE="alphaev7" ;;
263692f60a7Smrg	    "EV7.9 (21364A)")
264692f60a7Smrg		UNAME_MACHINE="alphaev79" ;;
265692f60a7Smrg	esac
26654569438Smrg	# A Pn.n version is a patched version.
267692f60a7Smrg	# A Vn.n version is a released version.
268692f60a7Smrg	# A Tn.n version is a released field test version.
269692f60a7Smrg	# A Xn.n version is an unreleased experimental baselevel.
270692f60a7Smrg	# 1.2 uses "1.2" for uname -r.
27154569438Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27254569438Smrg	exit ;;
273692f60a7Smrg    Alpha\ *:Windows_NT*:*)
274692f60a7Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
275692f60a7Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
276692f60a7Smrg	# of the specific Alpha model?
277692f60a7Smrg	echo alpha-pc-interix
27854569438Smrg	exit ;;
279692f60a7Smrg    21064:Windows_NT:50:3)
280692f60a7Smrg	echo alpha-dec-winnt3.5
28154569438Smrg	exit ;;
282692f60a7Smrg    Amiga*:UNIX_System_V:4.0:*)
283692f60a7Smrg	echo m68k-unknown-sysv4
28454569438Smrg	exit ;;
285692f60a7Smrg    *:[Aa]miga[Oo][Ss]:*:*)
286692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
28754569438Smrg	exit ;;
288692f60a7Smrg    *:[Mm]orph[Oo][Ss]:*:*)
289692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-morphos
29054569438Smrg	exit ;;
291692f60a7Smrg    *:OS/390:*:*)
292692f60a7Smrg	echo i370-ibm-openedition
29354569438Smrg	exit ;;
29454569438Smrg    *:z/VM:*:*)
29554569438Smrg	echo s390-ibm-zvmoe
29654569438Smrg	exit ;;
29754569438Smrg    *:OS400:*:*)
29854569438Smrg        echo powerpc-ibm-os400
29954569438Smrg	exit ;;
300692f60a7Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
301692f60a7Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
30254569438Smrg	exit ;;
30354569438Smrg    arm:riscos:*:*|arm:RISCOS:*:*)
30454569438Smrg	echo arm-unknown-riscos
30554569438Smrg	exit ;;
306692f60a7Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
307692f60a7Smrg	echo hppa1.1-hitachi-hiuxmpp
30854569438Smrg	exit ;;
309692f60a7Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
310692f60a7Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
311692f60a7Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
312692f60a7Smrg		echo pyramid-pyramid-sysv3
313692f60a7Smrg	else
314692f60a7Smrg		echo pyramid-pyramid-bsd
315692f60a7Smrg	fi
31654569438Smrg	exit ;;
317692f60a7Smrg    NILE*:*:*:dcosx)
318692f60a7Smrg	echo pyramid-pyramid-svr4
31954569438Smrg	exit ;;
320692f60a7Smrg    DRS?6000:unix:4.0:6*)
321692f60a7Smrg	echo sparc-icl-nx6
32254569438Smrg	exit ;;
32354569438Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
324692f60a7Smrg	case `/usr/bin/uname -p` in
32554569438Smrg	    sparc) echo sparc-icl-nx7; exit ;;
326692f60a7Smrg	esac ;;
327692f60a7Smrg    sun4H:SunOS:5.*:*)
328692f60a7Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
32954569438Smrg	exit ;;
330692f60a7Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
331692f60a7Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33254569438Smrg	exit ;;
33354569438Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
334692f60a7Smrg	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33554569438Smrg	exit ;;
336692f60a7Smrg    sun4*:SunOS:6*:*)
337692f60a7Smrg	# According to config.sub, this is the proper way to canonicalize
338692f60a7Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
339692f60a7Smrg	# it's likely to be more like Solaris than SunOS4.
340692f60a7Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
34154569438Smrg	exit ;;
342692f60a7Smrg    sun4*:SunOS:*:*)
343692f60a7Smrg	case "`/usr/bin/arch -k`" in
344692f60a7Smrg	    Series*|S4*)
345692f60a7Smrg		UNAME_RELEASE=`uname -v`
346692f60a7Smrg		;;
347692f60a7Smrg	esac
348692f60a7Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
349692f60a7Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
35054569438Smrg	exit ;;
351692f60a7Smrg    sun3*:SunOS:*:*)
352692f60a7Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
35354569438Smrg	exit ;;
354692f60a7Smrg    sun*:*:4.2BSD:*)
355692f60a7Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
356692f60a7Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
357692f60a7Smrg	case "`/bin/arch`" in
358692f60a7Smrg	    sun3)
359692f60a7Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
360692f60a7Smrg		;;
361692f60a7Smrg	    sun4)
362692f60a7Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
363692f60a7Smrg		;;
364692f60a7Smrg	esac
36554569438Smrg	exit ;;
366692f60a7Smrg    aushp:SunOS:*:*)
367692f60a7Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
36854569438Smrg	exit ;;
369692f60a7Smrg    # The situation for MiNT is a little confusing.  The machine name
370692f60a7Smrg    # can be virtually everything (everything which is not
371692f60a7Smrg    # "atarist" or "atariste" at least should have a processor
372692f60a7Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
373692f60a7Smrg    # to the lowercase version "mint" (or "freemint").  Finally
374692f60a7Smrg    # the system name "TOS" denotes a system which is actually not
375692f60a7Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
376692f60a7Smrg    # be no problem.
377692f60a7Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
378692f60a7Smrg        echo m68k-atari-mint${UNAME_RELEASE}
37954569438Smrg	exit ;;
380692f60a7Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
381692f60a7Smrg	echo m68k-atari-mint${UNAME_RELEASE}
38254569438Smrg        exit ;;
383692f60a7Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
384692f60a7Smrg        echo m68k-atari-mint${UNAME_RELEASE}
38554569438Smrg	exit ;;
386692f60a7Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
387692f60a7Smrg        echo m68k-milan-mint${UNAME_RELEASE}
38854569438Smrg        exit ;;
389692f60a7Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
390692f60a7Smrg        echo m68k-hades-mint${UNAME_RELEASE}
39154569438Smrg        exit ;;
392692f60a7Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
393692f60a7Smrg        echo m68k-unknown-mint${UNAME_RELEASE}
39454569438Smrg        exit ;;
39554569438Smrg    m68k:machten:*:*)
39654569438Smrg	echo m68k-apple-machten${UNAME_RELEASE}
39754569438Smrg	exit ;;
398692f60a7Smrg    powerpc:machten:*:*)
399692f60a7Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
40054569438Smrg	exit ;;
401692f60a7Smrg    RISC*:Mach:*:*)
402692f60a7Smrg	echo mips-dec-mach_bsd4.3
40354569438Smrg	exit ;;
404692f60a7Smrg    RISC*:ULTRIX:*:*)
405692f60a7Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
40654569438Smrg	exit ;;
407692f60a7Smrg    VAX*:ULTRIX*:*:*)
408692f60a7Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
40954569438Smrg	exit ;;
410692f60a7Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
411692f60a7Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
41254569438Smrg	exit ;;
413692f60a7Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
414692f60a7Smrg	eval $set_cc_for_build
415692f60a7Smrg	sed 's/^	//' << EOF >$dummy.c
416692f60a7Smrg#ifdef __cplusplus
417692f60a7Smrg#include <stdio.h>  /* for printf() prototype */
418692f60a7Smrg	int main (int argc, char *argv[]) {
419692f60a7Smrg#else
420692f60a7Smrg	int main (argc, argv) int argc; char *argv[]; {
421692f60a7Smrg#endif
422692f60a7Smrg	#if defined (host_mips) && defined (MIPSEB)
423692f60a7Smrg	#if defined (SYSTYPE_SYSV)
424692f60a7Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
425692f60a7Smrg	#endif
426692f60a7Smrg	#if defined (SYSTYPE_SVR4)
427692f60a7Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
428692f60a7Smrg	#endif
429692f60a7Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
430692f60a7Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
431692f60a7Smrg	#endif
432692f60a7Smrg	#endif
433692f60a7Smrg	  exit (-1);
434692f60a7Smrg	}
435692f60a7SmrgEOF
43654569438Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
43754569438Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
43854569438Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
43954569438Smrg	    { echo "$SYSTEM_NAME"; exit; }
440692f60a7Smrg	echo mips-mips-riscos${UNAME_RELEASE}
44154569438Smrg	exit ;;
442692f60a7Smrg    Motorola:PowerMAX_OS:*:*)
443692f60a7Smrg	echo powerpc-motorola-powermax
44454569438Smrg	exit ;;
445692f60a7Smrg    Motorola:*:4.3:PL8-*)
446692f60a7Smrg	echo powerpc-harris-powermax
44754569438Smrg	exit ;;
448692f60a7Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
449692f60a7Smrg	echo powerpc-harris-powermax
45054569438Smrg	exit ;;
451692f60a7Smrg    Night_Hawk:Power_UNIX:*:*)
452692f60a7Smrg	echo powerpc-harris-powerunix
45354569438Smrg	exit ;;
454692f60a7Smrg    m88k:CX/UX:7*:*)
455692f60a7Smrg	echo m88k-harris-cxux7
45654569438Smrg	exit ;;
457692f60a7Smrg    m88k:*:4*:R4*)
458692f60a7Smrg	echo m88k-motorola-sysv4
45954569438Smrg	exit ;;
460692f60a7Smrg    m88k:*:3*:R3*)
461692f60a7Smrg	echo m88k-motorola-sysv3
46254569438Smrg	exit ;;
463692f60a7Smrg    AViiON:dgux:*:*)
464692f60a7Smrg        # DG/UX returns AViiON for all architectures
465692f60a7Smrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
466692f60a7Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
467692f60a7Smrg	then
468692f60a7Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
469692f60a7Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
470692f60a7Smrg	    then
471692f60a7Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
472692f60a7Smrg	    else
473692f60a7Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
474692f60a7Smrg	    fi
475692f60a7Smrg	else
476692f60a7Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
477692f60a7Smrg	fi
47854569438Smrg 	exit ;;
479692f60a7Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
480692f60a7Smrg	echo m88k-dolphin-sysv3
48154569438Smrg	exit ;;
482692f60a7Smrg    M88*:*:R3*:*)
483692f60a7Smrg	# Delta 88k system running SVR3
484692f60a7Smrg	echo m88k-motorola-sysv3
48554569438Smrg	exit ;;
486692f60a7Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
487692f60a7Smrg	echo m88k-tektronix-sysv3
48854569438Smrg	exit ;;
489692f60a7Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
490692f60a7Smrg	echo m68k-tektronix-bsd
49154569438Smrg	exit ;;
492692f60a7Smrg    *:IRIX*:*:*)
493692f60a7Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
49454569438Smrg	exit ;;
495692f60a7Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
49654569438Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
49754569438Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
498692f60a7Smrg    i*86:AIX:*:*)
499692f60a7Smrg	echo i386-ibm-aix
50054569438Smrg	exit ;;
501692f60a7Smrg    ia64:AIX:*:*)
502692f60a7Smrg	if [ -x /usr/bin/oslevel ] ; then
503692f60a7Smrg		IBM_REV=`/usr/bin/oslevel`
504692f60a7Smrg	else
505692f60a7Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
506692f60a7Smrg	fi
507692f60a7Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
50854569438Smrg	exit ;;
509692f60a7Smrg    *:AIX:2:3)
510692f60a7Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
511692f60a7Smrg		eval $set_cc_for_build
512692f60a7Smrg		sed 's/^		//' << EOF >$dummy.c
513692f60a7Smrg		#include <sys/systemcfg.h>
514692f60a7Smrg
515692f60a7Smrg		main()
516692f60a7Smrg			{
517692f60a7Smrg			if (!__power_pc())
518692f60a7Smrg				exit(1);
519692f60a7Smrg			puts("powerpc-ibm-aix3.2.5");
520692f60a7Smrg			exit(0);
521692f60a7Smrg			}
522692f60a7SmrgEOF
52354569438Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
52454569438Smrg		then
52554569438Smrg			echo "$SYSTEM_NAME"
52654569438Smrg		else
52754569438Smrg			echo rs6000-ibm-aix3.2.5
52854569438Smrg		fi
529692f60a7Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
530692f60a7Smrg		echo rs6000-ibm-aix3.2.4
531692f60a7Smrg	else
532692f60a7Smrg		echo rs6000-ibm-aix3.2
533692f60a7Smrg	fi
53454569438Smrg	exit ;;
53554569438Smrg    *:AIX:*:[456])
536692f60a7Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
537692f60a7Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
538692f60a7Smrg		IBM_ARCH=rs6000
539692f60a7Smrg	else
540692f60a7Smrg		IBM_ARCH=powerpc
541692f60a7Smrg	fi
542692f60a7Smrg	if [ -x /usr/bin/oslevel ] ; then
543692f60a7Smrg		IBM_REV=`/usr/bin/oslevel`
544692f60a7Smrg	else
545692f60a7Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
546692f60a7Smrg	fi
547692f60a7Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
54854569438Smrg	exit ;;
549692f60a7Smrg    *:AIX:*:*)
550692f60a7Smrg	echo rs6000-ibm-aix
55154569438Smrg	exit ;;
552692f60a7Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
553692f60a7Smrg	echo romp-ibm-bsd4.4
55454569438Smrg	exit ;;
555692f60a7Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
556692f60a7Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
55754569438Smrg	exit ;;                             # report: romp-ibm BSD 4.3
558692f60a7Smrg    *:BOSX:*:*)
559692f60a7Smrg	echo rs6000-bull-bosx
56054569438Smrg	exit ;;
561692f60a7Smrg    DPX/2?00:B.O.S.:*:*)
562692f60a7Smrg	echo m68k-bull-sysv3
56354569438Smrg	exit ;;
564692f60a7Smrg    9000/[34]??:4.3bsd:1.*:*)
565692f60a7Smrg	echo m68k-hp-bsd
56654569438Smrg	exit ;;
567692f60a7Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
568692f60a7Smrg	echo m68k-hp-bsd4.4
56954569438Smrg	exit ;;
570692f60a7Smrg    9000/[34678]??:HP-UX:*:*)
571692f60a7Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
572692f60a7Smrg	case "${UNAME_MACHINE}" in
573692f60a7Smrg	    9000/31? )            HP_ARCH=m68000 ;;
574692f60a7Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
575692f60a7Smrg	    9000/[678][0-9][0-9])
576692f60a7Smrg		if [ -x /usr/bin/getconf ]; then
577692f60a7Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
578692f60a7Smrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
579692f60a7Smrg                    case "${sc_cpu_version}" in
580692f60a7Smrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
581692f60a7Smrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
582692f60a7Smrg                      532)                      # CPU_PA_RISC2_0
583692f60a7Smrg                        case "${sc_kernel_bits}" in
584692f60a7Smrg                          32) HP_ARCH="hppa2.0n" ;;
585692f60a7Smrg                          64) HP_ARCH="hppa2.0w" ;;
586692f60a7Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
587692f60a7Smrg                        esac ;;
588692f60a7Smrg                    esac
589692f60a7Smrg		fi
590692f60a7Smrg		if [ "${HP_ARCH}" = "" ]; then
591692f60a7Smrg		    eval $set_cc_for_build
592692f60a7Smrg		    sed 's/^              //' << EOF >$dummy.c
593692f60a7Smrg
594692f60a7Smrg              #define _HPUX_SOURCE
595692f60a7Smrg              #include <stdlib.h>
596692f60a7Smrg              #include <unistd.h>
597692f60a7Smrg
598692f60a7Smrg              int main ()
599692f60a7Smrg              {
600692f60a7Smrg              #if defined(_SC_KERNEL_BITS)
601692f60a7Smrg                  long bits = sysconf(_SC_KERNEL_BITS);
602692f60a7Smrg              #endif
603692f60a7Smrg                  long cpu  = sysconf (_SC_CPU_VERSION);
604692f60a7Smrg
605692f60a7Smrg                  switch (cpu)
606692f60a7Smrg              	{
607692f60a7Smrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
608692f60a7Smrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
609692f60a7Smrg              	case CPU_PA_RISC2_0:
610692f60a7Smrg              #if defined(_SC_KERNEL_BITS)
611692f60a7Smrg              	    switch (bits)
612692f60a7Smrg              		{
613692f60a7Smrg              		case 64: puts ("hppa2.0w"); break;
614692f60a7Smrg              		case 32: puts ("hppa2.0n"); break;
615692f60a7Smrg              		default: puts ("hppa2.0"); break;
616692f60a7Smrg              		} break;
617692f60a7Smrg              #else  /* !defined(_SC_KERNEL_BITS) */
618692f60a7Smrg              	    puts ("hppa2.0"); break;
619692f60a7Smrg              #endif
620692f60a7Smrg              	default: puts ("hppa1.0"); break;
621692f60a7Smrg              	}
622692f60a7Smrg                  exit (0);
623692f60a7Smrg              }
624692f60a7SmrgEOF
625692f60a7Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
626692f60a7Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
627692f60a7Smrg		fi ;;
628692f60a7Smrg	esac
629692f60a7Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
630692f60a7Smrg	then
63154569438Smrg	    eval $set_cc_for_build
63254569438Smrg
63354569438Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
63454569438Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
63554569438Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
63654569438Smrg	    #
63754569438Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
63854569438Smrg	    # => hppa2.0w-hp-hpux11.23
63954569438Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
64054569438Smrg	    # => hppa64-hp-hpux11.23
64154569438Smrg
64254569438Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
64354569438Smrg		grep __LP64__ >/dev/null
644692f60a7Smrg	    then
645692f60a7Smrg		HP_ARCH="hppa2.0w"
646692f60a7Smrg	    else
647692f60a7Smrg		HP_ARCH="hppa64"
648692f60a7Smrg	    fi
649692f60a7Smrg	fi
650692f60a7Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
65154569438Smrg	exit ;;
652692f60a7Smrg    ia64:HP-UX:*:*)
653692f60a7Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
654692f60a7Smrg	echo ia64-hp-hpux${HPUX_REV}
65554569438Smrg	exit ;;
656692f60a7Smrg    3050*:HI-UX:*:*)
657692f60a7Smrg	eval $set_cc_for_build
658692f60a7Smrg	sed 's/^	//' << EOF >$dummy.c
659692f60a7Smrg	#include <unistd.h>
660692f60a7Smrg	int
661692f60a7Smrg	main ()
662692f60a7Smrg	{
663692f60a7Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
664692f60a7Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
665692f60a7Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
666692f60a7Smrg	     results, however.  */
667692f60a7Smrg	  if (CPU_IS_PA_RISC (cpu))
668692f60a7Smrg	    {
669692f60a7Smrg	      switch (cpu)
670692f60a7Smrg		{
671692f60a7Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
672692f60a7Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
673692f60a7Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
674692f60a7Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
675692f60a7Smrg		}
676692f60a7Smrg	    }
677692f60a7Smrg	  else if (CPU_IS_HP_MC68K (cpu))
678692f60a7Smrg	    puts ("m68k-hitachi-hiuxwe2");
679692f60a7Smrg	  else puts ("unknown-hitachi-hiuxwe2");
680692f60a7Smrg	  exit (0);
681692f60a7Smrg	}
682692f60a7SmrgEOF
68354569438Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
68454569438Smrg		{ echo "$SYSTEM_NAME"; exit; }
685692f60a7Smrg	echo unknown-hitachi-hiuxwe2
68654569438Smrg	exit ;;
687692f60a7Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
688692f60a7Smrg	echo hppa1.1-hp-bsd
68954569438Smrg	exit ;;
690692f60a7Smrg    9000/8??:4.3bsd:*:*)
691692f60a7Smrg	echo hppa1.0-hp-bsd
69254569438Smrg	exit ;;
693692f60a7Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
694692f60a7Smrg	echo hppa1.0-hp-mpeix
69554569438Smrg	exit ;;
696692f60a7Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
697692f60a7Smrg	echo hppa1.1-hp-osf
69854569438Smrg	exit ;;
699692f60a7Smrg    hp8??:OSF1:*:*)
700692f60a7Smrg	echo hppa1.0-hp-osf
70154569438Smrg	exit ;;
702692f60a7Smrg    i*86:OSF1:*:*)
703692f60a7Smrg	if [ -x /usr/sbin/sysversion ] ; then
704692f60a7Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
705692f60a7Smrg	else
706692f60a7Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
707692f60a7Smrg	fi
70854569438Smrg	exit ;;
709692f60a7Smrg    parisc*:Lites*:*:*)
710692f60a7Smrg	echo hppa1.1-hp-lites
71154569438Smrg	exit ;;
712692f60a7Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
713692f60a7Smrg	echo c1-convex-bsd
71454569438Smrg        exit ;;
715692f60a7Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
716692f60a7Smrg	if getsysinfo -f scalar_acc
717692f60a7Smrg	then echo c32-convex-bsd
718692f60a7Smrg	else echo c2-convex-bsd
719692f60a7Smrg	fi
72054569438Smrg        exit ;;
721692f60a7Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
722692f60a7Smrg	echo c34-convex-bsd
72354569438Smrg        exit ;;
724692f60a7Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
725692f60a7Smrg	echo c38-convex-bsd
72654569438Smrg        exit ;;
727692f60a7Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
728692f60a7Smrg	echo c4-convex-bsd
72954569438Smrg        exit ;;
730692f60a7Smrg    CRAY*Y-MP:*:*:*)
731692f60a7Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
73254569438Smrg	exit ;;
733692f60a7Smrg    CRAY*[A-Z]90:*:*:*)
734692f60a7Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
735692f60a7Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
736692f60a7Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
737692f60a7Smrg	      -e 's/\.[^.]*$/.X/'
73854569438Smrg	exit ;;
739692f60a7Smrg    CRAY*TS:*:*:*)
740692f60a7Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
74154569438Smrg	exit ;;
742692f60a7Smrg    CRAY*T3E:*:*:*)
743692f60a7Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
74454569438Smrg	exit ;;
745692f60a7Smrg    CRAY*SV1:*:*:*)
746692f60a7Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
74754569438Smrg	exit ;;
748692f60a7Smrg    *:UNICOS/mp:*:*)
74954569438Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
75054569438Smrg	exit ;;
751692f60a7Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
752692f60a7Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
753692f60a7Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
754692f60a7Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
755692f60a7Smrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
75654569438Smrg        exit ;;
75754569438Smrg    5000:UNIX_System_V:4.*:*)
75854569438Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
75954569438Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
76054569438Smrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
76154569438Smrg	exit ;;
762692f60a7Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
763692f60a7Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
76454569438Smrg	exit ;;
765692f60a7Smrg    sparc*:BSD/OS:*:*)
766692f60a7Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
76754569438Smrg	exit ;;
768692f60a7Smrg    *:BSD/OS:*:*)
769692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
77054569438Smrg	exit ;;
77154569438Smrg    *:FreeBSD:*:*)
77254569438Smrg	case ${UNAME_MACHINE} in
77354569438Smrg	    pc98)
77454569438Smrg		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
77554569438Smrg	    amd64)
77654569438Smrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
77754569438Smrg	    *)
77854569438Smrg		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
77954569438Smrg	esac
78054569438Smrg	exit ;;
781692f60a7Smrg    i*:CYGWIN*:*)
782692f60a7Smrg	echo ${UNAME_MACHINE}-pc-cygwin
78354569438Smrg	exit ;;
78454569438Smrg    *:MINGW*:*)
785692f60a7Smrg	echo ${UNAME_MACHINE}-pc-mingw32
78654569438Smrg	exit ;;
78754569438Smrg    i*:windows32*:*)
78854569438Smrg    	# uname -m includes "-pc" on this system.
78954569438Smrg    	echo ${UNAME_MACHINE}-mingw32
79054569438Smrg	exit ;;
791692f60a7Smrg    i*:PW*:*)
792692f60a7Smrg	echo ${UNAME_MACHINE}-pc-pw32
79354569438Smrg	exit ;;
79454569438Smrg    *:Interix*:[3456]*)
79554569438Smrg    	case ${UNAME_MACHINE} in
79654569438Smrg	    x86)
79754569438Smrg		echo i586-pc-interix${UNAME_RELEASE}
79854569438Smrg		exit ;;
79954569438Smrg	    EM64T | authenticamd)
80054569438Smrg		echo x86_64-unknown-interix${UNAME_RELEASE}
80154569438Smrg		exit ;;
80254569438Smrg	    IA64)
80354569438Smrg		echo ia64-unknown-interix${UNAME_RELEASE}
80454569438Smrg		exit ;;
80554569438Smrg	esac ;;
806692f60a7Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
807692f60a7Smrg	echo i${UNAME_MACHINE}-pc-mks
80854569438Smrg	exit ;;
809692f60a7Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
810692f60a7Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
811692f60a7Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
812692f60a7Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
813692f60a7Smrg	echo i586-pc-interix
81454569438Smrg	exit ;;
815692f60a7Smrg    i*:UWIN*:*)
816692f60a7Smrg	echo ${UNAME_MACHINE}-pc-uwin
81754569438Smrg	exit ;;
81854569438Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
81954569438Smrg	echo x86_64-unknown-cygwin
82054569438Smrg	exit ;;
821692f60a7Smrg    p*:CYGWIN*:*)
822692f60a7Smrg	echo powerpcle-unknown-cygwin
82354569438Smrg	exit ;;
824692f60a7Smrg    prep*:SunOS:5.*:*)
825692f60a7Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
82654569438Smrg	exit ;;
827692f60a7Smrg    *:GNU:*:*)
82854569438Smrg	# the GNU system
829692f60a7Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
83054569438Smrg	exit ;;
83154569438Smrg    *:GNU/*:*:*)
83254569438Smrg	# other systems with GNU libc and userland
83354569438Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
83454569438Smrg	exit ;;
835692f60a7Smrg    i*86:Minix:*:*)
836692f60a7Smrg	echo ${UNAME_MACHINE}-pc-minix
83754569438Smrg	exit ;;
838692f60a7Smrg    arm*:Linux:*:*)
83954569438Smrg	eval $set_cc_for_build
84054569438Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
84154569438Smrg	    | grep -q __ARM_EABI__
84254569438Smrg	then
84354569438Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnu
84454569438Smrg	else
84554569438Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
84654569438Smrg	fi
84754569438Smrg	exit ;;
84854569438Smrg    avr32*:Linux:*:*)
849692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
85054569438Smrg	exit ;;
851692f60a7Smrg    cris:Linux:*:*)
852692f60a7Smrg	echo cris-axis-linux-gnu
85354569438Smrg	exit ;;
85454569438Smrg    crisv32:Linux:*:*)
85554569438Smrg	echo crisv32-axis-linux-gnu
85654569438Smrg	exit ;;
85754569438Smrg    frv:Linux:*:*)
85854569438Smrg    	echo frv-unknown-linux-gnu
85954569438Smrg	exit ;;
860692f60a7Smrg    ia64:Linux:*:*)
86154569438Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
86254569438Smrg	exit ;;
86354569438Smrg    m32r*:Linux:*:*)
86454569438Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
86554569438Smrg	exit ;;
866692f60a7Smrg    m68*:Linux:*:*)
867692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
86854569438Smrg	exit ;;
869692f60a7Smrg    mips:Linux:*:*)
870692f60a7Smrg	eval $set_cc_for_build
871692f60a7Smrg	sed 's/^	//' << EOF >$dummy.c
872692f60a7Smrg	#undef CPU
873692f60a7Smrg	#undef mips
874692f60a7Smrg	#undef mipsel
875692f60a7Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
876692f60a7Smrg	CPU=mipsel
877692f60a7Smrg	#else
878692f60a7Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
879692f60a7Smrg	CPU=mips
880692f60a7Smrg	#else
881692f60a7Smrg	CPU=
882692f60a7Smrg	#endif
883692f60a7Smrg	#endif
884692f60a7SmrgEOF
88554569438Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
88654569438Smrg	    /^CPU/{
88754569438Smrg		s: ::g
88854569438Smrg		p
88954569438Smrg	    }'`"
89054569438Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
891692f60a7Smrg	;;
892692f60a7Smrg    mips64:Linux:*:*)
893692f60a7Smrg	eval $set_cc_for_build
894692f60a7Smrg	sed 's/^	//' << EOF >$dummy.c
895692f60a7Smrg	#undef CPU
896692f60a7Smrg	#undef mips64
897692f60a7Smrg	#undef mips64el
898692f60a7Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
899692f60a7Smrg	CPU=mips64el
900692f60a7Smrg	#else
901692f60a7Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
902692f60a7Smrg	CPU=mips64
903692f60a7Smrg	#else
904692f60a7Smrg	CPU=
905692f60a7Smrg	#endif
906692f60a7Smrg	#endif
907692f60a7SmrgEOF
90854569438Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
90954569438Smrg	    /^CPU/{
91054569438Smrg		s: ::g
91154569438Smrg		p
91254569438Smrg	    }'`"
91354569438Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
914692f60a7Smrg	;;
91554569438Smrg    or32:Linux:*:*)
91654569438Smrg	echo or32-unknown-linux-gnu
91754569438Smrg	exit ;;
918692f60a7Smrg    ppc:Linux:*:*)
91954569438Smrg	echo powerpc-unknown-linux-gnu
92054569438Smrg	exit ;;
921692f60a7Smrg    ppc64:Linux:*:*)
92254569438Smrg	echo powerpc64-unknown-linux-gnu
92354569438Smrg	exit ;;
924692f60a7Smrg    alpha:Linux:*:*)
925692f60a7Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
926692f60a7Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
927692f60a7Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
928692f60a7Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
929692f60a7Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
930692f60a7Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
931692f60a7Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
932692f60a7Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
933692f60a7Smrg        esac
934692f60a7Smrg	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
935692f60a7Smrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
936692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
93754569438Smrg	exit ;;
938692f60a7Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
939692f60a7Smrg	# Look for CPU level
940692f60a7Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
941692f60a7Smrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
942692f60a7Smrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
943692f60a7Smrg	  *)    echo hppa-unknown-linux-gnu ;;
944692f60a7Smrg	esac
94554569438Smrg	exit ;;
946692f60a7Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
947692f60a7Smrg	echo hppa64-unknown-linux-gnu
94854569438Smrg	exit ;;
949692f60a7Smrg    s390:Linux:*:* | s390x:Linux:*:*)
95054569438Smrg	echo ${UNAME_MACHINE}-ibm-linux
95154569438Smrg	exit ;;
952692f60a7Smrg    sh64*:Linux:*:*)
953692f60a7Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
95454569438Smrg	exit ;;
955692f60a7Smrg    sh*:Linux:*:*)
956692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
95754569438Smrg	exit ;;
958692f60a7Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
959692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
96054569438Smrg	exit ;;
96154569438Smrg    vax:Linux:*:*)
96254569438Smrg	echo ${UNAME_MACHINE}-dec-linux-gnu
96354569438Smrg	exit ;;
964692f60a7Smrg    x86_64:Linux:*:*)
96554569438Smrg	echo x86_64-unknown-linux-gnu
96654569438Smrg	exit ;;
96754569438Smrg    xtensa*:Linux:*:*)
96854569438Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
96954569438Smrg	exit ;;
970692f60a7Smrg    i*86:Linux:*:*)
971692f60a7Smrg	# The BFD linker knows what the default object file format is, so
972692f60a7Smrg	# first see if it will tell us. cd to the root directory to prevent
973692f60a7Smrg	# problems with other programs or directories called `ld' in the path.
974692f60a7Smrg	# Set LC_ALL=C to ensure ld outputs messages in English.
975692f60a7Smrg	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
976692f60a7Smrg			 | sed -ne '/supported targets:/!d
977692f60a7Smrg				    s/[ 	][ 	]*/ /g
978692f60a7Smrg				    s/.*supported targets: *//
979692f60a7Smrg				    s/ .*//
980692f60a7Smrg				    p'`
981692f60a7Smrg        case "$ld_supported_targets" in
982692f60a7Smrg	  elf32-i386)
983692f60a7Smrg		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
984692f60a7Smrg		;;
985692f60a7Smrg	  a.out-i386-linux)
986692f60a7Smrg		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
98754569438Smrg		exit ;;
988692f60a7Smrg	  coff-i386)
989692f60a7Smrg		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
99054569438Smrg		exit ;;
991692f60a7Smrg	  "")
992692f60a7Smrg		# Either a pre-BFD a.out linker (linux-gnuoldld) or
993692f60a7Smrg		# one that does not give us useful --help.
994692f60a7Smrg		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
99554569438Smrg		exit ;;
996692f60a7Smrg	esac
997692f60a7Smrg	# Determine whether the default compiler is a.out or elf
998692f60a7Smrg	eval $set_cc_for_build
999692f60a7Smrg	sed 's/^	//' << EOF >$dummy.c
1000692f60a7Smrg	#include <features.h>
1001692f60a7Smrg	#ifdef __ELF__
1002692f60a7Smrg	# ifdef __GLIBC__
1003692f60a7Smrg	#  if __GLIBC__ >= 2
1004692f60a7Smrg	LIBC=gnu
1005692f60a7Smrg	#  else
1006692f60a7Smrg	LIBC=gnulibc1
1007692f60a7Smrg	#  endif
1008692f60a7Smrg	# else
1009692f60a7Smrg	LIBC=gnulibc1
1010692f60a7Smrg	# endif
1011692f60a7Smrg	#else
101254569438Smrg	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1013692f60a7Smrg	LIBC=gnu
1014692f60a7Smrg	#else
1015692f60a7Smrg	LIBC=gnuaout
1016692f60a7Smrg	#endif
1017692f60a7Smrg	#endif
101854569438Smrg	#ifdef __dietlibc__
101954569438Smrg	LIBC=dietlibc
102054569438Smrg	#endif
1021692f60a7SmrgEOF
102254569438Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
102354569438Smrg	    /^LIBC/{
102454569438Smrg		s: ::g
102554569438Smrg		p
102654569438Smrg	    }'`"
102754569438Smrg	test x"${LIBC}" != x && {
102854569438Smrg		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
102954569438Smrg		exit
103054569438Smrg	}
103154569438Smrg	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1032692f60a7Smrg	;;
1033692f60a7Smrg    i*86:DYNIX/ptx:4*:*)
1034692f60a7Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1035692f60a7Smrg	# earlier versions are messed up and put the nodename in both
1036692f60a7Smrg	# sysname and nodename.
1037692f60a7Smrg	echo i386-sequent-sysv4
103854569438Smrg	exit ;;
1039692f60a7Smrg    i*86:UNIX_SV:4.2MP:2.*)
1040692f60a7Smrg        # Unixware is an offshoot of SVR4, but it has its own version
1041692f60a7Smrg        # number series starting with 2...
1042692f60a7Smrg        # I am not positive that other SVR4 systems won't match this,
1043692f60a7Smrg	# I just have to hope.  -- rms.
1044692f60a7Smrg        # Use sysv4.2uw... so that sysv4* matches it.
1045692f60a7Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
104654569438Smrg	exit ;;
1047692f60a7Smrg    i*86:OS/2:*:*)
1048692f60a7Smrg	# If we were able to find `uname', then EMX Unix compatibility
1049692f60a7Smrg	# is probably installed.
1050692f60a7Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
105154569438Smrg	exit ;;
1052692f60a7Smrg    i*86:XTS-300:*:STOP)
1053692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-stop
105454569438Smrg	exit ;;
1055692f60a7Smrg    i*86:atheos:*:*)
1056692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-atheos
105754569438Smrg	exit ;;
105854569438Smrg    i*86:syllable:*:*)
105954569438Smrg	echo ${UNAME_MACHINE}-pc-syllable
106054569438Smrg	exit ;;
1061692f60a7Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1062692f60a7Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
106354569438Smrg	exit ;;
1064692f60a7Smrg    i*86:*DOS:*:*)
1065692f60a7Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
106654569438Smrg	exit ;;
1067692f60a7Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1068692f60a7Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1069692f60a7Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1070692f60a7Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1071692f60a7Smrg	else
1072692f60a7Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1073692f60a7Smrg	fi
107454569438Smrg	exit ;;
107554569438Smrg    i*86:*:5:[678]*)
107654569438Smrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
1077692f60a7Smrg	case `/bin/uname -X | grep "^Machine"` in
1078692f60a7Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
1079692f60a7Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
1080692f60a7Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1081692f60a7Smrg	esac
1082692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
108354569438Smrg	exit ;;
1084692f60a7Smrg    i*86:*:3.2:*)
1085692f60a7Smrg	if test -f /usr/options/cb.name; then
1086692f60a7Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1087692f60a7Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1088692f60a7Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
1089692f60a7Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1090692f60a7Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1091692f60a7Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1092692f60a7Smrg			&& UNAME_MACHINE=i586
1093692f60a7Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1094692f60a7Smrg			&& UNAME_MACHINE=i686
1095692f60a7Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1096692f60a7Smrg			&& UNAME_MACHINE=i686
1097692f60a7Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1098692f60a7Smrg	else
1099692f60a7Smrg		echo ${UNAME_MACHINE}-pc-sysv32
1100692f60a7Smrg	fi
110154569438Smrg	exit ;;
1102692f60a7Smrg    pc:*:*:*)
1103692f60a7Smrg	# Left here for compatibility:
1104692f60a7Smrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1105692f60a7Smrg        # the processor, so we play safe by assuming i386.
1106692f60a7Smrg	echo i386-pc-msdosdjgpp
110754569438Smrg        exit ;;
1108692f60a7Smrg    Intel:Mach:3*:*)
1109692f60a7Smrg	echo i386-pc-mach3
111054569438Smrg	exit ;;
1111692f60a7Smrg    paragon:*:*:*)
1112692f60a7Smrg	echo i860-intel-osf1
111354569438Smrg	exit ;;
1114692f60a7Smrg    i860:*:4.*:*) # i860-SVR4
1115692f60a7Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1116692f60a7Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1117692f60a7Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
1118692f60a7Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1119692f60a7Smrg	fi
112054569438Smrg	exit ;;
1121692f60a7Smrg    mini*:CTIX:SYS*5:*)
1122692f60a7Smrg	# "miniframe"
1123692f60a7Smrg	echo m68010-convergent-sysv
112454569438Smrg	exit ;;
1125692f60a7Smrg    mc68k:UNIX:SYSTEM5:3.51m)
1126692f60a7Smrg	echo m68k-convergent-sysv
112754569438Smrg	exit ;;
1128692f60a7Smrg    M680?0:D-NIX:5.3:*)
1129692f60a7Smrg	echo m68k-diab-dnix
113054569438Smrg	exit ;;
113154569438Smrg    M68*:*:R3V[5678]*:*)
113254569438Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
113354569438Smrg    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)
1134692f60a7Smrg	OS_REL=''
1135692f60a7Smrg	test -r /etc/.relid \
1136692f60a7Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1137692f60a7Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
113854569438Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1139692f60a7Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
114054569438Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1141692f60a7Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1142692f60a7Smrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
114354569438Smrg          && { echo i486-ncr-sysv4; exit; } ;;
1144692f60a7Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1145692f60a7Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
114654569438Smrg	exit ;;
1147692f60a7Smrg    mc68030:UNIX_System_V:4.*:*)
1148692f60a7Smrg	echo m68k-atari-sysv4
114954569438Smrg	exit ;;
1150692f60a7Smrg    TSUNAMI:LynxOS:2.*:*)
1151692f60a7Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
115254569438Smrg	exit ;;
1153692f60a7Smrg    rs6000:LynxOS:2.*:*)
1154692f60a7Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
115554569438Smrg	exit ;;
1156692f60a7Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1157692f60a7Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
115854569438Smrg	exit ;;
1159692f60a7Smrg    SM[BE]S:UNIX_SV:*:*)
1160692f60a7Smrg	echo mips-dde-sysv${UNAME_RELEASE}
116154569438Smrg	exit ;;
1162692f60a7Smrg    RM*:ReliantUNIX-*:*:*)
1163692f60a7Smrg	echo mips-sni-sysv4
116454569438Smrg	exit ;;
1165692f60a7Smrg    RM*:SINIX-*:*:*)
1166692f60a7Smrg	echo mips-sni-sysv4
116754569438Smrg	exit ;;
1168692f60a7Smrg    *:SINIX-*:*:*)
1169692f60a7Smrg	if uname -p 2>/dev/null >/dev/null ; then
1170692f60a7Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
1171692f60a7Smrg		echo ${UNAME_MACHINE}-sni-sysv4
1172692f60a7Smrg	else
1173692f60a7Smrg		echo ns32k-sni-sysv
1174692f60a7Smrg	fi
117554569438Smrg	exit ;;
1176692f60a7Smrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1177692f60a7Smrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1178692f60a7Smrg        echo i586-unisys-sysv4
117954569438Smrg        exit ;;
1180692f60a7Smrg    *:UNIX_System_V:4*:FTX*)
1181692f60a7Smrg	# From Gerald Hewes <hewes@openmarket.com>.
1182692f60a7Smrg	# How about differentiating between stratus architectures? -djm
1183692f60a7Smrg	echo hppa1.1-stratus-sysv4
118454569438Smrg	exit ;;
1185692f60a7Smrg    *:*:*:FTX*)
1186692f60a7Smrg	# From seanf@swdc.stratus.com.
1187692f60a7Smrg	echo i860-stratus-sysv4
118854569438Smrg	exit ;;
118954569438Smrg    i*86:VOS:*:*)
119054569438Smrg	# From Paul.Green@stratus.com.
119154569438Smrg	echo ${UNAME_MACHINE}-stratus-vos
119254569438Smrg	exit ;;
1193692f60a7Smrg    *:VOS:*:*)
1194692f60a7Smrg	# From Paul.Green@stratus.com.
1195692f60a7Smrg	echo hppa1.1-stratus-vos
119654569438Smrg	exit ;;
1197692f60a7Smrg    mc68*:A/UX:*:*)
1198692f60a7Smrg	echo m68k-apple-aux${UNAME_RELEASE}
119954569438Smrg	exit ;;
1200692f60a7Smrg    news*:NEWS-OS:6*:*)
1201692f60a7Smrg	echo mips-sony-newsos6
120254569438Smrg	exit ;;
1203692f60a7Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1204692f60a7Smrg	if [ -d /usr/nec ]; then
1205692f60a7Smrg	        echo mips-nec-sysv${UNAME_RELEASE}
1206692f60a7Smrg	else
1207692f60a7Smrg	        echo mips-unknown-sysv${UNAME_RELEASE}
1208692f60a7Smrg	fi
120954569438Smrg        exit ;;
1210692f60a7Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
1211692f60a7Smrg	echo powerpc-be-beos
121254569438Smrg	exit ;;
1213692f60a7Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
1214692f60a7Smrg	echo powerpc-apple-beos
121554569438Smrg	exit ;;
1216692f60a7Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1217692f60a7Smrg	echo i586-pc-beos
121854569438Smrg	exit ;;
1219692f60a7Smrg    SX-4:SUPER-UX:*:*)
1220692f60a7Smrg	echo sx4-nec-superux${UNAME_RELEASE}
122154569438Smrg	exit ;;
1222692f60a7Smrg    SX-5:SUPER-UX:*:*)
1223692f60a7Smrg	echo sx5-nec-superux${UNAME_RELEASE}
122454569438Smrg	exit ;;
1225692f60a7Smrg    SX-6:SUPER-UX:*:*)
1226692f60a7Smrg	echo sx6-nec-superux${UNAME_RELEASE}
122754569438Smrg	exit ;;
122854569438Smrg    SX-7:SUPER-UX:*:*)
122954569438Smrg	echo sx7-nec-superux${UNAME_RELEASE}
123054569438Smrg	exit ;;
123154569438Smrg    SX-8:SUPER-UX:*:*)
123254569438Smrg	echo sx8-nec-superux${UNAME_RELEASE}
123354569438Smrg	exit ;;
123454569438Smrg    SX-8R:SUPER-UX:*:*)
123554569438Smrg	echo sx8r-nec-superux${UNAME_RELEASE}
123654569438Smrg	exit ;;
1237692f60a7Smrg    Power*:Rhapsody:*:*)
1238692f60a7Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
123954569438Smrg	exit ;;
1240692f60a7Smrg    *:Rhapsody:*:*)
1241692f60a7Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
124254569438Smrg	exit ;;
1243692f60a7Smrg    *:Darwin:*:*)
124454569438Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
124554569438Smrg	case $UNAME_PROCESSOR in
124654569438Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
1247692f60a7Smrg	esac
1248692f60a7Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
124954569438Smrg	exit ;;
1250692f60a7Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1251692f60a7Smrg	UNAME_PROCESSOR=`uname -p`
1252692f60a7Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
1253692f60a7Smrg		UNAME_PROCESSOR=i386
1254692f60a7Smrg		UNAME_MACHINE=pc
1255692f60a7Smrg	fi
1256692f60a7Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
125754569438Smrg	exit ;;
1258692f60a7Smrg    *:QNX:*:4*)
1259692f60a7Smrg	echo i386-pc-qnx
126054569438Smrg	exit ;;
126154569438Smrg    NSE-?:NONSTOP_KERNEL:*:*)
126254569438Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
126354569438Smrg	exit ;;
126454569438Smrg    NSR-?:NONSTOP_KERNEL:*:*)
1265692f60a7Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
126654569438Smrg	exit ;;
1267692f60a7Smrg    *:NonStop-UX:*:*)
1268692f60a7Smrg	echo mips-compaq-nonstopux
126954569438Smrg	exit ;;
1270692f60a7Smrg    BS2000:POSIX*:*:*)
1271692f60a7Smrg	echo bs2000-siemens-sysv
127254569438Smrg	exit ;;
1273692f60a7Smrg    DS/*:UNIX_System_V:*:*)
1274692f60a7Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
127554569438Smrg	exit ;;
1276692f60a7Smrg    *:Plan9:*:*)
1277692f60a7Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
1278692f60a7Smrg	# is converted to i386 for consistency with other x86
1279692f60a7Smrg	# operating systems.
1280692f60a7Smrg	if test "$cputype" = "386"; then
1281692f60a7Smrg	    UNAME_MACHINE=i386
1282692f60a7Smrg	else
1283692f60a7Smrg	    UNAME_MACHINE="$cputype"
1284692f60a7Smrg	fi
1285692f60a7Smrg	echo ${UNAME_MACHINE}-unknown-plan9
128654569438Smrg	exit ;;
1287692f60a7Smrg    *:TOPS-10:*:*)
1288692f60a7Smrg	echo pdp10-unknown-tops10
128954569438Smrg	exit ;;
1290692f60a7Smrg    *:TENEX:*:*)
1291692f60a7Smrg	echo pdp10-unknown-tenex
129254569438Smrg	exit ;;
1293692f60a7Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1294692f60a7Smrg	echo pdp10-dec-tops20
129554569438Smrg	exit ;;
1296692f60a7Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1297692f60a7Smrg	echo pdp10-xkl-tops20
129854569438Smrg	exit ;;
1299692f60a7Smrg    *:TOPS-20:*:*)
1300692f60a7Smrg	echo pdp10-unknown-tops20
130154569438Smrg	exit ;;
1302692f60a7Smrg    *:ITS:*:*)
1303692f60a7Smrg	echo pdp10-unknown-its
130454569438Smrg	exit ;;
1305692f60a7Smrg    SEI:*:*:SEIUX)
1306692f60a7Smrg        echo mips-sei-seiux${UNAME_RELEASE}
130754569438Smrg	exit ;;
130854569438Smrg    *:DragonFly:*:*)
130954569438Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
131054569438Smrg	exit ;;
131154569438Smrg    *:*VMS:*:*)
131254569438Smrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
131354569438Smrg	case "${UNAME_MACHINE}" in
131454569438Smrg	    A*) echo alpha-dec-vms ; exit ;;
131554569438Smrg	    I*) echo ia64-dec-vms ; exit ;;
131654569438Smrg	    V*) echo vax-dec-vms ; exit ;;
131754569438Smrg	esac ;;
131854569438Smrg    *:XENIX:*:SysV)
131954569438Smrg	echo i386-pc-xenix
132054569438Smrg	exit ;;
132154569438Smrg    i*86:skyos:*:*)
132254569438Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
132354569438Smrg	exit ;;
132454569438Smrg    i*86:rdos:*:*)
132554569438Smrg	echo ${UNAME_MACHINE}-pc-rdos
132654569438Smrg	exit ;;
1327692f60a7Smrgesac
1328692f60a7Smrg
1329692f60a7Smrg#echo '(No uname command or uname output not recognized.)' 1>&2
1330692f60a7Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1331692f60a7Smrg
1332692f60a7Smrgeval $set_cc_for_build
1333692f60a7Smrgcat >$dummy.c <<EOF
1334692f60a7Smrg#ifdef _SEQUENT_
1335692f60a7Smrg# include <sys/types.h>
1336692f60a7Smrg# include <sys/utsname.h>
1337692f60a7Smrg#endif
1338692f60a7Smrgmain ()
1339692f60a7Smrg{
1340692f60a7Smrg#if defined (sony)
1341692f60a7Smrg#if defined (MIPSEB)
1342692f60a7Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1343692f60a7Smrg     I don't know....  */
1344692f60a7Smrg  printf ("mips-sony-bsd\n"); exit (0);
1345692f60a7Smrg#else
1346692f60a7Smrg#include <sys/param.h>
1347692f60a7Smrg  printf ("m68k-sony-newsos%s\n",
1348692f60a7Smrg#ifdef NEWSOS4
1349692f60a7Smrg          "4"
1350692f60a7Smrg#else
1351692f60a7Smrg	  ""
1352692f60a7Smrg#endif
1353692f60a7Smrg         ); exit (0);
1354692f60a7Smrg#endif
1355692f60a7Smrg#endif
1356692f60a7Smrg
1357692f60a7Smrg#if defined (__arm) && defined (__acorn) && defined (__unix)
135854569438Smrg  printf ("arm-acorn-riscix\n"); exit (0);
1359692f60a7Smrg#endif
1360692f60a7Smrg
1361692f60a7Smrg#if defined (hp300) && !defined (hpux)
1362692f60a7Smrg  printf ("m68k-hp-bsd\n"); exit (0);
1363692f60a7Smrg#endif
1364692f60a7Smrg
1365692f60a7Smrg#if defined (NeXT)
1366692f60a7Smrg#if !defined (__ARCHITECTURE__)
1367692f60a7Smrg#define __ARCHITECTURE__ "m68k"
1368692f60a7Smrg#endif
1369692f60a7Smrg  int version;
1370692f60a7Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1371692f60a7Smrg  if (version < 4)
1372692f60a7Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1373692f60a7Smrg  else
1374692f60a7Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1375692f60a7Smrg  exit (0);
1376692f60a7Smrg#endif
1377692f60a7Smrg
1378692f60a7Smrg#if defined (MULTIMAX) || defined (n16)
1379692f60a7Smrg#if defined (UMAXV)
1380692f60a7Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
1381692f60a7Smrg#else
1382692f60a7Smrg#if defined (CMU)
1383692f60a7Smrg  printf ("ns32k-encore-mach\n"); exit (0);
1384692f60a7Smrg#else
1385692f60a7Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
1386692f60a7Smrg#endif
1387692f60a7Smrg#endif
1388692f60a7Smrg#endif
1389692f60a7Smrg
1390692f60a7Smrg#if defined (__386BSD__)
1391692f60a7Smrg  printf ("i386-pc-bsd\n"); exit (0);
1392692f60a7Smrg#endif
1393692f60a7Smrg
1394692f60a7Smrg#if defined (sequent)
1395692f60a7Smrg#if defined (i386)
1396692f60a7Smrg  printf ("i386-sequent-dynix\n"); exit (0);
1397692f60a7Smrg#endif
1398692f60a7Smrg#if defined (ns32000)
1399692f60a7Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
1400692f60a7Smrg#endif
1401692f60a7Smrg#endif
1402692f60a7Smrg
1403692f60a7Smrg#if defined (_SEQUENT_)
1404692f60a7Smrg    struct utsname un;
1405692f60a7Smrg
1406692f60a7Smrg    uname(&un);
1407692f60a7Smrg
1408692f60a7Smrg    if (strncmp(un.version, "V2", 2) == 0) {
1409692f60a7Smrg	printf ("i386-sequent-ptx2\n"); exit (0);
1410692f60a7Smrg    }
1411692f60a7Smrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1412692f60a7Smrg	printf ("i386-sequent-ptx1\n"); exit (0);
1413692f60a7Smrg    }
1414692f60a7Smrg    printf ("i386-sequent-ptx\n"); exit (0);
1415692f60a7Smrg
1416692f60a7Smrg#endif
1417692f60a7Smrg
1418692f60a7Smrg#if defined (vax)
1419692f60a7Smrg# if !defined (ultrix)
1420692f60a7Smrg#  include <sys/param.h>
1421692f60a7Smrg#  if defined (BSD)
1422692f60a7Smrg#   if BSD == 43
1423692f60a7Smrg      printf ("vax-dec-bsd4.3\n"); exit (0);
1424692f60a7Smrg#   else
1425692f60a7Smrg#    if BSD == 199006
1426692f60a7Smrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1427692f60a7Smrg#    else
1428692f60a7Smrg      printf ("vax-dec-bsd\n"); exit (0);
1429692f60a7Smrg#    endif
1430692f60a7Smrg#   endif
1431692f60a7Smrg#  else
1432692f60a7Smrg    printf ("vax-dec-bsd\n"); exit (0);
1433692f60a7Smrg#  endif
1434692f60a7Smrg# else
1435692f60a7Smrg    printf ("vax-dec-ultrix\n"); exit (0);
1436692f60a7Smrg# endif
1437692f60a7Smrg#endif
1438692f60a7Smrg
1439692f60a7Smrg#if defined (alliant) && defined (i860)
1440692f60a7Smrg  printf ("i860-alliant-bsd\n"); exit (0);
1441692f60a7Smrg#endif
1442692f60a7Smrg
1443692f60a7Smrg  exit (1);
1444692f60a7Smrg}
1445692f60a7SmrgEOF
1446692f60a7Smrg
144754569438Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
144854569438Smrg	{ echo "$SYSTEM_NAME"; exit; }
1449692f60a7Smrg
1450692f60a7Smrg# Apollos put the system type in the environment.
1451692f60a7Smrg
145254569438Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1453692f60a7Smrg
1454692f60a7Smrg# Convex versions that predate uname can use getsysinfo(1)
1455692f60a7Smrg
1456692f60a7Smrgif [ -x /usr/convex/getsysinfo ]
1457692f60a7Smrgthen
1458692f60a7Smrg    case `getsysinfo -f cpu_type` in
1459692f60a7Smrg    c1*)
1460692f60a7Smrg	echo c1-convex-bsd
146154569438Smrg	exit ;;
1462692f60a7Smrg    c2*)
1463692f60a7Smrg	if getsysinfo -f scalar_acc
1464692f60a7Smrg	then echo c32-convex-bsd
1465692f60a7Smrg	else echo c2-convex-bsd
1466692f60a7Smrg	fi
146754569438Smrg	exit ;;
1468692f60a7Smrg    c34*)
1469692f60a7Smrg	echo c34-convex-bsd
147054569438Smrg	exit ;;
1471692f60a7Smrg    c38*)
1472692f60a7Smrg	echo c38-convex-bsd
147354569438Smrg	exit ;;
1474692f60a7Smrg    c4*)
1475692f60a7Smrg	echo c4-convex-bsd
147654569438Smrg	exit ;;
1477692f60a7Smrg    esac
1478692f60a7Smrgfi
1479692f60a7Smrg
1480692f60a7Smrgcat >&2 <<EOF
1481692f60a7Smrg$0: unable to guess system type
1482692f60a7Smrg
1483692f60a7SmrgThis script, last modified $timestamp, has failed to recognize
1484692f60a7Smrgthe operating system you are using. It is advised that you
1485692f60a7Smrgdownload the most up to date version of the config scripts from
1486692f60a7Smrg
148754569438Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
148854569438Smrgand
148954569438Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1490692f60a7Smrg
1491692f60a7SmrgIf the version you run ($0) is already up to date, please
1492692f60a7Smrgsend the following data and any information you think might be
1493692f60a7Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
1494692f60a7Smrginformation to handle your system.
1495692f60a7Smrg
1496692f60a7Smrgconfig.guess timestamp = $timestamp
1497692f60a7Smrg
1498692f60a7Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
1499692f60a7Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
1500692f60a7Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
1501692f60a7Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
1502692f60a7Smrg
1503692f60a7Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1504692f60a7Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
1505692f60a7Smrg
1506692f60a7Smrghostinfo               = `(hostinfo) 2>/dev/null`
1507692f60a7Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
1508692f60a7Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
1509692f60a7Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
1510692f60a7Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
1511692f60a7Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1512692f60a7Smrg
1513692f60a7SmrgUNAME_MACHINE = ${UNAME_MACHINE}
1514692f60a7SmrgUNAME_RELEASE = ${UNAME_RELEASE}
1515692f60a7SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
1516692f60a7SmrgUNAME_VERSION = ${UNAME_VERSION}
1517692f60a7SmrgEOF
1518692f60a7Smrg
1519692f60a7Smrgexit 1
1520692f60a7Smrg
1521692f60a7Smrg# Local variables:
1522692f60a7Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
1523692f60a7Smrg# time-stamp-start: "timestamp='"
1524692f60a7Smrg# time-stamp-format: "%:y-%02m-%02d"
1525692f60a7Smrg# time-stamp-end: "'"
1526692f60a7Smrg# End:
1527