config.guess revision 72b676d7
172b676d7Smrg#! /bin/sh
272b676d7Smrg# Attempt to guess a canonical system name.
372b676d7Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
472b676d7Smrg#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
572b676d7Smrg
672b676d7Smrgtimestamp='2006-02-23'
772b676d7Smrg
872b676d7Smrg# This file is free software; you can redistribute it and/or modify it
972b676d7Smrg# under the terms of the GNU General Public License as published by
1072b676d7Smrg# the Free Software Foundation; either version 2 of the License, or
1172b676d7Smrg# (at your option) any later version.
1272b676d7Smrg#
1372b676d7Smrg# This program is distributed in the hope that it will be useful, but
1472b676d7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
1572b676d7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1672b676d7Smrg# General Public License for more details.
1772b676d7Smrg#
1872b676d7Smrg# You should have received a copy of the GNU General Public License
1972b676d7Smrg# along with this program; if not, write to the Free Software
2072b676d7Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2172b676d7Smrg# 02110-1301, USA.
2272b676d7Smrg#
2372b676d7Smrg# As a special exception to the GNU General Public License, if you
2472b676d7Smrg# distribute this file as part of a program that contains a
2572b676d7Smrg# configuration script generated by Autoconf, you may include it under
2672b676d7Smrg# the same distribution terms that you use for the rest of that program.
2772b676d7Smrg
2872b676d7Smrg
2972b676d7Smrg# Originally written by Per Bothner <per@bothner.com>.
3072b676d7Smrg# Please send patches to <config-patches@gnu.org>.  Submit a context
3172b676d7Smrg# diff and a properly formatted ChangeLog entry.
3272b676d7Smrg#
3372b676d7Smrg# This script attempts to guess a canonical system name similar to
3472b676d7Smrg# config.sub.  If it succeeds, it prints the system name on stdout, and
3572b676d7Smrg# exits with 0.  Otherwise, it exits with 1.
3672b676d7Smrg#
3772b676d7Smrg# The plan is that this can be called by configure scripts if you
3872b676d7Smrg# don't specify an explicit build system type.
3972b676d7Smrg
4072b676d7Smrgme=`echo "$0" | sed -e 's,.*/,,'`
4172b676d7Smrg
4272b676d7Smrgusage="\
4372b676d7SmrgUsage: $0 [OPTION]
4472b676d7Smrg
4572b676d7SmrgOutput the configuration name of the system \`$me' is run on.
4672b676d7Smrg
4772b676d7SmrgOperation modes:
4872b676d7Smrg  -h, --help         print this help, then exit
4972b676d7Smrg  -t, --time-stamp   print date of last modification, then exit
5072b676d7Smrg  -v, --version      print version number, then exit
5172b676d7Smrg
5272b676d7SmrgReport bugs and patches to <config-patches@gnu.org>."
5372b676d7Smrg
5472b676d7Smrgversion="\
5572b676d7SmrgGNU config.guess ($timestamp)
5672b676d7Smrg
5772b676d7SmrgOriginally written by Per Bothner.
5872b676d7SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
5972b676d7SmrgFree Software Foundation, Inc.
6072b676d7Smrg
6172b676d7SmrgThis is free software; see the source for copying conditions.  There is NO
6272b676d7Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
6372b676d7Smrg
6472b676d7Smrghelp="
6572b676d7SmrgTry \`$me --help' for more information."
6672b676d7Smrg
6772b676d7Smrg# Parse command line
6872b676d7Smrgwhile test $# -gt 0 ; do
6972b676d7Smrg  case $1 in
7072b676d7Smrg    --time-stamp | --time* | -t )
7172b676d7Smrg       echo "$timestamp" ; exit ;;
7272b676d7Smrg    --version | -v )
7372b676d7Smrg       echo "$version" ; exit ;;
7472b676d7Smrg    --help | --h* | -h )
7572b676d7Smrg       echo "$usage"; exit ;;
7672b676d7Smrg    -- )     # Stop option processing
7772b676d7Smrg       shift; break ;;
7872b676d7Smrg    - )	# Use stdin as input.
7972b676d7Smrg       break ;;
8072b676d7Smrg    -* )
8172b676d7Smrg       echo "$me: invalid option $1$help" >&2
8272b676d7Smrg       exit 1 ;;
8372b676d7Smrg    * )
8472b676d7Smrg       break ;;
8572b676d7Smrg  esac
8672b676d7Smrgdone
8772b676d7Smrg
8872b676d7Smrgif test $# != 0; then
8972b676d7Smrg  echo "$me: too many arguments$help" >&2
9072b676d7Smrg  exit 1
9172b676d7Smrgfi
9272b676d7Smrg
9372b676d7Smrgtrap 'exit 1' 1 2 15
9472b676d7Smrg
9572b676d7Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
9672b676d7Smrg# compiler to aid in system detection is discouraged as it requires
9772b676d7Smrg# temporary files to be created and, as you can see below, it is a
9872b676d7Smrg# headache to deal with in a portable fashion.
9972b676d7Smrg
10072b676d7Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
10172b676d7Smrg# use `HOST_CC' if defined, but it is deprecated.
10272b676d7Smrg
10372b676d7Smrg# Portable tmp directory creation inspired by the Autoconf team.
10472b676d7Smrg
10572b676d7Smrgset_cc_for_build='
10672b676d7Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
10772b676d7Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
10872b676d7Smrg: ${TMPDIR=/tmp} ;
10972b676d7Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
11072b676d7Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
11172b676d7Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
11272b676d7Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
11372b676d7Smrgdummy=$tmp/dummy ;
11472b676d7Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
11572b676d7Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
11672b676d7Smrg ,,)    echo "int x;" > $dummy.c ;
11772b676d7Smrg	for c in cc gcc c89 c99 ; do
11872b676d7Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
11972b676d7Smrg	     CC_FOR_BUILD="$c"; break ;
12072b676d7Smrg	  fi ;
12172b676d7Smrg	done ;
12272b676d7Smrg	if test x"$CC_FOR_BUILD" = x ; then
12372b676d7Smrg	  CC_FOR_BUILD=no_compiler_found ;
12472b676d7Smrg	fi
12572b676d7Smrg	;;
12672b676d7Smrg ,,*)   CC_FOR_BUILD=$CC ;;
12772b676d7Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
12872b676d7Smrgesac ; set_cc_for_build= ;'
12972b676d7Smrg
13072b676d7Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
13172b676d7Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
13272b676d7Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
13372b676d7Smrg	PATH=$PATH:/.attbin ; export PATH
13472b676d7Smrgfi
13572b676d7Smrg
13672b676d7SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
13772b676d7SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
13872b676d7SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
13972b676d7SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
14072b676d7Smrg
14172b676d7Smrg# Note: order is significant - the case branches are not exclusive.
14272b676d7Smrg
14372b676d7Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
14472b676d7Smrg    *:NetBSD:*:*)
14572b676d7Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
14672b676d7Smrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
14772b676d7Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
14872b676d7Smrg	# switched to ELF, *-*-netbsd* would select the old
14972b676d7Smrg	# object file format.  This provides both forward
15072b676d7Smrg	# compatibility and a consistent mechanism for selecting the
15172b676d7Smrg	# object file format.
15272b676d7Smrg	#
15372b676d7Smrg	# Note: NetBSD doesn't particularly care about the vendor
15472b676d7Smrg	# portion of the name.  We always set it to "unknown".
15572b676d7Smrg	sysctl="sysctl -n hw.machine_arch"
15672b676d7Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
15772b676d7Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
15872b676d7Smrg	case "${UNAME_MACHINE_ARCH}" in
15972b676d7Smrg	    armeb) machine=armeb-unknown ;;
16072b676d7Smrg	    arm*) machine=arm-unknown ;;
16172b676d7Smrg	    sh3el) machine=shl-unknown ;;
16272b676d7Smrg	    sh3eb) machine=sh-unknown ;;
16372b676d7Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
16472b676d7Smrg	esac
16572b676d7Smrg	# The Operating System including object format, if it has switched
16672b676d7Smrg	# to ELF recently, or will in the future.
16772b676d7Smrg	case "${UNAME_MACHINE_ARCH}" in
16872b676d7Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
16972b676d7Smrg		eval $set_cc_for_build
17072b676d7Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
17172b676d7Smrg			| grep __ELF__ >/dev/null
17272b676d7Smrg		then
17372b676d7Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
17472b676d7Smrg		    # Return netbsd for either.  FIX?
17572b676d7Smrg		    os=netbsd
17672b676d7Smrg		else
17772b676d7Smrg		    os=netbsdelf
17872b676d7Smrg		fi
17972b676d7Smrg		;;
18072b676d7Smrg	    *)
18172b676d7Smrg	        os=netbsd
18272b676d7Smrg		;;
18372b676d7Smrg	esac
18472b676d7Smrg	# The OS release
18572b676d7Smrg	# Debian GNU/NetBSD machines have a different userland, and
18672b676d7Smrg	# thus, need a distinct triplet. However, they do not need
18772b676d7Smrg	# kernel version information, so it can be replaced with a
18872b676d7Smrg	# suitable tag, in the style of linux-gnu.
18972b676d7Smrg	case "${UNAME_VERSION}" in
19072b676d7Smrg	    Debian*)
19172b676d7Smrg		release='-gnu'
19272b676d7Smrg		;;
19372b676d7Smrg	    *)
19472b676d7Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
19572b676d7Smrg		;;
19672b676d7Smrg	esac
19772b676d7Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
19872b676d7Smrg	# contains redundant information, the shorter form:
19972b676d7Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
20072b676d7Smrg	echo "${machine}-${os}${release}"
20172b676d7Smrg	exit ;;
20272b676d7Smrg    *:OpenBSD:*:*)
20372b676d7Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
20472b676d7Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
20572b676d7Smrg	exit ;;
20672b676d7Smrg    *:ekkoBSD:*:*)
20772b676d7Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
20872b676d7Smrg	exit ;;
20972b676d7Smrg    *:SolidBSD:*:*)
21072b676d7Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
21172b676d7Smrg	exit ;;
21272b676d7Smrg    macppc:MirBSD:*:*)
21372b676d7Smrg	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
21472b676d7Smrg	exit ;;
21572b676d7Smrg    *:MirBSD:*:*)
21672b676d7Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
21772b676d7Smrg	exit ;;
21872b676d7Smrg    alpha:OSF1:*:*)
21972b676d7Smrg	case $UNAME_RELEASE in
22072b676d7Smrg	*4.0)
22172b676d7Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
22272b676d7Smrg		;;
22372b676d7Smrg	*5.*)
22472b676d7Smrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
22572b676d7Smrg		;;
22672b676d7Smrg	esac
22772b676d7Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
22872b676d7Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
22972b676d7Smrg	# covers most systems running today.  This code pipes the CPU
23072b676d7Smrg	# types through head -n 1, so we only detect the type of CPU 0.
23172b676d7Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
23272b676d7Smrg	case "$ALPHA_CPU_TYPE" in
23372b676d7Smrg	    "EV4 (21064)")
23472b676d7Smrg		UNAME_MACHINE="alpha" ;;
23572b676d7Smrg	    "EV4.5 (21064)")
23672b676d7Smrg		UNAME_MACHINE="alpha" ;;
23772b676d7Smrg	    "LCA4 (21066/21068)")
23872b676d7Smrg		UNAME_MACHINE="alpha" ;;
23972b676d7Smrg	    "EV5 (21164)")
24072b676d7Smrg		UNAME_MACHINE="alphaev5" ;;
24172b676d7Smrg	    "EV5.6 (21164A)")
24272b676d7Smrg		UNAME_MACHINE="alphaev56" ;;
24372b676d7Smrg	    "EV5.6 (21164PC)")
24472b676d7Smrg		UNAME_MACHINE="alphapca56" ;;
24572b676d7Smrg	    "EV5.7 (21164PC)")
24672b676d7Smrg		UNAME_MACHINE="alphapca57" ;;
24772b676d7Smrg	    "EV6 (21264)")
24872b676d7Smrg		UNAME_MACHINE="alphaev6" ;;
24972b676d7Smrg	    "EV6.7 (21264A)")
25072b676d7Smrg		UNAME_MACHINE="alphaev67" ;;
25172b676d7Smrg	    "EV6.8CB (21264C)")
25272b676d7Smrg		UNAME_MACHINE="alphaev68" ;;
25372b676d7Smrg	    "EV6.8AL (21264B)")
25472b676d7Smrg		UNAME_MACHINE="alphaev68" ;;
25572b676d7Smrg	    "EV6.8CX (21264D)")
25672b676d7Smrg		UNAME_MACHINE="alphaev68" ;;
25772b676d7Smrg	    "EV6.9A (21264/EV69A)")
25872b676d7Smrg		UNAME_MACHINE="alphaev69" ;;
25972b676d7Smrg	    "EV7 (21364)")
26072b676d7Smrg		UNAME_MACHINE="alphaev7" ;;
26172b676d7Smrg	    "EV7.9 (21364A)")
26272b676d7Smrg		UNAME_MACHINE="alphaev79" ;;
26372b676d7Smrg	esac
26472b676d7Smrg	# A Pn.n version is a patched version.
26572b676d7Smrg	# A Vn.n version is a released version.
26672b676d7Smrg	# A Tn.n version is a released field test version.
26772b676d7Smrg	# A Xn.n version is an unreleased experimental baselevel.
26872b676d7Smrg	# 1.2 uses "1.2" for uname -r.
26972b676d7Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27072b676d7Smrg	exit ;;
27172b676d7Smrg    Alpha\ *:Windows_NT*:*)
27272b676d7Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
27372b676d7Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
27472b676d7Smrg	# of the specific Alpha model?
27572b676d7Smrg	echo alpha-pc-interix
27672b676d7Smrg	exit ;;
27772b676d7Smrg    21064:Windows_NT:50:3)
27872b676d7Smrg	echo alpha-dec-winnt3.5
27972b676d7Smrg	exit ;;
28072b676d7Smrg    Amiga*:UNIX_System_V:4.0:*)
28172b676d7Smrg	echo m68k-unknown-sysv4
28272b676d7Smrg	exit ;;
28372b676d7Smrg    *:[Aa]miga[Oo][Ss]:*:*)
28472b676d7Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
28572b676d7Smrg	exit ;;
28672b676d7Smrg    *:[Mm]orph[Oo][Ss]:*:*)
28772b676d7Smrg	echo ${UNAME_MACHINE}-unknown-morphos
28872b676d7Smrg	exit ;;
28972b676d7Smrg    *:OS/390:*:*)
29072b676d7Smrg	echo i370-ibm-openedition
29172b676d7Smrg	exit ;;
29272b676d7Smrg    *:z/VM:*:*)
29372b676d7Smrg	echo s390-ibm-zvmoe
29472b676d7Smrg	exit ;;
29572b676d7Smrg    *:OS400:*:*)
29672b676d7Smrg        echo powerpc-ibm-os400
29772b676d7Smrg	exit ;;
29872b676d7Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
29972b676d7Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
30072b676d7Smrg	exit ;;
30172b676d7Smrg    arm:riscos:*:*|arm:RISCOS:*:*)
30272b676d7Smrg	echo arm-unknown-riscos
30372b676d7Smrg	exit ;;
30472b676d7Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
30572b676d7Smrg	echo hppa1.1-hitachi-hiuxmpp
30672b676d7Smrg	exit ;;
30772b676d7Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
30872b676d7Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
30972b676d7Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
31072b676d7Smrg		echo pyramid-pyramid-sysv3
31172b676d7Smrg	else
31272b676d7Smrg		echo pyramid-pyramid-bsd
31372b676d7Smrg	fi
31472b676d7Smrg	exit ;;
31572b676d7Smrg    NILE*:*:*:dcosx)
31672b676d7Smrg	echo pyramid-pyramid-svr4
31772b676d7Smrg	exit ;;
31872b676d7Smrg    DRS?6000:unix:4.0:6*)
31972b676d7Smrg	echo sparc-icl-nx6
32072b676d7Smrg	exit ;;
32172b676d7Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
32272b676d7Smrg	case `/usr/bin/uname -p` in
32372b676d7Smrg	    sparc) echo sparc-icl-nx7; exit ;;
32472b676d7Smrg	esac ;;
32572b676d7Smrg    sun4H:SunOS:5.*:*)
32672b676d7Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
32772b676d7Smrg	exit ;;
32872b676d7Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
32972b676d7Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33072b676d7Smrg	exit ;;
33172b676d7Smrg    i86pc:SunOS:5.*:*)
33272b676d7Smrg	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33372b676d7Smrg	exit ;;
33472b676d7Smrg    sun4*:SunOS:6*:*)
33572b676d7Smrg	# According to config.sub, this is the proper way to canonicalize
33672b676d7Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
33772b676d7Smrg	# it's likely to be more like Solaris than SunOS4.
33872b676d7Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33972b676d7Smrg	exit ;;
34072b676d7Smrg    sun4*:SunOS:*:*)
34172b676d7Smrg	case "`/usr/bin/arch -k`" in
34272b676d7Smrg	    Series*|S4*)
34372b676d7Smrg		UNAME_RELEASE=`uname -v`
34472b676d7Smrg		;;
34572b676d7Smrg	esac
34672b676d7Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
34772b676d7Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
34872b676d7Smrg	exit ;;
34972b676d7Smrg    sun3*:SunOS:*:*)
35072b676d7Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
35172b676d7Smrg	exit ;;
35272b676d7Smrg    sun*:*:4.2BSD:*)
35372b676d7Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
35472b676d7Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
35572b676d7Smrg	case "`/bin/arch`" in
35672b676d7Smrg	    sun3)
35772b676d7Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
35872b676d7Smrg		;;
35972b676d7Smrg	    sun4)
36072b676d7Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
36172b676d7Smrg		;;
36272b676d7Smrg	esac
36372b676d7Smrg	exit ;;
36472b676d7Smrg    aushp:SunOS:*:*)
36572b676d7Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
36672b676d7Smrg	exit ;;
36772b676d7Smrg    # The situation for MiNT is a little confusing.  The machine name
36872b676d7Smrg    # can be virtually everything (everything which is not
36972b676d7Smrg    # "atarist" or "atariste" at least should have a processor
37072b676d7Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
37172b676d7Smrg    # to the lowercase version "mint" (or "freemint").  Finally
37272b676d7Smrg    # the system name "TOS" denotes a system which is actually not
37372b676d7Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
37472b676d7Smrg    # be no problem.
37572b676d7Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
37672b676d7Smrg        echo m68k-atari-mint${UNAME_RELEASE}
37772b676d7Smrg	exit ;;
37872b676d7Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
37972b676d7Smrg	echo m68k-atari-mint${UNAME_RELEASE}
38072b676d7Smrg        exit ;;
38172b676d7Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
38272b676d7Smrg        echo m68k-atari-mint${UNAME_RELEASE}
38372b676d7Smrg	exit ;;
38472b676d7Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
38572b676d7Smrg        echo m68k-milan-mint${UNAME_RELEASE}
38672b676d7Smrg        exit ;;
38772b676d7Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
38872b676d7Smrg        echo m68k-hades-mint${UNAME_RELEASE}
38972b676d7Smrg        exit ;;
39072b676d7Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
39172b676d7Smrg        echo m68k-unknown-mint${UNAME_RELEASE}
39272b676d7Smrg        exit ;;
39372b676d7Smrg    m68k:machten:*:*)
39472b676d7Smrg	echo m68k-apple-machten${UNAME_RELEASE}
39572b676d7Smrg	exit ;;
39672b676d7Smrg    powerpc:machten:*:*)
39772b676d7Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
39872b676d7Smrg	exit ;;
39972b676d7Smrg    RISC*:Mach:*:*)
40072b676d7Smrg	echo mips-dec-mach_bsd4.3
40172b676d7Smrg	exit ;;
40272b676d7Smrg    RISC*:ULTRIX:*:*)
40372b676d7Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
40472b676d7Smrg	exit ;;
40572b676d7Smrg    VAX*:ULTRIX*:*:*)
40672b676d7Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
40772b676d7Smrg	exit ;;
40872b676d7Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
40972b676d7Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
41072b676d7Smrg	exit ;;
41172b676d7Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
41272b676d7Smrg	eval $set_cc_for_build
41372b676d7Smrg	sed 's/^	//' << EOF >$dummy.c
41472b676d7Smrg#ifdef __cplusplus
41572b676d7Smrg#include <stdio.h>  /* for printf() prototype */
41672b676d7Smrg	int main (int argc, char *argv[]) {
41772b676d7Smrg#else
41872b676d7Smrg	int main (argc, argv) int argc; char *argv[]; {
41972b676d7Smrg#endif
42072b676d7Smrg	#if defined (host_mips) && defined (MIPSEB)
42172b676d7Smrg	#if defined (SYSTYPE_SYSV)
42272b676d7Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
42372b676d7Smrg	#endif
42472b676d7Smrg	#if defined (SYSTYPE_SVR4)
42572b676d7Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
42672b676d7Smrg	#endif
42772b676d7Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
42872b676d7Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
42972b676d7Smrg	#endif
43072b676d7Smrg	#endif
43172b676d7Smrg	  exit (-1);
43272b676d7Smrg	}
43372b676d7SmrgEOF
43472b676d7Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
43572b676d7Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
43672b676d7Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
43772b676d7Smrg	    { echo "$SYSTEM_NAME"; exit; }
43872b676d7Smrg	echo mips-mips-riscos${UNAME_RELEASE}
43972b676d7Smrg	exit ;;
44072b676d7Smrg    Motorola:PowerMAX_OS:*:*)
44172b676d7Smrg	echo powerpc-motorola-powermax
44272b676d7Smrg	exit ;;
44372b676d7Smrg    Motorola:*:4.3:PL8-*)
44472b676d7Smrg	echo powerpc-harris-powermax
44572b676d7Smrg	exit ;;
44672b676d7Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
44772b676d7Smrg	echo powerpc-harris-powermax
44872b676d7Smrg	exit ;;
44972b676d7Smrg    Night_Hawk:Power_UNIX:*:*)
45072b676d7Smrg	echo powerpc-harris-powerunix
45172b676d7Smrg	exit ;;
45272b676d7Smrg    m88k:CX/UX:7*:*)
45372b676d7Smrg	echo m88k-harris-cxux7
45472b676d7Smrg	exit ;;
45572b676d7Smrg    m88k:*:4*:R4*)
45672b676d7Smrg	echo m88k-motorola-sysv4
45772b676d7Smrg	exit ;;
45872b676d7Smrg    m88k:*:3*:R3*)
45972b676d7Smrg	echo m88k-motorola-sysv3
46072b676d7Smrg	exit ;;
46172b676d7Smrg    AViiON:dgux:*:*)
46272b676d7Smrg        # DG/UX returns AViiON for all architectures
46372b676d7Smrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
46472b676d7Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
46572b676d7Smrg	then
46672b676d7Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
46772b676d7Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
46872b676d7Smrg	    then
46972b676d7Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
47072b676d7Smrg	    else
47172b676d7Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
47272b676d7Smrg	    fi
47372b676d7Smrg	else
47472b676d7Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
47572b676d7Smrg	fi
47672b676d7Smrg 	exit ;;
47772b676d7Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
47872b676d7Smrg	echo m88k-dolphin-sysv3
47972b676d7Smrg	exit ;;
48072b676d7Smrg    M88*:*:R3*:*)
48172b676d7Smrg	# Delta 88k system running SVR3
48272b676d7Smrg	echo m88k-motorola-sysv3
48372b676d7Smrg	exit ;;
48472b676d7Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
48572b676d7Smrg	echo m88k-tektronix-sysv3
48672b676d7Smrg	exit ;;
48772b676d7Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
48872b676d7Smrg	echo m68k-tektronix-bsd
48972b676d7Smrg	exit ;;
49072b676d7Smrg    *:IRIX*:*:*)
49172b676d7Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
49272b676d7Smrg	exit ;;
49372b676d7Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
49472b676d7Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
49572b676d7Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
49672b676d7Smrg    i*86:AIX:*:*)
49772b676d7Smrg	echo i386-ibm-aix
49872b676d7Smrg	exit ;;
49972b676d7Smrg    ia64:AIX:*:*)
50072b676d7Smrg	if [ -x /usr/bin/oslevel ] ; then
50172b676d7Smrg		IBM_REV=`/usr/bin/oslevel`
50272b676d7Smrg	else
50372b676d7Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
50472b676d7Smrg	fi
50572b676d7Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
50672b676d7Smrg	exit ;;
50772b676d7Smrg    *:AIX:2:3)
50872b676d7Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
50972b676d7Smrg		eval $set_cc_for_build
51072b676d7Smrg		sed 's/^		//' << EOF >$dummy.c
51172b676d7Smrg		#include <sys/systemcfg.h>
51272b676d7Smrg
51372b676d7Smrg		main()
51472b676d7Smrg			{
51572b676d7Smrg			if (!__power_pc())
51672b676d7Smrg				exit(1);
51772b676d7Smrg			puts("powerpc-ibm-aix3.2.5");
51872b676d7Smrg			exit(0);
51972b676d7Smrg			}
52072b676d7SmrgEOF
52172b676d7Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
52272b676d7Smrg		then
52372b676d7Smrg			echo "$SYSTEM_NAME"
52472b676d7Smrg		else
52572b676d7Smrg			echo rs6000-ibm-aix3.2.5
52672b676d7Smrg		fi
52772b676d7Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
52872b676d7Smrg		echo rs6000-ibm-aix3.2.4
52972b676d7Smrg	else
53072b676d7Smrg		echo rs6000-ibm-aix3.2
53172b676d7Smrg	fi
53272b676d7Smrg	exit ;;
53372b676d7Smrg    *:AIX:*:[45])
53472b676d7Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
53572b676d7Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
53672b676d7Smrg		IBM_ARCH=rs6000
53772b676d7Smrg	else
53872b676d7Smrg		IBM_ARCH=powerpc
53972b676d7Smrg	fi
54072b676d7Smrg	if [ -x /usr/bin/oslevel ] ; then
54172b676d7Smrg		IBM_REV=`/usr/bin/oslevel`
54272b676d7Smrg	else
54372b676d7Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
54472b676d7Smrg	fi
54572b676d7Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
54672b676d7Smrg	exit ;;
54772b676d7Smrg    *:AIX:*:*)
54872b676d7Smrg	echo rs6000-ibm-aix
54972b676d7Smrg	exit ;;
55072b676d7Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
55172b676d7Smrg	echo romp-ibm-bsd4.4
55272b676d7Smrg	exit ;;
55372b676d7Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
55472b676d7Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
55572b676d7Smrg	exit ;;                             # report: romp-ibm BSD 4.3
55672b676d7Smrg    *:BOSX:*:*)
55772b676d7Smrg	echo rs6000-bull-bosx
55872b676d7Smrg	exit ;;
55972b676d7Smrg    DPX/2?00:B.O.S.:*:*)
56072b676d7Smrg	echo m68k-bull-sysv3
56172b676d7Smrg	exit ;;
56272b676d7Smrg    9000/[34]??:4.3bsd:1.*:*)
56372b676d7Smrg	echo m68k-hp-bsd
56472b676d7Smrg	exit ;;
56572b676d7Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
56672b676d7Smrg	echo m68k-hp-bsd4.4
56772b676d7Smrg	exit ;;
56872b676d7Smrg    9000/[34678]??:HP-UX:*:*)
56972b676d7Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
57072b676d7Smrg	case "${UNAME_MACHINE}" in
57172b676d7Smrg	    9000/31? )            HP_ARCH=m68000 ;;
57272b676d7Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
57372b676d7Smrg	    9000/[678][0-9][0-9])
57472b676d7Smrg		if [ -x /usr/bin/getconf ]; then
57572b676d7Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
57672b676d7Smrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
57772b676d7Smrg                    case "${sc_cpu_version}" in
57872b676d7Smrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
57972b676d7Smrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
58072b676d7Smrg                      532)                      # CPU_PA_RISC2_0
58172b676d7Smrg                        case "${sc_kernel_bits}" in
58272b676d7Smrg                          32) HP_ARCH="hppa2.0n" ;;
58372b676d7Smrg                          64) HP_ARCH="hppa2.0w" ;;
58472b676d7Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
58572b676d7Smrg                        esac ;;
58672b676d7Smrg                    esac
58772b676d7Smrg		fi
58872b676d7Smrg		if [ "${HP_ARCH}" = "" ]; then
58972b676d7Smrg		    eval $set_cc_for_build
59072b676d7Smrg		    sed 's/^              //' << EOF >$dummy.c
59172b676d7Smrg
59272b676d7Smrg              #define _HPUX_SOURCE
59372b676d7Smrg              #include <stdlib.h>
59472b676d7Smrg              #include <unistd.h>
59572b676d7Smrg
59672b676d7Smrg              int main ()
59772b676d7Smrg              {
59872b676d7Smrg              #if defined(_SC_KERNEL_BITS)
59972b676d7Smrg                  long bits = sysconf(_SC_KERNEL_BITS);
60072b676d7Smrg              #endif
60172b676d7Smrg                  long cpu  = sysconf (_SC_CPU_VERSION);
60272b676d7Smrg
60372b676d7Smrg                  switch (cpu)
60472b676d7Smrg              	{
60572b676d7Smrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
60672b676d7Smrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
60772b676d7Smrg              	case CPU_PA_RISC2_0:
60872b676d7Smrg              #if defined(_SC_KERNEL_BITS)
60972b676d7Smrg              	    switch (bits)
61072b676d7Smrg              		{
61172b676d7Smrg              		case 64: puts ("hppa2.0w"); break;
61272b676d7Smrg              		case 32: puts ("hppa2.0n"); break;
61372b676d7Smrg              		default: puts ("hppa2.0"); break;
61472b676d7Smrg              		} break;
61572b676d7Smrg              #else  /* !defined(_SC_KERNEL_BITS) */
61672b676d7Smrg              	    puts ("hppa2.0"); break;
61772b676d7Smrg              #endif
61872b676d7Smrg              	default: puts ("hppa1.0"); break;
61972b676d7Smrg              	}
62072b676d7Smrg                  exit (0);
62172b676d7Smrg              }
62272b676d7SmrgEOF
62372b676d7Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
62472b676d7Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
62572b676d7Smrg		fi ;;
62672b676d7Smrg	esac
62772b676d7Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
62872b676d7Smrg	then
62972b676d7Smrg	    eval $set_cc_for_build
63072b676d7Smrg
63172b676d7Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
63272b676d7Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
63372b676d7Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
63472b676d7Smrg	    #
63572b676d7Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
63672b676d7Smrg	    # => hppa2.0w-hp-hpux11.23
63772b676d7Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
63872b676d7Smrg	    # => hppa64-hp-hpux11.23
63972b676d7Smrg
64072b676d7Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
64172b676d7Smrg		grep __LP64__ >/dev/null
64272b676d7Smrg	    then
64372b676d7Smrg		HP_ARCH="hppa2.0w"
64472b676d7Smrg	    else
64572b676d7Smrg		HP_ARCH="hppa64"
64672b676d7Smrg	    fi
64772b676d7Smrg	fi
64872b676d7Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
64972b676d7Smrg	exit ;;
65072b676d7Smrg    ia64:HP-UX:*:*)
65172b676d7Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
65272b676d7Smrg	echo ia64-hp-hpux${HPUX_REV}
65372b676d7Smrg	exit ;;
65472b676d7Smrg    3050*:HI-UX:*:*)
65572b676d7Smrg	eval $set_cc_for_build
65672b676d7Smrg	sed 's/^	//' << EOF >$dummy.c
65772b676d7Smrg	#include <unistd.h>
65872b676d7Smrg	int
65972b676d7Smrg	main ()
66072b676d7Smrg	{
66172b676d7Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
66272b676d7Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
66372b676d7Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
66472b676d7Smrg	     results, however.  */
66572b676d7Smrg	  if (CPU_IS_PA_RISC (cpu))
66672b676d7Smrg	    {
66772b676d7Smrg	      switch (cpu)
66872b676d7Smrg		{
66972b676d7Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
67072b676d7Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
67172b676d7Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
67272b676d7Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
67372b676d7Smrg		}
67472b676d7Smrg	    }
67572b676d7Smrg	  else if (CPU_IS_HP_MC68K (cpu))
67672b676d7Smrg	    puts ("m68k-hitachi-hiuxwe2");
67772b676d7Smrg	  else puts ("unknown-hitachi-hiuxwe2");
67872b676d7Smrg	  exit (0);
67972b676d7Smrg	}
68072b676d7SmrgEOF
68172b676d7Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
68272b676d7Smrg		{ echo "$SYSTEM_NAME"; exit; }
68372b676d7Smrg	echo unknown-hitachi-hiuxwe2
68472b676d7Smrg	exit ;;
68572b676d7Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
68672b676d7Smrg	echo hppa1.1-hp-bsd
68772b676d7Smrg	exit ;;
68872b676d7Smrg    9000/8??:4.3bsd:*:*)
68972b676d7Smrg	echo hppa1.0-hp-bsd
69072b676d7Smrg	exit ;;
69172b676d7Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
69272b676d7Smrg	echo hppa1.0-hp-mpeix
69372b676d7Smrg	exit ;;
69472b676d7Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
69572b676d7Smrg	echo hppa1.1-hp-osf
69672b676d7Smrg	exit ;;
69772b676d7Smrg    hp8??:OSF1:*:*)
69872b676d7Smrg	echo hppa1.0-hp-osf
69972b676d7Smrg	exit ;;
70072b676d7Smrg    i*86:OSF1:*:*)
70172b676d7Smrg	if [ -x /usr/sbin/sysversion ] ; then
70272b676d7Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
70372b676d7Smrg	else
70472b676d7Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
70572b676d7Smrg	fi
70672b676d7Smrg	exit ;;
70772b676d7Smrg    parisc*:Lites*:*:*)
70872b676d7Smrg	echo hppa1.1-hp-lites
70972b676d7Smrg	exit ;;
71072b676d7Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
71172b676d7Smrg	echo c1-convex-bsd
71272b676d7Smrg        exit ;;
71372b676d7Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
71472b676d7Smrg	if getsysinfo -f scalar_acc
71572b676d7Smrg	then echo c32-convex-bsd
71672b676d7Smrg	else echo c2-convex-bsd
71772b676d7Smrg	fi
71872b676d7Smrg        exit ;;
71972b676d7Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
72072b676d7Smrg	echo c34-convex-bsd
72172b676d7Smrg        exit ;;
72272b676d7Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
72372b676d7Smrg	echo c38-convex-bsd
72472b676d7Smrg        exit ;;
72572b676d7Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
72672b676d7Smrg	echo c4-convex-bsd
72772b676d7Smrg        exit ;;
72872b676d7Smrg    CRAY*Y-MP:*:*:*)
72972b676d7Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
73072b676d7Smrg	exit ;;
73172b676d7Smrg    CRAY*[A-Z]90:*:*:*)
73272b676d7Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
73372b676d7Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
73472b676d7Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
73572b676d7Smrg	      -e 's/\.[^.]*$/.X/'
73672b676d7Smrg	exit ;;
73772b676d7Smrg    CRAY*TS:*:*:*)
73872b676d7Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
73972b676d7Smrg	exit ;;
74072b676d7Smrg    CRAY*T3E:*:*:*)
74172b676d7Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
74272b676d7Smrg	exit ;;
74372b676d7Smrg    CRAY*SV1:*:*:*)
74472b676d7Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
74572b676d7Smrg	exit ;;
74672b676d7Smrg    *:UNICOS/mp:*:*)
74772b676d7Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
74872b676d7Smrg	exit ;;
74972b676d7Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
75072b676d7Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
75172b676d7Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
75272b676d7Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
75372b676d7Smrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
75472b676d7Smrg        exit ;;
75572b676d7Smrg    5000:UNIX_System_V:4.*:*)
75672b676d7Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
75772b676d7Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
75872b676d7Smrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
75972b676d7Smrg	exit ;;
76072b676d7Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
76172b676d7Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
76272b676d7Smrg	exit ;;
76372b676d7Smrg    sparc*:BSD/OS:*:*)
76472b676d7Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
76572b676d7Smrg	exit ;;
76672b676d7Smrg    *:BSD/OS:*:*)
76772b676d7Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
76872b676d7Smrg	exit ;;
76972b676d7Smrg    *:FreeBSD:*:*)
77072b676d7Smrg	case ${UNAME_MACHINE} in
77172b676d7Smrg	    pc98)
77272b676d7Smrg		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
77372b676d7Smrg	    *)
77472b676d7Smrg		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
77572b676d7Smrg	esac
77672b676d7Smrg	exit ;;
77772b676d7Smrg    i*:CYGWIN*:*)
77872b676d7Smrg	echo ${UNAME_MACHINE}-pc-cygwin
77972b676d7Smrg	exit ;;
78072b676d7Smrg    i*:MINGW*:*)
78172b676d7Smrg	echo ${UNAME_MACHINE}-pc-mingw32
78272b676d7Smrg	exit ;;
78372b676d7Smrg    i*:MSYS_NT-*:*:*)
78472b676d7Smrg	echo ${UNAME_MACHINE}-pc-mingw32
78572b676d7Smrg	exit ;;
78672b676d7Smrg    i*:windows32*:*)
78772b676d7Smrg    	# uname -m includes "-pc" on this system.
78872b676d7Smrg    	echo ${UNAME_MACHINE}-mingw32
78972b676d7Smrg	exit ;;
79072b676d7Smrg    i*:PW*:*)
79172b676d7Smrg	echo ${UNAME_MACHINE}-pc-pw32
79272b676d7Smrg	exit ;;
79372b676d7Smrg    x86:Interix*:[345]*)
79472b676d7Smrg	echo i586-pc-interix${UNAME_RELEASE}
79572b676d7Smrg	exit ;;
79672b676d7Smrg    EM64T:Interix*:[345]*)
79772b676d7Smrg	echo x86_64-unknown-interix${UNAME_RELEASE}
79872b676d7Smrg	exit ;;
79972b676d7Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
80072b676d7Smrg	echo i${UNAME_MACHINE}-pc-mks
80172b676d7Smrg	exit ;;
80272b676d7Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
80372b676d7Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
80472b676d7Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
80572b676d7Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
80672b676d7Smrg	echo i586-pc-interix
80772b676d7Smrg	exit ;;
80872b676d7Smrg    i*:UWIN*:*)
80972b676d7Smrg	echo ${UNAME_MACHINE}-pc-uwin
81072b676d7Smrg	exit ;;
81172b676d7Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
81272b676d7Smrg	echo x86_64-unknown-cygwin
81372b676d7Smrg	exit ;;
81472b676d7Smrg    p*:CYGWIN*:*)
81572b676d7Smrg	echo powerpcle-unknown-cygwin
81672b676d7Smrg	exit ;;
81772b676d7Smrg    prep*:SunOS:5.*:*)
81872b676d7Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
81972b676d7Smrg	exit ;;
82072b676d7Smrg    *:GNU:*:*)
82172b676d7Smrg	# the GNU system
82272b676d7Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
82372b676d7Smrg	exit ;;
82472b676d7Smrg    *:GNU/*:*:*)
82572b676d7Smrg	# other systems with GNU libc and userland
82672b676d7Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
82772b676d7Smrg	exit ;;
82872b676d7Smrg    i*86:Minix:*:*)
82972b676d7Smrg	echo ${UNAME_MACHINE}-pc-minix
83072b676d7Smrg	exit ;;
83172b676d7Smrg    arm*:Linux:*:*)
83272b676d7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
83372b676d7Smrg	exit ;;
83472b676d7Smrg    cris:Linux:*:*)
83572b676d7Smrg	echo cris-axis-linux-gnu
83672b676d7Smrg	exit ;;
83772b676d7Smrg    crisv32:Linux:*:*)
83872b676d7Smrg	echo crisv32-axis-linux-gnu
83972b676d7Smrg	exit ;;
84072b676d7Smrg    frv:Linux:*:*)
84172b676d7Smrg    	echo frv-unknown-linux-gnu
84272b676d7Smrg	exit ;;
84372b676d7Smrg    ia64:Linux:*:*)
84472b676d7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
84572b676d7Smrg	exit ;;
84672b676d7Smrg    m32r*:Linux:*:*)
84772b676d7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
84872b676d7Smrg	exit ;;
84972b676d7Smrg    m68*:Linux:*:*)
85072b676d7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
85172b676d7Smrg	exit ;;
85272b676d7Smrg    mips:Linux:*:*)
85372b676d7Smrg	eval $set_cc_for_build
85472b676d7Smrg	sed 's/^	//' << EOF >$dummy.c
85572b676d7Smrg	#undef CPU
85672b676d7Smrg	#undef mips
85772b676d7Smrg	#undef mipsel
85872b676d7Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
85972b676d7Smrg	CPU=mipsel
86072b676d7Smrg	#else
86172b676d7Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
86272b676d7Smrg	CPU=mips
86372b676d7Smrg	#else
86472b676d7Smrg	CPU=
86572b676d7Smrg	#endif
86672b676d7Smrg	#endif
86772b676d7SmrgEOF
86872b676d7Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
86972b676d7Smrg	    /^CPU/{
87072b676d7Smrg		s: ::g
87172b676d7Smrg		p
87272b676d7Smrg	    }'`"
87372b676d7Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
87472b676d7Smrg	;;
87572b676d7Smrg    mips64:Linux:*:*)
87672b676d7Smrg	eval $set_cc_for_build
87772b676d7Smrg	sed 's/^	//' << EOF >$dummy.c
87872b676d7Smrg	#undef CPU
87972b676d7Smrg	#undef mips64
88072b676d7Smrg	#undef mips64el
88172b676d7Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
88272b676d7Smrg	CPU=mips64el
88372b676d7Smrg	#else
88472b676d7Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
88572b676d7Smrg	CPU=mips64
88672b676d7Smrg	#else
88772b676d7Smrg	CPU=
88872b676d7Smrg	#endif
88972b676d7Smrg	#endif
89072b676d7SmrgEOF
89172b676d7Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
89272b676d7Smrg	    /^CPU/{
89372b676d7Smrg		s: ::g
89472b676d7Smrg		p
89572b676d7Smrg	    }'`"
89672b676d7Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
89772b676d7Smrg	;;
89872b676d7Smrg    or32:Linux:*:*)
89972b676d7Smrg	echo or32-unknown-linux-gnu
90072b676d7Smrg	exit ;;
90172b676d7Smrg    ppc:Linux:*:*)
90272b676d7Smrg	echo powerpc-unknown-linux-gnu
90372b676d7Smrg	exit ;;
90472b676d7Smrg    ppc64:Linux:*:*)
90572b676d7Smrg	echo powerpc64-unknown-linux-gnu
90672b676d7Smrg	exit ;;
90772b676d7Smrg    alpha:Linux:*:*)
90872b676d7Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
90972b676d7Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
91072b676d7Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
91172b676d7Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
91272b676d7Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
91372b676d7Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
91472b676d7Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
91572b676d7Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
91672b676d7Smrg        esac
91772b676d7Smrg	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
91872b676d7Smrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
91972b676d7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
92072b676d7Smrg	exit ;;
92172b676d7Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
92272b676d7Smrg	# Look for CPU level
92372b676d7Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
92472b676d7Smrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
92572b676d7Smrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
92672b676d7Smrg	  *)    echo hppa-unknown-linux-gnu ;;
92772b676d7Smrg	esac
92872b676d7Smrg	exit ;;
92972b676d7Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
93072b676d7Smrg	echo hppa64-unknown-linux-gnu
93172b676d7Smrg	exit ;;
93272b676d7Smrg    s390:Linux:*:* | s390x:Linux:*:*)
93372b676d7Smrg	echo ${UNAME_MACHINE}-ibm-linux
93472b676d7Smrg	exit ;;
93572b676d7Smrg    sh64*:Linux:*:*)
93672b676d7Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
93772b676d7Smrg	exit ;;
93872b676d7Smrg    sh*:Linux:*:*)
93972b676d7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
94072b676d7Smrg	exit ;;
94172b676d7Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
94272b676d7Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
94372b676d7Smrg	exit ;;
94472b676d7Smrg    vax:Linux:*:*)
94572b676d7Smrg	echo ${UNAME_MACHINE}-dec-linux-gnu
94672b676d7Smrg	exit ;;
94772b676d7Smrg    x86_64:Linux:*:*)
94872b676d7Smrg	echo x86_64-unknown-linux-gnu
94972b676d7Smrg	exit ;;
95072b676d7Smrg    i*86:Linux:*:*)
95172b676d7Smrg	# The BFD linker knows what the default object file format is, so
95272b676d7Smrg	# first see if it will tell us. cd to the root directory to prevent
95372b676d7Smrg	# problems with other programs or directories called `ld' in the path.
95472b676d7Smrg	# Set LC_ALL=C to ensure ld outputs messages in English.
95572b676d7Smrg	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
95672b676d7Smrg			 | sed -ne '/supported targets:/!d
95772b676d7Smrg				    s/[ 	][ 	]*/ /g
95872b676d7Smrg				    s/.*supported targets: *//
95972b676d7Smrg				    s/ .*//
96072b676d7Smrg				    p'`
96172b676d7Smrg        case "$ld_supported_targets" in
96272b676d7Smrg	  elf32-i386)
96372b676d7Smrg		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
96472b676d7Smrg		;;
96572b676d7Smrg	  a.out-i386-linux)
96672b676d7Smrg		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
96772b676d7Smrg		exit ;;
96872b676d7Smrg	  coff-i386)
96972b676d7Smrg		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
97072b676d7Smrg		exit ;;
97172b676d7Smrg	  "")
97272b676d7Smrg		# Either a pre-BFD a.out linker (linux-gnuoldld) or
97372b676d7Smrg		# one that does not give us useful --help.
97472b676d7Smrg		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
97572b676d7Smrg		exit ;;
97672b676d7Smrg	esac
97772b676d7Smrg	# Determine whether the default compiler is a.out or elf
97872b676d7Smrg	eval $set_cc_for_build
97972b676d7Smrg	sed 's/^	//' << EOF >$dummy.c
98072b676d7Smrg	#include <features.h>
98172b676d7Smrg	#ifdef __ELF__
98272b676d7Smrg	# ifdef __GLIBC__
98372b676d7Smrg	#  if __GLIBC__ >= 2
98472b676d7Smrg	LIBC=gnu
98572b676d7Smrg	#  else
98672b676d7Smrg	LIBC=gnulibc1
98772b676d7Smrg	#  endif
98872b676d7Smrg	# else
98972b676d7Smrg	LIBC=gnulibc1
99072b676d7Smrg	# endif
99172b676d7Smrg	#else
99272b676d7Smrg	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
99372b676d7Smrg	LIBC=gnu
99472b676d7Smrg	#else
99572b676d7Smrg	LIBC=gnuaout
99672b676d7Smrg	#endif
99772b676d7Smrg	#endif
99872b676d7Smrg	#ifdef __dietlibc__
99972b676d7Smrg	LIBC=dietlibc
100072b676d7Smrg	#endif
100172b676d7SmrgEOF
100272b676d7Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
100372b676d7Smrg	    /^LIBC/{
100472b676d7Smrg		s: ::g
100572b676d7Smrg		p
100672b676d7Smrg	    }'`"
100772b676d7Smrg	test x"${LIBC}" != x && {
100872b676d7Smrg		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
100972b676d7Smrg		exit
101072b676d7Smrg	}
101172b676d7Smrg	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
101272b676d7Smrg	;;
101372b676d7Smrg    i*86:DYNIX/ptx:4*:*)
101472b676d7Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
101572b676d7Smrg	# earlier versions are messed up and put the nodename in both
101672b676d7Smrg	# sysname and nodename.
101772b676d7Smrg	echo i386-sequent-sysv4
101872b676d7Smrg	exit ;;
101972b676d7Smrg    i*86:UNIX_SV:4.2MP:2.*)
102072b676d7Smrg        # Unixware is an offshoot of SVR4, but it has its own version
102172b676d7Smrg        # number series starting with 2...
102272b676d7Smrg        # I am not positive that other SVR4 systems won't match this,
102372b676d7Smrg	# I just have to hope.  -- rms.
102472b676d7Smrg        # Use sysv4.2uw... so that sysv4* matches it.
102572b676d7Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
102672b676d7Smrg	exit ;;
102772b676d7Smrg    i*86:OS/2:*:*)
102872b676d7Smrg	# If we were able to find `uname', then EMX Unix compatibility
102972b676d7Smrg	# is probably installed.
103072b676d7Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
103172b676d7Smrg	exit ;;
103272b676d7Smrg    i*86:XTS-300:*:STOP)
103372b676d7Smrg	echo ${UNAME_MACHINE}-unknown-stop
103472b676d7Smrg	exit ;;
103572b676d7Smrg    i*86:atheos:*:*)
103672b676d7Smrg	echo ${UNAME_MACHINE}-unknown-atheos
103772b676d7Smrg	exit ;;
103872b676d7Smrg    i*86:syllable:*:*)
103972b676d7Smrg	echo ${UNAME_MACHINE}-pc-syllable
104072b676d7Smrg	exit ;;
104172b676d7Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
104272b676d7Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
104372b676d7Smrg	exit ;;
104472b676d7Smrg    i*86:*DOS:*:*)
104572b676d7Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
104672b676d7Smrg	exit ;;
104772b676d7Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
104872b676d7Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
104972b676d7Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
105072b676d7Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
105172b676d7Smrg	else
105272b676d7Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
105372b676d7Smrg	fi
105472b676d7Smrg	exit ;;
105572b676d7Smrg    i*86:*:5:[678]*)
105672b676d7Smrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
105772b676d7Smrg	case `/bin/uname -X | grep "^Machine"` in
105872b676d7Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
105972b676d7Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
106072b676d7Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
106172b676d7Smrg	esac
106272b676d7Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
106372b676d7Smrg	exit ;;
106472b676d7Smrg    i*86:*:3.2:*)
106572b676d7Smrg	if test -f /usr/options/cb.name; then
106672b676d7Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
106772b676d7Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
106872b676d7Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
106972b676d7Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
107072b676d7Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
107172b676d7Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
107272b676d7Smrg			&& UNAME_MACHINE=i586
107372b676d7Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
107472b676d7Smrg			&& UNAME_MACHINE=i686
107572b676d7Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
107672b676d7Smrg			&& UNAME_MACHINE=i686
107772b676d7Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
107872b676d7Smrg	else
107972b676d7Smrg		echo ${UNAME_MACHINE}-pc-sysv32
108072b676d7Smrg	fi
108172b676d7Smrg	exit ;;
108272b676d7Smrg    pc:*:*:*)
108372b676d7Smrg	# Left here for compatibility:
108472b676d7Smrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
108572b676d7Smrg        # the processor, so we play safe by assuming i386.
108672b676d7Smrg	echo i386-pc-msdosdjgpp
108772b676d7Smrg        exit ;;
108872b676d7Smrg    Intel:Mach:3*:*)
108972b676d7Smrg	echo i386-pc-mach3
109072b676d7Smrg	exit ;;
109172b676d7Smrg    paragon:*:*:*)
109272b676d7Smrg	echo i860-intel-osf1
109372b676d7Smrg	exit ;;
109472b676d7Smrg    i860:*:4.*:*) # i860-SVR4
109572b676d7Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
109672b676d7Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
109772b676d7Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
109872b676d7Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
109972b676d7Smrg	fi
110072b676d7Smrg	exit ;;
110172b676d7Smrg    mini*:CTIX:SYS*5:*)
110272b676d7Smrg	# "miniframe"
110372b676d7Smrg	echo m68010-convergent-sysv
110472b676d7Smrg	exit ;;
110572b676d7Smrg    mc68k:UNIX:SYSTEM5:3.51m)
110672b676d7Smrg	echo m68k-convergent-sysv
110772b676d7Smrg	exit ;;
110872b676d7Smrg    M680?0:D-NIX:5.3:*)
110972b676d7Smrg	echo m68k-diab-dnix
111072b676d7Smrg	exit ;;
111172b676d7Smrg    M68*:*:R3V[5678]*:*)
111272b676d7Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
111372b676d7Smrg    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)
111472b676d7Smrg	OS_REL=''
111572b676d7Smrg	test -r /etc/.relid \
111672b676d7Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
111772b676d7Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
111872b676d7Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
111972b676d7Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
112072b676d7Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
112172b676d7Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
112272b676d7Smrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
112372b676d7Smrg          && { echo i486-ncr-sysv4; exit; } ;;
112472b676d7Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
112572b676d7Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
112672b676d7Smrg	exit ;;
112772b676d7Smrg    mc68030:UNIX_System_V:4.*:*)
112872b676d7Smrg	echo m68k-atari-sysv4
112972b676d7Smrg	exit ;;
113072b676d7Smrg    TSUNAMI:LynxOS:2.*:*)
113172b676d7Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
113272b676d7Smrg	exit ;;
113372b676d7Smrg    rs6000:LynxOS:2.*:*)
113472b676d7Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
113572b676d7Smrg	exit ;;
113672b676d7Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
113772b676d7Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
113872b676d7Smrg	exit ;;
113972b676d7Smrg    SM[BE]S:UNIX_SV:*:*)
114072b676d7Smrg	echo mips-dde-sysv${UNAME_RELEASE}
114172b676d7Smrg	exit ;;
114272b676d7Smrg    RM*:ReliantUNIX-*:*:*)
114372b676d7Smrg	echo mips-sni-sysv4
114472b676d7Smrg	exit ;;
114572b676d7Smrg    RM*:SINIX-*:*:*)
114672b676d7Smrg	echo mips-sni-sysv4
114772b676d7Smrg	exit ;;
114872b676d7Smrg    *:SINIX-*:*:*)
114972b676d7Smrg	if uname -p 2>/dev/null >/dev/null ; then
115072b676d7Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
115172b676d7Smrg		echo ${UNAME_MACHINE}-sni-sysv4
115272b676d7Smrg	else
115372b676d7Smrg		echo ns32k-sni-sysv
115472b676d7Smrg	fi
115572b676d7Smrg	exit ;;
115672b676d7Smrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
115772b676d7Smrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
115872b676d7Smrg        echo i586-unisys-sysv4
115972b676d7Smrg        exit ;;
116072b676d7Smrg    *:UNIX_System_V:4*:FTX*)
116172b676d7Smrg	# From Gerald Hewes <hewes@openmarket.com>.
116272b676d7Smrg	# How about differentiating between stratus architectures? -djm
116372b676d7Smrg	echo hppa1.1-stratus-sysv4
116472b676d7Smrg	exit ;;
116572b676d7Smrg    *:*:*:FTX*)
116672b676d7Smrg	# From seanf@swdc.stratus.com.
116772b676d7Smrg	echo i860-stratus-sysv4
116872b676d7Smrg	exit ;;
116972b676d7Smrg    i*86:VOS:*:*)
117072b676d7Smrg	# From Paul.Green@stratus.com.
117172b676d7Smrg	echo ${UNAME_MACHINE}-stratus-vos
117272b676d7Smrg	exit ;;
117372b676d7Smrg    *:VOS:*:*)
117472b676d7Smrg	# From Paul.Green@stratus.com.
117572b676d7Smrg	echo hppa1.1-stratus-vos
117672b676d7Smrg	exit ;;
117772b676d7Smrg    mc68*:A/UX:*:*)
117872b676d7Smrg	echo m68k-apple-aux${UNAME_RELEASE}
117972b676d7Smrg	exit ;;
118072b676d7Smrg    news*:NEWS-OS:6*:*)
118172b676d7Smrg	echo mips-sony-newsos6
118272b676d7Smrg	exit ;;
118372b676d7Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
118472b676d7Smrg	if [ -d /usr/nec ]; then
118572b676d7Smrg	        echo mips-nec-sysv${UNAME_RELEASE}
118672b676d7Smrg	else
118772b676d7Smrg	        echo mips-unknown-sysv${UNAME_RELEASE}
118872b676d7Smrg	fi
118972b676d7Smrg        exit ;;
119072b676d7Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
119172b676d7Smrg	echo powerpc-be-beos
119272b676d7Smrg	exit ;;
119372b676d7Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
119472b676d7Smrg	echo powerpc-apple-beos
119572b676d7Smrg	exit ;;
119672b676d7Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
119772b676d7Smrg	echo i586-pc-beos
119872b676d7Smrg	exit ;;
119972b676d7Smrg    SX-4:SUPER-UX:*:*)
120072b676d7Smrg	echo sx4-nec-superux${UNAME_RELEASE}
120172b676d7Smrg	exit ;;
120272b676d7Smrg    SX-5:SUPER-UX:*:*)
120372b676d7Smrg	echo sx5-nec-superux${UNAME_RELEASE}
120472b676d7Smrg	exit ;;
120572b676d7Smrg    SX-6:SUPER-UX:*:*)
120672b676d7Smrg	echo sx6-nec-superux${UNAME_RELEASE}
120772b676d7Smrg	exit ;;
120872b676d7Smrg    Power*:Rhapsody:*:*)
120972b676d7Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
121072b676d7Smrg	exit ;;
121172b676d7Smrg    *:Rhapsody:*:*)
121272b676d7Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
121372b676d7Smrg	exit ;;
121472b676d7Smrg    *:Darwin:*:*)
121572b676d7Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
121672b676d7Smrg	case $UNAME_PROCESSOR in
121772b676d7Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
121872b676d7Smrg	esac
121972b676d7Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
122072b676d7Smrg	exit ;;
122172b676d7Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
122272b676d7Smrg	UNAME_PROCESSOR=`uname -p`
122372b676d7Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
122472b676d7Smrg		UNAME_PROCESSOR=i386
122572b676d7Smrg		UNAME_MACHINE=pc
122672b676d7Smrg	fi
122772b676d7Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
122872b676d7Smrg	exit ;;
122972b676d7Smrg    *:QNX:*:4*)
123072b676d7Smrg	echo i386-pc-qnx
123172b676d7Smrg	exit ;;
123272b676d7Smrg    NSE-?:NONSTOP_KERNEL:*:*)
123372b676d7Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
123472b676d7Smrg	exit ;;
123572b676d7Smrg    NSR-?:NONSTOP_KERNEL:*:*)
123672b676d7Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
123772b676d7Smrg	exit ;;
123872b676d7Smrg    *:NonStop-UX:*:*)
123972b676d7Smrg	echo mips-compaq-nonstopux
124072b676d7Smrg	exit ;;
124172b676d7Smrg    BS2000:POSIX*:*:*)
124272b676d7Smrg	echo bs2000-siemens-sysv
124372b676d7Smrg	exit ;;
124472b676d7Smrg    DS/*:UNIX_System_V:*:*)
124572b676d7Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
124672b676d7Smrg	exit ;;
124772b676d7Smrg    *:Plan9:*:*)
124872b676d7Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
124972b676d7Smrg	# is converted to i386 for consistency with other x86
125072b676d7Smrg	# operating systems.
125172b676d7Smrg	if test "$cputype" = "386"; then
125272b676d7Smrg	    UNAME_MACHINE=i386
125372b676d7Smrg	else
125472b676d7Smrg	    UNAME_MACHINE="$cputype"
125572b676d7Smrg	fi
125672b676d7Smrg	echo ${UNAME_MACHINE}-unknown-plan9
125772b676d7Smrg	exit ;;
125872b676d7Smrg    *:TOPS-10:*:*)
125972b676d7Smrg	echo pdp10-unknown-tops10
126072b676d7Smrg	exit ;;
126172b676d7Smrg    *:TENEX:*:*)
126272b676d7Smrg	echo pdp10-unknown-tenex
126372b676d7Smrg	exit ;;
126472b676d7Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
126572b676d7Smrg	echo pdp10-dec-tops20
126672b676d7Smrg	exit ;;
126772b676d7Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
126872b676d7Smrg	echo pdp10-xkl-tops20
126972b676d7Smrg	exit ;;
127072b676d7Smrg    *:TOPS-20:*:*)
127172b676d7Smrg	echo pdp10-unknown-tops20
127272b676d7Smrg	exit ;;
127372b676d7Smrg    *:ITS:*:*)
127472b676d7Smrg	echo pdp10-unknown-its
127572b676d7Smrg	exit ;;
127672b676d7Smrg    SEI:*:*:SEIUX)
127772b676d7Smrg        echo mips-sei-seiux${UNAME_RELEASE}
127872b676d7Smrg	exit ;;
127972b676d7Smrg    *:DragonFly:*:*)
128072b676d7Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
128172b676d7Smrg	exit ;;
128272b676d7Smrg    *:*VMS:*:*)
128372b676d7Smrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
128472b676d7Smrg	case "${UNAME_MACHINE}" in
128572b676d7Smrg	    A*) echo alpha-dec-vms ; exit ;;
128672b676d7Smrg	    I*) echo ia64-dec-vms ; exit ;;
128772b676d7Smrg	    V*) echo vax-dec-vms ; exit ;;
128872b676d7Smrg	esac ;;
128972b676d7Smrg    *:XENIX:*:SysV)
129072b676d7Smrg	echo i386-pc-xenix
129172b676d7Smrg	exit ;;
129272b676d7Smrg    i*86:skyos:*:*)
129372b676d7Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
129472b676d7Smrg	exit ;;
129572b676d7Smrg    i*86:rdos:*:*)
129672b676d7Smrg	echo ${UNAME_MACHINE}-pc-rdos
129772b676d7Smrg	exit ;;
129872b676d7Smrgesac
129972b676d7Smrg
130072b676d7Smrg#echo '(No uname command or uname output not recognized.)' 1>&2
130172b676d7Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
130272b676d7Smrg
130372b676d7Smrgeval $set_cc_for_build
130472b676d7Smrgcat >$dummy.c <<EOF
130572b676d7Smrg#ifdef _SEQUENT_
130672b676d7Smrg# include <sys/types.h>
130772b676d7Smrg# include <sys/utsname.h>
130872b676d7Smrg#endif
130972b676d7Smrgmain ()
131072b676d7Smrg{
131172b676d7Smrg#if defined (sony)
131272b676d7Smrg#if defined (MIPSEB)
131372b676d7Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
131472b676d7Smrg     I don't know....  */
131572b676d7Smrg  printf ("mips-sony-bsd\n"); exit (0);
131672b676d7Smrg#else
131772b676d7Smrg#include <sys/param.h>
131872b676d7Smrg  printf ("m68k-sony-newsos%s\n",
131972b676d7Smrg#ifdef NEWSOS4
132072b676d7Smrg          "4"
132172b676d7Smrg#else
132272b676d7Smrg	  ""
132372b676d7Smrg#endif
132472b676d7Smrg         ); exit (0);
132572b676d7Smrg#endif
132672b676d7Smrg#endif
132772b676d7Smrg
132872b676d7Smrg#if defined (__arm) && defined (__acorn) && defined (__unix)
132972b676d7Smrg  printf ("arm-acorn-riscix\n"); exit (0);
133072b676d7Smrg#endif
133172b676d7Smrg
133272b676d7Smrg#if defined (hp300) && !defined (hpux)
133372b676d7Smrg  printf ("m68k-hp-bsd\n"); exit (0);
133472b676d7Smrg#endif
133572b676d7Smrg
133672b676d7Smrg#if defined (NeXT)
133772b676d7Smrg#if !defined (__ARCHITECTURE__)
133872b676d7Smrg#define __ARCHITECTURE__ "m68k"
133972b676d7Smrg#endif
134072b676d7Smrg  int version;
134172b676d7Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
134272b676d7Smrg  if (version < 4)
134372b676d7Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
134472b676d7Smrg  else
134572b676d7Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
134672b676d7Smrg  exit (0);
134772b676d7Smrg#endif
134872b676d7Smrg
134972b676d7Smrg#if defined (MULTIMAX) || defined (n16)
135072b676d7Smrg#if defined (UMAXV)
135172b676d7Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
135272b676d7Smrg#else
135372b676d7Smrg#if defined (CMU)
135472b676d7Smrg  printf ("ns32k-encore-mach\n"); exit (0);
135572b676d7Smrg#else
135672b676d7Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
135772b676d7Smrg#endif
135872b676d7Smrg#endif
135972b676d7Smrg#endif
136072b676d7Smrg
136172b676d7Smrg#if defined (__386BSD__)
136272b676d7Smrg  printf ("i386-pc-bsd\n"); exit (0);
136372b676d7Smrg#endif
136472b676d7Smrg
136572b676d7Smrg#if defined (sequent)
136672b676d7Smrg#if defined (i386)
136772b676d7Smrg  printf ("i386-sequent-dynix\n"); exit (0);
136872b676d7Smrg#endif
136972b676d7Smrg#if defined (ns32000)
137072b676d7Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
137172b676d7Smrg#endif
137272b676d7Smrg#endif
137372b676d7Smrg
137472b676d7Smrg#if defined (_SEQUENT_)
137572b676d7Smrg    struct utsname un;
137672b676d7Smrg
137772b676d7Smrg    uname(&un);
137872b676d7Smrg
137972b676d7Smrg    if (strncmp(un.version, "V2", 2) == 0) {
138072b676d7Smrg	printf ("i386-sequent-ptx2\n"); exit (0);
138172b676d7Smrg    }
138272b676d7Smrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
138372b676d7Smrg	printf ("i386-sequent-ptx1\n"); exit (0);
138472b676d7Smrg    }
138572b676d7Smrg    printf ("i386-sequent-ptx\n"); exit (0);
138672b676d7Smrg
138772b676d7Smrg#endif
138872b676d7Smrg
138972b676d7Smrg#if defined (vax)
139072b676d7Smrg# if !defined (ultrix)
139172b676d7Smrg#  include <sys/param.h>
139272b676d7Smrg#  if defined (BSD)
139372b676d7Smrg#   if BSD == 43
139472b676d7Smrg      printf ("vax-dec-bsd4.3\n"); exit (0);
139572b676d7Smrg#   else
139672b676d7Smrg#    if BSD == 199006
139772b676d7Smrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
139872b676d7Smrg#    else
139972b676d7Smrg      printf ("vax-dec-bsd\n"); exit (0);
140072b676d7Smrg#    endif
140172b676d7Smrg#   endif
140272b676d7Smrg#  else
140372b676d7Smrg    printf ("vax-dec-bsd\n"); exit (0);
140472b676d7Smrg#  endif
140572b676d7Smrg# else
140672b676d7Smrg    printf ("vax-dec-ultrix\n"); exit (0);
140772b676d7Smrg# endif
140872b676d7Smrg#endif
140972b676d7Smrg
141072b676d7Smrg#if defined (alliant) && defined (i860)
141172b676d7Smrg  printf ("i860-alliant-bsd\n"); exit (0);
141272b676d7Smrg#endif
141372b676d7Smrg
141472b676d7Smrg  exit (1);
141572b676d7Smrg}
141672b676d7SmrgEOF
141772b676d7Smrg
141872b676d7Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
141972b676d7Smrg	{ echo "$SYSTEM_NAME"; exit; }
142072b676d7Smrg
142172b676d7Smrg# Apollos put the system type in the environment.
142272b676d7Smrg
142372b676d7Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
142472b676d7Smrg
142572b676d7Smrg# Convex versions that predate uname can use getsysinfo(1)
142672b676d7Smrg
142772b676d7Smrgif [ -x /usr/convex/getsysinfo ]
142872b676d7Smrgthen
142972b676d7Smrg    case `getsysinfo -f cpu_type` in
143072b676d7Smrg    c1*)
143172b676d7Smrg	echo c1-convex-bsd
143272b676d7Smrg	exit ;;
143372b676d7Smrg    c2*)
143472b676d7Smrg	if getsysinfo -f scalar_acc
143572b676d7Smrg	then echo c32-convex-bsd
143672b676d7Smrg	else echo c2-convex-bsd
143772b676d7Smrg	fi
143872b676d7Smrg	exit ;;
143972b676d7Smrg    c34*)
144072b676d7Smrg	echo c34-convex-bsd
144172b676d7Smrg	exit ;;
144272b676d7Smrg    c38*)
144372b676d7Smrg	echo c38-convex-bsd
144472b676d7Smrg	exit ;;
144572b676d7Smrg    c4*)
144672b676d7Smrg	echo c4-convex-bsd
144772b676d7Smrg	exit ;;
144872b676d7Smrg    esac
144972b676d7Smrgfi
145072b676d7Smrg
145172b676d7Smrgcat >&2 <<EOF
145272b676d7Smrg$0: unable to guess system type
145372b676d7Smrg
145472b676d7SmrgThis script, last modified $timestamp, has failed to recognize
145572b676d7Smrgthe operating system you are using. It is advised that you
145672b676d7Smrgdownload the most up to date version of the config scripts from
145772b676d7Smrg
145872b676d7Smrg  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
145972b676d7Smrgand
146072b676d7Smrg  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
146172b676d7Smrg
146272b676d7SmrgIf the version you run ($0) is already up to date, please
146372b676d7Smrgsend the following data and any information you think might be
146472b676d7Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
146572b676d7Smrginformation to handle your system.
146672b676d7Smrg
146772b676d7Smrgconfig.guess timestamp = $timestamp
146872b676d7Smrg
146972b676d7Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
147072b676d7Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
147172b676d7Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
147272b676d7Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
147372b676d7Smrg
147472b676d7Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
147572b676d7Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
147672b676d7Smrg
147772b676d7Smrghostinfo               = `(hostinfo) 2>/dev/null`
147872b676d7Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
147972b676d7Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
148072b676d7Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
148172b676d7Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
148272b676d7Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
148372b676d7Smrg
148472b676d7SmrgUNAME_MACHINE = ${UNAME_MACHINE}
148572b676d7SmrgUNAME_RELEASE = ${UNAME_RELEASE}
148672b676d7SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
148772b676d7SmrgUNAME_VERSION = ${UNAME_VERSION}
148872b676d7SmrgEOF
148972b676d7Smrg
149072b676d7Smrgexit 1
149172b676d7Smrg
149272b676d7Smrg# Local variables:
149372b676d7Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
149472b676d7Smrg# time-stamp-start: "timestamp='"
149572b676d7Smrg# time-stamp-format: "%:y-%02m-%02d"
149672b676d7Smrg# time-stamp-end: "'"
149772b676d7Smrg# End:
1498