config.guess revision ab902922
17a84e134Smrg#! /bin/sh
27a84e134Smrg# Attempt to guess a canonical system name.
37a84e134Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4ab902922Smrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5ab902922Smrg#   Free Software Foundation, Inc.
67a84e134Smrg
7ab902922Smrgtimestamp='2008-01-23'
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
307a84e134Smrg# Originally written by Per Bothner <per@bothner.com>.
317a84e134Smrg# Please send patches to <config-patches@gnu.org>.  Submit a context
327a84e134Smrg# diff and a properly formatted ChangeLog 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#
387a84e134Smrg# The plan is that this can be called by configure scripts if you
397a84e134Smrg# don't specify an explicit build system type.
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.
59ab902922SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60ab902922Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
617a84e134Smrg
627a84e134SmrgThis is free software; see the source for copying conditions.  There is NO
637a84e134Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
647a84e134Smrg
657a84e134Smrghelp="
667a84e134SmrgTry \`$me --help' for more information."
677a84e134Smrg
687a84e134Smrg# Parse command line
697a84e134Smrgwhile test $# -gt 0 ; do
707a84e134Smrg  case $1 in
717a84e134Smrg    --time-stamp | --time* | -t )
727a84e134Smrg       echo "$timestamp" ; exit ;;
737a84e134Smrg    --version | -v )
747a84e134Smrg       echo "$version" ; exit ;;
757a84e134Smrg    --help | --h* | -h )
767a84e134Smrg       echo "$usage"; exit ;;
777a84e134Smrg    -- )     # Stop option processing
787a84e134Smrg       shift; break ;;
797a84e134Smrg    - )	# Use stdin as input.
807a84e134Smrg       break ;;
817a84e134Smrg    -* )
827a84e134Smrg       echo "$me: invalid option $1$help" >&2
837a84e134Smrg       exit 1 ;;
847a84e134Smrg    * )
857a84e134Smrg       break ;;
867a84e134Smrg  esac
877a84e134Smrgdone
887a84e134Smrg
897a84e134Smrgif test $# != 0; then
907a84e134Smrg  echo "$me: too many arguments$help" >&2
917a84e134Smrg  exit 1
927a84e134Smrgfi
937a84e134Smrg
947a84e134Smrgtrap 'exit 1' 1 2 15
957a84e134Smrg
967a84e134Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
977a84e134Smrg# compiler to aid in system detection is discouraged as it requires
987a84e134Smrg# temporary files to be created and, as you can see below, it is a
997a84e134Smrg# headache to deal with in a portable fashion.
1007a84e134Smrg
1017a84e134Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
1027a84e134Smrg# use `HOST_CC' if defined, but it is deprecated.
1037a84e134Smrg
1047a84e134Smrg# Portable tmp directory creation inspired by the Autoconf team.
1057a84e134Smrg
1067a84e134Smrgset_cc_for_build='
1077a84e134Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
1087a84e134Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
1097a84e134Smrg: ${TMPDIR=/tmp} ;
110ab902922Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
1117a84e134Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
1127a84e134Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
1137a84e134Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
1147a84e134Smrgdummy=$tmp/dummy ;
1157a84e134Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
1167a84e134Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
1177a84e134Smrg ,,)    echo "int x;" > $dummy.c ;
1187a84e134Smrg	for c in cc gcc c89 c99 ; do
1197a84e134Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
1207a84e134Smrg	     CC_FOR_BUILD="$c"; break ;
1217a84e134Smrg	  fi ;
1227a84e134Smrg	done ;
1237a84e134Smrg	if test x"$CC_FOR_BUILD" = x ; then
1247a84e134Smrg	  CC_FOR_BUILD=no_compiler_found ;
1257a84e134Smrg	fi
1267a84e134Smrg	;;
1277a84e134Smrg ,,*)   CC_FOR_BUILD=$CC ;;
1287a84e134Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
1297a84e134Smrgesac ; set_cc_for_build= ;'
1307a84e134Smrg
1317a84e134Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
1327a84e134Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
1337a84e134Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
1347a84e134Smrg	PATH=$PATH:/.attbin ; export PATH
1357a84e134Smrgfi
1367a84e134Smrg
1377a84e134SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
1387a84e134SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
1397a84e134SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
1407a84e134SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
1417a84e134Smrg
1427a84e134Smrg# Note: order is significant - the case branches are not exclusive.
1437a84e134Smrg
1447a84e134Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
1457a84e134Smrg    *:NetBSD:*:*)
1467a84e134Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
1477a84e134Smrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
1487a84e134Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
1497a84e134Smrg	# switched to ELF, *-*-netbsd* would select the old
1507a84e134Smrg	# object file format.  This provides both forward
1517a84e134Smrg	# compatibility and a consistent mechanism for selecting the
1527a84e134Smrg	# object file format.
1537a84e134Smrg	#
1547a84e134Smrg	# Note: NetBSD doesn't particularly care about the vendor
1557a84e134Smrg	# portion of the name.  We always set it to "unknown".
1567a84e134Smrg	sysctl="sysctl -n hw.machine_arch"
1577a84e134Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
1587a84e134Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
1597a84e134Smrg	case "${UNAME_MACHINE_ARCH}" in
1607a84e134Smrg	    armeb) machine=armeb-unknown ;;
1617a84e134Smrg	    arm*) machine=arm-unknown ;;
1627a84e134Smrg	    sh3el) machine=shl-unknown ;;
1637a84e134Smrg	    sh3eb) machine=sh-unknown ;;
164ab902922Smrg	    sh5el) machine=sh5le-unknown ;;
1657a84e134Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
1667a84e134Smrg	esac
1677a84e134Smrg	# The Operating System including object format, if it has switched
1687a84e134Smrg	# to ELF recently, or will in the future.
1697a84e134Smrg	case "${UNAME_MACHINE_ARCH}" in
1707a84e134Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
1717a84e134Smrg		eval $set_cc_for_build
1727a84e134Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
1737a84e134Smrg			| grep __ELF__ >/dev/null
1747a84e134Smrg		then
1757a84e134Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
1767a84e134Smrg		    # Return netbsd for either.  FIX?
1777a84e134Smrg		    os=netbsd
1787a84e134Smrg		else
1797a84e134Smrg		    os=netbsdelf
1807a84e134Smrg		fi
1817a84e134Smrg		;;
1827a84e134Smrg	    *)
1837a84e134Smrg	        os=netbsd
1847a84e134Smrg		;;
1857a84e134Smrg	esac
1867a84e134Smrg	# The OS release
1877a84e134Smrg	# Debian GNU/NetBSD machines have a different userland, and
1887a84e134Smrg	# thus, need a distinct triplet. However, they do not need
1897a84e134Smrg	# kernel version information, so it can be replaced with a
1907a84e134Smrg	# suitable tag, in the style of linux-gnu.
1917a84e134Smrg	case "${UNAME_VERSION}" in
1927a84e134Smrg	    Debian*)
1937a84e134Smrg		release='-gnu'
1947a84e134Smrg		;;
1957a84e134Smrg	    *)
1967a84e134Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1977a84e134Smrg		;;
1987a84e134Smrg	esac
1997a84e134Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
2007a84e134Smrg	# contains redundant information, the shorter form:
2017a84e134Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
2027a84e134Smrg	echo "${machine}-${os}${release}"
2037a84e134Smrg	exit ;;
2047a84e134Smrg    *:OpenBSD:*:*)
2057a84e134Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
2067a84e134Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
2077a84e134Smrg	exit ;;
2087a84e134Smrg    *:ekkoBSD:*:*)
2097a84e134Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
2107a84e134Smrg	exit ;;
211ab902922Smrg    *:SolidBSD:*:*)
212ab902922Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
213ab902922Smrg	exit ;;
2147a84e134Smrg    macppc:MirBSD:*:*)
215ab902922Smrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
2167a84e134Smrg	exit ;;
2177a84e134Smrg    *:MirBSD:*:*)
2187a84e134Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
2197a84e134Smrg	exit ;;
2207a84e134Smrg    alpha:OSF1:*:*)
2217a84e134Smrg	case $UNAME_RELEASE in
2227a84e134Smrg	*4.0)
2237a84e134Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
2247a84e134Smrg		;;
2257a84e134Smrg	*5.*)
2267a84e134Smrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
2277a84e134Smrg		;;
2287a84e134Smrg	esac
2297a84e134Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
2307a84e134Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
2317a84e134Smrg	# covers most systems running today.  This code pipes the CPU
2327a84e134Smrg	# types through head -n 1, so we only detect the type of CPU 0.
2337a84e134Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
2347a84e134Smrg	case "$ALPHA_CPU_TYPE" in
2357a84e134Smrg	    "EV4 (21064)")
2367a84e134Smrg		UNAME_MACHINE="alpha" ;;
2377a84e134Smrg	    "EV4.5 (21064)")
2387a84e134Smrg		UNAME_MACHINE="alpha" ;;
2397a84e134Smrg	    "LCA4 (21066/21068)")
2407a84e134Smrg		UNAME_MACHINE="alpha" ;;
2417a84e134Smrg	    "EV5 (21164)")
2427a84e134Smrg		UNAME_MACHINE="alphaev5" ;;
2437a84e134Smrg	    "EV5.6 (21164A)")
2447a84e134Smrg		UNAME_MACHINE="alphaev56" ;;
2457a84e134Smrg	    "EV5.6 (21164PC)")
2467a84e134Smrg		UNAME_MACHINE="alphapca56" ;;
2477a84e134Smrg	    "EV5.7 (21164PC)")
2487a84e134Smrg		UNAME_MACHINE="alphapca57" ;;
2497a84e134Smrg	    "EV6 (21264)")
2507a84e134Smrg		UNAME_MACHINE="alphaev6" ;;
2517a84e134Smrg	    "EV6.7 (21264A)")
2527a84e134Smrg		UNAME_MACHINE="alphaev67" ;;
2537a84e134Smrg	    "EV6.8CB (21264C)")
2547a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2557a84e134Smrg	    "EV6.8AL (21264B)")
2567a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2577a84e134Smrg	    "EV6.8CX (21264D)")
2587a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2597a84e134Smrg	    "EV6.9A (21264/EV69A)")
2607a84e134Smrg		UNAME_MACHINE="alphaev69" ;;
2617a84e134Smrg	    "EV7 (21364)")
2627a84e134Smrg		UNAME_MACHINE="alphaev7" ;;
2637a84e134Smrg	    "EV7.9 (21364A)")
2647a84e134Smrg		UNAME_MACHINE="alphaev79" ;;
2657a84e134Smrg	esac
2667a84e134Smrg	# A Pn.n version is a patched version.
2677a84e134Smrg	# A Vn.n version is a released version.
2687a84e134Smrg	# A Tn.n version is a released field test version.
2697a84e134Smrg	# A Xn.n version is an unreleased experimental baselevel.
2707a84e134Smrg	# 1.2 uses "1.2" for uname -r.
2717a84e134Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
2727a84e134Smrg	exit ;;
2737a84e134Smrg    Alpha\ *:Windows_NT*:*)
2747a84e134Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
2757a84e134Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
2767a84e134Smrg	# of the specific Alpha model?
2777a84e134Smrg	echo alpha-pc-interix
2787a84e134Smrg	exit ;;
2797a84e134Smrg    21064:Windows_NT:50:3)
2807a84e134Smrg	echo alpha-dec-winnt3.5
2817a84e134Smrg	exit ;;
2827a84e134Smrg    Amiga*:UNIX_System_V:4.0:*)
2837a84e134Smrg	echo m68k-unknown-sysv4
2847a84e134Smrg	exit ;;
2857a84e134Smrg    *:[Aa]miga[Oo][Ss]:*:*)
2867a84e134Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
2877a84e134Smrg	exit ;;
2887a84e134Smrg    *:[Mm]orph[Oo][Ss]:*:*)
2897a84e134Smrg	echo ${UNAME_MACHINE}-unknown-morphos
2907a84e134Smrg	exit ;;
2917a84e134Smrg    *:OS/390:*:*)
2927a84e134Smrg	echo i370-ibm-openedition
2937a84e134Smrg	exit ;;
2947a84e134Smrg    *:z/VM:*:*)
2957a84e134Smrg	echo s390-ibm-zvmoe
2967a84e134Smrg	exit ;;
2977a84e134Smrg    *:OS400:*:*)
2987a84e134Smrg        echo powerpc-ibm-os400
2997a84e134Smrg	exit ;;
3007a84e134Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
3017a84e134Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
3027a84e134Smrg	exit ;;
3037a84e134Smrg    arm:riscos:*:*|arm:RISCOS:*:*)
3047a84e134Smrg	echo arm-unknown-riscos
3057a84e134Smrg	exit ;;
3067a84e134Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
3077a84e134Smrg	echo hppa1.1-hitachi-hiuxmpp
3087a84e134Smrg	exit ;;
3097a84e134Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
3107a84e134Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
3117a84e134Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
3127a84e134Smrg		echo pyramid-pyramid-sysv3
3137a84e134Smrg	else
3147a84e134Smrg		echo pyramid-pyramid-bsd
3157a84e134Smrg	fi
3167a84e134Smrg	exit ;;
3177a84e134Smrg    NILE*:*:*:dcosx)
3187a84e134Smrg	echo pyramid-pyramid-svr4
3197a84e134Smrg	exit ;;
3207a84e134Smrg    DRS?6000:unix:4.0:6*)
3217a84e134Smrg	echo sparc-icl-nx6
3227a84e134Smrg	exit ;;
3237a84e134Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
3247a84e134Smrg	case `/usr/bin/uname -p` in
3257a84e134Smrg	    sparc) echo sparc-icl-nx7; exit ;;
3267a84e134Smrg	esac ;;
3277a84e134Smrg    sun4H:SunOS:5.*:*)
3287a84e134Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3297a84e134Smrg	exit ;;
3307a84e134Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
3317a84e134Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3327a84e134Smrg	exit ;;
333ab902922Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
3347a84e134Smrg	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3357a84e134Smrg	exit ;;
3367a84e134Smrg    sun4*:SunOS:6*:*)
3377a84e134Smrg	# According to config.sub, this is the proper way to canonicalize
3387a84e134Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
3397a84e134Smrg	# it's likely to be more like Solaris than SunOS4.
3407a84e134Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3417a84e134Smrg	exit ;;
3427a84e134Smrg    sun4*:SunOS:*:*)
3437a84e134Smrg	case "`/usr/bin/arch -k`" in
3447a84e134Smrg	    Series*|S4*)
3457a84e134Smrg		UNAME_RELEASE=`uname -v`
3467a84e134Smrg		;;
3477a84e134Smrg	esac
3487a84e134Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
3497a84e134Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
3507a84e134Smrg	exit ;;
3517a84e134Smrg    sun3*:SunOS:*:*)
3527a84e134Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
3537a84e134Smrg	exit ;;
3547a84e134Smrg    sun*:*:4.2BSD:*)
3557a84e134Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
3567a84e134Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
3577a84e134Smrg	case "`/bin/arch`" in
3587a84e134Smrg	    sun3)
3597a84e134Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
3607a84e134Smrg		;;
3617a84e134Smrg	    sun4)
3627a84e134Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
3637a84e134Smrg		;;
3647a84e134Smrg	esac
3657a84e134Smrg	exit ;;
3667a84e134Smrg    aushp:SunOS:*:*)
3677a84e134Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
3687a84e134Smrg	exit ;;
3697a84e134Smrg    # The situation for MiNT is a little confusing.  The machine name
3707a84e134Smrg    # can be virtually everything (everything which is not
3717a84e134Smrg    # "atarist" or "atariste" at least should have a processor
3727a84e134Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
3737a84e134Smrg    # to the lowercase version "mint" (or "freemint").  Finally
3747a84e134Smrg    # the system name "TOS" denotes a system which is actually not
3757a84e134Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
3767a84e134Smrg    # be no problem.
3777a84e134Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
3787a84e134Smrg        echo m68k-atari-mint${UNAME_RELEASE}
3797a84e134Smrg	exit ;;
3807a84e134Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
3817a84e134Smrg	echo m68k-atari-mint${UNAME_RELEASE}
3827a84e134Smrg        exit ;;
3837a84e134Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
3847a84e134Smrg        echo m68k-atari-mint${UNAME_RELEASE}
3857a84e134Smrg	exit ;;
3867a84e134Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
3877a84e134Smrg        echo m68k-milan-mint${UNAME_RELEASE}
3887a84e134Smrg        exit ;;
3897a84e134Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
3907a84e134Smrg        echo m68k-hades-mint${UNAME_RELEASE}
3917a84e134Smrg        exit ;;
3927a84e134Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
3937a84e134Smrg        echo m68k-unknown-mint${UNAME_RELEASE}
3947a84e134Smrg        exit ;;
3957a84e134Smrg    m68k:machten:*:*)
3967a84e134Smrg	echo m68k-apple-machten${UNAME_RELEASE}
3977a84e134Smrg	exit ;;
3987a84e134Smrg    powerpc:machten:*:*)
3997a84e134Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
4007a84e134Smrg	exit ;;
4017a84e134Smrg    RISC*:Mach:*:*)
4027a84e134Smrg	echo mips-dec-mach_bsd4.3
4037a84e134Smrg	exit ;;
4047a84e134Smrg    RISC*:ULTRIX:*:*)
4057a84e134Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
4067a84e134Smrg	exit ;;
4077a84e134Smrg    VAX*:ULTRIX*:*:*)
4087a84e134Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
4097a84e134Smrg	exit ;;
4107a84e134Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
4117a84e134Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
4127a84e134Smrg	exit ;;
4137a84e134Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
4147a84e134Smrg	eval $set_cc_for_build
4157a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
4167a84e134Smrg#ifdef __cplusplus
4177a84e134Smrg#include <stdio.h>  /* for printf() prototype */
4187a84e134Smrg	int main (int argc, char *argv[]) {
4197a84e134Smrg#else
4207a84e134Smrg	int main (argc, argv) int argc; char *argv[]; {
4217a84e134Smrg#endif
4227a84e134Smrg	#if defined (host_mips) && defined (MIPSEB)
4237a84e134Smrg	#if defined (SYSTYPE_SYSV)
4247a84e134Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
4257a84e134Smrg	#endif
4267a84e134Smrg	#if defined (SYSTYPE_SVR4)
4277a84e134Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
4287a84e134Smrg	#endif
4297a84e134Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
4307a84e134Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
4317a84e134Smrg	#endif
4327a84e134Smrg	#endif
4337a84e134Smrg	  exit (-1);
4347a84e134Smrg	}
4357a84e134SmrgEOF
4367a84e134Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
4377a84e134Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
4387a84e134Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
4397a84e134Smrg	    { echo "$SYSTEM_NAME"; exit; }
4407a84e134Smrg	echo mips-mips-riscos${UNAME_RELEASE}
4417a84e134Smrg	exit ;;
4427a84e134Smrg    Motorola:PowerMAX_OS:*:*)
4437a84e134Smrg	echo powerpc-motorola-powermax
4447a84e134Smrg	exit ;;
4457a84e134Smrg    Motorola:*:4.3:PL8-*)
4467a84e134Smrg	echo powerpc-harris-powermax
4477a84e134Smrg	exit ;;
4487a84e134Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
4497a84e134Smrg	echo powerpc-harris-powermax
4507a84e134Smrg	exit ;;
4517a84e134Smrg    Night_Hawk:Power_UNIX:*:*)
4527a84e134Smrg	echo powerpc-harris-powerunix
4537a84e134Smrg	exit ;;
4547a84e134Smrg    m88k:CX/UX:7*:*)
4557a84e134Smrg	echo m88k-harris-cxux7
4567a84e134Smrg	exit ;;
4577a84e134Smrg    m88k:*:4*:R4*)
4587a84e134Smrg	echo m88k-motorola-sysv4
4597a84e134Smrg	exit ;;
4607a84e134Smrg    m88k:*:3*:R3*)
4617a84e134Smrg	echo m88k-motorola-sysv3
4627a84e134Smrg	exit ;;
4637a84e134Smrg    AViiON:dgux:*:*)
4647a84e134Smrg        # DG/UX returns AViiON for all architectures
4657a84e134Smrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
4667a84e134Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
4677a84e134Smrg	then
4687a84e134Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
4697a84e134Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
4707a84e134Smrg	    then
4717a84e134Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
4727a84e134Smrg	    else
4737a84e134Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
4747a84e134Smrg	    fi
4757a84e134Smrg	else
4767a84e134Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
4777a84e134Smrg	fi
4787a84e134Smrg 	exit ;;
4797a84e134Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
4807a84e134Smrg	echo m88k-dolphin-sysv3
4817a84e134Smrg	exit ;;
4827a84e134Smrg    M88*:*:R3*:*)
4837a84e134Smrg	# Delta 88k system running SVR3
4847a84e134Smrg	echo m88k-motorola-sysv3
4857a84e134Smrg	exit ;;
4867a84e134Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
4877a84e134Smrg	echo m88k-tektronix-sysv3
4887a84e134Smrg	exit ;;
4897a84e134Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
4907a84e134Smrg	echo m68k-tektronix-bsd
4917a84e134Smrg	exit ;;
4927a84e134Smrg    *:IRIX*:*:*)
4937a84e134Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
4947a84e134Smrg	exit ;;
4957a84e134Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
4967a84e134Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
4977a84e134Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
4987a84e134Smrg    i*86:AIX:*:*)
4997a84e134Smrg	echo i386-ibm-aix
5007a84e134Smrg	exit ;;
5017a84e134Smrg    ia64:AIX:*:*)
5027a84e134Smrg	if [ -x /usr/bin/oslevel ] ; then
5037a84e134Smrg		IBM_REV=`/usr/bin/oslevel`
5047a84e134Smrg	else
5057a84e134Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
5067a84e134Smrg	fi
5077a84e134Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
5087a84e134Smrg	exit ;;
5097a84e134Smrg    *:AIX:2:3)
5107a84e134Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
5117a84e134Smrg		eval $set_cc_for_build
5127a84e134Smrg		sed 's/^		//' << EOF >$dummy.c
5137a84e134Smrg		#include <sys/systemcfg.h>
5147a84e134Smrg
5157a84e134Smrg		main()
5167a84e134Smrg			{
5177a84e134Smrg			if (!__power_pc())
5187a84e134Smrg				exit(1);
5197a84e134Smrg			puts("powerpc-ibm-aix3.2.5");
5207a84e134Smrg			exit(0);
5217a84e134Smrg			}
5227a84e134SmrgEOF
5237a84e134Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
5247a84e134Smrg		then
5257a84e134Smrg			echo "$SYSTEM_NAME"
5267a84e134Smrg		else
5277a84e134Smrg			echo rs6000-ibm-aix3.2.5
5287a84e134Smrg		fi
5297a84e134Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
5307a84e134Smrg		echo rs6000-ibm-aix3.2.4
5317a84e134Smrg	else
5327a84e134Smrg		echo rs6000-ibm-aix3.2
5337a84e134Smrg	fi
5347a84e134Smrg	exit ;;
535ab902922Smrg    *:AIX:*:[456])
5367a84e134Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
5377a84e134Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
5387a84e134Smrg		IBM_ARCH=rs6000
5397a84e134Smrg	else
5407a84e134Smrg		IBM_ARCH=powerpc
5417a84e134Smrg	fi
5427a84e134Smrg	if [ -x /usr/bin/oslevel ] ; then
5437a84e134Smrg		IBM_REV=`/usr/bin/oslevel`
5447a84e134Smrg	else
5457a84e134Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
5467a84e134Smrg	fi
5477a84e134Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
5487a84e134Smrg	exit ;;
5497a84e134Smrg    *:AIX:*:*)
5507a84e134Smrg	echo rs6000-ibm-aix
5517a84e134Smrg	exit ;;
5527a84e134Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
5537a84e134Smrg	echo romp-ibm-bsd4.4
5547a84e134Smrg	exit ;;
5557a84e134Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
5567a84e134Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
5577a84e134Smrg	exit ;;                             # report: romp-ibm BSD 4.3
5587a84e134Smrg    *:BOSX:*:*)
5597a84e134Smrg	echo rs6000-bull-bosx
5607a84e134Smrg	exit ;;
5617a84e134Smrg    DPX/2?00:B.O.S.:*:*)
5627a84e134Smrg	echo m68k-bull-sysv3
5637a84e134Smrg	exit ;;
5647a84e134Smrg    9000/[34]??:4.3bsd:1.*:*)
5657a84e134Smrg	echo m68k-hp-bsd
5667a84e134Smrg	exit ;;
5677a84e134Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
5687a84e134Smrg	echo m68k-hp-bsd4.4
5697a84e134Smrg	exit ;;
5707a84e134Smrg    9000/[34678]??:HP-UX:*:*)
5717a84e134Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
5727a84e134Smrg	case "${UNAME_MACHINE}" in
5737a84e134Smrg	    9000/31? )            HP_ARCH=m68000 ;;
5747a84e134Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
5757a84e134Smrg	    9000/[678][0-9][0-9])
5767a84e134Smrg		if [ -x /usr/bin/getconf ]; then
5777a84e134Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
5787a84e134Smrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
5797a84e134Smrg                    case "${sc_cpu_version}" in
5807a84e134Smrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
5817a84e134Smrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
5827a84e134Smrg                      532)                      # CPU_PA_RISC2_0
5837a84e134Smrg                        case "${sc_kernel_bits}" in
5847a84e134Smrg                          32) HP_ARCH="hppa2.0n" ;;
5857a84e134Smrg                          64) HP_ARCH="hppa2.0w" ;;
5867a84e134Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
5877a84e134Smrg                        esac ;;
5887a84e134Smrg                    esac
5897a84e134Smrg		fi
5907a84e134Smrg		if [ "${HP_ARCH}" = "" ]; then
5917a84e134Smrg		    eval $set_cc_for_build
5927a84e134Smrg		    sed 's/^              //' << EOF >$dummy.c
5937a84e134Smrg
5947a84e134Smrg              #define _HPUX_SOURCE
5957a84e134Smrg              #include <stdlib.h>
5967a84e134Smrg              #include <unistd.h>
5977a84e134Smrg
5987a84e134Smrg              int main ()
5997a84e134Smrg              {
6007a84e134Smrg              #if defined(_SC_KERNEL_BITS)
6017a84e134Smrg                  long bits = sysconf(_SC_KERNEL_BITS);
6027a84e134Smrg              #endif
6037a84e134Smrg                  long cpu  = sysconf (_SC_CPU_VERSION);
6047a84e134Smrg
6057a84e134Smrg                  switch (cpu)
6067a84e134Smrg              	{
6077a84e134Smrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
6087a84e134Smrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
6097a84e134Smrg              	case CPU_PA_RISC2_0:
6107a84e134Smrg              #if defined(_SC_KERNEL_BITS)
6117a84e134Smrg              	    switch (bits)
6127a84e134Smrg              		{
6137a84e134Smrg              		case 64: puts ("hppa2.0w"); break;
6147a84e134Smrg              		case 32: puts ("hppa2.0n"); break;
6157a84e134Smrg              		default: puts ("hppa2.0"); break;
6167a84e134Smrg              		} break;
6177a84e134Smrg              #else  /* !defined(_SC_KERNEL_BITS) */
6187a84e134Smrg              	    puts ("hppa2.0"); break;
6197a84e134Smrg              #endif
6207a84e134Smrg              	default: puts ("hppa1.0"); break;
6217a84e134Smrg              	}
6227a84e134Smrg                  exit (0);
6237a84e134Smrg              }
6247a84e134SmrgEOF
6257a84e134Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
6267a84e134Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
6277a84e134Smrg		fi ;;
6287a84e134Smrg	esac
6297a84e134Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
6307a84e134Smrg	then
6317a84e134Smrg	    eval $set_cc_for_build
6327a84e134Smrg
6337a84e134Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
6347a84e134Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
6357a84e134Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
6367a84e134Smrg	    #
6377a84e134Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
6387a84e134Smrg	    # => hppa2.0w-hp-hpux11.23
6397a84e134Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
6407a84e134Smrg	    # => hppa64-hp-hpux11.23
6417a84e134Smrg
6427a84e134Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
6437a84e134Smrg		grep __LP64__ >/dev/null
6447a84e134Smrg	    then
6457a84e134Smrg		HP_ARCH="hppa2.0w"
6467a84e134Smrg	    else
6477a84e134Smrg		HP_ARCH="hppa64"
6487a84e134Smrg	    fi
6497a84e134Smrg	fi
6507a84e134Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
6517a84e134Smrg	exit ;;
6527a84e134Smrg    ia64:HP-UX:*:*)
6537a84e134Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
6547a84e134Smrg	echo ia64-hp-hpux${HPUX_REV}
6557a84e134Smrg	exit ;;
6567a84e134Smrg    3050*:HI-UX:*:*)
6577a84e134Smrg	eval $set_cc_for_build
6587a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
6597a84e134Smrg	#include <unistd.h>
6607a84e134Smrg	int
6617a84e134Smrg	main ()
6627a84e134Smrg	{
6637a84e134Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
6647a84e134Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
6657a84e134Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
6667a84e134Smrg	     results, however.  */
6677a84e134Smrg	  if (CPU_IS_PA_RISC (cpu))
6687a84e134Smrg	    {
6697a84e134Smrg	      switch (cpu)
6707a84e134Smrg		{
6717a84e134Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
6727a84e134Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
6737a84e134Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
6747a84e134Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
6757a84e134Smrg		}
6767a84e134Smrg	    }
6777a84e134Smrg	  else if (CPU_IS_HP_MC68K (cpu))
6787a84e134Smrg	    puts ("m68k-hitachi-hiuxwe2");
6797a84e134Smrg	  else puts ("unknown-hitachi-hiuxwe2");
6807a84e134Smrg	  exit (0);
6817a84e134Smrg	}
6827a84e134SmrgEOF
6837a84e134Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
6847a84e134Smrg		{ echo "$SYSTEM_NAME"; exit; }
6857a84e134Smrg	echo unknown-hitachi-hiuxwe2
6867a84e134Smrg	exit ;;
6877a84e134Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
6887a84e134Smrg	echo hppa1.1-hp-bsd
6897a84e134Smrg	exit ;;
6907a84e134Smrg    9000/8??:4.3bsd:*:*)
6917a84e134Smrg	echo hppa1.0-hp-bsd
6927a84e134Smrg	exit ;;
6937a84e134Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
6947a84e134Smrg	echo hppa1.0-hp-mpeix
6957a84e134Smrg	exit ;;
6967a84e134Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
6977a84e134Smrg	echo hppa1.1-hp-osf
6987a84e134Smrg	exit ;;
6997a84e134Smrg    hp8??:OSF1:*:*)
7007a84e134Smrg	echo hppa1.0-hp-osf
7017a84e134Smrg	exit ;;
7027a84e134Smrg    i*86:OSF1:*:*)
7037a84e134Smrg	if [ -x /usr/sbin/sysversion ] ; then
7047a84e134Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
7057a84e134Smrg	else
7067a84e134Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
7077a84e134Smrg	fi
7087a84e134Smrg	exit ;;
7097a84e134Smrg    parisc*:Lites*:*:*)
7107a84e134Smrg	echo hppa1.1-hp-lites
7117a84e134Smrg	exit ;;
7127a84e134Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
7137a84e134Smrg	echo c1-convex-bsd
7147a84e134Smrg        exit ;;
7157a84e134Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
7167a84e134Smrg	if getsysinfo -f scalar_acc
7177a84e134Smrg	then echo c32-convex-bsd
7187a84e134Smrg	else echo c2-convex-bsd
7197a84e134Smrg	fi
7207a84e134Smrg        exit ;;
7217a84e134Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
7227a84e134Smrg	echo c34-convex-bsd
7237a84e134Smrg        exit ;;
7247a84e134Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
7257a84e134Smrg	echo c38-convex-bsd
7267a84e134Smrg        exit ;;
7277a84e134Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
7287a84e134Smrg	echo c4-convex-bsd
7297a84e134Smrg        exit ;;
7307a84e134Smrg    CRAY*Y-MP:*:*:*)
7317a84e134Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7327a84e134Smrg	exit ;;
7337a84e134Smrg    CRAY*[A-Z]90:*:*:*)
7347a84e134Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
7357a84e134Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
7367a84e134Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
7377a84e134Smrg	      -e 's/\.[^.]*$/.X/'
7387a84e134Smrg	exit ;;
7397a84e134Smrg    CRAY*TS:*:*:*)
7407a84e134Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7417a84e134Smrg	exit ;;
7427a84e134Smrg    CRAY*T3E:*:*:*)
7437a84e134Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7447a84e134Smrg	exit ;;
7457a84e134Smrg    CRAY*SV1:*:*:*)
7467a84e134Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7477a84e134Smrg	exit ;;
7487a84e134Smrg    *:UNICOS/mp:*:*)
7497a84e134Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7507a84e134Smrg	exit ;;
7517a84e134Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
7527a84e134Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7537a84e134Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
7547a84e134Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
7557a84e134Smrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
7567a84e134Smrg        exit ;;
7577a84e134Smrg    5000:UNIX_System_V:4.*:*)
7587a84e134Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
7597a84e134Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
7607a84e134Smrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
7617a84e134Smrg	exit ;;
7627a84e134Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
7637a84e134Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
7647a84e134Smrg	exit ;;
7657a84e134Smrg    sparc*:BSD/OS:*:*)
7667a84e134Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
7677a84e134Smrg	exit ;;
7687a84e134Smrg    *:BSD/OS:*:*)
7697a84e134Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
7707a84e134Smrg	exit ;;
7717a84e134Smrg    *:FreeBSD:*:*)
772ab902922Smrg	case ${UNAME_MACHINE} in
773ab902922Smrg	    pc98)
774ab902922Smrg		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
775ab902922Smrg	    amd64)
776ab902922Smrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
777ab902922Smrg	    *)
778ab902922Smrg		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
779ab902922Smrg	esac
7807a84e134Smrg	exit ;;
7817a84e134Smrg    i*:CYGWIN*:*)
7827a84e134Smrg	echo ${UNAME_MACHINE}-pc-cygwin
7837a84e134Smrg	exit ;;
784ab902922Smrg    *:MINGW*:*)
7857a84e134Smrg	echo ${UNAME_MACHINE}-pc-mingw32
7867a84e134Smrg	exit ;;
7877a84e134Smrg    i*:windows32*:*)
7887a84e134Smrg    	# uname -m includes "-pc" on this system.
7897a84e134Smrg    	echo ${UNAME_MACHINE}-mingw32
7907a84e134Smrg	exit ;;
7917a84e134Smrg    i*:PW*:*)
7927a84e134Smrg	echo ${UNAME_MACHINE}-pc-pw32
7937a84e134Smrg	exit ;;
794ab902922Smrg    *:Interix*:[3456]*)
795ab902922Smrg    	case ${UNAME_MACHINE} in
796ab902922Smrg	    x86)
797ab902922Smrg		echo i586-pc-interix${UNAME_RELEASE}
798ab902922Smrg		exit ;;
799ab902922Smrg	    EM64T | authenticamd)
800ab902922Smrg		echo x86_64-unknown-interix${UNAME_RELEASE}
801ab902922Smrg		exit ;;
802ab902922Smrg	    IA64)
803ab902922Smrg		echo ia64-unknown-interix${UNAME_RELEASE}
804ab902922Smrg		exit ;;
805ab902922Smrg	esac ;;
8067a84e134Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
8077a84e134Smrg	echo i${UNAME_MACHINE}-pc-mks
8087a84e134Smrg	exit ;;
8097a84e134Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
8107a84e134Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
8117a84e134Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
8127a84e134Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
8137a84e134Smrg	echo i586-pc-interix
8147a84e134Smrg	exit ;;
8157a84e134Smrg    i*:UWIN*:*)
8167a84e134Smrg	echo ${UNAME_MACHINE}-pc-uwin
8177a84e134Smrg	exit ;;
8187a84e134Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
8197a84e134Smrg	echo x86_64-unknown-cygwin
8207a84e134Smrg	exit ;;
8217a84e134Smrg    p*:CYGWIN*:*)
8227a84e134Smrg	echo powerpcle-unknown-cygwin
8237a84e134Smrg	exit ;;
8247a84e134Smrg    prep*:SunOS:5.*:*)
8257a84e134Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
8267a84e134Smrg	exit ;;
8277a84e134Smrg    *:GNU:*:*)
8287a84e134Smrg	# the GNU system
8297a84e134Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
8307a84e134Smrg	exit ;;
8317a84e134Smrg    *:GNU/*:*:*)
8327a84e134Smrg	# other systems with GNU libc and userland
8337a84e134Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
8347a84e134Smrg	exit ;;
8357a84e134Smrg    i*86:Minix:*:*)
8367a84e134Smrg	echo ${UNAME_MACHINE}-pc-minix
8377a84e134Smrg	exit ;;
8387a84e134Smrg    arm*:Linux:*:*)
839ab902922Smrg	eval $set_cc_for_build
840ab902922Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
841ab902922Smrg	    | grep -q __ARM_EABI__
842ab902922Smrg	then
843ab902922Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnu
844ab902922Smrg	else
845ab902922Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
846ab902922Smrg	fi
847ab902922Smrg	exit ;;
848ab902922Smrg    avr32*:Linux:*:*)
8497a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8507a84e134Smrg	exit ;;
8517a84e134Smrg    cris:Linux:*:*)
8527a84e134Smrg	echo cris-axis-linux-gnu
8537a84e134Smrg	exit ;;
8547a84e134Smrg    crisv32:Linux:*:*)
8557a84e134Smrg	echo crisv32-axis-linux-gnu
8567a84e134Smrg	exit ;;
8577a84e134Smrg    frv:Linux:*:*)
8587a84e134Smrg    	echo frv-unknown-linux-gnu
8597a84e134Smrg	exit ;;
8607a84e134Smrg    ia64:Linux:*:*)
8617a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8627a84e134Smrg	exit ;;
8637a84e134Smrg    m32r*:Linux:*:*)
8647a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8657a84e134Smrg	exit ;;
8667a84e134Smrg    m68*:Linux:*:*)
8677a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8687a84e134Smrg	exit ;;
8697a84e134Smrg    mips:Linux:*:*)
8707a84e134Smrg	eval $set_cc_for_build
8717a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
8727a84e134Smrg	#undef CPU
8737a84e134Smrg	#undef mips
8747a84e134Smrg	#undef mipsel
8757a84e134Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
8767a84e134Smrg	CPU=mipsel
8777a84e134Smrg	#else
8787a84e134Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
8797a84e134Smrg	CPU=mips
8807a84e134Smrg	#else
8817a84e134Smrg	CPU=
8827a84e134Smrg	#endif
8837a84e134Smrg	#endif
8847a84e134SmrgEOF
885ab902922Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
886ab902922Smrg	    /^CPU/{
887ab902922Smrg		s: ::g
888ab902922Smrg		p
889ab902922Smrg	    }'`"
8907a84e134Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
8917a84e134Smrg	;;
8927a84e134Smrg    mips64:Linux:*:*)
8937a84e134Smrg	eval $set_cc_for_build
8947a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
8957a84e134Smrg	#undef CPU
8967a84e134Smrg	#undef mips64
8977a84e134Smrg	#undef mips64el
8987a84e134Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
8997a84e134Smrg	CPU=mips64el
9007a84e134Smrg	#else
9017a84e134Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
9027a84e134Smrg	CPU=mips64
9037a84e134Smrg	#else
9047a84e134Smrg	CPU=
9057a84e134Smrg	#endif
9067a84e134Smrg	#endif
9077a84e134SmrgEOF
908ab902922Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
909ab902922Smrg	    /^CPU/{
910ab902922Smrg		s: ::g
911ab902922Smrg		p
912ab902922Smrg	    }'`"
9137a84e134Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
9147a84e134Smrg	;;
9157a84e134Smrg    or32:Linux:*:*)
9167a84e134Smrg	echo or32-unknown-linux-gnu
9177a84e134Smrg	exit ;;
9187a84e134Smrg    ppc:Linux:*:*)
9197a84e134Smrg	echo powerpc-unknown-linux-gnu
9207a84e134Smrg	exit ;;
9217a84e134Smrg    ppc64:Linux:*:*)
9227a84e134Smrg	echo powerpc64-unknown-linux-gnu
9237a84e134Smrg	exit ;;
9247a84e134Smrg    alpha:Linux:*:*)
9257a84e134Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
9267a84e134Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
9277a84e134Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
9287a84e134Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
9297a84e134Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
9307a84e134Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
9317a84e134Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
9327a84e134Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
9337a84e134Smrg        esac
9347a84e134Smrg	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
9357a84e134Smrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
9367a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
9377a84e134Smrg	exit ;;
9387a84e134Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
9397a84e134Smrg	# Look for CPU level
9407a84e134Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
9417a84e134Smrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
9427a84e134Smrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
9437a84e134Smrg	  *)    echo hppa-unknown-linux-gnu ;;
9447a84e134Smrg	esac
9457a84e134Smrg	exit ;;
9467a84e134Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
9477a84e134Smrg	echo hppa64-unknown-linux-gnu
9487a84e134Smrg	exit ;;
9497a84e134Smrg    s390:Linux:*:* | s390x:Linux:*:*)
9507a84e134Smrg	echo ${UNAME_MACHINE}-ibm-linux
9517a84e134Smrg	exit ;;
9527a84e134Smrg    sh64*:Linux:*:*)
9537a84e134Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
9547a84e134Smrg	exit ;;
9557a84e134Smrg    sh*:Linux:*:*)
9567a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9577a84e134Smrg	exit ;;
9587a84e134Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
9597a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9607a84e134Smrg	exit ;;
9617a84e134Smrg    vax:Linux:*:*)
9627a84e134Smrg	echo ${UNAME_MACHINE}-dec-linux-gnu
9637a84e134Smrg	exit ;;
9647a84e134Smrg    x86_64:Linux:*:*)
9657a84e134Smrg	echo x86_64-unknown-linux-gnu
9667a84e134Smrg	exit ;;
967ab902922Smrg    xtensa*:Linux:*:*)
968ab902922Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
969ab902922Smrg	exit ;;
9707a84e134Smrg    i*86:Linux:*:*)
9717a84e134Smrg	# The BFD linker knows what the default object file format is, so
9727a84e134Smrg	# first see if it will tell us. cd to the root directory to prevent
9737a84e134Smrg	# problems with other programs or directories called `ld' in the path.
9747a84e134Smrg	# Set LC_ALL=C to ensure ld outputs messages in English.
9757a84e134Smrg	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
9767a84e134Smrg			 | sed -ne '/supported targets:/!d
9777a84e134Smrg				    s/[ 	][ 	]*/ /g
9787a84e134Smrg				    s/.*supported targets: *//
9797a84e134Smrg				    s/ .*//
9807a84e134Smrg				    p'`
9817a84e134Smrg        case "$ld_supported_targets" in
9827a84e134Smrg	  elf32-i386)
9837a84e134Smrg		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
9847a84e134Smrg		;;
9857a84e134Smrg	  a.out-i386-linux)
9867a84e134Smrg		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
9877a84e134Smrg		exit ;;
9887a84e134Smrg	  coff-i386)
9897a84e134Smrg		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
9907a84e134Smrg		exit ;;
9917a84e134Smrg	  "")
9927a84e134Smrg		# Either a pre-BFD a.out linker (linux-gnuoldld) or
9937a84e134Smrg		# one that does not give us useful --help.
9947a84e134Smrg		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
9957a84e134Smrg		exit ;;
9967a84e134Smrg	esac
9977a84e134Smrg	# Determine whether the default compiler is a.out or elf
9987a84e134Smrg	eval $set_cc_for_build
9997a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
10007a84e134Smrg	#include <features.h>
10017a84e134Smrg	#ifdef __ELF__
10027a84e134Smrg	# ifdef __GLIBC__
10037a84e134Smrg	#  if __GLIBC__ >= 2
10047a84e134Smrg	LIBC=gnu
10057a84e134Smrg	#  else
10067a84e134Smrg	LIBC=gnulibc1
10077a84e134Smrg	#  endif
10087a84e134Smrg	# else
10097a84e134Smrg	LIBC=gnulibc1
10107a84e134Smrg	# endif
10117a84e134Smrg	#else
1012ab902922Smrg	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
10137a84e134Smrg	LIBC=gnu
10147a84e134Smrg	#else
10157a84e134Smrg	LIBC=gnuaout
10167a84e134Smrg	#endif
10177a84e134Smrg	#endif
10187a84e134Smrg	#ifdef __dietlibc__
10197a84e134Smrg	LIBC=dietlibc
10207a84e134Smrg	#endif
10217a84e134SmrgEOF
1022ab902922Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1023ab902922Smrg	    /^LIBC/{
1024ab902922Smrg		s: ::g
1025ab902922Smrg		p
1026ab902922Smrg	    }'`"
10277a84e134Smrg	test x"${LIBC}" != x && {
10287a84e134Smrg		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
10297a84e134Smrg		exit
10307a84e134Smrg	}
10317a84e134Smrg	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
10327a84e134Smrg	;;
10337a84e134Smrg    i*86:DYNIX/ptx:4*:*)
10347a84e134Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
10357a84e134Smrg	# earlier versions are messed up and put the nodename in both
10367a84e134Smrg	# sysname and nodename.
10377a84e134Smrg	echo i386-sequent-sysv4
10387a84e134Smrg	exit ;;
10397a84e134Smrg    i*86:UNIX_SV:4.2MP:2.*)
10407a84e134Smrg        # Unixware is an offshoot of SVR4, but it has its own version
10417a84e134Smrg        # number series starting with 2...
10427a84e134Smrg        # I am not positive that other SVR4 systems won't match this,
10437a84e134Smrg	# I just have to hope.  -- rms.
10447a84e134Smrg        # Use sysv4.2uw... so that sysv4* matches it.
10457a84e134Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
10467a84e134Smrg	exit ;;
10477a84e134Smrg    i*86:OS/2:*:*)
10487a84e134Smrg	# If we were able to find `uname', then EMX Unix compatibility
10497a84e134Smrg	# is probably installed.
10507a84e134Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
10517a84e134Smrg	exit ;;
10527a84e134Smrg    i*86:XTS-300:*:STOP)
10537a84e134Smrg	echo ${UNAME_MACHINE}-unknown-stop
10547a84e134Smrg	exit ;;
10557a84e134Smrg    i*86:atheos:*:*)
10567a84e134Smrg	echo ${UNAME_MACHINE}-unknown-atheos
10577a84e134Smrg	exit ;;
10587a84e134Smrg    i*86:syllable:*:*)
10597a84e134Smrg	echo ${UNAME_MACHINE}-pc-syllable
10607a84e134Smrg	exit ;;
10617a84e134Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
10627a84e134Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
10637a84e134Smrg	exit ;;
10647a84e134Smrg    i*86:*DOS:*:*)
10657a84e134Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
10667a84e134Smrg	exit ;;
10677a84e134Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
10687a84e134Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
10697a84e134Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
10707a84e134Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
10717a84e134Smrg	else
10727a84e134Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
10737a84e134Smrg	fi
10747a84e134Smrg	exit ;;
10757a84e134Smrg    i*86:*:5:[678]*)
10767a84e134Smrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
10777a84e134Smrg	case `/bin/uname -X | grep "^Machine"` in
10787a84e134Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
10797a84e134Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
10807a84e134Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10817a84e134Smrg	esac
10827a84e134Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
10837a84e134Smrg	exit ;;
10847a84e134Smrg    i*86:*:3.2:*)
10857a84e134Smrg	if test -f /usr/options/cb.name; then
10867a84e134Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
10877a84e134Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
10887a84e134Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
10897a84e134Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
10907a84e134Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
10917a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
10927a84e134Smrg			&& UNAME_MACHINE=i586
10937a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
10947a84e134Smrg			&& UNAME_MACHINE=i686
10957a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
10967a84e134Smrg			&& UNAME_MACHINE=i686
10977a84e134Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
10987a84e134Smrg	else
10997a84e134Smrg		echo ${UNAME_MACHINE}-pc-sysv32
11007a84e134Smrg	fi
11017a84e134Smrg	exit ;;
11027a84e134Smrg    pc:*:*:*)
11037a84e134Smrg	# Left here for compatibility:
11047a84e134Smrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
11057a84e134Smrg        # the processor, so we play safe by assuming i386.
11067a84e134Smrg	echo i386-pc-msdosdjgpp
11077a84e134Smrg        exit ;;
11087a84e134Smrg    Intel:Mach:3*:*)
11097a84e134Smrg	echo i386-pc-mach3
11107a84e134Smrg	exit ;;
11117a84e134Smrg    paragon:*:*:*)
11127a84e134Smrg	echo i860-intel-osf1
11137a84e134Smrg	exit ;;
11147a84e134Smrg    i860:*:4.*:*) # i860-SVR4
11157a84e134Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
11167a84e134Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
11177a84e134Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
11187a84e134Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
11197a84e134Smrg	fi
11207a84e134Smrg	exit ;;
11217a84e134Smrg    mini*:CTIX:SYS*5:*)
11227a84e134Smrg	# "miniframe"
11237a84e134Smrg	echo m68010-convergent-sysv
11247a84e134Smrg	exit ;;
11257a84e134Smrg    mc68k:UNIX:SYSTEM5:3.51m)
11267a84e134Smrg	echo m68k-convergent-sysv
11277a84e134Smrg	exit ;;
11287a84e134Smrg    M680?0:D-NIX:5.3:*)
11297a84e134Smrg	echo m68k-diab-dnix
11307a84e134Smrg	exit ;;
11317a84e134Smrg    M68*:*:R3V[5678]*:*)
11327a84e134Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
11337a84e134Smrg    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)
11347a84e134Smrg	OS_REL=''
11357a84e134Smrg	test -r /etc/.relid \
11367a84e134Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
11377a84e134Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11387a84e134Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
11397a84e134Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11407a84e134Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
11417a84e134Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
11427a84e134Smrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11437a84e134Smrg          && { echo i486-ncr-sysv4; exit; } ;;
11447a84e134Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
11457a84e134Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
11467a84e134Smrg	exit ;;
11477a84e134Smrg    mc68030:UNIX_System_V:4.*:*)
11487a84e134Smrg	echo m68k-atari-sysv4
11497a84e134Smrg	exit ;;
11507a84e134Smrg    TSUNAMI:LynxOS:2.*:*)
11517a84e134Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
11527a84e134Smrg	exit ;;
11537a84e134Smrg    rs6000:LynxOS:2.*:*)
11547a84e134Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
11557a84e134Smrg	exit ;;
11567a84e134Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
11577a84e134Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
11587a84e134Smrg	exit ;;
11597a84e134Smrg    SM[BE]S:UNIX_SV:*:*)
11607a84e134Smrg	echo mips-dde-sysv${UNAME_RELEASE}
11617a84e134Smrg	exit ;;
11627a84e134Smrg    RM*:ReliantUNIX-*:*:*)
11637a84e134Smrg	echo mips-sni-sysv4
11647a84e134Smrg	exit ;;
11657a84e134Smrg    RM*:SINIX-*:*:*)
11667a84e134Smrg	echo mips-sni-sysv4
11677a84e134Smrg	exit ;;
11687a84e134Smrg    *:SINIX-*:*:*)
11697a84e134Smrg	if uname -p 2>/dev/null >/dev/null ; then
11707a84e134Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
11717a84e134Smrg		echo ${UNAME_MACHINE}-sni-sysv4
11727a84e134Smrg	else
11737a84e134Smrg		echo ns32k-sni-sysv
11747a84e134Smrg	fi
11757a84e134Smrg	exit ;;
11767a84e134Smrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
11777a84e134Smrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
11787a84e134Smrg        echo i586-unisys-sysv4
11797a84e134Smrg        exit ;;
11807a84e134Smrg    *:UNIX_System_V:4*:FTX*)
11817a84e134Smrg	# From Gerald Hewes <hewes@openmarket.com>.
11827a84e134Smrg	# How about differentiating between stratus architectures? -djm
11837a84e134Smrg	echo hppa1.1-stratus-sysv4
11847a84e134Smrg	exit ;;
11857a84e134Smrg    *:*:*:FTX*)
11867a84e134Smrg	# From seanf@swdc.stratus.com.
11877a84e134Smrg	echo i860-stratus-sysv4
11887a84e134Smrg	exit ;;
11897a84e134Smrg    i*86:VOS:*:*)
11907a84e134Smrg	# From Paul.Green@stratus.com.
11917a84e134Smrg	echo ${UNAME_MACHINE}-stratus-vos
11927a84e134Smrg	exit ;;
11937a84e134Smrg    *:VOS:*:*)
11947a84e134Smrg	# From Paul.Green@stratus.com.
11957a84e134Smrg	echo hppa1.1-stratus-vos
11967a84e134Smrg	exit ;;
11977a84e134Smrg    mc68*:A/UX:*:*)
11987a84e134Smrg	echo m68k-apple-aux${UNAME_RELEASE}
11997a84e134Smrg	exit ;;
12007a84e134Smrg    news*:NEWS-OS:6*:*)
12017a84e134Smrg	echo mips-sony-newsos6
12027a84e134Smrg	exit ;;
12037a84e134Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
12047a84e134Smrg	if [ -d /usr/nec ]; then
12057a84e134Smrg	        echo mips-nec-sysv${UNAME_RELEASE}
12067a84e134Smrg	else
12077a84e134Smrg	        echo mips-unknown-sysv${UNAME_RELEASE}
12087a84e134Smrg	fi
12097a84e134Smrg        exit ;;
12107a84e134Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
12117a84e134Smrg	echo powerpc-be-beos
12127a84e134Smrg	exit ;;
12137a84e134Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
12147a84e134Smrg	echo powerpc-apple-beos
12157a84e134Smrg	exit ;;
12167a84e134Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
12177a84e134Smrg	echo i586-pc-beos
12187a84e134Smrg	exit ;;
12197a84e134Smrg    SX-4:SUPER-UX:*:*)
12207a84e134Smrg	echo sx4-nec-superux${UNAME_RELEASE}
12217a84e134Smrg	exit ;;
12227a84e134Smrg    SX-5:SUPER-UX:*:*)
12237a84e134Smrg	echo sx5-nec-superux${UNAME_RELEASE}
12247a84e134Smrg	exit ;;
12257a84e134Smrg    SX-6:SUPER-UX:*:*)
12267a84e134Smrg	echo sx6-nec-superux${UNAME_RELEASE}
12277a84e134Smrg	exit ;;
1228ab902922Smrg    SX-7:SUPER-UX:*:*)
1229ab902922Smrg	echo sx7-nec-superux${UNAME_RELEASE}
1230ab902922Smrg	exit ;;
1231ab902922Smrg    SX-8:SUPER-UX:*:*)
1232ab902922Smrg	echo sx8-nec-superux${UNAME_RELEASE}
1233ab902922Smrg	exit ;;
1234ab902922Smrg    SX-8R:SUPER-UX:*:*)
1235ab902922Smrg	echo sx8r-nec-superux${UNAME_RELEASE}
1236ab902922Smrg	exit ;;
12377a84e134Smrg    Power*:Rhapsody:*:*)
12387a84e134Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
12397a84e134Smrg	exit ;;
12407a84e134Smrg    *:Rhapsody:*:*)
12417a84e134Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
12427a84e134Smrg	exit ;;
12437a84e134Smrg    *:Darwin:*:*)
12447a84e134Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
12457a84e134Smrg	case $UNAME_PROCESSOR in
12467a84e134Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
12477a84e134Smrg	esac
12487a84e134Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
12497a84e134Smrg	exit ;;
12507a84e134Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
12517a84e134Smrg	UNAME_PROCESSOR=`uname -p`
12527a84e134Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
12537a84e134Smrg		UNAME_PROCESSOR=i386
12547a84e134Smrg		UNAME_MACHINE=pc
12557a84e134Smrg	fi
12567a84e134Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
12577a84e134Smrg	exit ;;
12587a84e134Smrg    *:QNX:*:4*)
12597a84e134Smrg	echo i386-pc-qnx
12607a84e134Smrg	exit ;;
12617a84e134Smrg    NSE-?:NONSTOP_KERNEL:*:*)
12627a84e134Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
12637a84e134Smrg	exit ;;
12647a84e134Smrg    NSR-?:NONSTOP_KERNEL:*:*)
12657a84e134Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
12667a84e134Smrg	exit ;;
12677a84e134Smrg    *:NonStop-UX:*:*)
12687a84e134Smrg	echo mips-compaq-nonstopux
12697a84e134Smrg	exit ;;
12707a84e134Smrg    BS2000:POSIX*:*:*)
12717a84e134Smrg	echo bs2000-siemens-sysv
12727a84e134Smrg	exit ;;
12737a84e134Smrg    DS/*:UNIX_System_V:*:*)
12747a84e134Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
12757a84e134Smrg	exit ;;
12767a84e134Smrg    *:Plan9:*:*)
12777a84e134Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
12787a84e134Smrg	# is converted to i386 for consistency with other x86
12797a84e134Smrg	# operating systems.
12807a84e134Smrg	if test "$cputype" = "386"; then
12817a84e134Smrg	    UNAME_MACHINE=i386
12827a84e134Smrg	else
12837a84e134Smrg	    UNAME_MACHINE="$cputype"
12847a84e134Smrg	fi
12857a84e134Smrg	echo ${UNAME_MACHINE}-unknown-plan9
12867a84e134Smrg	exit ;;
12877a84e134Smrg    *:TOPS-10:*:*)
12887a84e134Smrg	echo pdp10-unknown-tops10
12897a84e134Smrg	exit ;;
12907a84e134Smrg    *:TENEX:*:*)
12917a84e134Smrg	echo pdp10-unknown-tenex
12927a84e134Smrg	exit ;;
12937a84e134Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
12947a84e134Smrg	echo pdp10-dec-tops20
12957a84e134Smrg	exit ;;
12967a84e134Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
12977a84e134Smrg	echo pdp10-xkl-tops20
12987a84e134Smrg	exit ;;
12997a84e134Smrg    *:TOPS-20:*:*)
13007a84e134Smrg	echo pdp10-unknown-tops20
13017a84e134Smrg	exit ;;
13027a84e134Smrg    *:ITS:*:*)
13037a84e134Smrg	echo pdp10-unknown-its
13047a84e134Smrg	exit ;;
13057a84e134Smrg    SEI:*:*:SEIUX)
13067a84e134Smrg        echo mips-sei-seiux${UNAME_RELEASE}
13077a84e134Smrg	exit ;;
13087a84e134Smrg    *:DragonFly:*:*)
13097a84e134Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
13107a84e134Smrg	exit ;;
13117a84e134Smrg    *:*VMS:*:*)
13127a84e134Smrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
13137a84e134Smrg	case "${UNAME_MACHINE}" in
13147a84e134Smrg	    A*) echo alpha-dec-vms ; exit ;;
13157a84e134Smrg	    I*) echo ia64-dec-vms ; exit ;;
13167a84e134Smrg	    V*) echo vax-dec-vms ; exit ;;
13177a84e134Smrg	esac ;;
13187a84e134Smrg    *:XENIX:*:SysV)
13197a84e134Smrg	echo i386-pc-xenix
13207a84e134Smrg	exit ;;
13217a84e134Smrg    i*86:skyos:*:*)
13227a84e134Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
13237a84e134Smrg	exit ;;
13247a84e134Smrg    i*86:rdos:*:*)
13257a84e134Smrg	echo ${UNAME_MACHINE}-pc-rdos
13267a84e134Smrg	exit ;;
13277a84e134Smrgesac
13287a84e134Smrg
13297a84e134Smrg#echo '(No uname command or uname output not recognized.)' 1>&2
13307a84e134Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
13317a84e134Smrg
13327a84e134Smrgeval $set_cc_for_build
13337a84e134Smrgcat >$dummy.c <<EOF
13347a84e134Smrg#ifdef _SEQUENT_
13357a84e134Smrg# include <sys/types.h>
13367a84e134Smrg# include <sys/utsname.h>
13377a84e134Smrg#endif
13387a84e134Smrgmain ()
13397a84e134Smrg{
13407a84e134Smrg#if defined (sony)
13417a84e134Smrg#if defined (MIPSEB)
13427a84e134Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
13437a84e134Smrg     I don't know....  */
13447a84e134Smrg  printf ("mips-sony-bsd\n"); exit (0);
13457a84e134Smrg#else
13467a84e134Smrg#include <sys/param.h>
13477a84e134Smrg  printf ("m68k-sony-newsos%s\n",
13487a84e134Smrg#ifdef NEWSOS4
13497a84e134Smrg          "4"
13507a84e134Smrg#else
13517a84e134Smrg	  ""
13527a84e134Smrg#endif
13537a84e134Smrg         ); exit (0);
13547a84e134Smrg#endif
13557a84e134Smrg#endif
13567a84e134Smrg
13577a84e134Smrg#if defined (__arm) && defined (__acorn) && defined (__unix)
13587a84e134Smrg  printf ("arm-acorn-riscix\n"); exit (0);
13597a84e134Smrg#endif
13607a84e134Smrg
13617a84e134Smrg#if defined (hp300) && !defined (hpux)
13627a84e134Smrg  printf ("m68k-hp-bsd\n"); exit (0);
13637a84e134Smrg#endif
13647a84e134Smrg
13657a84e134Smrg#if defined (NeXT)
13667a84e134Smrg#if !defined (__ARCHITECTURE__)
13677a84e134Smrg#define __ARCHITECTURE__ "m68k"
13687a84e134Smrg#endif
13697a84e134Smrg  int version;
13707a84e134Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
13717a84e134Smrg  if (version < 4)
13727a84e134Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
13737a84e134Smrg  else
13747a84e134Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
13757a84e134Smrg  exit (0);
13767a84e134Smrg#endif
13777a84e134Smrg
13787a84e134Smrg#if defined (MULTIMAX) || defined (n16)
13797a84e134Smrg#if defined (UMAXV)
13807a84e134Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
13817a84e134Smrg#else
13827a84e134Smrg#if defined (CMU)
13837a84e134Smrg  printf ("ns32k-encore-mach\n"); exit (0);
13847a84e134Smrg#else
13857a84e134Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
13867a84e134Smrg#endif
13877a84e134Smrg#endif
13887a84e134Smrg#endif
13897a84e134Smrg
13907a84e134Smrg#if defined (__386BSD__)
13917a84e134Smrg  printf ("i386-pc-bsd\n"); exit (0);
13927a84e134Smrg#endif
13937a84e134Smrg
13947a84e134Smrg#if defined (sequent)
13957a84e134Smrg#if defined (i386)
13967a84e134Smrg  printf ("i386-sequent-dynix\n"); exit (0);
13977a84e134Smrg#endif
13987a84e134Smrg#if defined (ns32000)
13997a84e134Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
14007a84e134Smrg#endif
14017a84e134Smrg#endif
14027a84e134Smrg
14037a84e134Smrg#if defined (_SEQUENT_)
14047a84e134Smrg    struct utsname un;
14057a84e134Smrg
14067a84e134Smrg    uname(&un);
14077a84e134Smrg
14087a84e134Smrg    if (strncmp(un.version, "V2", 2) == 0) {
14097a84e134Smrg	printf ("i386-sequent-ptx2\n"); exit (0);
14107a84e134Smrg    }
14117a84e134Smrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
14127a84e134Smrg	printf ("i386-sequent-ptx1\n"); exit (0);
14137a84e134Smrg    }
14147a84e134Smrg    printf ("i386-sequent-ptx\n"); exit (0);
14157a84e134Smrg
14167a84e134Smrg#endif
14177a84e134Smrg
14187a84e134Smrg#if defined (vax)
14197a84e134Smrg# if !defined (ultrix)
14207a84e134Smrg#  include <sys/param.h>
14217a84e134Smrg#  if defined (BSD)
14227a84e134Smrg#   if BSD == 43
14237a84e134Smrg      printf ("vax-dec-bsd4.3\n"); exit (0);
14247a84e134Smrg#   else
14257a84e134Smrg#    if BSD == 199006
14267a84e134Smrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
14277a84e134Smrg#    else
14287a84e134Smrg      printf ("vax-dec-bsd\n"); exit (0);
14297a84e134Smrg#    endif
14307a84e134Smrg#   endif
14317a84e134Smrg#  else
14327a84e134Smrg    printf ("vax-dec-bsd\n"); exit (0);
14337a84e134Smrg#  endif
14347a84e134Smrg# else
14357a84e134Smrg    printf ("vax-dec-ultrix\n"); exit (0);
14367a84e134Smrg# endif
14377a84e134Smrg#endif
14387a84e134Smrg
14397a84e134Smrg#if defined (alliant) && defined (i860)
14407a84e134Smrg  printf ("i860-alliant-bsd\n"); exit (0);
14417a84e134Smrg#endif
14427a84e134Smrg
14437a84e134Smrg  exit (1);
14447a84e134Smrg}
14457a84e134SmrgEOF
14467a84e134Smrg
14477a84e134Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
14487a84e134Smrg	{ echo "$SYSTEM_NAME"; exit; }
14497a84e134Smrg
14507a84e134Smrg# Apollos put the system type in the environment.
14517a84e134Smrg
14527a84e134Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
14537a84e134Smrg
14547a84e134Smrg# Convex versions that predate uname can use getsysinfo(1)
14557a84e134Smrg
14567a84e134Smrgif [ -x /usr/convex/getsysinfo ]
14577a84e134Smrgthen
14587a84e134Smrg    case `getsysinfo -f cpu_type` in
14597a84e134Smrg    c1*)
14607a84e134Smrg	echo c1-convex-bsd
14617a84e134Smrg	exit ;;
14627a84e134Smrg    c2*)
14637a84e134Smrg	if getsysinfo -f scalar_acc
14647a84e134Smrg	then echo c32-convex-bsd
14657a84e134Smrg	else echo c2-convex-bsd
14667a84e134Smrg	fi
14677a84e134Smrg	exit ;;
14687a84e134Smrg    c34*)
14697a84e134Smrg	echo c34-convex-bsd
14707a84e134Smrg	exit ;;
14717a84e134Smrg    c38*)
14727a84e134Smrg	echo c38-convex-bsd
14737a84e134Smrg	exit ;;
14747a84e134Smrg    c4*)
14757a84e134Smrg	echo c4-convex-bsd
14767a84e134Smrg	exit ;;
14777a84e134Smrg    esac
14787a84e134Smrgfi
14797a84e134Smrg
14807a84e134Smrgcat >&2 <<EOF
14817a84e134Smrg$0: unable to guess system type
14827a84e134Smrg
14837a84e134SmrgThis script, last modified $timestamp, has failed to recognize
14847a84e134Smrgthe operating system you are using. It is advised that you
14857a84e134Smrgdownload the most up to date version of the config scripts from
14867a84e134Smrg
1487ab902922Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
14887a84e134Smrgand
1489ab902922Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
14907a84e134Smrg
14917a84e134SmrgIf the version you run ($0) is already up to date, please
14927a84e134Smrgsend the following data and any information you think might be
14937a84e134Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
14947a84e134Smrginformation to handle your system.
14957a84e134Smrg
14967a84e134Smrgconfig.guess timestamp = $timestamp
14977a84e134Smrg
14987a84e134Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
14997a84e134Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
15007a84e134Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
15017a84e134Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
15027a84e134Smrg
15037a84e134Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
15047a84e134Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
15057a84e134Smrg
15067a84e134Smrghostinfo               = `(hostinfo) 2>/dev/null`
15077a84e134Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
15087a84e134Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
15097a84e134Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
15107a84e134Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
15117a84e134Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
15127a84e134Smrg
15137a84e134SmrgUNAME_MACHINE = ${UNAME_MACHINE}
15147a84e134SmrgUNAME_RELEASE = ${UNAME_RELEASE}
15157a84e134SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
15167a84e134SmrgUNAME_VERSION = ${UNAME_VERSION}
15177a84e134SmrgEOF
15187a84e134Smrg
15197a84e134Smrgexit 1
15207a84e134Smrg
15217a84e134Smrg# Local variables:
15227a84e134Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
15237a84e134Smrg# time-stamp-start: "timestamp='"
15247a84e134Smrg# time-stamp-format: "%:y-%02m-%02d"
15257a84e134Smrg# time-stamp-end: "'"
15267a84e134Smrg# End:
1527