config.guess revision 14330f12
195b296d0Smrg#! /bin/sh
295b296d0Smrg# Attempt to guess a canonical system name.
395b296d0Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
414330f12Smrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5ff89ac2bSmrg#   Free Software Foundation, Inc.
695b296d0Smrg
714330f12Smrgtimestamp='2010-08-21'
895b296d0Smrg
995b296d0Smrg# This file is free software; you can redistribute it and/or modify it
1095b296d0Smrg# under the terms of the GNU General Public License as published by
1195b296d0Smrg# the Free Software Foundation; either version 2 of the License, or
1295b296d0Smrg# (at your option) any later version.
1395b296d0Smrg#
1495b296d0Smrg# This program is distributed in the hope that it will be useful, but
1595b296d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
1695b296d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1795b296d0Smrg# General Public License for more details.
1895b296d0Smrg#
1995b296d0Smrg# You should have received a copy of the GNU General Public License
2095b296d0Smrg# along with this program; if not, write to the Free Software
2195b296d0Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2295b296d0Smrg# 02110-1301, USA.
2395b296d0Smrg#
2495b296d0Smrg# As a special exception to the GNU General Public License, if you
2595b296d0Smrg# distribute this file as part of a program that contains a
2695b296d0Smrg# configuration script generated by Autoconf, you may include it under
2795b296d0Smrg# the same distribution terms that you use for the rest of that program.
2895b296d0Smrg
2995b296d0Smrg
3014330f12Smrg# Originally written by Per Bothner.  Please send patches (context
3114330f12Smrg# diff format) to <config-patches@gnu.org> and include a ChangeLog
3214330f12Smrg# entry.
3395b296d0Smrg#
3495b296d0Smrg# This script attempts to guess a canonical system name similar to
3595b296d0Smrg# config.sub.  If it succeeds, it prints the system name on stdout, and
3695b296d0Smrg# exits with 0.  Otherwise, it exits with 1.
3795b296d0Smrg#
3814330f12Smrg# You can get the latest version of this script from:
3914330f12Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
4095b296d0Smrg
4195b296d0Smrgme=`echo "$0" | sed -e 's,.*/,,'`
4295b296d0Smrg
4395b296d0Smrgusage="\
4495b296d0SmrgUsage: $0 [OPTION]
4595b296d0Smrg
4695b296d0SmrgOutput the configuration name of the system \`$me' is run on.
4795b296d0Smrg
4895b296d0SmrgOperation modes:
4995b296d0Smrg  -h, --help         print this help, then exit
5095b296d0Smrg  -t, --time-stamp   print date of last modification, then exit
5195b296d0Smrg  -v, --version      print version number, then exit
5295b296d0Smrg
5395b296d0SmrgReport bugs and patches to <config-patches@gnu.org>."
5495b296d0Smrg
5595b296d0Smrgversion="\
5695b296d0SmrgGNU config.guess ($timestamp)
5795b296d0Smrg
5895b296d0SmrgOriginally written by Per Bothner.
5914330f12SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
6014330f12Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
6114330f12SmrgSoftware Foundation, Inc.
6295b296d0Smrg
6395b296d0SmrgThis is free software; see the source for copying conditions.  There is NO
6495b296d0Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6595b296d0Smrg
6695b296d0Smrghelp="
6795b296d0SmrgTry \`$me --help' for more information."
6895b296d0Smrg
6995b296d0Smrg# Parse command line
7095b296d0Smrgwhile test $# -gt 0 ; do
7195b296d0Smrg  case $1 in
7295b296d0Smrg    --time-stamp | --time* | -t )
7395b296d0Smrg       echo "$timestamp" ; exit ;;
7495b296d0Smrg    --version | -v )
7595b296d0Smrg       echo "$version" ; exit ;;
7695b296d0Smrg    --help | --h* | -h )
7795b296d0Smrg       echo "$usage"; exit ;;
7895b296d0Smrg    -- )     # Stop option processing
7995b296d0Smrg       shift; break ;;
8095b296d0Smrg    - )	# Use stdin as input.
8195b296d0Smrg       break ;;
8295b296d0Smrg    -* )
8395b296d0Smrg       echo "$me: invalid option $1$help" >&2
8495b296d0Smrg       exit 1 ;;
8595b296d0Smrg    * )
8695b296d0Smrg       break ;;
8795b296d0Smrg  esac
8895b296d0Smrgdone
8995b296d0Smrg
9095b296d0Smrgif test $# != 0; then
9195b296d0Smrg  echo "$me: too many arguments$help" >&2
9295b296d0Smrg  exit 1
9395b296d0Smrgfi
9495b296d0Smrg
9514330f12Smrgtrap 'exit 1' HUP INT TERM
9695b296d0Smrg
9795b296d0Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
9895b296d0Smrg# compiler to aid in system detection is discouraged as it requires
9995b296d0Smrg# temporary files to be created and, as you can see below, it is a
10095b296d0Smrg# headache to deal with in a portable fashion.
10195b296d0Smrg
10295b296d0Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
10395b296d0Smrg# use `HOST_CC' if defined, but it is deprecated.
10495b296d0Smrg
10595b296d0Smrg# Portable tmp directory creation inspired by the Autoconf team.
10695b296d0Smrg
10795b296d0Smrgset_cc_for_build='
10895b296d0Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
10914330f12Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
11095b296d0Smrg: ${TMPDIR=/tmp} ;
11195b296d0Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
11295b296d0Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
11395b296d0Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
11495b296d0Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
11595b296d0Smrgdummy=$tmp/dummy ;
11695b296d0Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
11795b296d0Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
11895b296d0Smrg ,,)    echo "int x;" > $dummy.c ;
11995b296d0Smrg	for c in cc gcc c89 c99 ; do
12095b296d0Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
12195b296d0Smrg	     CC_FOR_BUILD="$c"; break ;
12295b296d0Smrg	  fi ;
12395b296d0Smrg	done ;
12495b296d0Smrg	if test x"$CC_FOR_BUILD" = x ; then
12595b296d0Smrg	  CC_FOR_BUILD=no_compiler_found ;
12695b296d0Smrg	fi
12795b296d0Smrg	;;
12895b296d0Smrg ,,*)   CC_FOR_BUILD=$CC ;;
12995b296d0Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
13095b296d0Smrgesac ; set_cc_for_build= ;'
13195b296d0Smrg
13295b296d0Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
13395b296d0Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
13495b296d0Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
13595b296d0Smrg	PATH=$PATH:/.attbin ; export PATH
13695b296d0Smrgfi
13795b296d0Smrg
13895b296d0SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
13995b296d0SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
14095b296d0SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
14195b296d0SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
14295b296d0Smrg
14395b296d0Smrg# Note: order is significant - the case branches are not exclusive.
14495b296d0Smrg
14595b296d0Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
14695b296d0Smrg    *:NetBSD:*:*)
14795b296d0Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
14895b296d0Smrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
14995b296d0Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
15095b296d0Smrg	# switched to ELF, *-*-netbsd* would select the old
15195b296d0Smrg	# object file format.  This provides both forward
15295b296d0Smrg	# compatibility and a consistent mechanism for selecting the
15395b296d0Smrg	# object file format.
15495b296d0Smrg	#
15595b296d0Smrg	# Note: NetBSD doesn't particularly care about the vendor
15695b296d0Smrg	# portion of the name.  We always set it to "unknown".
15795b296d0Smrg	sysctl="sysctl -n hw.machine_arch"
15895b296d0Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
15995b296d0Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
16095b296d0Smrg	case "${UNAME_MACHINE_ARCH}" in
16195b296d0Smrg	    armeb) machine=armeb-unknown ;;
16295b296d0Smrg	    arm*) machine=arm-unknown ;;
16395b296d0Smrg	    sh3el) machine=shl-unknown ;;
16495b296d0Smrg	    sh3eb) machine=sh-unknown ;;
165ff89ac2bSmrg	    sh5el) machine=sh5le-unknown ;;
16695b296d0Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
16795b296d0Smrg	esac
16895b296d0Smrg	# The Operating System including object format, if it has switched
16995b296d0Smrg	# to ELF recently, or will in the future.
17095b296d0Smrg	case "${UNAME_MACHINE_ARCH}" in
17195b296d0Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
17295b296d0Smrg		eval $set_cc_for_build
17395b296d0Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
17414330f12Smrg			| grep -q __ELF__
17595b296d0Smrg		then
17695b296d0Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
17795b296d0Smrg		    # Return netbsd for either.  FIX?
17895b296d0Smrg		    os=netbsd
17995b296d0Smrg		else
18095b296d0Smrg		    os=netbsdelf
18195b296d0Smrg		fi
18295b296d0Smrg		;;
18395b296d0Smrg	    *)
18495b296d0Smrg	        os=netbsd
18595b296d0Smrg		;;
18695b296d0Smrg	esac
18795b296d0Smrg	# The OS release
18895b296d0Smrg	# Debian GNU/NetBSD machines have a different userland, and
18995b296d0Smrg	# thus, need a distinct triplet. However, they do not need
19095b296d0Smrg	# kernel version information, so it can be replaced with a
19195b296d0Smrg	# suitable tag, in the style of linux-gnu.
19295b296d0Smrg	case "${UNAME_VERSION}" in
19395b296d0Smrg	    Debian*)
19495b296d0Smrg		release='-gnu'
19595b296d0Smrg		;;
19695b296d0Smrg	    *)
19795b296d0Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
19895b296d0Smrg		;;
19995b296d0Smrg	esac
20095b296d0Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
20195b296d0Smrg	# contains redundant information, the shorter form:
20295b296d0Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
20395b296d0Smrg	echo "${machine}-${os}${release}"
20495b296d0Smrg	exit ;;
20595b296d0Smrg    *:OpenBSD:*:*)
20695b296d0Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
20795b296d0Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
20895b296d0Smrg	exit ;;
20995b296d0Smrg    *:ekkoBSD:*:*)
21095b296d0Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
21195b296d0Smrg	exit ;;
21295b296d0Smrg    *:SolidBSD:*:*)
21395b296d0Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
21495b296d0Smrg	exit ;;
21595b296d0Smrg    macppc:MirBSD:*:*)
21695b296d0Smrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
21795b296d0Smrg	exit ;;
21895b296d0Smrg    *:MirBSD:*:*)
21995b296d0Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
22095b296d0Smrg	exit ;;
22195b296d0Smrg    alpha:OSF1:*:*)
22295b296d0Smrg	case $UNAME_RELEASE in
22395b296d0Smrg	*4.0)
22495b296d0Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
22595b296d0Smrg		;;
22695b296d0Smrg	*5.*)
22795b296d0Smrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
22895b296d0Smrg		;;
22995b296d0Smrg	esac
23095b296d0Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
23195b296d0Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
23295b296d0Smrg	# covers most systems running today.  This code pipes the CPU
23395b296d0Smrg	# types through head -n 1, so we only detect the type of CPU 0.
23495b296d0Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
23595b296d0Smrg	case "$ALPHA_CPU_TYPE" in
23695b296d0Smrg	    "EV4 (21064)")
23795b296d0Smrg		UNAME_MACHINE="alpha" ;;
23895b296d0Smrg	    "EV4.5 (21064)")
23995b296d0Smrg		UNAME_MACHINE="alpha" ;;
24095b296d0Smrg	    "LCA4 (21066/21068)")
24195b296d0Smrg		UNAME_MACHINE="alpha" ;;
24295b296d0Smrg	    "EV5 (21164)")
24395b296d0Smrg		UNAME_MACHINE="alphaev5" ;;
24495b296d0Smrg	    "EV5.6 (21164A)")
24595b296d0Smrg		UNAME_MACHINE="alphaev56" ;;
24695b296d0Smrg	    "EV5.6 (21164PC)")
24795b296d0Smrg		UNAME_MACHINE="alphapca56" ;;
24895b296d0Smrg	    "EV5.7 (21164PC)")
24995b296d0Smrg		UNAME_MACHINE="alphapca57" ;;
25095b296d0Smrg	    "EV6 (21264)")
25195b296d0Smrg		UNAME_MACHINE="alphaev6" ;;
25295b296d0Smrg	    "EV6.7 (21264A)")
25395b296d0Smrg		UNAME_MACHINE="alphaev67" ;;
25495b296d0Smrg	    "EV6.8CB (21264C)")
25595b296d0Smrg		UNAME_MACHINE="alphaev68" ;;
25695b296d0Smrg	    "EV6.8AL (21264B)")
25795b296d0Smrg		UNAME_MACHINE="alphaev68" ;;
25895b296d0Smrg	    "EV6.8CX (21264D)")
25995b296d0Smrg		UNAME_MACHINE="alphaev68" ;;
26095b296d0Smrg	    "EV6.9A (21264/EV69A)")
26195b296d0Smrg		UNAME_MACHINE="alphaev69" ;;
26295b296d0Smrg	    "EV7 (21364)")
26395b296d0Smrg		UNAME_MACHINE="alphaev7" ;;
26495b296d0Smrg	    "EV7.9 (21364A)")
26595b296d0Smrg		UNAME_MACHINE="alphaev79" ;;
26695b296d0Smrg	esac
26795b296d0Smrg	# A Pn.n version is a patched version.
26895b296d0Smrg	# A Vn.n version is a released version.
26995b296d0Smrg	# A Tn.n version is a released field test version.
27095b296d0Smrg	# A Xn.n version is an unreleased experimental baselevel.
27195b296d0Smrg	# 1.2 uses "1.2" for uname -r.
27295b296d0Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27395b296d0Smrg	exit ;;
27495b296d0Smrg    Alpha\ *:Windows_NT*:*)
27595b296d0Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
27695b296d0Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
27795b296d0Smrg	# of the specific Alpha model?
27895b296d0Smrg	echo alpha-pc-interix
27995b296d0Smrg	exit ;;
28095b296d0Smrg    21064:Windows_NT:50:3)
28195b296d0Smrg	echo alpha-dec-winnt3.5
28295b296d0Smrg	exit ;;
28395b296d0Smrg    Amiga*:UNIX_System_V:4.0:*)
28495b296d0Smrg	echo m68k-unknown-sysv4
28595b296d0Smrg	exit ;;
28695b296d0Smrg    *:[Aa]miga[Oo][Ss]:*:*)
28795b296d0Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
28895b296d0Smrg	exit ;;
28995b296d0Smrg    *:[Mm]orph[Oo][Ss]:*:*)
29095b296d0Smrg	echo ${UNAME_MACHINE}-unknown-morphos
29195b296d0Smrg	exit ;;
29295b296d0Smrg    *:OS/390:*:*)
29395b296d0Smrg	echo i370-ibm-openedition
29495b296d0Smrg	exit ;;
29595b296d0Smrg    *:z/VM:*:*)
29695b296d0Smrg	echo s390-ibm-zvmoe
29795b296d0Smrg	exit ;;
29895b296d0Smrg    *:OS400:*:*)
29995b296d0Smrg        echo powerpc-ibm-os400
30095b296d0Smrg	exit ;;
30195b296d0Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
30295b296d0Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
30395b296d0Smrg	exit ;;
30495b296d0Smrg    arm:riscos:*:*|arm:RISCOS:*:*)
30595b296d0Smrg	echo arm-unknown-riscos
30695b296d0Smrg	exit ;;
30795b296d0Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
30895b296d0Smrg	echo hppa1.1-hitachi-hiuxmpp
30995b296d0Smrg	exit ;;
31095b296d0Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
31195b296d0Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
31295b296d0Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
31395b296d0Smrg		echo pyramid-pyramid-sysv3
31495b296d0Smrg	else
31595b296d0Smrg		echo pyramid-pyramid-bsd
31695b296d0Smrg	fi
31795b296d0Smrg	exit ;;
31895b296d0Smrg    NILE*:*:*:dcosx)
31995b296d0Smrg	echo pyramid-pyramid-svr4
32095b296d0Smrg	exit ;;
32195b296d0Smrg    DRS?6000:unix:4.0:6*)
32295b296d0Smrg	echo sparc-icl-nx6
32395b296d0Smrg	exit ;;
32495b296d0Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
32595b296d0Smrg	case `/usr/bin/uname -p` in
32695b296d0Smrg	    sparc) echo sparc-icl-nx7; exit ;;
32795b296d0Smrg	esac ;;
32814330f12Smrg    s390x:SunOS:*:*)
32914330f12Smrg	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33014330f12Smrg	exit ;;
33195b296d0Smrg    sun4H:SunOS:5.*:*)
33295b296d0Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33395b296d0Smrg	exit ;;
33495b296d0Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
33595b296d0Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33695b296d0Smrg	exit ;;
33714330f12Smrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
33814330f12Smrg	echo i386-pc-auroraux${UNAME_RELEASE}
33914330f12Smrg	exit ;;
340ff89ac2bSmrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
34114330f12Smrg	eval $set_cc_for_build
34214330f12Smrg	SUN_ARCH="i386"
34314330f12Smrg	# If there is a compiler, see if it is configured for 64-bit objects.
34414330f12Smrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
34514330f12Smrg	# This test works for both compilers.
34614330f12Smrg	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
34714330f12Smrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
34814330f12Smrg		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
34914330f12Smrg		grep IS_64BIT_ARCH >/dev/null
35014330f12Smrg	    then
35114330f12Smrg		SUN_ARCH="x86_64"
35214330f12Smrg	    fi
35314330f12Smrg	fi
35414330f12Smrg	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
35595b296d0Smrg	exit ;;
35695b296d0Smrg    sun4*:SunOS:6*:*)
35795b296d0Smrg	# According to config.sub, this is the proper way to canonicalize
35895b296d0Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
35995b296d0Smrg	# it's likely to be more like Solaris than SunOS4.
36095b296d0Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
36195b296d0Smrg	exit ;;
36295b296d0Smrg    sun4*:SunOS:*:*)
36395b296d0Smrg	case "`/usr/bin/arch -k`" in
36495b296d0Smrg	    Series*|S4*)
36595b296d0Smrg		UNAME_RELEASE=`uname -v`
36695b296d0Smrg		;;
36795b296d0Smrg	esac
36895b296d0Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
36995b296d0Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
37095b296d0Smrg	exit ;;
37195b296d0Smrg    sun3*:SunOS:*:*)
37295b296d0Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
37395b296d0Smrg	exit ;;
37495b296d0Smrg    sun*:*:4.2BSD:*)
37595b296d0Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
37695b296d0Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
37795b296d0Smrg	case "`/bin/arch`" in
37895b296d0Smrg	    sun3)
37995b296d0Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
38095b296d0Smrg		;;
38195b296d0Smrg	    sun4)
38295b296d0Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
38395b296d0Smrg		;;
38495b296d0Smrg	esac
38595b296d0Smrg	exit ;;
38695b296d0Smrg    aushp:SunOS:*:*)
38795b296d0Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
38895b296d0Smrg	exit ;;
38995b296d0Smrg    # The situation for MiNT is a little confusing.  The machine name
39095b296d0Smrg    # can be virtually everything (everything which is not
39195b296d0Smrg    # "atarist" or "atariste" at least should have a processor
39295b296d0Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
39395b296d0Smrg    # to the lowercase version "mint" (or "freemint").  Finally
39495b296d0Smrg    # the system name "TOS" denotes a system which is actually not
39595b296d0Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
39695b296d0Smrg    # be no problem.
39795b296d0Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
39895b296d0Smrg        echo m68k-atari-mint${UNAME_RELEASE}
39995b296d0Smrg	exit ;;
40095b296d0Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
40195b296d0Smrg	echo m68k-atari-mint${UNAME_RELEASE}
40295b296d0Smrg        exit ;;
40395b296d0Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
40495b296d0Smrg        echo m68k-atari-mint${UNAME_RELEASE}
40595b296d0Smrg	exit ;;
40695b296d0Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
40795b296d0Smrg        echo m68k-milan-mint${UNAME_RELEASE}
40895b296d0Smrg        exit ;;
40995b296d0Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
41095b296d0Smrg        echo m68k-hades-mint${UNAME_RELEASE}
41195b296d0Smrg        exit ;;
41295b296d0Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
41395b296d0Smrg        echo m68k-unknown-mint${UNAME_RELEASE}
41495b296d0Smrg        exit ;;
41595b296d0Smrg    m68k:machten:*:*)
41695b296d0Smrg	echo m68k-apple-machten${UNAME_RELEASE}
41795b296d0Smrg	exit ;;
41895b296d0Smrg    powerpc:machten:*:*)
41995b296d0Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
42095b296d0Smrg	exit ;;
42195b296d0Smrg    RISC*:Mach:*:*)
42295b296d0Smrg	echo mips-dec-mach_bsd4.3
42395b296d0Smrg	exit ;;
42495b296d0Smrg    RISC*:ULTRIX:*:*)
42595b296d0Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
42695b296d0Smrg	exit ;;
42795b296d0Smrg    VAX*:ULTRIX*:*:*)
42895b296d0Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
42995b296d0Smrg	exit ;;
43095b296d0Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
43195b296d0Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
43295b296d0Smrg	exit ;;
43395b296d0Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
43495b296d0Smrg	eval $set_cc_for_build
43595b296d0Smrg	sed 's/^	//' << EOF >$dummy.c
43695b296d0Smrg#ifdef __cplusplus
43795b296d0Smrg#include <stdio.h>  /* for printf() prototype */
43895b296d0Smrg	int main (int argc, char *argv[]) {
43995b296d0Smrg#else
44095b296d0Smrg	int main (argc, argv) int argc; char *argv[]; {
44195b296d0Smrg#endif
44295b296d0Smrg	#if defined (host_mips) && defined (MIPSEB)
44395b296d0Smrg	#if defined (SYSTYPE_SYSV)
44495b296d0Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
44595b296d0Smrg	#endif
44695b296d0Smrg	#if defined (SYSTYPE_SVR4)
44795b296d0Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
44895b296d0Smrg	#endif
44995b296d0Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
45095b296d0Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
45195b296d0Smrg	#endif
45295b296d0Smrg	#endif
45395b296d0Smrg	  exit (-1);
45495b296d0Smrg	}
45595b296d0SmrgEOF
45695b296d0Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
45795b296d0Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
45895b296d0Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
45995b296d0Smrg	    { echo "$SYSTEM_NAME"; exit; }
46095b296d0Smrg	echo mips-mips-riscos${UNAME_RELEASE}
46195b296d0Smrg	exit ;;
46295b296d0Smrg    Motorola:PowerMAX_OS:*:*)
46395b296d0Smrg	echo powerpc-motorola-powermax
46495b296d0Smrg	exit ;;
46595b296d0Smrg    Motorola:*:4.3:PL8-*)
46695b296d0Smrg	echo powerpc-harris-powermax
46795b296d0Smrg	exit ;;
46895b296d0Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
46995b296d0Smrg	echo powerpc-harris-powermax
47095b296d0Smrg	exit ;;
47195b296d0Smrg    Night_Hawk:Power_UNIX:*:*)
47295b296d0Smrg	echo powerpc-harris-powerunix
47395b296d0Smrg	exit ;;
47495b296d0Smrg    m88k:CX/UX:7*:*)
47595b296d0Smrg	echo m88k-harris-cxux7
47695b296d0Smrg	exit ;;
47795b296d0Smrg    m88k:*:4*:R4*)
47895b296d0Smrg	echo m88k-motorola-sysv4
47995b296d0Smrg	exit ;;
48095b296d0Smrg    m88k:*:3*:R3*)
48195b296d0Smrg	echo m88k-motorola-sysv3
48295b296d0Smrg	exit ;;
48395b296d0Smrg    AViiON:dgux:*:*)
48495b296d0Smrg        # DG/UX returns AViiON for all architectures
48595b296d0Smrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
48695b296d0Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
48795b296d0Smrg	then
48895b296d0Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
48995b296d0Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
49095b296d0Smrg	    then
49195b296d0Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
49295b296d0Smrg	    else
49395b296d0Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
49495b296d0Smrg	    fi
49595b296d0Smrg	else
49695b296d0Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
49795b296d0Smrg	fi
49895b296d0Smrg 	exit ;;
49995b296d0Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
50095b296d0Smrg	echo m88k-dolphin-sysv3
50195b296d0Smrg	exit ;;
50295b296d0Smrg    M88*:*:R3*:*)
50395b296d0Smrg	# Delta 88k system running SVR3
50495b296d0Smrg	echo m88k-motorola-sysv3
50595b296d0Smrg	exit ;;
50695b296d0Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
50795b296d0Smrg	echo m88k-tektronix-sysv3
50895b296d0Smrg	exit ;;
50995b296d0Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
51095b296d0Smrg	echo m68k-tektronix-bsd
51195b296d0Smrg	exit ;;
51295b296d0Smrg    *:IRIX*:*:*)
51395b296d0Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
51495b296d0Smrg	exit ;;
51595b296d0Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
51695b296d0Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
51795b296d0Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
51895b296d0Smrg    i*86:AIX:*:*)
51995b296d0Smrg	echo i386-ibm-aix
52095b296d0Smrg	exit ;;
52195b296d0Smrg    ia64:AIX:*:*)
52295b296d0Smrg	if [ -x /usr/bin/oslevel ] ; then
52395b296d0Smrg		IBM_REV=`/usr/bin/oslevel`
52495b296d0Smrg	else
52595b296d0Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
52695b296d0Smrg	fi
52795b296d0Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
52895b296d0Smrg	exit ;;
52995b296d0Smrg    *:AIX:2:3)
53095b296d0Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
53195b296d0Smrg		eval $set_cc_for_build
53295b296d0Smrg		sed 's/^		//' << EOF >$dummy.c
53395b296d0Smrg		#include <sys/systemcfg.h>
53495b296d0Smrg
53595b296d0Smrg		main()
53695b296d0Smrg			{
53795b296d0Smrg			if (!__power_pc())
53895b296d0Smrg				exit(1);
53995b296d0Smrg			puts("powerpc-ibm-aix3.2.5");
54095b296d0Smrg			exit(0);
54195b296d0Smrg			}
54295b296d0SmrgEOF
54395b296d0Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
54495b296d0Smrg		then
54595b296d0Smrg			echo "$SYSTEM_NAME"
54695b296d0Smrg		else
54795b296d0Smrg			echo rs6000-ibm-aix3.2.5
54895b296d0Smrg		fi
54995b296d0Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
55095b296d0Smrg		echo rs6000-ibm-aix3.2.4
55195b296d0Smrg	else
55295b296d0Smrg		echo rs6000-ibm-aix3.2
55395b296d0Smrg	fi
55495b296d0Smrg	exit ;;
55514330f12Smrg    *:AIX:*:[4567])
55695b296d0Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
55795b296d0Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
55895b296d0Smrg		IBM_ARCH=rs6000
55995b296d0Smrg	else
56095b296d0Smrg		IBM_ARCH=powerpc
56195b296d0Smrg	fi
56295b296d0Smrg	if [ -x /usr/bin/oslevel ] ; then
56395b296d0Smrg		IBM_REV=`/usr/bin/oslevel`
56495b296d0Smrg	else
56595b296d0Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
56695b296d0Smrg	fi
56795b296d0Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
56895b296d0Smrg	exit ;;
56995b296d0Smrg    *:AIX:*:*)
57095b296d0Smrg	echo rs6000-ibm-aix
57195b296d0Smrg	exit ;;
57295b296d0Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
57395b296d0Smrg	echo romp-ibm-bsd4.4
57495b296d0Smrg	exit ;;
57595b296d0Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
57695b296d0Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
57795b296d0Smrg	exit ;;                             # report: romp-ibm BSD 4.3
57895b296d0Smrg    *:BOSX:*:*)
57995b296d0Smrg	echo rs6000-bull-bosx
58095b296d0Smrg	exit ;;
58195b296d0Smrg    DPX/2?00:B.O.S.:*:*)
58295b296d0Smrg	echo m68k-bull-sysv3
58395b296d0Smrg	exit ;;
58495b296d0Smrg    9000/[34]??:4.3bsd:1.*:*)
58595b296d0Smrg	echo m68k-hp-bsd
58695b296d0Smrg	exit ;;
58795b296d0Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
58895b296d0Smrg	echo m68k-hp-bsd4.4
58995b296d0Smrg	exit ;;
59095b296d0Smrg    9000/[34678]??:HP-UX:*:*)
59195b296d0Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
59295b296d0Smrg	case "${UNAME_MACHINE}" in
59395b296d0Smrg	    9000/31? )            HP_ARCH=m68000 ;;
59495b296d0Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
59595b296d0Smrg	    9000/[678][0-9][0-9])
59695b296d0Smrg		if [ -x /usr/bin/getconf ]; then
59795b296d0Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
59895b296d0Smrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
59995b296d0Smrg                    case "${sc_cpu_version}" in
60095b296d0Smrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
60195b296d0Smrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
60295b296d0Smrg                      532)                      # CPU_PA_RISC2_0
60395b296d0Smrg                        case "${sc_kernel_bits}" in
60495b296d0Smrg                          32) HP_ARCH="hppa2.0n" ;;
60595b296d0Smrg                          64) HP_ARCH="hppa2.0w" ;;
60695b296d0Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
60795b296d0Smrg                        esac ;;
60895b296d0Smrg                    esac
60995b296d0Smrg		fi
61095b296d0Smrg		if [ "${HP_ARCH}" = "" ]; then
61195b296d0Smrg		    eval $set_cc_for_build
61295b296d0Smrg		    sed 's/^              //' << EOF >$dummy.c
61395b296d0Smrg
61495b296d0Smrg              #define _HPUX_SOURCE
61595b296d0Smrg              #include <stdlib.h>
61695b296d0Smrg              #include <unistd.h>
61795b296d0Smrg
61895b296d0Smrg              int main ()
61995b296d0Smrg              {
62095b296d0Smrg              #if defined(_SC_KERNEL_BITS)
62195b296d0Smrg                  long bits = sysconf(_SC_KERNEL_BITS);
62295b296d0Smrg              #endif
62395b296d0Smrg                  long cpu  = sysconf (_SC_CPU_VERSION);
62495b296d0Smrg
62595b296d0Smrg                  switch (cpu)
62695b296d0Smrg              	{
62795b296d0Smrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
62895b296d0Smrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
62995b296d0Smrg              	case CPU_PA_RISC2_0:
63095b296d0Smrg              #if defined(_SC_KERNEL_BITS)
63195b296d0Smrg              	    switch (bits)
63295b296d0Smrg              		{
63395b296d0Smrg              		case 64: puts ("hppa2.0w"); break;
63495b296d0Smrg              		case 32: puts ("hppa2.0n"); break;
63595b296d0Smrg              		default: puts ("hppa2.0"); break;
63695b296d0Smrg              		} break;
63795b296d0Smrg              #else  /* !defined(_SC_KERNEL_BITS) */
63895b296d0Smrg              	    puts ("hppa2.0"); break;
63995b296d0Smrg              #endif
64095b296d0Smrg              	default: puts ("hppa1.0"); break;
64195b296d0Smrg              	}
64295b296d0Smrg                  exit (0);
64395b296d0Smrg              }
64495b296d0SmrgEOF
64595b296d0Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
64695b296d0Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
64795b296d0Smrg		fi ;;
64895b296d0Smrg	esac
64995b296d0Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
65095b296d0Smrg	then
65195b296d0Smrg	    eval $set_cc_for_build
65295b296d0Smrg
65395b296d0Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
65495b296d0Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
65595b296d0Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
65695b296d0Smrg	    #
65795b296d0Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
65895b296d0Smrg	    # => hppa2.0w-hp-hpux11.23
65995b296d0Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
66095b296d0Smrg	    # => hppa64-hp-hpux11.23
66195b296d0Smrg
66295b296d0Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
66314330f12Smrg		grep -q __LP64__
66495b296d0Smrg	    then
66595b296d0Smrg		HP_ARCH="hppa2.0w"
66695b296d0Smrg	    else
66795b296d0Smrg		HP_ARCH="hppa64"
66895b296d0Smrg	    fi
66995b296d0Smrg	fi
67095b296d0Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
67195b296d0Smrg	exit ;;
67295b296d0Smrg    ia64:HP-UX:*:*)
67395b296d0Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
67495b296d0Smrg	echo ia64-hp-hpux${HPUX_REV}
67595b296d0Smrg	exit ;;
67695b296d0Smrg    3050*:HI-UX:*:*)
67795b296d0Smrg	eval $set_cc_for_build
67895b296d0Smrg	sed 's/^	//' << EOF >$dummy.c
67995b296d0Smrg	#include <unistd.h>
68095b296d0Smrg	int
68195b296d0Smrg	main ()
68295b296d0Smrg	{
68395b296d0Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
68495b296d0Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
68595b296d0Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
68695b296d0Smrg	     results, however.  */
68795b296d0Smrg	  if (CPU_IS_PA_RISC (cpu))
68895b296d0Smrg	    {
68995b296d0Smrg	      switch (cpu)
69095b296d0Smrg		{
69195b296d0Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
69295b296d0Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
69395b296d0Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
69495b296d0Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
69595b296d0Smrg		}
69695b296d0Smrg	    }
69795b296d0Smrg	  else if (CPU_IS_HP_MC68K (cpu))
69895b296d0Smrg	    puts ("m68k-hitachi-hiuxwe2");
69995b296d0Smrg	  else puts ("unknown-hitachi-hiuxwe2");
70095b296d0Smrg	  exit (0);
70195b296d0Smrg	}
70295b296d0SmrgEOF
70395b296d0Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
70495b296d0Smrg		{ echo "$SYSTEM_NAME"; exit; }
70595b296d0Smrg	echo unknown-hitachi-hiuxwe2
70695b296d0Smrg	exit ;;
70795b296d0Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
70895b296d0Smrg	echo hppa1.1-hp-bsd
70995b296d0Smrg	exit ;;
71095b296d0Smrg    9000/8??:4.3bsd:*:*)
71195b296d0Smrg	echo hppa1.0-hp-bsd
71295b296d0Smrg	exit ;;
71395b296d0Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
71495b296d0Smrg	echo hppa1.0-hp-mpeix
71595b296d0Smrg	exit ;;
71695b296d0Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
71795b296d0Smrg	echo hppa1.1-hp-osf
71895b296d0Smrg	exit ;;
71995b296d0Smrg    hp8??:OSF1:*:*)
72095b296d0Smrg	echo hppa1.0-hp-osf
72195b296d0Smrg	exit ;;
72295b296d0Smrg    i*86:OSF1:*:*)
72395b296d0Smrg	if [ -x /usr/sbin/sysversion ] ; then
72495b296d0Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
72595b296d0Smrg	else
72695b296d0Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
72795b296d0Smrg	fi
72895b296d0Smrg	exit ;;
72995b296d0Smrg    parisc*:Lites*:*:*)
73095b296d0Smrg	echo hppa1.1-hp-lites
73195b296d0Smrg	exit ;;
73295b296d0Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
73395b296d0Smrg	echo c1-convex-bsd
73495b296d0Smrg        exit ;;
73595b296d0Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
73695b296d0Smrg	if getsysinfo -f scalar_acc
73795b296d0Smrg	then echo c32-convex-bsd
73895b296d0Smrg	else echo c2-convex-bsd
73995b296d0Smrg	fi
74095b296d0Smrg        exit ;;
74195b296d0Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
74295b296d0Smrg	echo c34-convex-bsd
74395b296d0Smrg        exit ;;
74495b296d0Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
74595b296d0Smrg	echo c38-convex-bsd
74695b296d0Smrg        exit ;;
74795b296d0Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
74895b296d0Smrg	echo c4-convex-bsd
74995b296d0Smrg        exit ;;
75095b296d0Smrg    CRAY*Y-MP:*:*:*)
75195b296d0Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
75295b296d0Smrg	exit ;;
75395b296d0Smrg    CRAY*[A-Z]90:*:*:*)
75495b296d0Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
75595b296d0Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
75695b296d0Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
75795b296d0Smrg	      -e 's/\.[^.]*$/.X/'
75895b296d0Smrg	exit ;;
75995b296d0Smrg    CRAY*TS:*:*:*)
76095b296d0Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76195b296d0Smrg	exit ;;
76295b296d0Smrg    CRAY*T3E:*:*:*)
76395b296d0Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76495b296d0Smrg	exit ;;
76595b296d0Smrg    CRAY*SV1:*:*:*)
76695b296d0Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76795b296d0Smrg	exit ;;
76895b296d0Smrg    *:UNICOS/mp:*:*)
76995b296d0Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
77095b296d0Smrg	exit ;;
77195b296d0Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
77295b296d0Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
77395b296d0Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
77495b296d0Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
77595b296d0Smrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
77695b296d0Smrg        exit ;;
77795b296d0Smrg    5000:UNIX_System_V:4.*:*)
77895b296d0Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
77995b296d0Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
78095b296d0Smrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
78195b296d0Smrg	exit ;;
78295b296d0Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
78395b296d0Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
78495b296d0Smrg	exit ;;
78595b296d0Smrg    sparc*:BSD/OS:*:*)
78695b296d0Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
78795b296d0Smrg	exit ;;
78895b296d0Smrg    *:BSD/OS:*:*)
78995b296d0Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
79095b296d0Smrg	exit ;;
79195b296d0Smrg    *:FreeBSD:*:*)
79295b296d0Smrg	case ${UNAME_MACHINE} in
79395b296d0Smrg	    pc98)
79495b296d0Smrg		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79595b296d0Smrg	    amd64)
79695b296d0Smrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79795b296d0Smrg	    *)
79895b296d0Smrg		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79995b296d0Smrg	esac
80095b296d0Smrg	exit ;;
80195b296d0Smrg    i*:CYGWIN*:*)
80295b296d0Smrg	echo ${UNAME_MACHINE}-pc-cygwin
80395b296d0Smrg	exit ;;
804ff89ac2bSmrg    *:MINGW*:*)
80595b296d0Smrg	echo ${UNAME_MACHINE}-pc-mingw32
80695b296d0Smrg	exit ;;
80795b296d0Smrg    i*:windows32*:*)
80895b296d0Smrg    	# uname -m includes "-pc" on this system.
80995b296d0Smrg    	echo ${UNAME_MACHINE}-mingw32
81095b296d0Smrg	exit ;;
81195b296d0Smrg    i*:PW*:*)
81295b296d0Smrg	echo ${UNAME_MACHINE}-pc-pw32
81395b296d0Smrg	exit ;;
81414330f12Smrg    *:Interix*:*)
815ff89ac2bSmrg    	case ${UNAME_MACHINE} in
816ff89ac2bSmrg	    x86)
817ff89ac2bSmrg		echo i586-pc-interix${UNAME_RELEASE}
818ff89ac2bSmrg		exit ;;
81914330f12Smrg	    authenticamd | genuineintel | EM64T)
820ff89ac2bSmrg		echo x86_64-unknown-interix${UNAME_RELEASE}
821ff89ac2bSmrg		exit ;;
822ff89ac2bSmrg	    IA64)
823ff89ac2bSmrg		echo ia64-unknown-interix${UNAME_RELEASE}
824ff89ac2bSmrg		exit ;;
825ff89ac2bSmrg	esac ;;
82695b296d0Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
82795b296d0Smrg	echo i${UNAME_MACHINE}-pc-mks
82895b296d0Smrg	exit ;;
82914330f12Smrg    8664:Windows_NT:*)
83014330f12Smrg	echo x86_64-pc-mks
83114330f12Smrg	exit ;;
83295b296d0Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
83395b296d0Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
83495b296d0Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
83595b296d0Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
83695b296d0Smrg	echo i586-pc-interix
83795b296d0Smrg	exit ;;
83895b296d0Smrg    i*:UWIN*:*)
83995b296d0Smrg	echo ${UNAME_MACHINE}-pc-uwin
84095b296d0Smrg	exit ;;
84195b296d0Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
84295b296d0Smrg	echo x86_64-unknown-cygwin
84395b296d0Smrg	exit ;;
84495b296d0Smrg    p*:CYGWIN*:*)
84595b296d0Smrg	echo powerpcle-unknown-cygwin
84695b296d0Smrg	exit ;;
84795b296d0Smrg    prep*:SunOS:5.*:*)
84895b296d0Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
84995b296d0Smrg	exit ;;
85095b296d0Smrg    *:GNU:*:*)
85195b296d0Smrg	# the GNU system
85295b296d0Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
85395b296d0Smrg	exit ;;
85495b296d0Smrg    *:GNU/*:*:*)
85595b296d0Smrg	# other systems with GNU libc and userland
85695b296d0Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
85795b296d0Smrg	exit ;;
85895b296d0Smrg    i*86:Minix:*:*)
85995b296d0Smrg	echo ${UNAME_MACHINE}-pc-minix
86095b296d0Smrg	exit ;;
86114330f12Smrg    alpha:Linux:*:*)
86214330f12Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
86314330f12Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
86414330f12Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
86514330f12Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
86614330f12Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
86714330f12Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
86814330f12Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
86914330f12Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
87014330f12Smrg        esac
87114330f12Smrg	objdump --private-headers /bin/sh | grep -q ld.so.1
87214330f12Smrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
87314330f12Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
87414330f12Smrg	exit ;;
87595b296d0Smrg    arm*:Linux:*:*)
876ff89ac2bSmrg	eval $set_cc_for_build
877ff89ac2bSmrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
878ff89ac2bSmrg	    | grep -q __ARM_EABI__
879ff89ac2bSmrg	then
880ff89ac2bSmrg	    echo ${UNAME_MACHINE}-unknown-linux-gnu
881ff89ac2bSmrg	else
882ff89ac2bSmrg	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
883ff89ac2bSmrg	fi
88495b296d0Smrg	exit ;;
88595b296d0Smrg    avr32*:Linux:*:*)
886ff89ac2bSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
88795b296d0Smrg	exit ;;
88895b296d0Smrg    cris:Linux:*:*)
889ff89ac2bSmrg	echo cris-axis-linux-gnu
89095b296d0Smrg	exit ;;
89195b296d0Smrg    crisv32:Linux:*:*)
892ff89ac2bSmrg	echo crisv32-axis-linux-gnu
89395b296d0Smrg	exit ;;
89495b296d0Smrg    frv:Linux:*:*)
895ff89ac2bSmrg    	echo frv-unknown-linux-gnu
89695b296d0Smrg	exit ;;
89714330f12Smrg    i*86:Linux:*:*)
89814330f12Smrg	LIBC=gnu
89914330f12Smrg	eval $set_cc_for_build
90014330f12Smrg	sed 's/^	//' << EOF >$dummy.c
90114330f12Smrg	#ifdef __dietlibc__
90214330f12Smrg	LIBC=dietlibc
90314330f12Smrg	#endif
90414330f12SmrgEOF
90514330f12Smrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
90614330f12Smrg	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
90714330f12Smrg	exit ;;
90895b296d0Smrg    ia64:Linux:*:*)
909ff89ac2bSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
91095b296d0Smrg	exit ;;
91195b296d0Smrg    m32r*:Linux:*:*)
912ff89ac2bSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
91395b296d0Smrg	exit ;;
91495b296d0Smrg    m68*:Linux:*:*)
915ff89ac2bSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
91695b296d0Smrg	exit ;;
91714330f12Smrg    mips:Linux:*:* | mips64:Linux:*:*)
91895b296d0Smrg	eval $set_cc_for_build
91995b296d0Smrg	sed 's/^	//' << EOF >$dummy.c
92095b296d0Smrg	#undef CPU
92114330f12Smrg	#undef ${UNAME_MACHINE}
92214330f12Smrg	#undef ${UNAME_MACHINE}el
92395b296d0Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
92414330f12Smrg	CPU=${UNAME_MACHINE}el
92595b296d0Smrg	#else
92695b296d0Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
92714330f12Smrg	CPU=${UNAME_MACHINE}
92895b296d0Smrg	#else
92995b296d0Smrg	CPU=
93095b296d0Smrg	#endif
93195b296d0Smrg	#endif
93295b296d0SmrgEOF
93314330f12Smrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
934ff89ac2bSmrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
93595b296d0Smrg	;;
93695b296d0Smrg    or32:Linux:*:*)
937ff89ac2bSmrg	echo or32-unknown-linux-gnu
93895b296d0Smrg	exit ;;
93914330f12Smrg    padre:Linux:*:*)
94014330f12Smrg	echo sparc-unknown-linux-gnu
94195b296d0Smrg	exit ;;
94214330f12Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
94314330f12Smrg	echo hppa64-unknown-linux-gnu
94495b296d0Smrg	exit ;;
94595b296d0Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
94695b296d0Smrg	# Look for CPU level
94795b296d0Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
948ff89ac2bSmrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
949ff89ac2bSmrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
950ff89ac2bSmrg	  *)    echo hppa-unknown-linux-gnu ;;
95195b296d0Smrg	esac
95295b296d0Smrg	exit ;;
95314330f12Smrg    ppc64:Linux:*:*)
95414330f12Smrg	echo powerpc64-unknown-linux-gnu
95514330f12Smrg	exit ;;
95614330f12Smrg    ppc:Linux:*:*)
95714330f12Smrg	echo powerpc-unknown-linux-gnu
95895b296d0Smrg	exit ;;
95995b296d0Smrg    s390:Linux:*:* | s390x:Linux:*:*)
96095b296d0Smrg	echo ${UNAME_MACHINE}-ibm-linux
96195b296d0Smrg	exit ;;
96295b296d0Smrg    sh64*:Linux:*:*)
963ff89ac2bSmrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
96495b296d0Smrg	exit ;;
96595b296d0Smrg    sh*:Linux:*:*)
966ff89ac2bSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
96795b296d0Smrg	exit ;;
96895b296d0Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
969ff89ac2bSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
97095b296d0Smrg	exit ;;
97114330f12Smrg    tile*:Linux:*:*)
97214330f12Smrg	echo ${UNAME_MACHINE}-tilera-linux-gnu
97314330f12Smrg	exit ;;
97495b296d0Smrg    vax:Linux:*:*)
975ff89ac2bSmrg	echo ${UNAME_MACHINE}-dec-linux-gnu
97695b296d0Smrg	exit ;;
97795b296d0Smrg    x86_64:Linux:*:*)
978ff89ac2bSmrg	echo x86_64-unknown-linux-gnu
979ff89ac2bSmrg	exit ;;
980ff89ac2bSmrg    xtensa*:Linux:*:*)
981ff89ac2bSmrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
98295b296d0Smrg	exit ;;
98395b296d0Smrg    i*86:DYNIX/ptx:4*:*)
98495b296d0Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
98595b296d0Smrg	# earlier versions are messed up and put the nodename in both
98695b296d0Smrg	# sysname and nodename.
98795b296d0Smrg	echo i386-sequent-sysv4
98895b296d0Smrg	exit ;;
98995b296d0Smrg    i*86:UNIX_SV:4.2MP:2.*)
99095b296d0Smrg        # Unixware is an offshoot of SVR4, but it has its own version
99195b296d0Smrg        # number series starting with 2...
99295b296d0Smrg        # I am not positive that other SVR4 systems won't match this,
99395b296d0Smrg	# I just have to hope.  -- rms.
99495b296d0Smrg        # Use sysv4.2uw... so that sysv4* matches it.
99595b296d0Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
99695b296d0Smrg	exit ;;
99795b296d0Smrg    i*86:OS/2:*:*)
99895b296d0Smrg	# If we were able to find `uname', then EMX Unix compatibility
99995b296d0Smrg	# is probably installed.
100095b296d0Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
100195b296d0Smrg	exit ;;
100295b296d0Smrg    i*86:XTS-300:*:STOP)
100395b296d0Smrg	echo ${UNAME_MACHINE}-unknown-stop
100495b296d0Smrg	exit ;;
100595b296d0Smrg    i*86:atheos:*:*)
100695b296d0Smrg	echo ${UNAME_MACHINE}-unknown-atheos
100795b296d0Smrg	exit ;;
100895b296d0Smrg    i*86:syllable:*:*)
100995b296d0Smrg	echo ${UNAME_MACHINE}-pc-syllable
101095b296d0Smrg	exit ;;
101114330f12Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
101295b296d0Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
101395b296d0Smrg	exit ;;
101495b296d0Smrg    i*86:*DOS:*:*)
101595b296d0Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
101695b296d0Smrg	exit ;;
101795b296d0Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
101895b296d0Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
101995b296d0Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
102095b296d0Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
102195b296d0Smrg	else
102295b296d0Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
102395b296d0Smrg	fi
102495b296d0Smrg	exit ;;
102595b296d0Smrg    i*86:*:5:[678]*)
102695b296d0Smrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
102795b296d0Smrg	case `/bin/uname -X | grep "^Machine"` in
102895b296d0Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
102995b296d0Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
103095b296d0Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
103195b296d0Smrg	esac
103295b296d0Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
103395b296d0Smrg	exit ;;
103495b296d0Smrg    i*86:*:3.2:*)
103595b296d0Smrg	if test -f /usr/options/cb.name; then
103695b296d0Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
103795b296d0Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
103895b296d0Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
103995b296d0Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
104095b296d0Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
104195b296d0Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
104295b296d0Smrg			&& UNAME_MACHINE=i586
104395b296d0Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
104495b296d0Smrg			&& UNAME_MACHINE=i686
104595b296d0Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
104695b296d0Smrg			&& UNAME_MACHINE=i686
104795b296d0Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
104895b296d0Smrg	else
104995b296d0Smrg		echo ${UNAME_MACHINE}-pc-sysv32
105095b296d0Smrg	fi
105195b296d0Smrg	exit ;;
105295b296d0Smrg    pc:*:*:*)
105395b296d0Smrg	# Left here for compatibility:
105495b296d0Smrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
105514330f12Smrg        # the processor, so we play safe by assuming i586.
105614330f12Smrg	# Note: whatever this is, it MUST be the same as what config.sub
105714330f12Smrg	# prints for the "djgpp" host, or else GDB configury will decide that
105814330f12Smrg	# this is a cross-build.
105914330f12Smrg	echo i586-pc-msdosdjgpp
106095b296d0Smrg        exit ;;
106195b296d0Smrg    Intel:Mach:3*:*)
106295b296d0Smrg	echo i386-pc-mach3
106395b296d0Smrg	exit ;;
106495b296d0Smrg    paragon:*:*:*)
106595b296d0Smrg	echo i860-intel-osf1
106695b296d0Smrg	exit ;;
106795b296d0Smrg    i860:*:4.*:*) # i860-SVR4
106895b296d0Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
106995b296d0Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
107095b296d0Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
107195b296d0Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
107295b296d0Smrg	fi
107395b296d0Smrg	exit ;;
107495b296d0Smrg    mini*:CTIX:SYS*5:*)
107595b296d0Smrg	# "miniframe"
107695b296d0Smrg	echo m68010-convergent-sysv
107795b296d0Smrg	exit ;;
107895b296d0Smrg    mc68k:UNIX:SYSTEM5:3.51m)
107995b296d0Smrg	echo m68k-convergent-sysv
108095b296d0Smrg	exit ;;
108195b296d0Smrg    M680?0:D-NIX:5.3:*)
108295b296d0Smrg	echo m68k-diab-dnix
108395b296d0Smrg	exit ;;
108495b296d0Smrg    M68*:*:R3V[5678]*:*)
108595b296d0Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
108695b296d0Smrg    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)
108795b296d0Smrg	OS_REL=''
108895b296d0Smrg	test -r /etc/.relid \
108995b296d0Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
109095b296d0Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
109195b296d0Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
109295b296d0Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
109395b296d0Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
109495b296d0Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
109595b296d0Smrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
109695b296d0Smrg          && { echo i486-ncr-sysv4; exit; } ;;
109714330f12Smrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
109814330f12Smrg	OS_REL='.3'
109914330f12Smrg	test -r /etc/.relid \
110014330f12Smrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
110114330f12Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
110214330f12Smrg	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
110314330f12Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
110414330f12Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
110514330f12Smrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
110614330f12Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
110795b296d0Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
110895b296d0Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
110995b296d0Smrg	exit ;;
111095b296d0Smrg    mc68030:UNIX_System_V:4.*:*)
111195b296d0Smrg	echo m68k-atari-sysv4
111295b296d0Smrg	exit ;;
111395b296d0Smrg    TSUNAMI:LynxOS:2.*:*)
111495b296d0Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
111595b296d0Smrg	exit ;;
111695b296d0Smrg    rs6000:LynxOS:2.*:*)
111795b296d0Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
111895b296d0Smrg	exit ;;
111914330f12Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
112095b296d0Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
112195b296d0Smrg	exit ;;
112295b296d0Smrg    SM[BE]S:UNIX_SV:*:*)
112395b296d0Smrg	echo mips-dde-sysv${UNAME_RELEASE}
112495b296d0Smrg	exit ;;
112595b296d0Smrg    RM*:ReliantUNIX-*:*:*)
112695b296d0Smrg	echo mips-sni-sysv4
112795b296d0Smrg	exit ;;
112895b296d0Smrg    RM*:SINIX-*:*:*)
112995b296d0Smrg	echo mips-sni-sysv4
113095b296d0Smrg	exit ;;
113195b296d0Smrg    *:SINIX-*:*:*)
113295b296d0Smrg	if uname -p 2>/dev/null >/dev/null ; then
113395b296d0Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
113495b296d0Smrg		echo ${UNAME_MACHINE}-sni-sysv4
113595b296d0Smrg	else
113695b296d0Smrg		echo ns32k-sni-sysv
113795b296d0Smrg	fi
113895b296d0Smrg	exit ;;
113995b296d0Smrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
114095b296d0Smrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
114195b296d0Smrg        echo i586-unisys-sysv4
114295b296d0Smrg        exit ;;
114395b296d0Smrg    *:UNIX_System_V:4*:FTX*)
114495b296d0Smrg	# From Gerald Hewes <hewes@openmarket.com>.
114595b296d0Smrg	# How about differentiating between stratus architectures? -djm
114695b296d0Smrg	echo hppa1.1-stratus-sysv4
114795b296d0Smrg	exit ;;
114895b296d0Smrg    *:*:*:FTX*)
114995b296d0Smrg	# From seanf@swdc.stratus.com.
115095b296d0Smrg	echo i860-stratus-sysv4
115195b296d0Smrg	exit ;;
115295b296d0Smrg    i*86:VOS:*:*)
115395b296d0Smrg	# From Paul.Green@stratus.com.
115495b296d0Smrg	echo ${UNAME_MACHINE}-stratus-vos
115595b296d0Smrg	exit ;;
115695b296d0Smrg    *:VOS:*:*)
115795b296d0Smrg	# From Paul.Green@stratus.com.
115895b296d0Smrg	echo hppa1.1-stratus-vos
115995b296d0Smrg	exit ;;
116095b296d0Smrg    mc68*:A/UX:*:*)
116195b296d0Smrg	echo m68k-apple-aux${UNAME_RELEASE}
116295b296d0Smrg	exit ;;
116395b296d0Smrg    news*:NEWS-OS:6*:*)
116495b296d0Smrg	echo mips-sony-newsos6
116595b296d0Smrg	exit ;;
116695b296d0Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
116795b296d0Smrg	if [ -d /usr/nec ]; then
116895b296d0Smrg	        echo mips-nec-sysv${UNAME_RELEASE}
116995b296d0Smrg	else
117095b296d0Smrg	        echo mips-unknown-sysv${UNAME_RELEASE}
117195b296d0Smrg	fi
117295b296d0Smrg        exit ;;
117395b296d0Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
117495b296d0Smrg	echo powerpc-be-beos
117595b296d0Smrg	exit ;;
117695b296d0Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
117795b296d0Smrg	echo powerpc-apple-beos
117895b296d0Smrg	exit ;;
117995b296d0Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
118095b296d0Smrg	echo i586-pc-beos
118195b296d0Smrg	exit ;;
118214330f12Smrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
118314330f12Smrg	echo i586-pc-haiku
118414330f12Smrg	exit ;;
118595b296d0Smrg    SX-4:SUPER-UX:*:*)
118695b296d0Smrg	echo sx4-nec-superux${UNAME_RELEASE}
118795b296d0Smrg	exit ;;
118895b296d0Smrg    SX-5:SUPER-UX:*:*)
118995b296d0Smrg	echo sx5-nec-superux${UNAME_RELEASE}
119095b296d0Smrg	exit ;;
119195b296d0Smrg    SX-6:SUPER-UX:*:*)
119295b296d0Smrg	echo sx6-nec-superux${UNAME_RELEASE}
119395b296d0Smrg	exit ;;
1194ff89ac2bSmrg    SX-7:SUPER-UX:*:*)
1195ff89ac2bSmrg	echo sx7-nec-superux${UNAME_RELEASE}
1196ff89ac2bSmrg	exit ;;
1197ff89ac2bSmrg    SX-8:SUPER-UX:*:*)
1198ff89ac2bSmrg	echo sx8-nec-superux${UNAME_RELEASE}
1199ff89ac2bSmrg	exit ;;
1200ff89ac2bSmrg    SX-8R:SUPER-UX:*:*)
1201ff89ac2bSmrg	echo sx8r-nec-superux${UNAME_RELEASE}
1202ff89ac2bSmrg	exit ;;
120395b296d0Smrg    Power*:Rhapsody:*:*)
120495b296d0Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
120595b296d0Smrg	exit ;;
120695b296d0Smrg    *:Rhapsody:*:*)
120795b296d0Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
120895b296d0Smrg	exit ;;
120995b296d0Smrg    *:Darwin:*:*)
121095b296d0Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
121195b296d0Smrg	case $UNAME_PROCESSOR in
121214330f12Smrg	    i386)
121314330f12Smrg		eval $set_cc_for_build
121414330f12Smrg		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
121514330f12Smrg		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
121614330f12Smrg		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
121714330f12Smrg		      grep IS_64BIT_ARCH >/dev/null
121814330f12Smrg		  then
121914330f12Smrg		      UNAME_PROCESSOR="x86_64"
122014330f12Smrg		  fi
122114330f12Smrg		fi ;;
122295b296d0Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
122395b296d0Smrg	esac
122495b296d0Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
122595b296d0Smrg	exit ;;
122695b296d0Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
122795b296d0Smrg	UNAME_PROCESSOR=`uname -p`
122895b296d0Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
122995b296d0Smrg		UNAME_PROCESSOR=i386
123095b296d0Smrg		UNAME_MACHINE=pc
123195b296d0Smrg	fi
123295b296d0Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
123395b296d0Smrg	exit ;;
123495b296d0Smrg    *:QNX:*:4*)
123595b296d0Smrg	echo i386-pc-qnx
123695b296d0Smrg	exit ;;
123795b296d0Smrg    NSE-?:NONSTOP_KERNEL:*:*)
123895b296d0Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
123995b296d0Smrg	exit ;;
124095b296d0Smrg    NSR-?:NONSTOP_KERNEL:*:*)
124195b296d0Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
124295b296d0Smrg	exit ;;
124395b296d0Smrg    *:NonStop-UX:*:*)
124495b296d0Smrg	echo mips-compaq-nonstopux
124595b296d0Smrg	exit ;;
124695b296d0Smrg    BS2000:POSIX*:*:*)
124795b296d0Smrg	echo bs2000-siemens-sysv
124895b296d0Smrg	exit ;;
124995b296d0Smrg    DS/*:UNIX_System_V:*:*)
125095b296d0Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
125195b296d0Smrg	exit ;;
125295b296d0Smrg    *:Plan9:*:*)
125395b296d0Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
125495b296d0Smrg	# is converted to i386 for consistency with other x86
125595b296d0Smrg	# operating systems.
125695b296d0Smrg	if test "$cputype" = "386"; then
125795b296d0Smrg	    UNAME_MACHINE=i386
125895b296d0Smrg	else
125995b296d0Smrg	    UNAME_MACHINE="$cputype"
126095b296d0Smrg	fi
126195b296d0Smrg	echo ${UNAME_MACHINE}-unknown-plan9
126295b296d0Smrg	exit ;;
126395b296d0Smrg    *:TOPS-10:*:*)
126495b296d0Smrg	echo pdp10-unknown-tops10
126595b296d0Smrg	exit ;;
126695b296d0Smrg    *:TENEX:*:*)
126795b296d0Smrg	echo pdp10-unknown-tenex
126895b296d0Smrg	exit ;;
126995b296d0Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
127095b296d0Smrg	echo pdp10-dec-tops20
127195b296d0Smrg	exit ;;
127295b296d0Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
127395b296d0Smrg	echo pdp10-xkl-tops20
127495b296d0Smrg	exit ;;
127595b296d0Smrg    *:TOPS-20:*:*)
127695b296d0Smrg	echo pdp10-unknown-tops20
127795b296d0Smrg	exit ;;
127895b296d0Smrg    *:ITS:*:*)
127995b296d0Smrg	echo pdp10-unknown-its
128095b296d0Smrg	exit ;;
128195b296d0Smrg    SEI:*:*:SEIUX)
128295b296d0Smrg        echo mips-sei-seiux${UNAME_RELEASE}
128395b296d0Smrg	exit ;;
128495b296d0Smrg    *:DragonFly:*:*)
128595b296d0Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
128695b296d0Smrg	exit ;;
128795b296d0Smrg    *:*VMS:*:*)
128895b296d0Smrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
128995b296d0Smrg	case "${UNAME_MACHINE}" in
129095b296d0Smrg	    A*) echo alpha-dec-vms ; exit ;;
129195b296d0Smrg	    I*) echo ia64-dec-vms ; exit ;;
129295b296d0Smrg	    V*) echo vax-dec-vms ; exit ;;
129395b296d0Smrg	esac ;;
129495b296d0Smrg    *:XENIX:*:SysV)
129595b296d0Smrg	echo i386-pc-xenix
129695b296d0Smrg	exit ;;
129795b296d0Smrg    i*86:skyos:*:*)
129895b296d0Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
129995b296d0Smrg	exit ;;
130095b296d0Smrg    i*86:rdos:*:*)
130195b296d0Smrg	echo ${UNAME_MACHINE}-pc-rdos
130295b296d0Smrg	exit ;;
130314330f12Smrg    i*86:AROS:*:*)
130414330f12Smrg	echo ${UNAME_MACHINE}-pc-aros
130514330f12Smrg	exit ;;
130695b296d0Smrgesac
130795b296d0Smrg
130895b296d0Smrg#echo '(No uname command or uname output not recognized.)' 1>&2
130995b296d0Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
131095b296d0Smrg
131195b296d0Smrgeval $set_cc_for_build
131295b296d0Smrgcat >$dummy.c <<EOF
131395b296d0Smrg#ifdef _SEQUENT_
131495b296d0Smrg# include <sys/types.h>
131595b296d0Smrg# include <sys/utsname.h>
131695b296d0Smrg#endif
131795b296d0Smrgmain ()
131895b296d0Smrg{
131995b296d0Smrg#if defined (sony)
132095b296d0Smrg#if defined (MIPSEB)
132195b296d0Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
132295b296d0Smrg     I don't know....  */
132395b296d0Smrg  printf ("mips-sony-bsd\n"); exit (0);
132495b296d0Smrg#else
132595b296d0Smrg#include <sys/param.h>
132695b296d0Smrg  printf ("m68k-sony-newsos%s\n",
132795b296d0Smrg#ifdef NEWSOS4
132895b296d0Smrg          "4"
132995b296d0Smrg#else
133095b296d0Smrg	  ""
133195b296d0Smrg#endif
133295b296d0Smrg         ); exit (0);
133395b296d0Smrg#endif
133495b296d0Smrg#endif
133595b296d0Smrg
133695b296d0Smrg#if defined (__arm) && defined (__acorn) && defined (__unix)
133795b296d0Smrg  printf ("arm-acorn-riscix\n"); exit (0);
133895b296d0Smrg#endif
133995b296d0Smrg
134095b296d0Smrg#if defined (hp300) && !defined (hpux)
134195b296d0Smrg  printf ("m68k-hp-bsd\n"); exit (0);
134295b296d0Smrg#endif
134395b296d0Smrg
134495b296d0Smrg#if defined (NeXT)
134595b296d0Smrg#if !defined (__ARCHITECTURE__)
134695b296d0Smrg#define __ARCHITECTURE__ "m68k"
134795b296d0Smrg#endif
134895b296d0Smrg  int version;
134995b296d0Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
135095b296d0Smrg  if (version < 4)
135195b296d0Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
135295b296d0Smrg  else
135395b296d0Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
135495b296d0Smrg  exit (0);
135595b296d0Smrg#endif
135695b296d0Smrg
135795b296d0Smrg#if defined (MULTIMAX) || defined (n16)
135895b296d0Smrg#if defined (UMAXV)
135995b296d0Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
136095b296d0Smrg#else
136195b296d0Smrg#if defined (CMU)
136295b296d0Smrg  printf ("ns32k-encore-mach\n"); exit (0);
136395b296d0Smrg#else
136495b296d0Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
136595b296d0Smrg#endif
136695b296d0Smrg#endif
136795b296d0Smrg#endif
136895b296d0Smrg
136995b296d0Smrg#if defined (__386BSD__)
137095b296d0Smrg  printf ("i386-pc-bsd\n"); exit (0);
137195b296d0Smrg#endif
137295b296d0Smrg
137395b296d0Smrg#if defined (sequent)
137495b296d0Smrg#if defined (i386)
137595b296d0Smrg  printf ("i386-sequent-dynix\n"); exit (0);
137695b296d0Smrg#endif
137795b296d0Smrg#if defined (ns32000)
137895b296d0Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
137995b296d0Smrg#endif
138095b296d0Smrg#endif
138195b296d0Smrg
138295b296d0Smrg#if defined (_SEQUENT_)
138395b296d0Smrg    struct utsname un;
138495b296d0Smrg
138595b296d0Smrg    uname(&un);
138695b296d0Smrg
138795b296d0Smrg    if (strncmp(un.version, "V2", 2) == 0) {
138895b296d0Smrg	printf ("i386-sequent-ptx2\n"); exit (0);
138995b296d0Smrg    }
139095b296d0Smrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
139195b296d0Smrg	printf ("i386-sequent-ptx1\n"); exit (0);
139295b296d0Smrg    }
139395b296d0Smrg    printf ("i386-sequent-ptx\n"); exit (0);
139495b296d0Smrg
139595b296d0Smrg#endif
139695b296d0Smrg
139795b296d0Smrg#if defined (vax)
139895b296d0Smrg# if !defined (ultrix)
139995b296d0Smrg#  include <sys/param.h>
140095b296d0Smrg#  if defined (BSD)
140195b296d0Smrg#   if BSD == 43
140295b296d0Smrg      printf ("vax-dec-bsd4.3\n"); exit (0);
140395b296d0Smrg#   else
140495b296d0Smrg#    if BSD == 199006
140595b296d0Smrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
140695b296d0Smrg#    else
140795b296d0Smrg      printf ("vax-dec-bsd\n"); exit (0);
140895b296d0Smrg#    endif
140995b296d0Smrg#   endif
141095b296d0Smrg#  else
141195b296d0Smrg    printf ("vax-dec-bsd\n"); exit (0);
141295b296d0Smrg#  endif
141395b296d0Smrg# else
141495b296d0Smrg    printf ("vax-dec-ultrix\n"); exit (0);
141595b296d0Smrg# endif
141695b296d0Smrg#endif
141795b296d0Smrg
141895b296d0Smrg#if defined (alliant) && defined (i860)
141995b296d0Smrg  printf ("i860-alliant-bsd\n"); exit (0);
142095b296d0Smrg#endif
142195b296d0Smrg
142295b296d0Smrg  exit (1);
142395b296d0Smrg}
142495b296d0SmrgEOF
142595b296d0Smrg
142695b296d0Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
142795b296d0Smrg	{ echo "$SYSTEM_NAME"; exit; }
142895b296d0Smrg
142995b296d0Smrg# Apollos put the system type in the environment.
143095b296d0Smrg
143195b296d0Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
143295b296d0Smrg
143395b296d0Smrg# Convex versions that predate uname can use getsysinfo(1)
143495b296d0Smrg
143595b296d0Smrgif [ -x /usr/convex/getsysinfo ]
143695b296d0Smrgthen
143795b296d0Smrg    case `getsysinfo -f cpu_type` in
143895b296d0Smrg    c1*)
143995b296d0Smrg	echo c1-convex-bsd
144095b296d0Smrg	exit ;;
144195b296d0Smrg    c2*)
144295b296d0Smrg	if getsysinfo -f scalar_acc
144395b296d0Smrg	then echo c32-convex-bsd
144495b296d0Smrg	else echo c2-convex-bsd
144595b296d0Smrg	fi
144695b296d0Smrg	exit ;;
144795b296d0Smrg    c34*)
144895b296d0Smrg	echo c34-convex-bsd
144995b296d0Smrg	exit ;;
145095b296d0Smrg    c38*)
145195b296d0Smrg	echo c38-convex-bsd
145295b296d0Smrg	exit ;;
145395b296d0Smrg    c4*)
145495b296d0Smrg	echo c4-convex-bsd
145595b296d0Smrg	exit ;;
145695b296d0Smrg    esac
145795b296d0Smrgfi
145895b296d0Smrg
145995b296d0Smrgcat >&2 <<EOF
146095b296d0Smrg$0: unable to guess system type
146195b296d0Smrg
146295b296d0SmrgThis script, last modified $timestamp, has failed to recognize
146395b296d0Smrgthe operating system you are using. It is advised that you
146495b296d0Smrgdownload the most up to date version of the config scripts from
146595b296d0Smrg
1466ff89ac2bSmrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
146795b296d0Smrgand
1468ff89ac2bSmrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
146995b296d0Smrg
147095b296d0SmrgIf the version you run ($0) is already up to date, please
147195b296d0Smrgsend the following data and any information you think might be
147295b296d0Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
147395b296d0Smrginformation to handle your system.
147495b296d0Smrg
147595b296d0Smrgconfig.guess timestamp = $timestamp
147695b296d0Smrg
147795b296d0Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
147895b296d0Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
147995b296d0Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
148095b296d0Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
148195b296d0Smrg
148295b296d0Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
148395b296d0Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
148495b296d0Smrg
148595b296d0Smrghostinfo               = `(hostinfo) 2>/dev/null`
148695b296d0Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
148795b296d0Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
148895b296d0Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
148995b296d0Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
149095b296d0Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
149195b296d0Smrg
149295b296d0SmrgUNAME_MACHINE = ${UNAME_MACHINE}
149395b296d0SmrgUNAME_RELEASE = ${UNAME_RELEASE}
149495b296d0SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
149595b296d0SmrgUNAME_VERSION = ${UNAME_VERSION}
149695b296d0SmrgEOF
149795b296d0Smrg
149895b296d0Smrgexit 1
149995b296d0Smrg
150095b296d0Smrg# Local variables:
150195b296d0Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
150295b296d0Smrg# time-stamp-start: "timestamp='"
150395b296d0Smrg# time-stamp-format: "%:y-%02m-%02d"
150495b296d0Smrg# time-stamp-end: "'"
150595b296d0Smrg# End:
1506