config.guess revision e4c0bf4d
10eb10989Smrg#! /bin/sh
20eb10989Smrg# Attempt to guess a canonical system name.
30eb10989Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4e4c0bf4dSmrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
563165362Smrg#   Free Software Foundation, Inc.
60eb10989Smrg
7e4c0bf4dSmrgtimestamp='2009-11-20'
80eb10989Smrg
90eb10989Smrg# This file is free software; you can redistribute it and/or modify it
100eb10989Smrg# under the terms of the GNU General Public License as published by
110eb10989Smrg# the Free Software Foundation; either version 2 of the License, or
120eb10989Smrg# (at your option) any later version.
130eb10989Smrg#
140eb10989Smrg# This program is distributed in the hope that it will be useful, but
150eb10989Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
160eb10989Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
170eb10989Smrg# General Public License for more details.
180eb10989Smrg#
190eb10989Smrg# You should have received a copy of the GNU General Public License
200eb10989Smrg# along with this program; if not, write to the Free Software
2163165362Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2263165362Smrg# 02110-1301, USA.
230eb10989Smrg#
240eb10989Smrg# As a special exception to the GNU General Public License, if you
250eb10989Smrg# distribute this file as part of a program that contains a
260eb10989Smrg# configuration script generated by Autoconf, you may include it under
270eb10989Smrg# the same distribution terms that you use for the rest of that program.
280eb10989Smrg
2963165362Smrg
30e4c0bf4dSmrg# Originally written by Per Bothner.  Please send patches (context
31e4c0bf4dSmrg# diff format) to <config-patches@gnu.org> and include a ChangeLog
32e4c0bf4dSmrg# entry.
330eb10989Smrg#
340eb10989Smrg# This script attempts to guess a canonical system name similar to
350eb10989Smrg# config.sub.  If it succeeds, it prints the system name on stdout, and
360eb10989Smrg# exits with 0.  Otherwise, it exits with 1.
370eb10989Smrg#
38e4c0bf4dSmrg# You can get the latest version of this script from:
39e4c0bf4dSmrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
400eb10989Smrg
410eb10989Smrgme=`echo "$0" | sed -e 's,.*/,,'`
420eb10989Smrg
430eb10989Smrgusage="\
440eb10989SmrgUsage: $0 [OPTION]
450eb10989Smrg
460eb10989SmrgOutput the configuration name of the system \`$me' is run on.
470eb10989Smrg
480eb10989SmrgOperation modes:
490eb10989Smrg  -h, --help         print this help, then exit
500eb10989Smrg  -t, --time-stamp   print date of last modification, then exit
510eb10989Smrg  -v, --version      print version number, then exit
520eb10989Smrg
530eb10989SmrgReport bugs and patches to <config-patches@gnu.org>."
540eb10989Smrg
550eb10989Smrgversion="\
560eb10989SmrgGNU config.guess ($timestamp)
570eb10989Smrg
580eb10989SmrgOriginally written by Per Bothner.
5963165362SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
6063165362Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
610eb10989Smrg
620eb10989SmrgThis is free software; see the source for copying conditions.  There is NO
630eb10989Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
640eb10989Smrg
650eb10989Smrghelp="
660eb10989SmrgTry \`$me --help' for more information."
670eb10989Smrg
680eb10989Smrg# Parse command line
690eb10989Smrgwhile test $# -gt 0 ; do
700eb10989Smrg  case $1 in
710eb10989Smrg    --time-stamp | --time* | -t )
7263165362Smrg       echo "$timestamp" ; exit ;;
730eb10989Smrg    --version | -v )
7463165362Smrg       echo "$version" ; exit ;;
750eb10989Smrg    --help | --h* | -h )
7663165362Smrg       echo "$usage"; exit ;;
770eb10989Smrg    -- )     # Stop option processing
780eb10989Smrg       shift; break ;;
790eb10989Smrg    - )	# Use stdin as input.
800eb10989Smrg       break ;;
810eb10989Smrg    -* )
820eb10989Smrg       echo "$me: invalid option $1$help" >&2
830eb10989Smrg       exit 1 ;;
840eb10989Smrg    * )
850eb10989Smrg       break ;;
860eb10989Smrg  esac
870eb10989Smrgdone
880eb10989Smrg
890eb10989Smrgif test $# != 0; then
900eb10989Smrg  echo "$me: too many arguments$help" >&2
910eb10989Smrg  exit 1
920eb10989Smrgfi
930eb10989Smrg
940eb10989Smrgtrap 'exit 1' 1 2 15
950eb10989Smrg
960eb10989Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
970eb10989Smrg# compiler to aid in system detection is discouraged as it requires
980eb10989Smrg# temporary files to be created and, as you can see below, it is a
990eb10989Smrg# headache to deal with in a portable fashion.
1000eb10989Smrg
1010eb10989Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
1020eb10989Smrg# use `HOST_CC' if defined, but it is deprecated.
1030eb10989Smrg
1040eb10989Smrg# Portable tmp directory creation inspired by the Autoconf team.
1050eb10989Smrg
1060eb10989Smrgset_cc_for_build='
1070eb10989Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
1080eb10989Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
1090eb10989Smrg: ${TMPDIR=/tmp} ;
11063165362Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
1110eb10989Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
1120eb10989Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
1130eb10989Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
1140eb10989Smrgdummy=$tmp/dummy ;
1150eb10989Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
1160eb10989Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
1170eb10989Smrg ,,)    echo "int x;" > $dummy.c ;
1180eb10989Smrg	for c in cc gcc c89 c99 ; do
1190eb10989Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
1200eb10989Smrg	     CC_FOR_BUILD="$c"; break ;
1210eb10989Smrg	  fi ;
1220eb10989Smrg	done ;
1230eb10989Smrg	if test x"$CC_FOR_BUILD" = x ; then
1240eb10989Smrg	  CC_FOR_BUILD=no_compiler_found ;
1250eb10989Smrg	fi
1260eb10989Smrg	;;
1270eb10989Smrg ,,*)   CC_FOR_BUILD=$CC ;;
1280eb10989Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
12963165362Smrgesac ; set_cc_for_build= ;'
1300eb10989Smrg
1310eb10989Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
1320eb10989Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
1330eb10989Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
1340eb10989Smrg	PATH=$PATH:/.attbin ; export PATH
1350eb10989Smrgfi
1360eb10989Smrg
1370eb10989SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
1380eb10989SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
1390eb10989SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
1400eb10989SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
1410eb10989Smrg
1420eb10989Smrg# Note: order is significant - the case branches are not exclusive.
1430eb10989Smrg
1440eb10989Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
1450eb10989Smrg    *:NetBSD:*:*)
1460eb10989Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
1470eb10989Smrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
1480eb10989Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
1490eb10989Smrg	# switched to ELF, *-*-netbsd* would select the old
1500eb10989Smrg	# object file format.  This provides both forward
1510eb10989Smrg	# compatibility and a consistent mechanism for selecting the
1520eb10989Smrg	# object file format.
1530eb10989Smrg	#
1540eb10989Smrg	# Note: NetBSD doesn't particularly care about the vendor
1550eb10989Smrg	# portion of the name.  We always set it to "unknown".
1560eb10989Smrg	sysctl="sysctl -n hw.machine_arch"
1570eb10989Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
1580eb10989Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
1590eb10989Smrg	case "${UNAME_MACHINE_ARCH}" in
1600eb10989Smrg	    armeb) machine=armeb-unknown ;;
1610eb10989Smrg	    arm*) machine=arm-unknown ;;
1620eb10989Smrg	    sh3el) machine=shl-unknown ;;
1630eb10989Smrg	    sh3eb) machine=sh-unknown ;;
1640eb10989Smrg	    sh5el) machine=sh5le-unknown ;;
1650eb10989Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
1660eb10989Smrg	esac
1670eb10989Smrg	# The Operating System including object format, if it has switched
1680eb10989Smrg	# to ELF recently, or will in the future.
1690eb10989Smrg	case "${UNAME_MACHINE_ARCH}" in
1700eb10989Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
1710eb10989Smrg		eval $set_cc_for_build
1720eb10989Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173e4c0bf4dSmrg			| grep -q __ELF__
1740eb10989Smrg		then
1750eb10989Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
1760eb10989Smrg		    # Return netbsd for either.  FIX?
1770eb10989Smrg		    os=netbsd
1780eb10989Smrg		else
1790eb10989Smrg		    os=netbsdelf
1800eb10989Smrg		fi
1810eb10989Smrg		;;
1820eb10989Smrg	    *)
1830eb10989Smrg	        os=netbsd
1840eb10989Smrg		;;
1850eb10989Smrg	esac
1860eb10989Smrg	# The OS release
1870eb10989Smrg	# Debian GNU/NetBSD machines have a different userland, and
1880eb10989Smrg	# thus, need a distinct triplet. However, they do not need
1890eb10989Smrg	# kernel version information, so it can be replaced with a
1900eb10989Smrg	# suitable tag, in the style of linux-gnu.
1910eb10989Smrg	case "${UNAME_VERSION}" in
1920eb10989Smrg	    Debian*)
1930eb10989Smrg		release='-gnu'
1940eb10989Smrg		;;
1950eb10989Smrg	    *)
1960eb10989Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1970eb10989Smrg		;;
1980eb10989Smrg	esac
1990eb10989Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
2000eb10989Smrg	# contains redundant information, the shorter form:
2010eb10989Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
2020eb10989Smrg	echo "${machine}-${os}${release}"
20363165362Smrg	exit ;;
2040eb10989Smrg    *:OpenBSD:*:*)
20563165362Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
20663165362Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
20763165362Smrg	exit ;;
2080eb10989Smrg    *:ekkoBSD:*:*)
2090eb10989Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
21063165362Smrg	exit ;;
21163165362Smrg    *:SolidBSD:*:*)
21263165362Smrg	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
21363165362Smrg	exit ;;
2140eb10989Smrg    macppc:MirBSD:*:*)
21563165362Smrg	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
21663165362Smrg	exit ;;
2170eb10989Smrg    *:MirBSD:*:*)
2180eb10989Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
21963165362Smrg	exit ;;
2200eb10989Smrg    alpha:OSF1:*:*)
2210eb10989Smrg	case $UNAME_RELEASE in
2220eb10989Smrg	*4.0)
2230eb10989Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
2240eb10989Smrg		;;
2250eb10989Smrg	*5.*)
2260eb10989Smrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
2270eb10989Smrg		;;
2280eb10989Smrg	esac
2290eb10989Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
2300eb10989Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
2310eb10989Smrg	# covers most systems running today.  This code pipes the CPU
2320eb10989Smrg	# types through head -n 1, so we only detect the type of CPU 0.
2330eb10989Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
2340eb10989Smrg	case "$ALPHA_CPU_TYPE" in
2350eb10989Smrg	    "EV4 (21064)")
2360eb10989Smrg		UNAME_MACHINE="alpha" ;;
2370eb10989Smrg	    "EV4.5 (21064)")
2380eb10989Smrg		UNAME_MACHINE="alpha" ;;
2390eb10989Smrg	    "LCA4 (21066/21068)")
2400eb10989Smrg		UNAME_MACHINE="alpha" ;;
2410eb10989Smrg	    "EV5 (21164)")
2420eb10989Smrg		UNAME_MACHINE="alphaev5" ;;
2430eb10989Smrg	    "EV5.6 (21164A)")
2440eb10989Smrg		UNAME_MACHINE="alphaev56" ;;
2450eb10989Smrg	    "EV5.6 (21164PC)")
2460eb10989Smrg		UNAME_MACHINE="alphapca56" ;;
2470eb10989Smrg	    "EV5.7 (21164PC)")
2480eb10989Smrg		UNAME_MACHINE="alphapca57" ;;
2490eb10989Smrg	    "EV6 (21264)")
2500eb10989Smrg		UNAME_MACHINE="alphaev6" ;;
2510eb10989Smrg	    "EV6.7 (21264A)")
2520eb10989Smrg		UNAME_MACHINE="alphaev67" ;;
2530eb10989Smrg	    "EV6.8CB (21264C)")
2540eb10989Smrg		UNAME_MACHINE="alphaev68" ;;
2550eb10989Smrg	    "EV6.8AL (21264B)")
2560eb10989Smrg		UNAME_MACHINE="alphaev68" ;;
2570eb10989Smrg	    "EV6.8CX (21264D)")
2580eb10989Smrg		UNAME_MACHINE="alphaev68" ;;
2590eb10989Smrg	    "EV6.9A (21264/EV69A)")
2600eb10989Smrg		UNAME_MACHINE="alphaev69" ;;
2610eb10989Smrg	    "EV7 (21364)")
2620eb10989Smrg		UNAME_MACHINE="alphaev7" ;;
2630eb10989Smrg	    "EV7.9 (21364A)")
2640eb10989Smrg		UNAME_MACHINE="alphaev79" ;;
2650eb10989Smrg	esac
2660eb10989Smrg	# A Pn.n version is a patched version.
2670eb10989Smrg	# A Vn.n version is a released version.
2680eb10989Smrg	# A Tn.n version is a released field test version.
2690eb10989Smrg	# A Xn.n version is an unreleased experimental baselevel.
2700eb10989Smrg	# 1.2 uses "1.2" for uname -r.
2710eb10989Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27263165362Smrg	exit ;;
2730eb10989Smrg    Alpha\ *:Windows_NT*:*)
2740eb10989Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
2750eb10989Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
2760eb10989Smrg	# of the specific Alpha model?
2770eb10989Smrg	echo alpha-pc-interix
27863165362Smrg	exit ;;
2790eb10989Smrg    21064:Windows_NT:50:3)
2800eb10989Smrg	echo alpha-dec-winnt3.5
28163165362Smrg	exit ;;
2820eb10989Smrg    Amiga*:UNIX_System_V:4.0:*)
2830eb10989Smrg	echo m68k-unknown-sysv4
28463165362Smrg	exit ;;
2850eb10989Smrg    *:[Aa]miga[Oo][Ss]:*:*)
2860eb10989Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
28763165362Smrg	exit ;;
2880eb10989Smrg    *:[Mm]orph[Oo][Ss]:*:*)
2890eb10989Smrg	echo ${UNAME_MACHINE}-unknown-morphos
29063165362Smrg	exit ;;
2910eb10989Smrg    *:OS/390:*:*)
2920eb10989Smrg	echo i370-ibm-openedition
29363165362Smrg	exit ;;
29463165362Smrg    *:z/VM:*:*)
29563165362Smrg	echo s390-ibm-zvmoe
29663165362Smrg	exit ;;
2970eb10989Smrg    *:OS400:*:*)
2980eb10989Smrg        echo powerpc-ibm-os400
29963165362Smrg	exit ;;
3000eb10989Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
3010eb10989Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
30263165362Smrg	exit ;;
30363165362Smrg    arm:riscos:*:*|arm:RISCOS:*:*)
30463165362Smrg	echo arm-unknown-riscos
30563165362Smrg	exit ;;
3060eb10989Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
3070eb10989Smrg	echo hppa1.1-hitachi-hiuxmpp
30863165362Smrg	exit ;;
3090eb10989Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
3100eb10989Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
3110eb10989Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
3120eb10989Smrg		echo pyramid-pyramid-sysv3
3130eb10989Smrg	else
3140eb10989Smrg		echo pyramid-pyramid-bsd
3150eb10989Smrg	fi
31663165362Smrg	exit ;;
3170eb10989Smrg    NILE*:*:*:dcosx)
3180eb10989Smrg	echo pyramid-pyramid-svr4
31963165362Smrg	exit ;;
3200eb10989Smrg    DRS?6000:unix:4.0:6*)
3210eb10989Smrg	echo sparc-icl-nx6
32263165362Smrg	exit ;;
32363165362Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
3240eb10989Smrg	case `/usr/bin/uname -p` in
32563165362Smrg	    sparc) echo sparc-icl-nx7; exit ;;
3260eb10989Smrg	esac ;;
32763165362Smrg    s390x:SunOS:*:*)
32863165362Smrg	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
32963165362Smrg	exit ;;
3300eb10989Smrg    sun4H:SunOS:5.*:*)
3310eb10989Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33263165362Smrg	exit ;;
3330eb10989Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
3340eb10989Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
33563165362Smrg	exit ;;
336e4c0bf4dSmrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
337e4c0bf4dSmrg	echo i386-pc-auroraux${UNAME_RELEASE}
338e4c0bf4dSmrg	exit ;;
33963165362Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
34063165362Smrg	eval $set_cc_for_build
34163165362Smrg	SUN_ARCH="i386"
34263165362Smrg	# If there is a compiler, see if it is configured for 64-bit objects.
34363165362Smrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
34463165362Smrg	# This test works for both compilers.
34563165362Smrg	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
34663165362Smrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
34763165362Smrg		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
34863165362Smrg		grep IS_64BIT_ARCH >/dev/null
34963165362Smrg	    then
35063165362Smrg		SUN_ARCH="x86_64"
35163165362Smrg	    fi
35263165362Smrg	fi
35363165362Smrg	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
35463165362Smrg	exit ;;
3550eb10989Smrg    sun4*:SunOS:6*:*)
3560eb10989Smrg	# According to config.sub, this is the proper way to canonicalize
3570eb10989Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
3580eb10989Smrg	# it's likely to be more like Solaris than SunOS4.
3590eb10989Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
36063165362Smrg	exit ;;
3610eb10989Smrg    sun4*:SunOS:*:*)
3620eb10989Smrg	case "`/usr/bin/arch -k`" in
3630eb10989Smrg	    Series*|S4*)
3640eb10989Smrg		UNAME_RELEASE=`uname -v`
3650eb10989Smrg		;;
3660eb10989Smrg	esac
3670eb10989Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
3680eb10989Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
36963165362Smrg	exit ;;
3700eb10989Smrg    sun3*:SunOS:*:*)
3710eb10989Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
37263165362Smrg	exit ;;
3730eb10989Smrg    sun*:*:4.2BSD:*)
3740eb10989Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
3750eb10989Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
3760eb10989Smrg	case "`/bin/arch`" in
3770eb10989Smrg	    sun3)
3780eb10989Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
3790eb10989Smrg		;;
3800eb10989Smrg	    sun4)
3810eb10989Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
3820eb10989Smrg		;;
3830eb10989Smrg	esac
38463165362Smrg	exit ;;
3850eb10989Smrg    aushp:SunOS:*:*)
3860eb10989Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
38763165362Smrg	exit ;;
3880eb10989Smrg    # The situation for MiNT is a little confusing.  The machine name
3890eb10989Smrg    # can be virtually everything (everything which is not
3900eb10989Smrg    # "atarist" or "atariste" at least should have a processor
3910eb10989Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
3920eb10989Smrg    # to the lowercase version "mint" (or "freemint").  Finally
3930eb10989Smrg    # the system name "TOS" denotes a system which is actually not
3940eb10989Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
3950eb10989Smrg    # be no problem.
3960eb10989Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
3970eb10989Smrg        echo m68k-atari-mint${UNAME_RELEASE}
39863165362Smrg	exit ;;
3990eb10989Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
4000eb10989Smrg	echo m68k-atari-mint${UNAME_RELEASE}
40163165362Smrg        exit ;;
4020eb10989Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
4030eb10989Smrg        echo m68k-atari-mint${UNAME_RELEASE}
40463165362Smrg	exit ;;
4050eb10989Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
4060eb10989Smrg        echo m68k-milan-mint${UNAME_RELEASE}
40763165362Smrg        exit ;;
4080eb10989Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
4090eb10989Smrg        echo m68k-hades-mint${UNAME_RELEASE}
41063165362Smrg        exit ;;
4110eb10989Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
4120eb10989Smrg        echo m68k-unknown-mint${UNAME_RELEASE}
41363165362Smrg        exit ;;
4140eb10989Smrg    m68k:machten:*:*)
4150eb10989Smrg	echo m68k-apple-machten${UNAME_RELEASE}
41663165362Smrg	exit ;;
4170eb10989Smrg    powerpc:machten:*:*)
4180eb10989Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
41963165362Smrg	exit ;;
4200eb10989Smrg    RISC*:Mach:*:*)
4210eb10989Smrg	echo mips-dec-mach_bsd4.3
42263165362Smrg	exit ;;
4230eb10989Smrg    RISC*:ULTRIX:*:*)
4240eb10989Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
42563165362Smrg	exit ;;
4260eb10989Smrg    VAX*:ULTRIX*:*:*)
4270eb10989Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
42863165362Smrg	exit ;;
4290eb10989Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
4300eb10989Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
43163165362Smrg	exit ;;
4320eb10989Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
4330eb10989Smrg	eval $set_cc_for_build
4340eb10989Smrg	sed 's/^	//' << EOF >$dummy.c
4350eb10989Smrg#ifdef __cplusplus
4360eb10989Smrg#include <stdio.h>  /* for printf() prototype */
4370eb10989Smrg	int main (int argc, char *argv[]) {
4380eb10989Smrg#else
4390eb10989Smrg	int main (argc, argv) int argc; char *argv[]; {
4400eb10989Smrg#endif
4410eb10989Smrg	#if defined (host_mips) && defined (MIPSEB)
4420eb10989Smrg	#if defined (SYSTYPE_SYSV)
4430eb10989Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
4440eb10989Smrg	#endif
4450eb10989Smrg	#if defined (SYSTYPE_SVR4)
4460eb10989Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
4470eb10989Smrg	#endif
4480eb10989Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
4490eb10989Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
4500eb10989Smrg	#endif
4510eb10989Smrg	#endif
4520eb10989Smrg	  exit (-1);
4530eb10989Smrg	}
4540eb10989SmrgEOF
45563165362Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
45663165362Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
45763165362Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
45863165362Smrg	    { echo "$SYSTEM_NAME"; exit; }
4590eb10989Smrg	echo mips-mips-riscos${UNAME_RELEASE}
46063165362Smrg	exit ;;
4610eb10989Smrg    Motorola:PowerMAX_OS:*:*)
4620eb10989Smrg	echo powerpc-motorola-powermax
46363165362Smrg	exit ;;
4640eb10989Smrg    Motorola:*:4.3:PL8-*)
4650eb10989Smrg	echo powerpc-harris-powermax
46663165362Smrg	exit ;;
4670eb10989Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
4680eb10989Smrg	echo powerpc-harris-powermax
46963165362Smrg	exit ;;
4700eb10989Smrg    Night_Hawk:Power_UNIX:*:*)
4710eb10989Smrg	echo powerpc-harris-powerunix
47263165362Smrg	exit ;;
4730eb10989Smrg    m88k:CX/UX:7*:*)
4740eb10989Smrg	echo m88k-harris-cxux7
47563165362Smrg	exit ;;
4760eb10989Smrg    m88k:*:4*:R4*)
4770eb10989Smrg	echo m88k-motorola-sysv4
47863165362Smrg	exit ;;
4790eb10989Smrg    m88k:*:3*:R3*)
4800eb10989Smrg	echo m88k-motorola-sysv3
48163165362Smrg	exit ;;
4820eb10989Smrg    AViiON:dgux:*:*)
4830eb10989Smrg        # DG/UX returns AViiON for all architectures
4840eb10989Smrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
4850eb10989Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
4860eb10989Smrg	then
4870eb10989Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
4880eb10989Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
4890eb10989Smrg	    then
4900eb10989Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
4910eb10989Smrg	    else
4920eb10989Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
4930eb10989Smrg	    fi
4940eb10989Smrg	else
4950eb10989Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
4960eb10989Smrg	fi
49763165362Smrg 	exit ;;
4980eb10989Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
4990eb10989Smrg	echo m88k-dolphin-sysv3
50063165362Smrg	exit ;;
5010eb10989Smrg    M88*:*:R3*:*)
5020eb10989Smrg	# Delta 88k system running SVR3
5030eb10989Smrg	echo m88k-motorola-sysv3
50463165362Smrg	exit ;;
5050eb10989Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
5060eb10989Smrg	echo m88k-tektronix-sysv3
50763165362Smrg	exit ;;
5080eb10989Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
5090eb10989Smrg	echo m68k-tektronix-bsd
51063165362Smrg	exit ;;
5110eb10989Smrg    *:IRIX*:*:*)
5120eb10989Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
51363165362Smrg	exit ;;
5140eb10989Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
51563165362Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
51663165362Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
5170eb10989Smrg    i*86:AIX:*:*)
5180eb10989Smrg	echo i386-ibm-aix
51963165362Smrg	exit ;;
5200eb10989Smrg    ia64:AIX:*:*)
5210eb10989Smrg	if [ -x /usr/bin/oslevel ] ; then
5220eb10989Smrg		IBM_REV=`/usr/bin/oslevel`
5230eb10989Smrg	else
5240eb10989Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
5250eb10989Smrg	fi
5260eb10989Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
52763165362Smrg	exit ;;
5280eb10989Smrg    *:AIX:2:3)
5290eb10989Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
5300eb10989Smrg		eval $set_cc_for_build
5310eb10989Smrg		sed 's/^		//' << EOF >$dummy.c
5320eb10989Smrg		#include <sys/systemcfg.h>
5330eb10989Smrg
5340eb10989Smrg		main()
5350eb10989Smrg			{
5360eb10989Smrg			if (!__power_pc())
5370eb10989Smrg				exit(1);
5380eb10989Smrg			puts("powerpc-ibm-aix3.2.5");
5390eb10989Smrg			exit(0);
5400eb10989Smrg			}
5410eb10989SmrgEOF
54263165362Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
54363165362Smrg		then
54463165362Smrg			echo "$SYSTEM_NAME"
54563165362Smrg		else
54663165362Smrg			echo rs6000-ibm-aix3.2.5
54763165362Smrg		fi
5480eb10989Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
5490eb10989Smrg		echo rs6000-ibm-aix3.2.4
5500eb10989Smrg	else
5510eb10989Smrg		echo rs6000-ibm-aix3.2
5520eb10989Smrg	fi
55363165362Smrg	exit ;;
55463165362Smrg    *:AIX:*:[456])
5550eb10989Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
5560eb10989Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
5570eb10989Smrg		IBM_ARCH=rs6000
5580eb10989Smrg	else
5590eb10989Smrg		IBM_ARCH=powerpc
5600eb10989Smrg	fi
5610eb10989Smrg	if [ -x /usr/bin/oslevel ] ; then
5620eb10989Smrg		IBM_REV=`/usr/bin/oslevel`
5630eb10989Smrg	else
5640eb10989Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
5650eb10989Smrg	fi
5660eb10989Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
56763165362Smrg	exit ;;
5680eb10989Smrg    *:AIX:*:*)
5690eb10989Smrg	echo rs6000-ibm-aix
57063165362Smrg	exit ;;
5710eb10989Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
5720eb10989Smrg	echo romp-ibm-bsd4.4
57363165362Smrg	exit ;;
5740eb10989Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
5750eb10989Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
57663165362Smrg	exit ;;                             # report: romp-ibm BSD 4.3
5770eb10989Smrg    *:BOSX:*:*)
5780eb10989Smrg	echo rs6000-bull-bosx
57963165362Smrg	exit ;;
5800eb10989Smrg    DPX/2?00:B.O.S.:*:*)
5810eb10989Smrg	echo m68k-bull-sysv3
58263165362Smrg	exit ;;
5830eb10989Smrg    9000/[34]??:4.3bsd:1.*:*)
5840eb10989Smrg	echo m68k-hp-bsd
58563165362Smrg	exit ;;
5860eb10989Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
5870eb10989Smrg	echo m68k-hp-bsd4.4
58863165362Smrg	exit ;;
5890eb10989Smrg    9000/[34678]??:HP-UX:*:*)
5900eb10989Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
5910eb10989Smrg	case "${UNAME_MACHINE}" in
5920eb10989Smrg	    9000/31? )            HP_ARCH=m68000 ;;
5930eb10989Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
5940eb10989Smrg	    9000/[678][0-9][0-9])
5950eb10989Smrg		if [ -x /usr/bin/getconf ]; then
5960eb10989Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
5970eb10989Smrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
5980eb10989Smrg                    case "${sc_cpu_version}" in
5990eb10989Smrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
6000eb10989Smrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
6010eb10989Smrg                      532)                      # CPU_PA_RISC2_0
6020eb10989Smrg                        case "${sc_kernel_bits}" in
6030eb10989Smrg                          32) HP_ARCH="hppa2.0n" ;;
6040eb10989Smrg                          64) HP_ARCH="hppa2.0w" ;;
6050eb10989Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
6060eb10989Smrg                        esac ;;
6070eb10989Smrg                    esac
6080eb10989Smrg		fi
6090eb10989Smrg		if [ "${HP_ARCH}" = "" ]; then
6100eb10989Smrg		    eval $set_cc_for_build
6110eb10989Smrg		    sed 's/^              //' << EOF >$dummy.c
6120eb10989Smrg
6130eb10989Smrg              #define _HPUX_SOURCE
6140eb10989Smrg              #include <stdlib.h>
6150eb10989Smrg              #include <unistd.h>
6160eb10989Smrg
6170eb10989Smrg              int main ()
6180eb10989Smrg              {
6190eb10989Smrg              #if defined(_SC_KERNEL_BITS)
6200eb10989Smrg                  long bits = sysconf(_SC_KERNEL_BITS);
6210eb10989Smrg              #endif
6220eb10989Smrg                  long cpu  = sysconf (_SC_CPU_VERSION);
6230eb10989Smrg
6240eb10989Smrg                  switch (cpu)
6250eb10989Smrg              	{
6260eb10989Smrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
6270eb10989Smrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
6280eb10989Smrg              	case CPU_PA_RISC2_0:
6290eb10989Smrg              #if defined(_SC_KERNEL_BITS)
6300eb10989Smrg              	    switch (bits)
6310eb10989Smrg              		{
6320eb10989Smrg              		case 64: puts ("hppa2.0w"); break;
6330eb10989Smrg              		case 32: puts ("hppa2.0n"); break;
6340eb10989Smrg              		default: puts ("hppa2.0"); break;
6350eb10989Smrg              		} break;
6360eb10989Smrg              #else  /* !defined(_SC_KERNEL_BITS) */
6370eb10989Smrg              	    puts ("hppa2.0"); break;
6380eb10989Smrg              #endif
6390eb10989Smrg              	default: puts ("hppa1.0"); break;
6400eb10989Smrg              	}
6410eb10989Smrg                  exit (0);
6420eb10989Smrg              }
6430eb10989SmrgEOF
6440eb10989Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
6450eb10989Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
6460eb10989Smrg		fi ;;
6470eb10989Smrg	esac
6480eb10989Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
6490eb10989Smrg	then
65063165362Smrg	    eval $set_cc_for_build
65163165362Smrg
65263165362Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
65363165362Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
65463165362Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
65563165362Smrg	    #
65663165362Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
65763165362Smrg	    # => hppa2.0w-hp-hpux11.23
65863165362Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
65963165362Smrg	    # => hppa64-hp-hpux11.23
66063165362Smrg
66163165362Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
662e4c0bf4dSmrg		grep -q __LP64__
6630eb10989Smrg	    then
6640eb10989Smrg		HP_ARCH="hppa2.0w"
6650eb10989Smrg	    else
6660eb10989Smrg		HP_ARCH="hppa64"
6670eb10989Smrg	    fi
6680eb10989Smrg	fi
6690eb10989Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
67063165362Smrg	exit ;;
6710eb10989Smrg    ia64:HP-UX:*:*)
6720eb10989Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
6730eb10989Smrg	echo ia64-hp-hpux${HPUX_REV}
67463165362Smrg	exit ;;
6750eb10989Smrg    3050*:HI-UX:*:*)
6760eb10989Smrg	eval $set_cc_for_build
6770eb10989Smrg	sed 's/^	//' << EOF >$dummy.c
6780eb10989Smrg	#include <unistd.h>
6790eb10989Smrg	int
6800eb10989Smrg	main ()
6810eb10989Smrg	{
6820eb10989Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
6830eb10989Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
6840eb10989Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
6850eb10989Smrg	     results, however.  */
6860eb10989Smrg	  if (CPU_IS_PA_RISC (cpu))
6870eb10989Smrg	    {
6880eb10989Smrg	      switch (cpu)
6890eb10989Smrg		{
6900eb10989Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
6910eb10989Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
6920eb10989Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
6930eb10989Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
6940eb10989Smrg		}
6950eb10989Smrg	    }
6960eb10989Smrg	  else if (CPU_IS_HP_MC68K (cpu))
6970eb10989Smrg	    puts ("m68k-hitachi-hiuxwe2");
6980eb10989Smrg	  else puts ("unknown-hitachi-hiuxwe2");
6990eb10989Smrg	  exit (0);
7000eb10989Smrg	}
7010eb10989SmrgEOF
70263165362Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
70363165362Smrg		{ echo "$SYSTEM_NAME"; exit; }
7040eb10989Smrg	echo unknown-hitachi-hiuxwe2
70563165362Smrg	exit ;;
7060eb10989Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
7070eb10989Smrg	echo hppa1.1-hp-bsd
70863165362Smrg	exit ;;
7090eb10989Smrg    9000/8??:4.3bsd:*:*)
7100eb10989Smrg	echo hppa1.0-hp-bsd
71163165362Smrg	exit ;;
7120eb10989Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
7130eb10989Smrg	echo hppa1.0-hp-mpeix
71463165362Smrg	exit ;;
7150eb10989Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
7160eb10989Smrg	echo hppa1.1-hp-osf
71763165362Smrg	exit ;;
7180eb10989Smrg    hp8??:OSF1:*:*)
7190eb10989Smrg	echo hppa1.0-hp-osf
72063165362Smrg	exit ;;
7210eb10989Smrg    i*86:OSF1:*:*)
7220eb10989Smrg	if [ -x /usr/sbin/sysversion ] ; then
7230eb10989Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
7240eb10989Smrg	else
7250eb10989Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
7260eb10989Smrg	fi
72763165362Smrg	exit ;;
7280eb10989Smrg    parisc*:Lites*:*:*)
7290eb10989Smrg	echo hppa1.1-hp-lites
73063165362Smrg	exit ;;
7310eb10989Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
7320eb10989Smrg	echo c1-convex-bsd
73363165362Smrg        exit ;;
7340eb10989Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
7350eb10989Smrg	if getsysinfo -f scalar_acc
7360eb10989Smrg	then echo c32-convex-bsd
7370eb10989Smrg	else echo c2-convex-bsd
7380eb10989Smrg	fi
73963165362Smrg        exit ;;
7400eb10989Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
7410eb10989Smrg	echo c34-convex-bsd
74263165362Smrg        exit ;;
7430eb10989Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
7440eb10989Smrg	echo c38-convex-bsd
74563165362Smrg        exit ;;
7460eb10989Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
7470eb10989Smrg	echo c4-convex-bsd
74863165362Smrg        exit ;;
7490eb10989Smrg    CRAY*Y-MP:*:*:*)
7500eb10989Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
75163165362Smrg	exit ;;
7520eb10989Smrg    CRAY*[A-Z]90:*:*:*)
7530eb10989Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
7540eb10989Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
7550eb10989Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
7560eb10989Smrg	      -e 's/\.[^.]*$/.X/'
75763165362Smrg	exit ;;
7580eb10989Smrg    CRAY*TS:*:*:*)
7590eb10989Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76063165362Smrg	exit ;;
7610eb10989Smrg    CRAY*T3E:*:*:*)
7620eb10989Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76363165362Smrg	exit ;;
7640eb10989Smrg    CRAY*SV1:*:*:*)
7650eb10989Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76663165362Smrg	exit ;;
7670eb10989Smrg    *:UNICOS/mp:*:*)
76863165362Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
76963165362Smrg	exit ;;
7700eb10989Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
7710eb10989Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7720eb10989Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
7730eb10989Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
7740eb10989Smrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
77563165362Smrg        exit ;;
7760eb10989Smrg    5000:UNIX_System_V:4.*:*)
7770eb10989Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
7780eb10989Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
7790eb10989Smrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
78063165362Smrg	exit ;;
7810eb10989Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
7820eb10989Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
78363165362Smrg	exit ;;
7840eb10989Smrg    sparc*:BSD/OS:*:*)
7850eb10989Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
78663165362Smrg	exit ;;
7870eb10989Smrg    *:BSD/OS:*:*)
7880eb10989Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
78963165362Smrg	exit ;;
7900eb10989Smrg    *:FreeBSD:*:*)
79163165362Smrg	case ${UNAME_MACHINE} in
79263165362Smrg	    pc98)
79363165362Smrg		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79463165362Smrg	    amd64)
79563165362Smrg		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79663165362Smrg	    *)
79763165362Smrg		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
79863165362Smrg	esac
79963165362Smrg	exit ;;
8000eb10989Smrg    i*:CYGWIN*:*)
8010eb10989Smrg	echo ${UNAME_MACHINE}-pc-cygwin
80263165362Smrg	exit ;;
80363165362Smrg    *:MINGW*:*)
8040eb10989Smrg	echo ${UNAME_MACHINE}-pc-mingw32
80563165362Smrg	exit ;;
80663165362Smrg    i*:windows32*:*)
80763165362Smrg    	# uname -m includes "-pc" on this system.
80863165362Smrg    	echo ${UNAME_MACHINE}-mingw32
80963165362Smrg	exit ;;
8100eb10989Smrg    i*:PW*:*)
8110eb10989Smrg	echo ${UNAME_MACHINE}-pc-pw32
81263165362Smrg	exit ;;
813e4c0bf4dSmrg    *:Interix*:*)
81463165362Smrg    	case ${UNAME_MACHINE} in
81563165362Smrg	    x86)
81663165362Smrg		echo i586-pc-interix${UNAME_RELEASE}
81763165362Smrg		exit ;;
818e4c0bf4dSmrg	    authenticamd | genuineintel | EM64T)
81963165362Smrg		echo x86_64-unknown-interix${UNAME_RELEASE}
82063165362Smrg		exit ;;
82163165362Smrg	    IA64)
82263165362Smrg		echo ia64-unknown-interix${UNAME_RELEASE}
82363165362Smrg		exit ;;
82463165362Smrg	esac ;;
8250eb10989Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
8260eb10989Smrg	echo i${UNAME_MACHINE}-pc-mks
82763165362Smrg	exit ;;
828e4c0bf4dSmrg    8664:Windows_NT:*)
829e4c0bf4dSmrg	echo x86_64-pc-mks
830e4c0bf4dSmrg	exit ;;
8310eb10989Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
8320eb10989Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
8330eb10989Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
8340eb10989Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
8350eb10989Smrg	echo i586-pc-interix
83663165362Smrg	exit ;;
8370eb10989Smrg    i*:UWIN*:*)
8380eb10989Smrg	echo ${UNAME_MACHINE}-pc-uwin
83963165362Smrg	exit ;;
84063165362Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
84163165362Smrg	echo x86_64-unknown-cygwin
84263165362Smrg	exit ;;
8430eb10989Smrg    p*:CYGWIN*:*)
8440eb10989Smrg	echo powerpcle-unknown-cygwin
84563165362Smrg	exit ;;
8460eb10989Smrg    prep*:SunOS:5.*:*)
8470eb10989Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
84863165362Smrg	exit ;;
8490eb10989Smrg    *:GNU:*:*)
8500eb10989Smrg	# the GNU system
8510eb10989Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
85263165362Smrg	exit ;;
8530eb10989Smrg    *:GNU/*:*:*)
8540eb10989Smrg	# other systems with GNU libc and userland
8550eb10989Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
85663165362Smrg	exit ;;
8570eb10989Smrg    i*86:Minix:*:*)
8580eb10989Smrg	echo ${UNAME_MACHINE}-pc-minix
85963165362Smrg	exit ;;
860e4c0bf4dSmrg    alpha:Linux:*:*)
861e4c0bf4dSmrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
862e4c0bf4dSmrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
863e4c0bf4dSmrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
864e4c0bf4dSmrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
865e4c0bf4dSmrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
866e4c0bf4dSmrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
867e4c0bf4dSmrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
868e4c0bf4dSmrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
869e4c0bf4dSmrg        esac
870e4c0bf4dSmrg	objdump --private-headers /bin/sh | grep -q ld.so.1
871e4c0bf4dSmrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
872e4c0bf4dSmrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
873e4c0bf4dSmrg	exit ;;
8740eb10989Smrg    arm*:Linux:*:*)
87563165362Smrg	eval $set_cc_for_build
87663165362Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
87763165362Smrg	    | grep -q __ARM_EABI__
87863165362Smrg	then
87963165362Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnu
88063165362Smrg	else
88163165362Smrg	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
88263165362Smrg	fi
88363165362Smrg	exit ;;
88463165362Smrg    avr32*:Linux:*:*)
8850eb10989Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
88663165362Smrg	exit ;;
8870eb10989Smrg    cris:Linux:*:*)
8880eb10989Smrg	echo cris-axis-linux-gnu
88963165362Smrg	exit ;;
89063165362Smrg    crisv32:Linux:*:*)
89163165362Smrg	echo crisv32-axis-linux-gnu
89263165362Smrg	exit ;;
89363165362Smrg    frv:Linux:*:*)
89463165362Smrg    	echo frv-unknown-linux-gnu
89563165362Smrg	exit ;;
896e4c0bf4dSmrg    i*86:Linux:*:*)
897e4c0bf4dSmrg	LIBC=gnu
898e4c0bf4dSmrg	eval $set_cc_for_build
899e4c0bf4dSmrg	sed 's/^	//' << EOF >$dummy.c
900e4c0bf4dSmrg	#ifdef __dietlibc__
901e4c0bf4dSmrg	LIBC=dietlibc
902e4c0bf4dSmrg	#endif
903e4c0bf4dSmrgEOF
904e4c0bf4dSmrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
905e4c0bf4dSmrg	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
906e4c0bf4dSmrg	exit ;;
9070eb10989Smrg    ia64:Linux:*:*)
9080eb10989Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
90963165362Smrg	exit ;;
9100eb10989Smrg    m32r*:Linux:*:*)
9110eb10989Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
91263165362Smrg	exit ;;
9130eb10989Smrg    m68*:Linux:*:*)
9140eb10989Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
91563165362Smrg	exit ;;
916e4c0bf4dSmrg    mips:Linux:*:* | mips64:Linux:*:*)
9170eb10989Smrg	eval $set_cc_for_build
9180eb10989Smrg	sed 's/^	//' << EOF >$dummy.c
9190eb10989Smrg	#undef CPU
920e4c0bf4dSmrg	#undef ${UNAME_MACHINE}
921e4c0bf4dSmrg	#undef ${UNAME_MACHINE}el
9220eb10989Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
923e4c0bf4dSmrg	CPU=${UNAME_MACHINE}el
9240eb10989Smrg	#else
9250eb10989Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
926e4c0bf4dSmrg	CPU=${UNAME_MACHINE}
9270eb10989Smrg	#else
9280eb10989Smrg	CPU=
9290eb10989Smrg	#endif
9300eb10989Smrg	#endif
9310eb10989SmrgEOF
932e4c0bf4dSmrg	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
93363165362Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
9340eb10989Smrg	;;
93563165362Smrg    or32:Linux:*:*)
93663165362Smrg	echo or32-unknown-linux-gnu
93763165362Smrg	exit ;;
93863165362Smrg    padre:Linux:*:*)
93963165362Smrg	echo sparc-unknown-linux-gnu
94063165362Smrg	exit ;;
941e4c0bf4dSmrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
942e4c0bf4dSmrg	echo hppa64-unknown-linux-gnu
943e4c0bf4dSmrg	exit ;;
9440eb10989Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
9450eb10989Smrg	# Look for CPU level
9460eb10989Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
9470eb10989Smrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
9480eb10989Smrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
9490eb10989Smrg	  *)    echo hppa-unknown-linux-gnu ;;
9500eb10989Smrg	esac
95163165362Smrg	exit ;;
952e4c0bf4dSmrg    ppc64:Linux:*:*)
953e4c0bf4dSmrg	echo powerpc64-unknown-linux-gnu
954e4c0bf4dSmrg	exit ;;
955e4c0bf4dSmrg    ppc:Linux:*:*)
956e4c0bf4dSmrg	echo powerpc-unknown-linux-gnu
95763165362Smrg	exit ;;
9580eb10989Smrg    s390:Linux:*:* | s390x:Linux:*:*)
9590eb10989Smrg	echo ${UNAME_MACHINE}-ibm-linux
96063165362Smrg	exit ;;
9610eb10989Smrg    sh64*:Linux:*:*)
9620eb10989Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
96363165362Smrg	exit ;;
9640eb10989Smrg    sh*:Linux:*:*)
9650eb10989Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
96663165362Smrg	exit ;;
9670eb10989Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
9680eb10989Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
96963165362Smrg	exit ;;
97063165362Smrg    vax:Linux:*:*)
97163165362Smrg	echo ${UNAME_MACHINE}-dec-linux-gnu
97263165362Smrg	exit ;;
9730eb10989Smrg    x86_64:Linux:*:*)
9740eb10989Smrg	echo x86_64-unknown-linux-gnu
97563165362Smrg	exit ;;
97663165362Smrg    xtensa*:Linux:*:*)
97763165362Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
97863165362Smrg	exit ;;
9790eb10989Smrg    i*86:DYNIX/ptx:4*:*)
9800eb10989Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
9810eb10989Smrg	# earlier versions are messed up and put the nodename in both
9820eb10989Smrg	# sysname and nodename.
9830eb10989Smrg	echo i386-sequent-sysv4
98463165362Smrg	exit ;;
9850eb10989Smrg    i*86:UNIX_SV:4.2MP:2.*)
9860eb10989Smrg        # Unixware is an offshoot of SVR4, but it has its own version
9870eb10989Smrg        # number series starting with 2...
9880eb10989Smrg        # I am not positive that other SVR4 systems won't match this,
9890eb10989Smrg	# I just have to hope.  -- rms.
9900eb10989Smrg        # Use sysv4.2uw... so that sysv4* matches it.
9910eb10989Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
99263165362Smrg	exit ;;
9930eb10989Smrg    i*86:OS/2:*:*)
9940eb10989Smrg	# If we were able to find `uname', then EMX Unix compatibility
9950eb10989Smrg	# is probably installed.
9960eb10989Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
99763165362Smrg	exit ;;
9980eb10989Smrg    i*86:XTS-300:*:STOP)
9990eb10989Smrg	echo ${UNAME_MACHINE}-unknown-stop
100063165362Smrg	exit ;;
10010eb10989Smrg    i*86:atheos:*:*)
10020eb10989Smrg	echo ${UNAME_MACHINE}-unknown-atheos
100363165362Smrg	exit ;;
100463165362Smrg    i*86:syllable:*:*)
10050eb10989Smrg	echo ${UNAME_MACHINE}-pc-syllable
100663165362Smrg	exit ;;
1007e4c0bf4dSmrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
10080eb10989Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
100963165362Smrg	exit ;;
10100eb10989Smrg    i*86:*DOS:*:*)
10110eb10989Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
101263165362Smrg	exit ;;
10130eb10989Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
10140eb10989Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
10150eb10989Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
10160eb10989Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
10170eb10989Smrg	else
10180eb10989Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
10190eb10989Smrg	fi
102063165362Smrg	exit ;;
102163165362Smrg    i*86:*:5:[678]*)
102263165362Smrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
10230eb10989Smrg	case `/bin/uname -X | grep "^Machine"` in
10240eb10989Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
10250eb10989Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
10260eb10989Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10270eb10989Smrg	esac
10280eb10989Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
102963165362Smrg	exit ;;
10300eb10989Smrg    i*86:*:3.2:*)
10310eb10989Smrg	if test -f /usr/options/cb.name; then
10320eb10989Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
10330eb10989Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
10340eb10989Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
10350eb10989Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
10360eb10989Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
10370eb10989Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
10380eb10989Smrg			&& UNAME_MACHINE=i586
10390eb10989Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
10400eb10989Smrg			&& UNAME_MACHINE=i686
10410eb10989Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
10420eb10989Smrg			&& UNAME_MACHINE=i686
10430eb10989Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
10440eb10989Smrg	else
10450eb10989Smrg		echo ${UNAME_MACHINE}-pc-sysv32
10460eb10989Smrg	fi
104763165362Smrg	exit ;;
10480eb10989Smrg    pc:*:*:*)
10490eb10989Smrg	# Left here for compatibility:
10500eb10989Smrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
105163165362Smrg        # the processor, so we play safe by assuming i586.
105263165362Smrg	# Note: whatever this is, it MUST be the same as what config.sub
105363165362Smrg	# prints for the "djgpp" host, or else GDB configury will decide that
105463165362Smrg	# this is a cross-build.
105563165362Smrg	echo i586-pc-msdosdjgpp
105663165362Smrg        exit ;;
10570eb10989Smrg    Intel:Mach:3*:*)
10580eb10989Smrg	echo i386-pc-mach3
105963165362Smrg	exit ;;
10600eb10989Smrg    paragon:*:*:*)
10610eb10989Smrg	echo i860-intel-osf1
106263165362Smrg	exit ;;
10630eb10989Smrg    i860:*:4.*:*) # i860-SVR4
10640eb10989Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
10650eb10989Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
10660eb10989Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
10670eb10989Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
10680eb10989Smrg	fi
106963165362Smrg	exit ;;
10700eb10989Smrg    mini*:CTIX:SYS*5:*)
10710eb10989Smrg	# "miniframe"
10720eb10989Smrg	echo m68010-convergent-sysv
107363165362Smrg	exit ;;
10740eb10989Smrg    mc68k:UNIX:SYSTEM5:3.51m)
10750eb10989Smrg	echo m68k-convergent-sysv
107663165362Smrg	exit ;;
10770eb10989Smrg    M680?0:D-NIX:5.3:*)
10780eb10989Smrg	echo m68k-diab-dnix
107963165362Smrg	exit ;;
10800eb10989Smrg    M68*:*:R3V[5678]*:*)
108163165362Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
108263165362Smrg    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)
10830eb10989Smrg	OS_REL=''
10840eb10989Smrg	test -r /etc/.relid \
10850eb10989Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
10860eb10989Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
108763165362Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
10880eb10989Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
108963165362Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
10900eb10989Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
10910eb10989Smrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
109263165362Smrg          && { echo i486-ncr-sysv4; exit; } ;;
109363165362Smrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
109463165362Smrg	OS_REL='.3'
109563165362Smrg	test -r /etc/.relid \
109663165362Smrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
109763165362Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
109863165362Smrg	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
109963165362Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
110063165362Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
110163165362Smrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
110263165362Smrg	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
11030eb10989Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
11040eb10989Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
110563165362Smrg	exit ;;
11060eb10989Smrg    mc68030:UNIX_System_V:4.*:*)
11070eb10989Smrg	echo m68k-atari-sysv4
110863165362Smrg	exit ;;
11090eb10989Smrg    TSUNAMI:LynxOS:2.*:*)
11100eb10989Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
111163165362Smrg	exit ;;
11120eb10989Smrg    rs6000:LynxOS:2.*:*)
11130eb10989Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
111463165362Smrg	exit ;;
1115e4c0bf4dSmrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
11160eb10989Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
111763165362Smrg	exit ;;
11180eb10989Smrg    SM[BE]S:UNIX_SV:*:*)
11190eb10989Smrg	echo mips-dde-sysv${UNAME_RELEASE}
112063165362Smrg	exit ;;
11210eb10989Smrg    RM*:ReliantUNIX-*:*:*)
11220eb10989Smrg	echo mips-sni-sysv4
112363165362Smrg	exit ;;
11240eb10989Smrg    RM*:SINIX-*:*:*)
11250eb10989Smrg	echo mips-sni-sysv4
112663165362Smrg	exit ;;
11270eb10989Smrg    *:SINIX-*:*:*)
11280eb10989Smrg	if uname -p 2>/dev/null >/dev/null ; then
11290eb10989Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
11300eb10989Smrg		echo ${UNAME_MACHINE}-sni-sysv4
11310eb10989Smrg	else
11320eb10989Smrg		echo ns32k-sni-sysv
11330eb10989Smrg	fi
113463165362Smrg	exit ;;
11350eb10989Smrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
11360eb10989Smrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
11370eb10989Smrg        echo i586-unisys-sysv4
113863165362Smrg        exit ;;
11390eb10989Smrg    *:UNIX_System_V:4*:FTX*)
11400eb10989Smrg	# From Gerald Hewes <hewes@openmarket.com>.
11410eb10989Smrg	# How about differentiating between stratus architectures? -djm
11420eb10989Smrg	echo hppa1.1-stratus-sysv4
114363165362Smrg	exit ;;
11440eb10989Smrg    *:*:*:FTX*)
11450eb10989Smrg	# From seanf@swdc.stratus.com.
11460eb10989Smrg	echo i860-stratus-sysv4
114763165362Smrg	exit ;;
114863165362Smrg    i*86:VOS:*:*)
114963165362Smrg	# From Paul.Green@stratus.com.
115063165362Smrg	echo ${UNAME_MACHINE}-stratus-vos
115163165362Smrg	exit ;;
11520eb10989Smrg    *:VOS:*:*)
11530eb10989Smrg	# From Paul.Green@stratus.com.
11540eb10989Smrg	echo hppa1.1-stratus-vos
115563165362Smrg	exit ;;
11560eb10989Smrg    mc68*:A/UX:*:*)
11570eb10989Smrg	echo m68k-apple-aux${UNAME_RELEASE}
115863165362Smrg	exit ;;
11590eb10989Smrg    news*:NEWS-OS:6*:*)
11600eb10989Smrg	echo mips-sony-newsos6
116163165362Smrg	exit ;;
11620eb10989Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
11630eb10989Smrg	if [ -d /usr/nec ]; then
11640eb10989Smrg	        echo mips-nec-sysv${UNAME_RELEASE}
11650eb10989Smrg	else
11660eb10989Smrg	        echo mips-unknown-sysv${UNAME_RELEASE}
11670eb10989Smrg	fi
116863165362Smrg        exit ;;
11690eb10989Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
11700eb10989Smrg	echo powerpc-be-beos
117163165362Smrg	exit ;;
11720eb10989Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
11730eb10989Smrg	echo powerpc-apple-beos
117463165362Smrg	exit ;;
11750eb10989Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
11760eb10989Smrg	echo i586-pc-beos
117763165362Smrg	exit ;;
117863165362Smrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
117963165362Smrg	echo i586-pc-haiku
118063165362Smrg	exit ;;
11810eb10989Smrg    SX-4:SUPER-UX:*:*)
11820eb10989Smrg	echo sx4-nec-superux${UNAME_RELEASE}
118363165362Smrg	exit ;;
11840eb10989Smrg    SX-5:SUPER-UX:*:*)
11850eb10989Smrg	echo sx5-nec-superux${UNAME_RELEASE}
118663165362Smrg	exit ;;
11870eb10989Smrg    SX-6:SUPER-UX:*:*)
11880eb10989Smrg	echo sx6-nec-superux${UNAME_RELEASE}
118963165362Smrg	exit ;;
119063165362Smrg    SX-7:SUPER-UX:*:*)
119163165362Smrg	echo sx7-nec-superux${UNAME_RELEASE}
119263165362Smrg	exit ;;
119363165362Smrg    SX-8:SUPER-UX:*:*)
119463165362Smrg	echo sx8-nec-superux${UNAME_RELEASE}
119563165362Smrg	exit ;;
119663165362Smrg    SX-8R:SUPER-UX:*:*)
119763165362Smrg	echo sx8r-nec-superux${UNAME_RELEASE}
119863165362Smrg	exit ;;
11990eb10989Smrg    Power*:Rhapsody:*:*)
12000eb10989Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
120163165362Smrg	exit ;;
12020eb10989Smrg    *:Rhapsody:*:*)
12030eb10989Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
120463165362Smrg	exit ;;
12050eb10989Smrg    *:Darwin:*:*)
120663165362Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
120763165362Smrg	case $UNAME_PROCESSOR in
1208e4c0bf4dSmrg	    i386)
1209e4c0bf4dSmrg		eval $set_cc_for_build
1210e4c0bf4dSmrg		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1211e4c0bf4dSmrg		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1212e4c0bf4dSmrg		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1213e4c0bf4dSmrg		      grep IS_64BIT_ARCH >/dev/null
1214e4c0bf4dSmrg		  then
1215e4c0bf4dSmrg		      UNAME_PROCESSOR="x86_64"
1216e4c0bf4dSmrg		  fi
1217e4c0bf4dSmrg		fi ;;
121863165362Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
12190eb10989Smrg	esac
12200eb10989Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
122163165362Smrg	exit ;;
12220eb10989Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
12230eb10989Smrg	UNAME_PROCESSOR=`uname -p`
12240eb10989Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
12250eb10989Smrg		UNAME_PROCESSOR=i386
12260eb10989Smrg		UNAME_MACHINE=pc
12270eb10989Smrg	fi
12280eb10989Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
122963165362Smrg	exit ;;
12300eb10989Smrg    *:QNX:*:4*)
12310eb10989Smrg	echo i386-pc-qnx
123263165362Smrg	exit ;;
123363165362Smrg    NSE-?:NONSTOP_KERNEL:*:*)
123463165362Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
123563165362Smrg	exit ;;
12360eb10989Smrg    NSR-?:NONSTOP_KERNEL:*:*)
12370eb10989Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
123863165362Smrg	exit ;;
12390eb10989Smrg    *:NonStop-UX:*:*)
12400eb10989Smrg	echo mips-compaq-nonstopux
124163165362Smrg	exit ;;
12420eb10989Smrg    BS2000:POSIX*:*:*)
12430eb10989Smrg	echo bs2000-siemens-sysv
124463165362Smrg	exit ;;
12450eb10989Smrg    DS/*:UNIX_System_V:*:*)
12460eb10989Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
124763165362Smrg	exit ;;
12480eb10989Smrg    *:Plan9:*:*)
12490eb10989Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
12500eb10989Smrg	# is converted to i386 for consistency with other x86
12510eb10989Smrg	# operating systems.
12520eb10989Smrg	if test "$cputype" = "386"; then
12530eb10989Smrg	    UNAME_MACHINE=i386
12540eb10989Smrg	else
12550eb10989Smrg	    UNAME_MACHINE="$cputype"
12560eb10989Smrg	fi
12570eb10989Smrg	echo ${UNAME_MACHINE}-unknown-plan9
125863165362Smrg	exit ;;
12590eb10989Smrg    *:TOPS-10:*:*)
12600eb10989Smrg	echo pdp10-unknown-tops10
126163165362Smrg	exit ;;
12620eb10989Smrg    *:TENEX:*:*)
12630eb10989Smrg	echo pdp10-unknown-tenex
126463165362Smrg	exit ;;
12650eb10989Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
12660eb10989Smrg	echo pdp10-dec-tops20
126763165362Smrg	exit ;;
12680eb10989Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
12690eb10989Smrg	echo pdp10-xkl-tops20
127063165362Smrg	exit ;;
12710eb10989Smrg    *:TOPS-20:*:*)
12720eb10989Smrg	echo pdp10-unknown-tops20
127363165362Smrg	exit ;;
12740eb10989Smrg    *:ITS:*:*)
12750eb10989Smrg	echo pdp10-unknown-its
127663165362Smrg	exit ;;
12770eb10989Smrg    SEI:*:*:SEIUX)
12780eb10989Smrg        echo mips-sei-seiux${UNAME_RELEASE}
127963165362Smrg	exit ;;
12800eb10989Smrg    *:DragonFly:*:*)
12810eb10989Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
128263165362Smrg	exit ;;
128363165362Smrg    *:*VMS:*:*)
128463165362Smrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
128563165362Smrg	case "${UNAME_MACHINE}" in
128663165362Smrg	    A*) echo alpha-dec-vms ; exit ;;
128763165362Smrg	    I*) echo ia64-dec-vms ; exit ;;
128863165362Smrg	    V*) echo vax-dec-vms ; exit ;;
128963165362Smrg	esac ;;
129063165362Smrg    *:XENIX:*:SysV)
129163165362Smrg	echo i386-pc-xenix
129263165362Smrg	exit ;;
129363165362Smrg    i*86:skyos:*:*)
129463165362Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
129563165362Smrg	exit ;;
129663165362Smrg    i*86:rdos:*:*)
129763165362Smrg	echo ${UNAME_MACHINE}-pc-rdos
129863165362Smrg	exit ;;
129963165362Smrg    i*86:AROS:*:*)
130063165362Smrg	echo ${UNAME_MACHINE}-pc-aros
130163165362Smrg	exit ;;
13020eb10989Smrgesac
13030eb10989Smrg
13040eb10989Smrg#echo '(No uname command or uname output not recognized.)' 1>&2
13050eb10989Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
13060eb10989Smrg
13070eb10989Smrgeval $set_cc_for_build
13080eb10989Smrgcat >$dummy.c <<EOF
13090eb10989Smrg#ifdef _SEQUENT_
13100eb10989Smrg# include <sys/types.h>
13110eb10989Smrg# include <sys/utsname.h>
13120eb10989Smrg#endif
13130eb10989Smrgmain ()
13140eb10989Smrg{
13150eb10989Smrg#if defined (sony)
13160eb10989Smrg#if defined (MIPSEB)
13170eb10989Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
13180eb10989Smrg     I don't know....  */
13190eb10989Smrg  printf ("mips-sony-bsd\n"); exit (0);
13200eb10989Smrg#else
13210eb10989Smrg#include <sys/param.h>
13220eb10989Smrg  printf ("m68k-sony-newsos%s\n",
13230eb10989Smrg#ifdef NEWSOS4
13240eb10989Smrg          "4"
13250eb10989Smrg#else
13260eb10989Smrg	  ""
13270eb10989Smrg#endif
13280eb10989Smrg         ); exit (0);
13290eb10989Smrg#endif
13300eb10989Smrg#endif
13310eb10989Smrg
13320eb10989Smrg#if defined (__arm) && defined (__acorn) && defined (__unix)
133363165362Smrg  printf ("arm-acorn-riscix\n"); exit (0);
13340eb10989Smrg#endif
13350eb10989Smrg
13360eb10989Smrg#if defined (hp300) && !defined (hpux)
13370eb10989Smrg  printf ("m68k-hp-bsd\n"); exit (0);
13380eb10989Smrg#endif
13390eb10989Smrg
13400eb10989Smrg#if defined (NeXT)
13410eb10989Smrg#if !defined (__ARCHITECTURE__)
13420eb10989Smrg#define __ARCHITECTURE__ "m68k"
13430eb10989Smrg#endif
13440eb10989Smrg  int version;
13450eb10989Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
13460eb10989Smrg  if (version < 4)
13470eb10989Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
13480eb10989Smrg  else
13490eb10989Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
13500eb10989Smrg  exit (0);
13510eb10989Smrg#endif
13520eb10989Smrg
13530eb10989Smrg#if defined (MULTIMAX) || defined (n16)
13540eb10989Smrg#if defined (UMAXV)
13550eb10989Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
13560eb10989Smrg#else
13570eb10989Smrg#if defined (CMU)
13580eb10989Smrg  printf ("ns32k-encore-mach\n"); exit (0);
13590eb10989Smrg#else
13600eb10989Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
13610eb10989Smrg#endif
13620eb10989Smrg#endif
13630eb10989Smrg#endif
13640eb10989Smrg
13650eb10989Smrg#if defined (__386BSD__)
13660eb10989Smrg  printf ("i386-pc-bsd\n"); exit (0);
13670eb10989Smrg#endif
13680eb10989Smrg
13690eb10989Smrg#if defined (sequent)
13700eb10989Smrg#if defined (i386)
13710eb10989Smrg  printf ("i386-sequent-dynix\n"); exit (0);
13720eb10989Smrg#endif
13730eb10989Smrg#if defined (ns32000)
13740eb10989Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
13750eb10989Smrg#endif
13760eb10989Smrg#endif
13770eb10989Smrg
13780eb10989Smrg#if defined (_SEQUENT_)
13790eb10989Smrg    struct utsname un;
13800eb10989Smrg
13810eb10989Smrg    uname(&un);
13820eb10989Smrg
13830eb10989Smrg    if (strncmp(un.version, "V2", 2) == 0) {
13840eb10989Smrg	printf ("i386-sequent-ptx2\n"); exit (0);
13850eb10989Smrg    }
13860eb10989Smrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
13870eb10989Smrg	printf ("i386-sequent-ptx1\n"); exit (0);
13880eb10989Smrg    }
13890eb10989Smrg    printf ("i386-sequent-ptx\n"); exit (0);
13900eb10989Smrg
13910eb10989Smrg#endif
13920eb10989Smrg
13930eb10989Smrg#if defined (vax)
13940eb10989Smrg# if !defined (ultrix)
13950eb10989Smrg#  include <sys/param.h>
13960eb10989Smrg#  if defined (BSD)
13970eb10989Smrg#   if BSD == 43
13980eb10989Smrg      printf ("vax-dec-bsd4.3\n"); exit (0);
13990eb10989Smrg#   else
14000eb10989Smrg#    if BSD == 199006
14010eb10989Smrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
14020eb10989Smrg#    else
14030eb10989Smrg      printf ("vax-dec-bsd\n"); exit (0);
14040eb10989Smrg#    endif
14050eb10989Smrg#   endif
14060eb10989Smrg#  else
14070eb10989Smrg    printf ("vax-dec-bsd\n"); exit (0);
14080eb10989Smrg#  endif
14090eb10989Smrg# else
14100eb10989Smrg    printf ("vax-dec-ultrix\n"); exit (0);
14110eb10989Smrg# endif
14120eb10989Smrg#endif
14130eb10989Smrg
14140eb10989Smrg#if defined (alliant) && defined (i860)
14150eb10989Smrg  printf ("i860-alliant-bsd\n"); exit (0);
14160eb10989Smrg#endif
14170eb10989Smrg
14180eb10989Smrg  exit (1);
14190eb10989Smrg}
14200eb10989SmrgEOF
14210eb10989Smrg
142263165362Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
142363165362Smrg	{ echo "$SYSTEM_NAME"; exit; }
14240eb10989Smrg
14250eb10989Smrg# Apollos put the system type in the environment.
14260eb10989Smrg
142763165362Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
14280eb10989Smrg
14290eb10989Smrg# Convex versions that predate uname can use getsysinfo(1)
14300eb10989Smrg
14310eb10989Smrgif [ -x /usr/convex/getsysinfo ]
14320eb10989Smrgthen
14330eb10989Smrg    case `getsysinfo -f cpu_type` in
14340eb10989Smrg    c1*)
14350eb10989Smrg	echo c1-convex-bsd
143663165362Smrg	exit ;;
14370eb10989Smrg    c2*)
14380eb10989Smrg	if getsysinfo -f scalar_acc
14390eb10989Smrg	then echo c32-convex-bsd
14400eb10989Smrg	else echo c2-convex-bsd
14410eb10989Smrg	fi
144263165362Smrg	exit ;;
14430eb10989Smrg    c34*)
14440eb10989Smrg	echo c34-convex-bsd
144563165362Smrg	exit ;;
14460eb10989Smrg    c38*)
14470eb10989Smrg	echo c38-convex-bsd
144863165362Smrg	exit ;;
14490eb10989Smrg    c4*)
14500eb10989Smrg	echo c4-convex-bsd
145163165362Smrg	exit ;;
14520eb10989Smrg    esac
14530eb10989Smrgfi
14540eb10989Smrg
14550eb10989Smrgcat >&2 <<EOF
14560eb10989Smrg$0: unable to guess system type
14570eb10989Smrg
14580eb10989SmrgThis script, last modified $timestamp, has failed to recognize
14590eb10989Smrgthe operating system you are using. It is advised that you
14600eb10989Smrgdownload the most up to date version of the config scripts from
14610eb10989Smrg
146263165362Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
146363165362Smrgand
146463165362Smrg  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
14650eb10989Smrg
14660eb10989SmrgIf the version you run ($0) is already up to date, please
14670eb10989Smrgsend the following data and any information you think might be
14680eb10989Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
14690eb10989Smrginformation to handle your system.
14700eb10989Smrg
14710eb10989Smrgconfig.guess timestamp = $timestamp
14720eb10989Smrg
14730eb10989Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
14740eb10989Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
14750eb10989Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
14760eb10989Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
14770eb10989Smrg
14780eb10989Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
14790eb10989Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
14800eb10989Smrg
14810eb10989Smrghostinfo               = `(hostinfo) 2>/dev/null`
14820eb10989Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
14830eb10989Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
14840eb10989Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
14850eb10989Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
14860eb10989Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
14870eb10989Smrg
14880eb10989SmrgUNAME_MACHINE = ${UNAME_MACHINE}
14890eb10989SmrgUNAME_RELEASE = ${UNAME_RELEASE}
14900eb10989SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
14910eb10989SmrgUNAME_VERSION = ${UNAME_VERSION}
14920eb10989SmrgEOF
14930eb10989Smrg
14940eb10989Smrgexit 1
14950eb10989Smrg
14960eb10989Smrg# Local variables:
14970eb10989Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
14980eb10989Smrg# time-stamp-start: "timestamp='"
14990eb10989Smrg# time-stamp-format: "%:y-%02m-%02d"
15000eb10989Smrg# time-stamp-end: "'"
15010eb10989Smrg# End:
1502