config.guess revision 994689c1
17a84e134Smrg#! /bin/sh
27a84e134Smrg# Attempt to guess a canonical system name.
37a84e134Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4994689c1Smrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5ab902922Smrg#   Free Software Foundation, Inc.
67a84e134Smrg
7994689c1Smrgtimestamp='2010-08-21'
87a84e134Smrg
97a84e134Smrg# This file is free software; you can redistribute it and/or modify it
107a84e134Smrg# under the terms of the GNU General Public License as published by
117a84e134Smrg# the Free Software Foundation; either version 2 of the License, or
127a84e134Smrg# (at your option) any later version.
137a84e134Smrg#
147a84e134Smrg# This program is distributed in the hope that it will be useful, but
157a84e134Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
167a84e134Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
177a84e134Smrg# General Public License for more details.
187a84e134Smrg#
197a84e134Smrg# You should have received a copy of the GNU General Public License
207a84e134Smrg# along with this program; if not, write to the Free Software
217a84e134Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
227a84e134Smrg# 02110-1301, USA.
237a84e134Smrg#
247a84e134Smrg# As a special exception to the GNU General Public License, if you
257a84e134Smrg# distribute this file as part of a program that contains a
267a84e134Smrg# configuration script generated by Autoconf, you may include it under
277a84e134Smrg# the same distribution terms that you use for the rest of that program.
287a84e134Smrg
297a84e134Smrg
30994689c1Smrg# Originally written by Per Bothner.  Please send patches (context
31994689c1Smrg# diff format) to <config-patches@gnu.org> and include a ChangeLog
32994689c1Smrg# entry.
337a84e134Smrg#
347a84e134Smrg# This script attempts to guess a canonical system name similar to
357a84e134Smrg# config.sub.  If it succeeds, it prints the system name on stdout, and
367a84e134Smrg# exits with 0.  Otherwise, it exits with 1.
377a84e134Smrg#
38994689c1Smrg# You can get the latest version of this script from:
39994689c1Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
407a84e134Smrg
417a84e134Smrgme=`echo "$0" | sed -e 's,.*/,,'`
427a84e134Smrg
437a84e134Smrgusage="\
447a84e134SmrgUsage: $0 [OPTION]
457a84e134Smrg
467a84e134SmrgOutput the configuration name of the system \`$me' is run on.
477a84e134Smrg
487a84e134SmrgOperation modes:
497a84e134Smrg  -h, --help         print this help, then exit
507a84e134Smrg  -t, --time-stamp   print date of last modification, then exit
517a84e134Smrg  -v, --version      print version number, then exit
527a84e134Smrg
537a84e134SmrgReport bugs and patches to <config-patches@gnu.org>."
547a84e134Smrg
557a84e134Smrgversion="\
567a84e134SmrgGNU config.guess ($timestamp)
577a84e134Smrg
587a84e134SmrgOriginally written by Per Bothner.
59994689c1SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
60994689c1Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
61994689c1SmrgSoftware Foundation, Inc.
627a84e134Smrg
637a84e134SmrgThis is free software; see the source for copying conditions.  There is NO
647a84e134Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
657a84e134Smrg
667a84e134Smrghelp="
677a84e134SmrgTry \`$me --help' for more information."
687a84e134Smrg
697a84e134Smrg# Parse command line
707a84e134Smrgwhile test $# -gt 0 ; do
717a84e134Smrg  case $1 in
727a84e134Smrg    --time-stamp | --time* | -t )
737a84e134Smrg       echo "$timestamp" ; exit ;;
747a84e134Smrg    --version | -v )
757a84e134Smrg       echo "$version" ; exit ;;
767a84e134Smrg    --help | --h* | -h )
777a84e134Smrg       echo "$usage"; exit ;;
787a84e134Smrg    -- )     # Stop option processing
797a84e134Smrg       shift; break ;;
807a84e134Smrg    - )	# Use stdin as input.
817a84e134Smrg       break ;;
827a84e134Smrg    -* )
837a84e134Smrg       echo "$me: invalid option $1$help" >&2
847a84e134Smrg       exit 1 ;;
857a84e134Smrg    * )
867a84e134Smrg       break ;;
877a84e134Smrg  esac
887a84e134Smrgdone
897a84e134Smrg
907a84e134Smrgif test $# != 0; then
917a84e134Smrg  echo "$me: too many arguments$help" >&2
927a84e134Smrg  exit 1
937a84e134Smrgfi
947a84e134Smrg
95994689c1Smrgtrap 'exit 1' HUP INT TERM
967a84e134Smrg
977a84e134Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
987a84e134Smrg# compiler to aid in system detection is discouraged as it requires
997a84e134Smrg# temporary files to be created and, as you can see below, it is a
1007a84e134Smrg# headache to deal with in a portable fashion.
1017a84e134Smrg
1027a84e134Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
1037a84e134Smrg# use `HOST_CC' if defined, but it is deprecated.
1047a84e134Smrg
1057a84e134Smrg# Portable tmp directory creation inspired by the Autoconf team.
1067a84e134Smrg
1077a84e134Smrgset_cc_for_build='
1087a84e134Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
109994689c1Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
1107a84e134Smrg: ${TMPDIR=/tmp} ;
111ab902922Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
1127a84e134Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
1137a84e134Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
1147a84e134Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
1157a84e134Smrgdummy=$tmp/dummy ;
1167a84e134Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
1177a84e134Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
1187a84e134Smrg ,,)    echo "int x;" > $dummy.c ;
1197a84e134Smrg	for c in cc gcc c89 c99 ; do
1207a84e134Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
1217a84e134Smrg	     CC_FOR_BUILD="$c"; break ;
1227a84e134Smrg	  fi ;
1237a84e134Smrg	done ;
1247a84e134Smrg	if test x"$CC_FOR_BUILD" = x ; then
1257a84e134Smrg	  CC_FOR_BUILD=no_compiler_found ;
1267a84e134Smrg	fi
1277a84e134Smrg	;;
1287a84e134Smrg ,,*)   CC_FOR_BUILD=$CC ;;
1297a84e134Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
1307a84e134Smrgesac ; set_cc_for_build= ;'
1317a84e134Smrg
1327a84e134Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
1337a84e134Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
1347a84e134Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
1357a84e134Smrg	PATH=$PATH:/.attbin ; export PATH
1367a84e134Smrgfi
1377a84e134Smrg
1387a84e134SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
1397a84e134SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
1407a84e134SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
1417a84e134SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
1427a84e134Smrg
1437a84e134Smrg# Note: order is significant - the case branches are not exclusive.
1447a84e134Smrg
1457a84e134Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
1467a84e134Smrg    *:NetBSD:*:*)
1477a84e134Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
1487a84e134Smrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
1497a84e134Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
1507a84e134Smrg	# switched to ELF, *-*-netbsd* would select the old
1517a84e134Smrg	# object file format.  This provides both forward
1527a84e134Smrg	# compatibility and a consistent mechanism for selecting the
1537a84e134Smrg	# object file format.
1547a84e134Smrg	#
1557a84e134Smrg	# Note: NetBSD doesn't particularly care about the vendor
1567a84e134Smrg	# portion of the name.  We always set it to "unknown".
1577a84e134Smrg	sysctl="sysctl -n hw.machine_arch"
1587a84e134Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
1597a84e134Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
1607a84e134Smrg	case "${UNAME_MACHINE_ARCH}" in
1617a84e134Smrg	    armeb) machine=armeb-unknown ;;
1627a84e134Smrg	    arm*) machine=arm-unknown ;;
1637a84e134Smrg	    sh3el) machine=shl-unknown ;;
1647a84e134Smrg	    sh3eb) machine=sh-unknown ;;
165ab902922Smrg	    sh5el) machine=sh5le-unknown ;;
1667a84e134Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
1677a84e134Smrg	esac
1687a84e134Smrg	# The Operating System including object format, if it has switched
1697a84e134Smrg	# to ELF recently, or will in the future.
1707a84e134Smrg	case "${UNAME_MACHINE_ARCH}" in
1717a84e134Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
1727a84e134Smrg		eval $set_cc_for_build
1737a84e134Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
174994689c1Smrg			| grep -q __ELF__
1757a84e134Smrg		then
1767a84e134Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
1777a84e134Smrg		    # Return netbsd for either.  FIX?
1787a84e134Smrg		    os=netbsd
1797a84e134Smrg		else
1807a84e134Smrg		    os=netbsdelf
1817a84e134Smrg		fi
1827a84e134Smrg		;;
1837a84e134Smrg	    *)
1847a84e134Smrg	        os=netbsd
1857a84e134Smrg		;;
1867a84e134Smrg	esac
1877a84e134Smrg	# The OS release
1887a84e134Smrg	# Debian GNU/NetBSD machines have a different userland, and
1897a84e134Smrg	# thus, need a distinct triplet. However, they do not need
1907a84e134Smrg	# kernel version information, so it can be replaced with a
1917a84e134Smrg	# suitable tag, in the style of linux-gnu.
1927a84e134Smrg	case "${UNAME_VERSION}" in
1937a84e134Smrg	    Debian*)
1947a84e134Smrg		release='-gnu'
1957a84e134Smrg		;;
1967a84e134Smrg	    *)
1977a84e134Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1987a84e134Smrg		;;
1997a84e134Smrg	esac
2007a84e134Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
2017a84e134Smrg	# contains redundant information, the shorter form:
2027a84e134Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
2037a84e134Smrg	echo "${machine}-${os}${release}"
2047a84e134Smrg	exit ;;
2057a84e134Smrg    *:OpenBSD:*:*)
2067a84e134Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
2077a84e134Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
2087a84e134Smrg	exit ;;
2097a84e134Smrg    *:ekkoBSD:*:*)
2107a84e134Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
2117a84e134Smrg	exit ;;
212ab902922Smrg    *:SolidBSD:*:*)
213ab902922Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
214ab902922Smrg	exit ;;
2157a84e134Smrg    macppc:MirBSD:*:*)
216ab902922Smrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
2177a84e134Smrg	exit ;;
2187a84e134Smrg    *:MirBSD:*:*)
2197a84e134Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
2207a84e134Smrg	exit ;;
2217a84e134Smrg    alpha:OSF1:*:*)
2227a84e134Smrg	case $UNAME_RELEASE in
2237a84e134Smrg	*4.0)
2247a84e134Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
2257a84e134Smrg		;;
2267a84e134Smrg	*5.*)
2277a84e134Smrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
2287a84e134Smrg		;;
2297a84e134Smrg	esac
2307a84e134Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
2317a84e134Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
2327a84e134Smrg	# covers most systems running today.  This code pipes the CPU
2337a84e134Smrg	# types through head -n 1, so we only detect the type of CPU 0.
2347a84e134Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
2357a84e134Smrg	case "$ALPHA_CPU_TYPE" in
2367a84e134Smrg	    "EV4 (21064)")
2377a84e134Smrg		UNAME_MACHINE="alpha" ;;
2387a84e134Smrg	    "EV4.5 (21064)")
2397a84e134Smrg		UNAME_MACHINE="alpha" ;;
2407a84e134Smrg	    "LCA4 (21066/21068)")
2417a84e134Smrg		UNAME_MACHINE="alpha" ;;
2427a84e134Smrg	    "EV5 (21164)")
2437a84e134Smrg		UNAME_MACHINE="alphaev5" ;;
2447a84e134Smrg	    "EV5.6 (21164A)")
2457a84e134Smrg		UNAME_MACHINE="alphaev56" ;;
2467a84e134Smrg	    "EV5.6 (21164PC)")
2477a84e134Smrg		UNAME_MACHINE="alphapca56" ;;
2487a84e134Smrg	    "EV5.7 (21164PC)")
2497a84e134Smrg		UNAME_MACHINE="alphapca57" ;;
2507a84e134Smrg	    "EV6 (21264)")
2517a84e134Smrg		UNAME_MACHINE="alphaev6" ;;
2527a84e134Smrg	    "EV6.7 (21264A)")
2537a84e134Smrg		UNAME_MACHINE="alphaev67" ;;
2547a84e134Smrg	    "EV6.8CB (21264C)")
2557a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2567a84e134Smrg	    "EV6.8AL (21264B)")
2577a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2587a84e134Smrg	    "EV6.8CX (21264D)")
2597a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2607a84e134Smrg	    "EV6.9A (21264/EV69A)")
2617a84e134Smrg		UNAME_MACHINE="alphaev69" ;;
2627a84e134Smrg	    "EV7 (21364)")
2637a84e134Smrg		UNAME_MACHINE="alphaev7" ;;
2647a84e134Smrg	    "EV7.9 (21364A)")
2657a84e134Smrg		UNAME_MACHINE="alphaev79" ;;
2667a84e134Smrg	esac
2677a84e134Smrg	# A Pn.n version is a patched version.
2687a84e134Smrg	# A Vn.n version is a released version.
2697a84e134Smrg	# A Tn.n version is a released field test version.
2707a84e134Smrg	# A Xn.n version is an unreleased experimental baselevel.
2717a84e134Smrg	# 1.2 uses "1.2" for uname -r.
2727a84e134Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
2737a84e134Smrg	exit ;;
2747a84e134Smrg    Alpha\ *:Windows_NT*:*)
2757a84e134Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
2767a84e134Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
2777a84e134Smrg	# of the specific Alpha model?
2787a84e134Smrg	echo alpha-pc-interix
2797a84e134Smrg	exit ;;
2807a84e134Smrg    21064:Windows_NT:50:3)
2817a84e134Smrg	echo alpha-dec-winnt3.5
2827a84e134Smrg	exit ;;
2837a84e134Smrg    Amiga*:UNIX_System_V:4.0:*)
2847a84e134Smrg	echo m68k-unknown-sysv4
2857a84e134Smrg	exit ;;
2867a84e134Smrg    *:[Aa]miga[Oo][Ss]:*:*)
2877a84e134Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
2887a84e134Smrg	exit ;;
2897a84e134Smrg    *:[Mm]orph[Oo][Ss]:*:*)
2907a84e134Smrg	echo ${UNAME_MACHINE}-unknown-morphos
2917a84e134Smrg	exit ;;
2927a84e134Smrg    *:OS/390:*:*)
2937a84e134Smrg	echo i370-ibm-openedition
2947a84e134Smrg	exit ;;
2957a84e134Smrg    *:z/VM:*:*)
2967a84e134Smrg	echo s390-ibm-zvmoe
2977a84e134Smrg	exit ;;
2987a84e134Smrg    *:OS400:*:*)
2997a84e134Smrg        echo powerpc-ibm-os400
3007a84e134Smrg	exit ;;
3017a84e134Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
3027a84e134Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
3037a84e134Smrg	exit ;;
3047a84e134Smrg    arm:riscos:*:*|arm:RISCOS:*:*)
3057a84e134Smrg	echo arm-unknown-riscos
3067a84e134Smrg	exit ;;
3077a84e134Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
3087a84e134Smrg	echo hppa1.1-hitachi-hiuxmpp
3097a84e134Smrg	exit ;;
3107a84e134Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
3117a84e134Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
3127a84e134Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
3137a84e134Smrg		echo pyramid-pyramid-sysv3
3147a84e134Smrg	else
3157a84e134Smrg		echo pyramid-pyramid-bsd
3167a84e134Smrg	fi
3177a84e134Smrg	exit ;;
3187a84e134Smrg    NILE*:*:*:dcosx)
3197a84e134Smrg	echo pyramid-pyramid-svr4
3207a84e134Smrg	exit ;;
3217a84e134Smrg    DRS?6000:unix:4.0:6*)
3227a84e134Smrg	echo sparc-icl-nx6
3237a84e134Smrg	exit ;;
3247a84e134Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
3257a84e134Smrg	case `/usr/bin/uname -p` in
3267a84e134Smrg	    sparc) echo sparc-icl-nx7; exit ;;
3277a84e134Smrg	esac ;;
328994689c1Smrg    s390x:SunOS:*:*)
329994689c1Smrg	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330994689c1Smrg	exit ;;
3317a84e134Smrg    sun4H:SunOS:5.*:*)
3327a84e134Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3337a84e134Smrg	exit ;;
3347a84e134Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
3357a84e134Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3367a84e134Smrg	exit ;;
337994689c1Smrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338994689c1Smrg	echo i386-pc-auroraux${UNAME_RELEASE}
339994689c1Smrg	exit ;;
340ab902922Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
341994689c1Smrg	eval $set_cc_for_build
342994689c1Smrg	SUN_ARCH="i386"
343994689c1Smrg	# If there is a compiler, see if it is configured for 64-bit objects.
344994689c1Smrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
345994689c1Smrg	# This test works for both compilers.
346994689c1Smrg	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
347994689c1Smrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
348994689c1Smrg		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
349994689c1Smrg		grep IS_64BIT_ARCH >/dev/null
350994689c1Smrg	    then
351994689c1Smrg		SUN_ARCH="x86_64"
352994689c1Smrg	    fi
353994689c1Smrg	fi
354994689c1Smrg	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3557a84e134Smrg	exit ;;
3567a84e134Smrg    sun4*:SunOS:6*:*)
3577a84e134Smrg	# According to config.sub, this is the proper way to canonicalize
3587a84e134Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
3597a84e134Smrg	# it's likely to be more like Solaris than SunOS4.
3607a84e134Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3617a84e134Smrg	exit ;;
3627a84e134Smrg    sun4*:SunOS:*:*)
3637a84e134Smrg	case "`/usr/bin/arch -k`" in
3647a84e134Smrg	    Series*|S4*)
3657a84e134Smrg		UNAME_RELEASE=`uname -v`
3667a84e134Smrg		;;
3677a84e134Smrg	esac
3687a84e134Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
3697a84e134Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
3707a84e134Smrg	exit ;;
3717a84e134Smrg    sun3*:SunOS:*:*)
3727a84e134Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
3737a84e134Smrg	exit ;;
3747a84e134Smrg    sun*:*:4.2BSD:*)
3757a84e134Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
3767a84e134Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
3777a84e134Smrg	case "`/bin/arch`" in
3787a84e134Smrg	    sun3)
3797a84e134Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
3807a84e134Smrg		;;
3817a84e134Smrg	    sun4)
3827a84e134Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
3837a84e134Smrg		;;
3847a84e134Smrg	esac
3857a84e134Smrg	exit ;;
3867a84e134Smrg    aushp:SunOS:*:*)
3877a84e134Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
3887a84e134Smrg	exit ;;
3897a84e134Smrg    # The situation for MiNT is a little confusing.  The machine name
3907a84e134Smrg    # can be virtually everything (everything which is not
3917a84e134Smrg    # "atarist" or "atariste" at least should have a processor
3927a84e134Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
3937a84e134Smrg    # to the lowercase version "mint" (or "freemint").  Finally
3947a84e134Smrg    # the system name "TOS" denotes a system which is actually not
3957a84e134Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
3967a84e134Smrg    # be no problem.
3977a84e134Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
3987a84e134Smrg        echo m68k-atari-mint${UNAME_RELEASE}
3997a84e134Smrg	exit ;;
4007a84e134Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
4017a84e134Smrg	echo m68k-atari-mint${UNAME_RELEASE}
4027a84e134Smrg        exit ;;
4037a84e134Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
4047a84e134Smrg        echo m68k-atari-mint${UNAME_RELEASE}
4057a84e134Smrg	exit ;;
4067a84e134Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
4077a84e134Smrg        echo m68k-milan-mint${UNAME_RELEASE}
4087a84e134Smrg        exit ;;
4097a84e134Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
4107a84e134Smrg        echo m68k-hades-mint${UNAME_RELEASE}
4117a84e134Smrg        exit ;;
4127a84e134Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
4137a84e134Smrg        echo m68k-unknown-mint${UNAME_RELEASE}
4147a84e134Smrg        exit ;;
4157a84e134Smrg    m68k:machten:*:*)
4167a84e134Smrg	echo m68k-apple-machten${UNAME_RELEASE}
4177a84e134Smrg	exit ;;
4187a84e134Smrg    powerpc:machten:*:*)
4197a84e134Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
4207a84e134Smrg	exit ;;
4217a84e134Smrg    RISC*:Mach:*:*)
4227a84e134Smrg	echo mips-dec-mach_bsd4.3
4237a84e134Smrg	exit ;;
4247a84e134Smrg    RISC*:ULTRIX:*:*)
4257a84e134Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
4267a84e134Smrg	exit ;;
4277a84e134Smrg    VAX*:ULTRIX*:*:*)
4287a84e134Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
4297a84e134Smrg	exit ;;
4307a84e134Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
4317a84e134Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
4327a84e134Smrg	exit ;;
4337a84e134Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
4347a84e134Smrg	eval $set_cc_for_build
4357a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
4367a84e134Smrg#ifdef __cplusplus
4377a84e134Smrg#include <stdio.h>  /* for printf() prototype */
4387a84e134Smrg	int main (int argc, char *argv[]) {
4397a84e134Smrg#else
4407a84e134Smrg	int main (argc, argv) int argc; char *argv[]; {
4417a84e134Smrg#endif
4427a84e134Smrg	#if defined (host_mips) && defined (MIPSEB)
4437a84e134Smrg	#if defined (SYSTYPE_SYSV)
4447a84e134Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
4457a84e134Smrg	#endif
4467a84e134Smrg	#if defined (SYSTYPE_SVR4)
4477a84e134Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
4487a84e134Smrg	#endif
4497a84e134Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
4507a84e134Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
4517a84e134Smrg	#endif
4527a84e134Smrg	#endif
4537a84e134Smrg	  exit (-1);
4547a84e134Smrg	}
4557a84e134SmrgEOF
4567a84e134Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
4577a84e134Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
4587a84e134Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
4597a84e134Smrg	    { echo "$SYSTEM_NAME"; exit; }
4607a84e134Smrg	echo mips-mips-riscos${UNAME_RELEASE}
4617a84e134Smrg	exit ;;
4627a84e134Smrg    Motorola:PowerMAX_OS:*:*)
4637a84e134Smrg	echo powerpc-motorola-powermax
4647a84e134Smrg	exit ;;
4657a84e134Smrg    Motorola:*:4.3:PL8-*)
4667a84e134Smrg	echo powerpc-harris-powermax
4677a84e134Smrg	exit ;;
4687a84e134Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
4697a84e134Smrg	echo powerpc-harris-powermax
4707a84e134Smrg	exit ;;
4717a84e134Smrg    Night_Hawk:Power_UNIX:*:*)
4727a84e134Smrg	echo powerpc-harris-powerunix
4737a84e134Smrg	exit ;;
4747a84e134Smrg    m88k:CX/UX:7*:*)
4757a84e134Smrg	echo m88k-harris-cxux7
4767a84e134Smrg	exit ;;
4777a84e134Smrg    m88k:*:4*:R4*)
4787a84e134Smrg	echo m88k-motorola-sysv4
4797a84e134Smrg	exit ;;
4807a84e134Smrg    m88k:*:3*:R3*)
4817a84e134Smrg	echo m88k-motorola-sysv3
4827a84e134Smrg	exit ;;
4837a84e134Smrg    AViiON:dgux:*:*)
4847a84e134Smrg        # DG/UX returns AViiON for all architectures
4857a84e134Smrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
4867a84e134Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
4877a84e134Smrg	then
4887a84e134Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
4897a84e134Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
4907a84e134Smrg	    then
4917a84e134Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
4927a84e134Smrg	    else
4937a84e134Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
4947a84e134Smrg	    fi
4957a84e134Smrg	else
4967a84e134Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
4977a84e134Smrg	fi
4987a84e134Smrg 	exit ;;
4997a84e134Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
5007a84e134Smrg	echo m88k-dolphin-sysv3
5017a84e134Smrg	exit ;;
5027a84e134Smrg    M88*:*:R3*:*)
5037a84e134Smrg	# Delta 88k system running SVR3
5047a84e134Smrg	echo m88k-motorola-sysv3
5057a84e134Smrg	exit ;;
5067a84e134Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
5077a84e134Smrg	echo m88k-tektronix-sysv3
5087a84e134Smrg	exit ;;
5097a84e134Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
5107a84e134Smrg	echo m68k-tektronix-bsd
5117a84e134Smrg	exit ;;
5127a84e134Smrg    *:IRIX*:*:*)
5137a84e134Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
5147a84e134Smrg	exit ;;
5157a84e134Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
5167a84e134Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
5177a84e134Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
5187a84e134Smrg    i*86:AIX:*:*)
5197a84e134Smrg	echo i386-ibm-aix
5207a84e134Smrg	exit ;;
5217a84e134Smrg    ia64:AIX:*:*)
5227a84e134Smrg	if [ -x /usr/bin/oslevel ] ; then
5237a84e134Smrg		IBM_REV=`/usr/bin/oslevel`
5247a84e134Smrg	else
5257a84e134Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
5267a84e134Smrg	fi
5277a84e134Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
5287a84e134Smrg	exit ;;
5297a84e134Smrg    *:AIX:2:3)
5307a84e134Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
5317a84e134Smrg		eval $set_cc_for_build
5327a84e134Smrg		sed 's/^		//' << EOF >$dummy.c
5337a84e134Smrg		#include <sys/systemcfg.h>
5347a84e134Smrg
5357a84e134Smrg		main()
5367a84e134Smrg			{
5377a84e134Smrg			if (!__power_pc())
5387a84e134Smrg				exit(1);
5397a84e134Smrg			puts("powerpc-ibm-aix3.2.5");
5407a84e134Smrg			exit(0);
5417a84e134Smrg			}
5427a84e134SmrgEOF
5437a84e134Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
5447a84e134Smrg		then
5457a84e134Smrg			echo "$SYSTEM_NAME"
5467a84e134Smrg		else
5477a84e134Smrg			echo rs6000-ibm-aix3.2.5
5487a84e134Smrg		fi
5497a84e134Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
5507a84e134Smrg		echo rs6000-ibm-aix3.2.4
5517a84e134Smrg	else
5527a84e134Smrg		echo rs6000-ibm-aix3.2
5537a84e134Smrg	fi
5547a84e134Smrg	exit ;;
555994689c1Smrg    *:AIX:*:[4567])
5567a84e134Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
5577a84e134Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
5587a84e134Smrg		IBM_ARCH=rs6000
5597a84e134Smrg	else
5607a84e134Smrg		IBM_ARCH=powerpc
5617a84e134Smrg	fi
5627a84e134Smrg	if [ -x /usr/bin/oslevel ] ; then
5637a84e134Smrg		IBM_REV=`/usr/bin/oslevel`
5647a84e134Smrg	else
5657a84e134Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
5667a84e134Smrg	fi
5677a84e134Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
5687a84e134Smrg	exit ;;
5697a84e134Smrg    *:AIX:*:*)
5707a84e134Smrg	echo rs6000-ibm-aix
5717a84e134Smrg	exit ;;
5727a84e134Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
5737a84e134Smrg	echo romp-ibm-bsd4.4
5747a84e134Smrg	exit ;;
5757a84e134Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
5767a84e134Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
5777a84e134Smrg	exit ;;                             # report: romp-ibm BSD 4.3
5787a84e134Smrg    *:BOSX:*:*)
5797a84e134Smrg	echo rs6000-bull-bosx
5807a84e134Smrg	exit ;;
5817a84e134Smrg    DPX/2?00:B.O.S.:*:*)
5827a84e134Smrg	echo m68k-bull-sysv3
5837a84e134Smrg	exit ;;
5847a84e134Smrg    9000/[34]??:4.3bsd:1.*:*)
5857a84e134Smrg	echo m68k-hp-bsd
5867a84e134Smrg	exit ;;
5877a84e134Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
5887a84e134Smrg	echo m68k-hp-bsd4.4
5897a84e134Smrg	exit ;;
5907a84e134Smrg    9000/[34678]??:HP-UX:*:*)
5917a84e134Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
5927a84e134Smrg	case "${UNAME_MACHINE}" in
5937a84e134Smrg	    9000/31? )            HP_ARCH=m68000 ;;
5947a84e134Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
5957a84e134Smrg	    9000/[678][0-9][0-9])
5967a84e134Smrg		if [ -x /usr/bin/getconf ]; then
5977a84e134Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
5987a84e134Smrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
5997a84e134Smrg                    case "${sc_cpu_version}" in
6007a84e134Smrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
6017a84e134Smrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
6027a84e134Smrg                      532)                      # CPU_PA_RISC2_0
6037a84e134Smrg                        case "${sc_kernel_bits}" in
6047a84e134Smrg                          32) HP_ARCH="hppa2.0n" ;;
6057a84e134Smrg                          64) HP_ARCH="hppa2.0w" ;;
6067a84e134Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
6077a84e134Smrg                        esac ;;
6087a84e134Smrg                    esac
6097a84e134Smrg		fi
6107a84e134Smrg		if [ "${HP_ARCH}" = "" ]; then
6117a84e134Smrg		    eval $set_cc_for_build
6127a84e134Smrg		    sed 's/^              //' << EOF >$dummy.c
6137a84e134Smrg
6147a84e134Smrg              #define _HPUX_SOURCE
6157a84e134Smrg              #include <stdlib.h>
6167a84e134Smrg              #include <unistd.h>
6177a84e134Smrg
6187a84e134Smrg              int main ()
6197a84e134Smrg              {
6207a84e134Smrg              #if defined(_SC_KERNEL_BITS)
6217a84e134Smrg                  long bits = sysconf(_SC_KERNEL_BITS);
6227a84e134Smrg              #endif
6237a84e134Smrg                  long cpu  = sysconf (_SC_CPU_VERSION);
6247a84e134Smrg
6257a84e134Smrg                  switch (cpu)
6267a84e134Smrg              	{
6277a84e134Smrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
6287a84e134Smrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
6297a84e134Smrg              	case CPU_PA_RISC2_0:
6307a84e134Smrg              #if defined(_SC_KERNEL_BITS)
6317a84e134Smrg              	    switch (bits)
6327a84e134Smrg              		{
6337a84e134Smrg              		case 64: puts ("hppa2.0w"); break;
6347a84e134Smrg              		case 32: puts ("hppa2.0n"); break;
6357a84e134Smrg              		default: puts ("hppa2.0"); break;
6367a84e134Smrg              		} break;
6377a84e134Smrg              #else  /* !defined(_SC_KERNEL_BITS) */
6387a84e134Smrg              	    puts ("hppa2.0"); break;
6397a84e134Smrg              #endif
6407a84e134Smrg              	default: puts ("hppa1.0"); break;
6417a84e134Smrg              	}
6427a84e134Smrg                  exit (0);
6437a84e134Smrg              }
6447a84e134SmrgEOF
6457a84e134Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
6467a84e134Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
6477a84e134Smrg		fi ;;
6487a84e134Smrg	esac
6497a84e134Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
6507a84e134Smrg	then
6517a84e134Smrg	    eval $set_cc_for_build
6527a84e134Smrg
6537a84e134Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
6547a84e134Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
6557a84e134Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
6567a84e134Smrg	    #
6577a84e134Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
6587a84e134Smrg	    # => hppa2.0w-hp-hpux11.23
6597a84e134Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
6607a84e134Smrg	    # => hppa64-hp-hpux11.23
6617a84e134Smrg
6627a84e134Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
663994689c1Smrg		grep -q __LP64__
6647a84e134Smrg	    then
6657a84e134Smrg		HP_ARCH="hppa2.0w"
6667a84e134Smrg	    else
6677a84e134Smrg		HP_ARCH="hppa64"
6687a84e134Smrg	    fi
6697a84e134Smrg	fi
6707a84e134Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
6717a84e134Smrg	exit ;;
6727a84e134Smrg    ia64:HP-UX:*:*)
6737a84e134Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
6747a84e134Smrg	echo ia64-hp-hpux${HPUX_REV}
6757a84e134Smrg	exit ;;
6767a84e134Smrg    3050*:HI-UX:*:*)
6777a84e134Smrg	eval $set_cc_for_build
6787a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
6797a84e134Smrg	#include <unistd.h>
6807a84e134Smrg	int
6817a84e134Smrg	main ()
6827a84e134Smrg	{
6837a84e134Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
6847a84e134Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
6857a84e134Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
6867a84e134Smrg	     results, however.  */
6877a84e134Smrg	  if (CPU_IS_PA_RISC (cpu))
6887a84e134Smrg	    {
6897a84e134Smrg	      switch (cpu)
6907a84e134Smrg		{
6917a84e134Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
6927a84e134Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
6937a84e134Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
6947a84e134Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
6957a84e134Smrg		}
6967a84e134Smrg	    }
6977a84e134Smrg	  else if (CPU_IS_HP_MC68K (cpu))
6987a84e134Smrg	    puts ("m68k-hitachi-hiuxwe2");
6997a84e134Smrg	  else puts ("unknown-hitachi-hiuxwe2");
7007a84e134Smrg	  exit (0);
7017a84e134Smrg	}
7027a84e134SmrgEOF
7037a84e134Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
7047a84e134Smrg		{ echo "$SYSTEM_NAME"; exit; }
7057a84e134Smrg	echo unknown-hitachi-hiuxwe2
7067a84e134Smrg	exit ;;
7077a84e134Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
7087a84e134Smrg	echo hppa1.1-hp-bsd
7097a84e134Smrg	exit ;;
7107a84e134Smrg    9000/8??:4.3bsd:*:*)
7117a84e134Smrg	echo hppa1.0-hp-bsd
7127a84e134Smrg	exit ;;
7137a84e134Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
7147a84e134Smrg	echo hppa1.0-hp-mpeix
7157a84e134Smrg	exit ;;
7167a84e134Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
7177a84e134Smrg	echo hppa1.1-hp-osf
7187a84e134Smrg	exit ;;
7197a84e134Smrg    hp8??:OSF1:*:*)
7207a84e134Smrg	echo hppa1.0-hp-osf
7217a84e134Smrg	exit ;;
7227a84e134Smrg    i*86:OSF1:*:*)
7237a84e134Smrg	if [ -x /usr/sbin/sysversion ] ; then
7247a84e134Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
7257a84e134Smrg	else
7267a84e134Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
7277a84e134Smrg	fi
7287a84e134Smrg	exit ;;
7297a84e134Smrg    parisc*:Lites*:*:*)
7307a84e134Smrg	echo hppa1.1-hp-lites
7317a84e134Smrg	exit ;;
7327a84e134Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
7337a84e134Smrg	echo c1-convex-bsd
7347a84e134Smrg        exit ;;
7357a84e134Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
7367a84e134Smrg	if getsysinfo -f scalar_acc
7377a84e134Smrg	then echo c32-convex-bsd
7387a84e134Smrg	else echo c2-convex-bsd
7397a84e134Smrg	fi
7407a84e134Smrg        exit ;;
7417a84e134Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
7427a84e134Smrg	echo c34-convex-bsd
7437a84e134Smrg        exit ;;
7447a84e134Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
7457a84e134Smrg	echo c38-convex-bsd
7467a84e134Smrg        exit ;;
7477a84e134Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
7487a84e134Smrg	echo c4-convex-bsd
7497a84e134Smrg        exit ;;
7507a84e134Smrg    CRAY*Y-MP:*:*:*)
7517a84e134Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7527a84e134Smrg	exit ;;
7537a84e134Smrg    CRAY*[A-Z]90:*:*:*)
7547a84e134Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
7557a84e134Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
7567a84e134Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
7577a84e134Smrg	      -e 's/\.[^.]*$/.X/'
7587a84e134Smrg	exit ;;
7597a84e134Smrg    CRAY*TS:*:*:*)
7607a84e134Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7617a84e134Smrg	exit ;;
7627a84e134Smrg    CRAY*T3E:*:*:*)
7637a84e134Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7647a84e134Smrg	exit ;;
7657a84e134Smrg    CRAY*SV1:*:*:*)
7667a84e134Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7677a84e134Smrg	exit ;;
7687a84e134Smrg    *:UNICOS/mp:*:*)
7697a84e134Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7707a84e134Smrg	exit ;;
7717a84e134Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
7727a84e134Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7737a84e134Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
7747a84e134Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
7757a84e134Smrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
7767a84e134Smrg        exit ;;
7777a84e134Smrg    5000:UNIX_System_V:4.*:*)
7787a84e134Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
7797a84e134Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
7807a84e134Smrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
7817a84e134Smrg	exit ;;
7827a84e134Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
7837a84e134Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
7847a84e134Smrg	exit ;;
7857a84e134Smrg    sparc*:BSD/OS:*:*)
7867a84e134Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
7877a84e134Smrg	exit ;;
7887a84e134Smrg    *:BSD/OS:*:*)
7897a84e134Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
7907a84e134Smrg	exit ;;
7917a84e134Smrg    *:FreeBSD:*:*)
792ab902922Smrg	case ${UNAME_MACHINE} in
793ab902922Smrg	    pc98)
794ab902922Smrg		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795ab902922Smrg	    amd64)
796ab902922Smrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797ab902922Smrg	    *)
798ab902922Smrg		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799ab902922Smrg	esac
8007a84e134Smrg	exit ;;
8017a84e134Smrg    i*:CYGWIN*:*)
8027a84e134Smrg	echo ${UNAME_MACHINE}-pc-cygwin
8037a84e134Smrg	exit ;;
804ab902922Smrg    *:MINGW*:*)
8057a84e134Smrg	echo ${UNAME_MACHINE}-pc-mingw32
8067a84e134Smrg	exit ;;
8077a84e134Smrg    i*:windows32*:*)
8087a84e134Smrg    	# uname -m includes "-pc" on this system.
8097a84e134Smrg    	echo ${UNAME_MACHINE}-mingw32
8107a84e134Smrg	exit ;;
8117a84e134Smrg    i*:PW*:*)
8127a84e134Smrg	echo ${UNAME_MACHINE}-pc-pw32
8137a84e134Smrg	exit ;;
814994689c1Smrg    *:Interix*:*)
815ab902922Smrg    	case ${UNAME_MACHINE} in
816ab902922Smrg	    x86)
817ab902922Smrg		echo i586-pc-interix${UNAME_RELEASE}
818ab902922Smrg		exit ;;
819994689c1Smrg	    authenticamd | genuineintel | EM64T)
820ab902922Smrg		echo x86_64-unknown-interix${UNAME_RELEASE}
821ab902922Smrg		exit ;;
822ab902922Smrg	    IA64)
823ab902922Smrg		echo ia64-unknown-interix${UNAME_RELEASE}
824ab902922Smrg		exit ;;
825ab902922Smrg	esac ;;
8267a84e134Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
8277a84e134Smrg	echo i${UNAME_MACHINE}-pc-mks
8287a84e134Smrg	exit ;;
829994689c1Smrg    8664:Windows_NT:*)
830994689c1Smrg	echo x86_64-pc-mks
831994689c1Smrg	exit ;;
8327a84e134Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
8337a84e134Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
8347a84e134Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
8357a84e134Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
8367a84e134Smrg	echo i586-pc-interix
8377a84e134Smrg	exit ;;
8387a84e134Smrg    i*:UWIN*:*)
8397a84e134Smrg	echo ${UNAME_MACHINE}-pc-uwin
8407a84e134Smrg	exit ;;
8417a84e134Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
8427a84e134Smrg	echo x86_64-unknown-cygwin
8437a84e134Smrg	exit ;;
8447a84e134Smrg    p*:CYGWIN*:*)
8457a84e134Smrg	echo powerpcle-unknown-cygwin
8467a84e134Smrg	exit ;;
8477a84e134Smrg    prep*:SunOS:5.*:*)
8487a84e134Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
8497a84e134Smrg	exit ;;
8507a84e134Smrg    *:GNU:*:*)
8517a84e134Smrg	# the GNU system
8527a84e134Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
8537a84e134Smrg	exit ;;
8547a84e134Smrg    *:GNU/*:*:*)
8557a84e134Smrg	# other systems with GNU libc and userland
8567a84e134Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
8577a84e134Smrg	exit ;;
8587a84e134Smrg    i*86:Minix:*:*)
8597a84e134Smrg	echo ${UNAME_MACHINE}-pc-minix
8607a84e134Smrg	exit ;;
861994689c1Smrg    alpha:Linux:*:*)
862994689c1Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
863994689c1Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
864994689c1Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
865994689c1Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
866994689c1Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
867994689c1Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
868994689c1Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
869994689c1Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
870994689c1Smrg        esac
871994689c1Smrg	objdump --private-headers /bin/sh | grep -q ld.so.1
872994689c1Smrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
873994689c1Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
874994689c1Smrg	exit ;;
8757a84e134Smrg    arm*:Linux:*:*)
876ab902922Smrg	eval $set_cc_for_build
877ab902922Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
878ab902922Smrg	    | grep -q __ARM_EABI__
879ab902922Smrg	then
880ab902922Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnu
881ab902922Smrg	else
882ab902922Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
883ab902922Smrg	fi
884ab902922Smrg	exit ;;
885ab902922Smrg    avr32*:Linux:*:*)
8867a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8877a84e134Smrg	exit ;;
8887a84e134Smrg    cris:Linux:*:*)
8897a84e134Smrg	echo cris-axis-linux-gnu
8907a84e134Smrg	exit ;;
8917a84e134Smrg    crisv32:Linux:*:*)
8927a84e134Smrg	echo crisv32-axis-linux-gnu
8937a84e134Smrg	exit ;;
8947a84e134Smrg    frv:Linux:*:*)
8957a84e134Smrg    	echo frv-unknown-linux-gnu
8967a84e134Smrg	exit ;;
897994689c1Smrg    i*86:Linux:*:*)
898994689c1Smrg	LIBC=gnu
899994689c1Smrg	eval $set_cc_for_build
900994689c1Smrg	sed 's/^	//' << EOF >$dummy.c
901994689c1Smrg	#ifdef __dietlibc__
902994689c1Smrg	LIBC=dietlibc
903994689c1Smrg	#endif
904994689c1SmrgEOF
905994689c1Smrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906994689c1Smrg	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
907994689c1Smrg	exit ;;
9087a84e134Smrg    ia64:Linux:*:*)
9097a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9107a84e134Smrg	exit ;;
9117a84e134Smrg    m32r*:Linux:*:*)
9127a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9137a84e134Smrg	exit ;;
9147a84e134Smrg    m68*:Linux:*:*)
9157a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9167a84e134Smrg	exit ;;
917994689c1Smrg    mips:Linux:*:* | mips64:Linux:*:*)
9187a84e134Smrg	eval $set_cc_for_build
9197a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
9207a84e134Smrg	#undef CPU
921994689c1Smrg	#undef ${UNAME_MACHINE}
922994689c1Smrg	#undef ${UNAME_MACHINE}el
9237a84e134Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
924994689c1Smrg	CPU=${UNAME_MACHINE}el
9257a84e134Smrg	#else
9267a84e134Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
927994689c1Smrg	CPU=${UNAME_MACHINE}
9287a84e134Smrg	#else
9297a84e134Smrg	CPU=
9307a84e134Smrg	#endif
9317a84e134Smrg	#endif
9327a84e134SmrgEOF
933994689c1Smrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
9347a84e134Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
9357a84e134Smrg	;;
9367a84e134Smrg    or32:Linux:*:*)
9377a84e134Smrg	echo or32-unknown-linux-gnu
9387a84e134Smrg	exit ;;
939994689c1Smrg    padre:Linux:*:*)
940994689c1Smrg	echo sparc-unknown-linux-gnu
9417a84e134Smrg	exit ;;
942994689c1Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
943994689c1Smrg	echo hppa64-unknown-linux-gnu
9447a84e134Smrg	exit ;;
9457a84e134Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
9467a84e134Smrg	# Look for CPU level
9477a84e134Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
9487a84e134Smrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
9497a84e134Smrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
9507a84e134Smrg	  *)    echo hppa-unknown-linux-gnu ;;
9517a84e134Smrg	esac
9527a84e134Smrg	exit ;;
953994689c1Smrg    ppc64:Linux:*:*)
954994689c1Smrg	echo powerpc64-unknown-linux-gnu
955994689c1Smrg	exit ;;
956994689c1Smrg    ppc:Linux:*:*)
957994689c1Smrg	echo powerpc-unknown-linux-gnu
9587a84e134Smrg	exit ;;
9597a84e134Smrg    s390:Linux:*:* | s390x:Linux:*:*)
9607a84e134Smrg	echo ${UNAME_MACHINE}-ibm-linux
9617a84e134Smrg	exit ;;
9627a84e134Smrg    sh64*:Linux:*:*)
9637a84e134Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
9647a84e134Smrg	exit ;;
9657a84e134Smrg    sh*:Linux:*:*)
9667a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9677a84e134Smrg	exit ;;
9687a84e134Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
9697a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9707a84e134Smrg	exit ;;
971994689c1Smrg    tile*:Linux:*:*)
972994689c1Smrg	echo ${UNAME_MACHINE}-tilera-linux-gnu
973994689c1Smrg	exit ;;
9747a84e134Smrg    vax:Linux:*:*)
9757a84e134Smrg	echo ${UNAME_MACHINE}-dec-linux-gnu
9767a84e134Smrg	exit ;;
9777a84e134Smrg    x86_64:Linux:*:*)
9787a84e134Smrg	echo x86_64-unknown-linux-gnu
9797a84e134Smrg	exit ;;
980ab902922Smrg    xtensa*:Linux:*:*)
981ab902922Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
982ab902922Smrg	exit ;;
9837a84e134Smrg    i*86:DYNIX/ptx:4*:*)
9847a84e134Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
9857a84e134Smrg	# earlier versions are messed up and put the nodename in both
9867a84e134Smrg	# sysname and nodename.
9877a84e134Smrg	echo i386-sequent-sysv4
9887a84e134Smrg	exit ;;
9897a84e134Smrg    i*86:UNIX_SV:4.2MP:2.*)
9907a84e134Smrg        # Unixware is an offshoot of SVR4, but it has its own version
9917a84e134Smrg        # number series starting with 2...
9927a84e134Smrg        # I am not positive that other SVR4 systems won't match this,
9937a84e134Smrg	# I just have to hope.  -- rms.
9947a84e134Smrg        # Use sysv4.2uw... so that sysv4* matches it.
9957a84e134Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
9967a84e134Smrg	exit ;;
9977a84e134Smrg    i*86:OS/2:*:*)
9987a84e134Smrg	# If we were able to find `uname', then EMX Unix compatibility
9997a84e134Smrg	# is probably installed.
10007a84e134Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
10017a84e134Smrg	exit ;;
10027a84e134Smrg    i*86:XTS-300:*:STOP)
10037a84e134Smrg	echo ${UNAME_MACHINE}-unknown-stop
10047a84e134Smrg	exit ;;
10057a84e134Smrg    i*86:atheos:*:*)
10067a84e134Smrg	echo ${UNAME_MACHINE}-unknown-atheos
10077a84e134Smrg	exit ;;
10087a84e134Smrg    i*86:syllable:*:*)
10097a84e134Smrg	echo ${UNAME_MACHINE}-pc-syllable
10107a84e134Smrg	exit ;;
1011994689c1Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
10127a84e134Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
10137a84e134Smrg	exit ;;
10147a84e134Smrg    i*86:*DOS:*:*)
10157a84e134Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
10167a84e134Smrg	exit ;;
10177a84e134Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
10187a84e134Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
10197a84e134Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
10207a84e134Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
10217a84e134Smrg	else
10227a84e134Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
10237a84e134Smrg	fi
10247a84e134Smrg	exit ;;
10257a84e134Smrg    i*86:*:5:[678]*)
10267a84e134Smrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
10277a84e134Smrg	case `/bin/uname -X | grep "^Machine"` in
10287a84e134Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
10297a84e134Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
10307a84e134Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10317a84e134Smrg	esac
10327a84e134Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
10337a84e134Smrg	exit ;;
10347a84e134Smrg    i*86:*:3.2:*)
10357a84e134Smrg	if test -f /usr/options/cb.name; then
10367a84e134Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
10377a84e134Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
10387a84e134Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
10397a84e134Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
10407a84e134Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
10417a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
10427a84e134Smrg			&& UNAME_MACHINE=i586
10437a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
10447a84e134Smrg			&& UNAME_MACHINE=i686
10457a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
10467a84e134Smrg			&& UNAME_MACHINE=i686
10477a84e134Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
10487a84e134Smrg	else
10497a84e134Smrg		echo ${UNAME_MACHINE}-pc-sysv32
10507a84e134Smrg	fi
10517a84e134Smrg	exit ;;
10527a84e134Smrg    pc:*:*:*)
10537a84e134Smrg	# Left here for compatibility:
10547a84e134Smrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1055994689c1Smrg        # the processor, so we play safe by assuming i586.
1056994689c1Smrg	# Note: whatever this is, it MUST be the same as what config.sub
1057994689c1Smrg	# prints for the "djgpp" host, or else GDB configury will decide that
1058994689c1Smrg	# this is a cross-build.
1059994689c1Smrg	echo i586-pc-msdosdjgpp
10607a84e134Smrg        exit ;;
10617a84e134Smrg    Intel:Mach:3*:*)
10627a84e134Smrg	echo i386-pc-mach3
10637a84e134Smrg	exit ;;
10647a84e134Smrg    paragon:*:*:*)
10657a84e134Smrg	echo i860-intel-osf1
10667a84e134Smrg	exit ;;
10677a84e134Smrg    i860:*:4.*:*) # i860-SVR4
10687a84e134Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
10697a84e134Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
10707a84e134Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
10717a84e134Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
10727a84e134Smrg	fi
10737a84e134Smrg	exit ;;
10747a84e134Smrg    mini*:CTIX:SYS*5:*)
10757a84e134Smrg	# "miniframe"
10767a84e134Smrg	echo m68010-convergent-sysv
10777a84e134Smrg	exit ;;
10787a84e134Smrg    mc68k:UNIX:SYSTEM5:3.51m)
10797a84e134Smrg	echo m68k-convergent-sysv
10807a84e134Smrg	exit ;;
10817a84e134Smrg    M680?0:D-NIX:5.3:*)
10827a84e134Smrg	echo m68k-diab-dnix
10837a84e134Smrg	exit ;;
10847a84e134Smrg    M68*:*:R3V[5678]*:*)
10857a84e134Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
10867a84e134Smrg    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)
10877a84e134Smrg	OS_REL=''
10887a84e134Smrg	test -r /etc/.relid \
10897a84e134Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
10907a84e134Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
10917a84e134Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
10927a84e134Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
10937a84e134Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
10947a84e134Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
10957a84e134Smrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
10967a84e134Smrg          && { echo i486-ncr-sysv4; exit; } ;;
1097994689c1Smrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1098994689c1Smrg	OS_REL='.3'
1099994689c1Smrg	test -r /etc/.relid \
1100994689c1Smrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1101994689c1Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1102994689c1Smrg	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1103994689c1Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1104994689c1Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1105994689c1Smrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1106994689c1Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
11077a84e134Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
11087a84e134Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
11097a84e134Smrg	exit ;;
11107a84e134Smrg    mc68030:UNIX_System_V:4.*:*)
11117a84e134Smrg	echo m68k-atari-sysv4
11127a84e134Smrg	exit ;;
11137a84e134Smrg    TSUNAMI:LynxOS:2.*:*)
11147a84e134Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
11157a84e134Smrg	exit ;;
11167a84e134Smrg    rs6000:LynxOS:2.*:*)
11177a84e134Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
11187a84e134Smrg	exit ;;
1119994689c1Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
11207a84e134Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
11217a84e134Smrg	exit ;;
11227a84e134Smrg    SM[BE]S:UNIX_SV:*:*)
11237a84e134Smrg	echo mips-dde-sysv${UNAME_RELEASE}
11247a84e134Smrg	exit ;;
11257a84e134Smrg    RM*:ReliantUNIX-*:*:*)
11267a84e134Smrg	echo mips-sni-sysv4
11277a84e134Smrg	exit ;;
11287a84e134Smrg    RM*:SINIX-*:*:*)
11297a84e134Smrg	echo mips-sni-sysv4
11307a84e134Smrg	exit ;;
11317a84e134Smrg    *:SINIX-*:*:*)
11327a84e134Smrg	if uname -p 2>/dev/null >/dev/null ; then
11337a84e134Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
11347a84e134Smrg		echo ${UNAME_MACHINE}-sni-sysv4
11357a84e134Smrg	else
11367a84e134Smrg		echo ns32k-sni-sysv
11377a84e134Smrg	fi
11387a84e134Smrg	exit ;;
11397a84e134Smrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
11407a84e134Smrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
11417a84e134Smrg        echo i586-unisys-sysv4
11427a84e134Smrg        exit ;;
11437a84e134Smrg    *:UNIX_System_V:4*:FTX*)
11447a84e134Smrg	# From Gerald Hewes <hewes@openmarket.com>.
11457a84e134Smrg	# How about differentiating between stratus architectures? -djm
11467a84e134Smrg	echo hppa1.1-stratus-sysv4
11477a84e134Smrg	exit ;;
11487a84e134Smrg    *:*:*:FTX*)
11497a84e134Smrg	# From seanf@swdc.stratus.com.
11507a84e134Smrg	echo i860-stratus-sysv4
11517a84e134Smrg	exit ;;
11527a84e134Smrg    i*86:VOS:*:*)
11537a84e134Smrg	# From Paul.Green@stratus.com.
11547a84e134Smrg	echo ${UNAME_MACHINE}-stratus-vos
11557a84e134Smrg	exit ;;
11567a84e134Smrg    *:VOS:*:*)
11577a84e134Smrg	# From Paul.Green@stratus.com.
11587a84e134Smrg	echo hppa1.1-stratus-vos
11597a84e134Smrg	exit ;;
11607a84e134Smrg    mc68*:A/UX:*:*)
11617a84e134Smrg	echo m68k-apple-aux${UNAME_RELEASE}
11627a84e134Smrg	exit ;;
11637a84e134Smrg    news*:NEWS-OS:6*:*)
11647a84e134Smrg	echo mips-sony-newsos6
11657a84e134Smrg	exit ;;
11667a84e134Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
11677a84e134Smrg	if [ -d /usr/nec ]; then
11687a84e134Smrg	        echo mips-nec-sysv${UNAME_RELEASE}
11697a84e134Smrg	else
11707a84e134Smrg	        echo mips-unknown-sysv${UNAME_RELEASE}
11717a84e134Smrg	fi
11727a84e134Smrg        exit ;;
11737a84e134Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
11747a84e134Smrg	echo powerpc-be-beos
11757a84e134Smrg	exit ;;
11767a84e134Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
11777a84e134Smrg	echo powerpc-apple-beos
11787a84e134Smrg	exit ;;
11797a84e134Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
11807a84e134Smrg	echo i586-pc-beos
11817a84e134Smrg	exit ;;
1182994689c1Smrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
1183994689c1Smrg	echo i586-pc-haiku
1184994689c1Smrg	exit ;;
11857a84e134Smrg    SX-4:SUPER-UX:*:*)
11867a84e134Smrg	echo sx4-nec-superux${UNAME_RELEASE}
11877a84e134Smrg	exit ;;
11887a84e134Smrg    SX-5:SUPER-UX:*:*)
11897a84e134Smrg	echo sx5-nec-superux${UNAME_RELEASE}
11907a84e134Smrg	exit ;;
11917a84e134Smrg    SX-6:SUPER-UX:*:*)
11927a84e134Smrg	echo sx6-nec-superux${UNAME_RELEASE}
11937a84e134Smrg	exit ;;
1194ab902922Smrg    SX-7:SUPER-UX:*:*)
1195ab902922Smrg	echo sx7-nec-superux${UNAME_RELEASE}
1196ab902922Smrg	exit ;;
1197ab902922Smrg    SX-8:SUPER-UX:*:*)
1198ab902922Smrg	echo sx8-nec-superux${UNAME_RELEASE}
1199ab902922Smrg	exit ;;
1200ab902922Smrg    SX-8R:SUPER-UX:*:*)
1201ab902922Smrg	echo sx8r-nec-superux${UNAME_RELEASE}
1202ab902922Smrg	exit ;;
12037a84e134Smrg    Power*:Rhapsody:*:*)
12047a84e134Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
12057a84e134Smrg	exit ;;
12067a84e134Smrg    *:Rhapsody:*:*)
12077a84e134Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
12087a84e134Smrg	exit ;;
12097a84e134Smrg    *:Darwin:*:*)
12107a84e134Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
12117a84e134Smrg	case $UNAME_PROCESSOR in
1212994689c1Smrg	    i386)
1213994689c1Smrg		eval $set_cc_for_build
1214994689c1Smrg		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1215994689c1Smrg		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1216994689c1Smrg		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1217994689c1Smrg		      grep IS_64BIT_ARCH >/dev/null
1218994689c1Smrg		  then
1219994689c1Smrg		      UNAME_PROCESSOR="x86_64"
1220994689c1Smrg		  fi
1221994689c1Smrg		fi ;;
12227a84e134Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
12237a84e134Smrg	esac
12247a84e134Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
12257a84e134Smrg	exit ;;
12267a84e134Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
12277a84e134Smrg	UNAME_PROCESSOR=`uname -p`
12287a84e134Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
12297a84e134Smrg		UNAME_PROCESSOR=i386
12307a84e134Smrg		UNAME_MACHINE=pc
12317a84e134Smrg	fi
12327a84e134Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
12337a84e134Smrg	exit ;;
12347a84e134Smrg    *:QNX:*:4*)
12357a84e134Smrg	echo i386-pc-qnx
12367a84e134Smrg	exit ;;
12377a84e134Smrg    NSE-?:NONSTOP_KERNEL:*:*)
12387a84e134Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
12397a84e134Smrg	exit ;;
12407a84e134Smrg    NSR-?:NONSTOP_KERNEL:*:*)
12417a84e134Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
12427a84e134Smrg	exit ;;
12437a84e134Smrg    *:NonStop-UX:*:*)
12447a84e134Smrg	echo mips-compaq-nonstopux
12457a84e134Smrg	exit ;;
12467a84e134Smrg    BS2000:POSIX*:*:*)
12477a84e134Smrg	echo bs2000-siemens-sysv
12487a84e134Smrg	exit ;;
12497a84e134Smrg    DS/*:UNIX_System_V:*:*)
12507a84e134Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
12517a84e134Smrg	exit ;;
12527a84e134Smrg    *:Plan9:*:*)
12537a84e134Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
12547a84e134Smrg	# is converted to i386 for consistency with other x86
12557a84e134Smrg	# operating systems.
12567a84e134Smrg	if test "$cputype" = "386"; then
12577a84e134Smrg	    UNAME_MACHINE=i386
12587a84e134Smrg	else
12597a84e134Smrg	    UNAME_MACHINE="$cputype"
12607a84e134Smrg	fi
12617a84e134Smrg	echo ${UNAME_MACHINE}-unknown-plan9
12627a84e134Smrg	exit ;;
12637a84e134Smrg    *:TOPS-10:*:*)
12647a84e134Smrg	echo pdp10-unknown-tops10
12657a84e134Smrg	exit ;;
12667a84e134Smrg    *:TENEX:*:*)
12677a84e134Smrg	echo pdp10-unknown-tenex
12687a84e134Smrg	exit ;;
12697a84e134Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
12707a84e134Smrg	echo pdp10-dec-tops20
12717a84e134Smrg	exit ;;
12727a84e134Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
12737a84e134Smrg	echo pdp10-xkl-tops20
12747a84e134Smrg	exit ;;
12757a84e134Smrg    *:TOPS-20:*:*)
12767a84e134Smrg	echo pdp10-unknown-tops20
12777a84e134Smrg	exit ;;
12787a84e134Smrg    *:ITS:*:*)
12797a84e134Smrg	echo pdp10-unknown-its
12807a84e134Smrg	exit ;;
12817a84e134Smrg    SEI:*:*:SEIUX)
12827a84e134Smrg        echo mips-sei-seiux${UNAME_RELEASE}
12837a84e134Smrg	exit ;;
12847a84e134Smrg    *:DragonFly:*:*)
12857a84e134Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
12867a84e134Smrg	exit ;;
12877a84e134Smrg    *:*VMS:*:*)
12887a84e134Smrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
12897a84e134Smrg	case "${UNAME_MACHINE}" in
12907a84e134Smrg	    A*) echo alpha-dec-vms ; exit ;;
12917a84e134Smrg	    I*) echo ia64-dec-vms ; exit ;;
12927a84e134Smrg	    V*) echo vax-dec-vms ; exit ;;
12937a84e134Smrg	esac ;;
12947a84e134Smrg    *:XENIX:*:SysV)
12957a84e134Smrg	echo i386-pc-xenix
12967a84e134Smrg	exit ;;
12977a84e134Smrg    i*86:skyos:*:*)
12987a84e134Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
12997a84e134Smrg	exit ;;
13007a84e134Smrg    i*86:rdos:*:*)
13017a84e134Smrg	echo ${UNAME_MACHINE}-pc-rdos
13027a84e134Smrg	exit ;;
1303994689c1Smrg    i*86:AROS:*:*)
1304994689c1Smrg	echo ${UNAME_MACHINE}-pc-aros
1305994689c1Smrg	exit ;;
13067a84e134Smrgesac
13077a84e134Smrg
13087a84e134Smrg#echo '(No uname command or uname output not recognized.)' 1>&2
13097a84e134Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
13107a84e134Smrg
13117a84e134Smrgeval $set_cc_for_build
13127a84e134Smrgcat >$dummy.c <<EOF
13137a84e134Smrg#ifdef _SEQUENT_
13147a84e134Smrg# include <sys/types.h>
13157a84e134Smrg# include <sys/utsname.h>
13167a84e134Smrg#endif
13177a84e134Smrgmain ()
13187a84e134Smrg{
13197a84e134Smrg#if defined (sony)
13207a84e134Smrg#if defined (MIPSEB)
13217a84e134Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
13227a84e134Smrg     I don't know....  */
13237a84e134Smrg  printf ("mips-sony-bsd\n"); exit (0);
13247a84e134Smrg#else
13257a84e134Smrg#include <sys/param.h>
13267a84e134Smrg  printf ("m68k-sony-newsos%s\n",
13277a84e134Smrg#ifdef NEWSOS4
13287a84e134Smrg          "4"
13297a84e134Smrg#else
13307a84e134Smrg	  ""
13317a84e134Smrg#endif
13327a84e134Smrg         ); exit (0);
13337a84e134Smrg#endif
13347a84e134Smrg#endif
13357a84e134Smrg
13367a84e134Smrg#if defined (__arm) && defined (__acorn) && defined (__unix)
13377a84e134Smrg  printf ("arm-acorn-riscix\n"); exit (0);
13387a84e134Smrg#endif
13397a84e134Smrg
13407a84e134Smrg#if defined (hp300) && !defined (hpux)
13417a84e134Smrg  printf ("m68k-hp-bsd\n"); exit (0);
13427a84e134Smrg#endif
13437a84e134Smrg
13447a84e134Smrg#if defined (NeXT)
13457a84e134Smrg#if !defined (__ARCHITECTURE__)
13467a84e134Smrg#define __ARCHITECTURE__ "m68k"
13477a84e134Smrg#endif
13487a84e134Smrg  int version;
13497a84e134Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
13507a84e134Smrg  if (version < 4)
13517a84e134Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
13527a84e134Smrg  else
13537a84e134Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
13547a84e134Smrg  exit (0);
13557a84e134Smrg#endif
13567a84e134Smrg
13577a84e134Smrg#if defined (MULTIMAX) || defined (n16)
13587a84e134Smrg#if defined (UMAXV)
13597a84e134Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
13607a84e134Smrg#else
13617a84e134Smrg#if defined (CMU)
13627a84e134Smrg  printf ("ns32k-encore-mach\n"); exit (0);
13637a84e134Smrg#else
13647a84e134Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
13657a84e134Smrg#endif
13667a84e134Smrg#endif
13677a84e134Smrg#endif
13687a84e134Smrg
13697a84e134Smrg#if defined (__386BSD__)
13707a84e134Smrg  printf ("i386-pc-bsd\n"); exit (0);
13717a84e134Smrg#endif
13727a84e134Smrg
13737a84e134Smrg#if defined (sequent)
13747a84e134Smrg#if defined (i386)
13757a84e134Smrg  printf ("i386-sequent-dynix\n"); exit (0);
13767a84e134Smrg#endif
13777a84e134Smrg#if defined (ns32000)
13787a84e134Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
13797a84e134Smrg#endif
13807a84e134Smrg#endif
13817a84e134Smrg
13827a84e134Smrg#if defined (_SEQUENT_)
13837a84e134Smrg    struct utsname un;
13847a84e134Smrg
13857a84e134Smrg    uname(&un);
13867a84e134Smrg
13877a84e134Smrg    if (strncmp(un.version, "V2", 2) == 0) {
13887a84e134Smrg	printf ("i386-sequent-ptx2\n"); exit (0);
13897a84e134Smrg    }
13907a84e134Smrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
13917a84e134Smrg	printf ("i386-sequent-ptx1\n"); exit (0);
13927a84e134Smrg    }
13937a84e134Smrg    printf ("i386-sequent-ptx\n"); exit (0);
13947a84e134Smrg
13957a84e134Smrg#endif
13967a84e134Smrg
13977a84e134Smrg#if defined (vax)
13987a84e134Smrg# if !defined (ultrix)
13997a84e134Smrg#  include <sys/param.h>
14007a84e134Smrg#  if defined (BSD)
14017a84e134Smrg#   if BSD == 43
14027a84e134Smrg      printf ("vax-dec-bsd4.3\n"); exit (0);
14037a84e134Smrg#   else
14047a84e134Smrg#    if BSD == 199006
14057a84e134Smrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
14067a84e134Smrg#    else
14077a84e134Smrg      printf ("vax-dec-bsd\n"); exit (0);
14087a84e134Smrg#    endif
14097a84e134Smrg#   endif
14107a84e134Smrg#  else
14117a84e134Smrg    printf ("vax-dec-bsd\n"); exit (0);
14127a84e134Smrg#  endif
14137a84e134Smrg# else
14147a84e134Smrg    printf ("vax-dec-ultrix\n"); exit (0);
14157a84e134Smrg# endif
14167a84e134Smrg#endif
14177a84e134Smrg
14187a84e134Smrg#if defined (alliant) && defined (i860)
14197a84e134Smrg  printf ("i860-alliant-bsd\n"); exit (0);
14207a84e134Smrg#endif
14217a84e134Smrg
14227a84e134Smrg  exit (1);
14237a84e134Smrg}
14247a84e134SmrgEOF
14257a84e134Smrg
14267a84e134Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
14277a84e134Smrg	{ echo "$SYSTEM_NAME"; exit; }
14287a84e134Smrg
14297a84e134Smrg# Apollos put the system type in the environment.
14307a84e134Smrg
14317a84e134Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
14327a84e134Smrg
14337a84e134Smrg# Convex versions that predate uname can use getsysinfo(1)
14347a84e134Smrg
14357a84e134Smrgif [ -x /usr/convex/getsysinfo ]
14367a84e134Smrgthen
14377a84e134Smrg    case `getsysinfo -f cpu_type` in
14387a84e134Smrg    c1*)
14397a84e134Smrg	echo c1-convex-bsd
14407a84e134Smrg	exit ;;
14417a84e134Smrg    c2*)
14427a84e134Smrg	if getsysinfo -f scalar_acc
14437a84e134Smrg	then echo c32-convex-bsd
14447a84e134Smrg	else echo c2-convex-bsd
14457a84e134Smrg	fi
14467a84e134Smrg	exit ;;
14477a84e134Smrg    c34*)
14487a84e134Smrg	echo c34-convex-bsd
14497a84e134Smrg	exit ;;
14507a84e134Smrg    c38*)
14517a84e134Smrg	echo c38-convex-bsd
14527a84e134Smrg	exit ;;
14537a84e134Smrg    c4*)
14547a84e134Smrg	echo c4-convex-bsd
14557a84e134Smrg	exit ;;
14567a84e134Smrg    esac
14577a84e134Smrgfi
14587a84e134Smrg
14597a84e134Smrgcat >&2 <<EOF
14607a84e134Smrg$0: unable to guess system type
14617a84e134Smrg
14627a84e134SmrgThis script, last modified $timestamp, has failed to recognize
14637a84e134Smrgthe operating system you are using. It is advised that you
14647a84e134Smrgdownload the most up to date version of the config scripts from
14657a84e134Smrg
1466ab902922Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
14677a84e134Smrgand
1468ab902922Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
14697a84e134Smrg
14707a84e134SmrgIf the version you run ($0) is already up to date, please
14717a84e134Smrgsend the following data and any information you think might be
14727a84e134Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
14737a84e134Smrginformation to handle your system.
14747a84e134Smrg
14757a84e134Smrgconfig.guess timestamp = $timestamp
14767a84e134Smrg
14777a84e134Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
14787a84e134Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
14797a84e134Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
14807a84e134Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
14817a84e134Smrg
14827a84e134Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
14837a84e134Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
14847a84e134Smrg
14857a84e134Smrghostinfo               = `(hostinfo) 2>/dev/null`
14867a84e134Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
14877a84e134Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
14887a84e134Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
14897a84e134Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
14907a84e134Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
14917a84e134Smrg
14927a84e134SmrgUNAME_MACHINE = ${UNAME_MACHINE}
14937a84e134SmrgUNAME_RELEASE = ${UNAME_RELEASE}
14947a84e134SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
14957a84e134SmrgUNAME_VERSION = ${UNAME_VERSION}
14967a84e134SmrgEOF
14977a84e134Smrg
14987a84e134Smrgexit 1
14997a84e134Smrg
15007a84e134Smrg# Local variables:
15017a84e134Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
15027a84e134Smrg# time-stamp-start: "timestamp='"
15037a84e134Smrg# time-stamp-format: "%:y-%02m-%02d"
15047a84e134Smrg# time-stamp-end: "'"
15057a84e134Smrg# End:
1506