Blame config.guess

Packit 6d72ef
#! /bin/sh
Packit 6d72ef
# Attempt to guess a canonical system name.
Packit 6d72ef
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
Packit 6d72ef
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
Packit 6d72ef
#   2011, 2012 Free Software Foundation, Inc.
Packit 6d72ef
Packit 6d72ef
timestamp='2012-02-10'
Packit 6d72ef
Packit 6d72ef
# This file is free software; you can redistribute it and/or modify it
Packit 6d72ef
# under the terms of the GNU General Public License as published by
Packit 6d72ef
# the Free Software Foundation; either version 2 of the License, or
Packit 6d72ef
# (at your option) any later version.
Packit 6d72ef
#
Packit 6d72ef
# This program is distributed in the hope that it will be useful, but
Packit 6d72ef
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6d72ef
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6d72ef
# General Public License for more details.
Packit 6d72ef
#
Packit 6d72ef
# You should have received a copy of the GNU General Public License
Packit 6d72ef
# along with this program; if not, see <http://www.gnu.org/licenses/>.
Packit 6d72ef
#
Packit 6d72ef
# As a special exception to the GNU General Public License, if you
Packit 6d72ef
# distribute this file as part of a program that contains a
Packit 6d72ef
# configuration script generated by Autoconf, you may include it under
Packit 6d72ef
# the same distribution terms that you use for the rest of that program.
Packit 6d72ef
Packit 6d72ef
Packit 6d72ef
# Originally written by Per Bothner.  Please send patches (context
Packit 6d72ef
# diff format) to <config-patches@gnu.org> and include a ChangeLog
Packit 6d72ef
# entry.
Packit 6d72ef
#
Packit 6d72ef
# This script attempts to guess a canonical system name similar to
Packit 6d72ef
# config.sub.  If it succeeds, it prints the system name on stdout, and
Packit 6d72ef
# exits with 0.  Otherwise, it exits with 1.
Packit 6d72ef
#
Packit 6d72ef
# You can get the latest version of this script from:
Packit 6d72ef
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
Packit 6d72ef
Packit 6d72ef
me=`echo "$0" | sed -e 's,.*/,,'`
Packit 6d72ef
Packit 6d72ef
usage="\
Packit 6d72ef
Usage: $0 [OPTION]
Packit 6d72ef
Packit 6d72ef
Output the configuration name of the system \`$me' is run on.
Packit 6d72ef
Packit 6d72ef
Operation modes:
Packit 6d72ef
  -h, --help         print this help, then exit
Packit 6d72ef
  -t, --time-stamp   print date of last modification, then exit
Packit 6d72ef
  -v, --version      print version number, then exit
Packit 6d72ef
Packit 6d72ef
Report bugs and patches to <config-patches@gnu.org>."
Packit 6d72ef
Packit 6d72ef
version="\
Packit 6d72ef
GNU config.guess ($timestamp)
Packit 6d72ef
Packit 6d72ef
Originally written by Per Bothner.
Packit 6d72ef
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
Packit 6d72ef
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Packit 6d72ef
Free Software Foundation, Inc.
Packit 6d72ef
Packit 6d72ef
This is free software; see the source for copying conditions.  There is NO
Packit 6d72ef
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
Packit 6d72ef
Packit 6d72ef
help="
Packit 6d72ef
Try \`$me --help' for more information."
Packit 6d72ef
Packit 6d72ef
# Parse command line
Packit 6d72ef
while test $# -gt 0 ; do
Packit 6d72ef
  case $1 in
Packit 6d72ef
    --time-stamp | --time* | -t )
Packit 6d72ef
       echo "$timestamp" ; exit ;;
Packit 6d72ef
    --version | -v )
Packit 6d72ef
       echo "$version" ; exit ;;
Packit 6d72ef
    --help | --h* | -h )
Packit 6d72ef
       echo "$usage"; exit ;;
Packit 6d72ef
    -- )     # Stop option processing
Packit 6d72ef
       shift; break ;;
Packit 6d72ef
    - )	# Use stdin as input.
Packit 6d72ef
       break ;;
Packit 6d72ef
    -* )
Packit 6d72ef
       echo "$me: invalid option $1$help" >&2
Packit 6d72ef
       exit 1 ;;
Packit 6d72ef
    * )
Packit 6d72ef
       break ;;
Packit 6d72ef
  esac
Packit 6d72ef
done
Packit 6d72ef
Packit 6d72ef
if test $# != 0; then
Packit 6d72ef
  echo "$me: too many arguments$help" >&2
Packit 6d72ef
  exit 1
Packit 6d72ef
fi
Packit 6d72ef
Packit 6d72ef
trap 'exit 1' 1 2 15
Packit 6d72ef
Packit 6d72ef
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
Packit 6d72ef
# compiler to aid in system detection is discouraged as it requires
Packit 6d72ef
# temporary files to be created and, as you can see below, it is a
Packit 6d72ef
# headache to deal with in a portable fashion.
Packit 6d72ef
Packit 6d72ef
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
Packit 6d72ef
# use `HOST_CC' if defined, but it is deprecated.
Packit 6d72ef
Packit 6d72ef
# Portable tmp directory creation inspired by the Autoconf team.
Packit 6d72ef
Packit 6d72ef
set_cc_for_build='
Packit 6d72ef
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
Packit 6d72ef
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
Packit 6d72ef
: ${TMPDIR=/tmp} ;
Packit 6d72ef
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
Packit 6d72ef
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
Packit 6d72ef
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
Packit 6d72ef
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
Packit 6d72ef
dummy=$tmp/dummy ;
Packit 6d72ef
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
Packit 6d72ef
case $CC_FOR_BUILD,$HOST_CC,$CC in
Packit 6d72ef
 ,,)    echo "int x;" > $dummy.c ;
Packit 6d72ef
	for c in cc gcc c89 c99 ; do
Packit 6d72ef
	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
Packit 6d72ef
	     CC_FOR_BUILD="$c"; break ;
Packit 6d72ef
	  fi ;
Packit 6d72ef
	done ;
Packit 6d72ef
	if test x"$CC_FOR_BUILD" = x ; then
Packit 6d72ef
	  CC_FOR_BUILD=no_compiler_found ;
Packit 6d72ef
	fi
Packit 6d72ef
	;;
Packit 6d72ef
 ,,*)   CC_FOR_BUILD=$CC ;;
Packit 6d72ef
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
Packit 6d72ef
esac ; set_cc_for_build= ;'
Packit 6d72ef
Packit 6d72ef
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
Packit 6d72ef
# (ghazi@noc.rutgers.edu 1994-08-24)
Packit 6d72ef
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
Packit 6d72ef
	PATH=$PATH:/.attbin ; export PATH
Packit 6d72ef
fi
Packit 6d72ef
Packit 6d72ef
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
Packit 6d72ef
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
Packit 6d72ef
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
Packit 6d72ef
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
Packit 6d72ef
Packit 6d72ef
# Note: order is significant - the case branches are not exclusive.
Packit 6d72ef
Packit 6d72ef
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
Packit 6d72ef
    *:NetBSD:*:*)
Packit 6d72ef
	# NetBSD (nbsd) targets should (where applicable) match one or
Packit 6d72ef
	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
Packit 6d72ef
	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
Packit 6d72ef
	# switched to ELF, *-*-netbsd* would select the old
Packit 6d72ef
	# object file format.  This provides both forward
Packit 6d72ef
	# compatibility and a consistent mechanism for selecting the
Packit 6d72ef
	# object file format.
Packit 6d72ef
	#
Packit 6d72ef
	# Note: NetBSD doesn't particularly care about the vendor
Packit 6d72ef
	# portion of the name.  We always set it to "unknown".
Packit 6d72ef
	sysctl="sysctl -n hw.machine_arch"
Packit 6d72ef
	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
Packit 6d72ef
	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
Packit 6d72ef
	case "${UNAME_MACHINE_ARCH}" in
Packit 6d72ef
	    armeb) machine=armeb-unknown ;;
Packit 6d72ef
	    arm*) machine=arm-unknown ;;
Packit 6d72ef
	    sh3el) machine=shl-unknown ;;
Packit 6d72ef
	    sh3eb) machine=sh-unknown ;;
Packit 6d72ef
	    sh5el) machine=sh5le-unknown ;;
Packit 6d72ef
	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
Packit 6d72ef
	esac
Packit 6d72ef
	# The Operating System including object format, if it has switched
Packit 6d72ef
	# to ELF recently, or will in the future.
Packit 6d72ef
	case "${UNAME_MACHINE_ARCH}" in
Packit 6d72ef
	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
Packit 6d72ef
		eval $set_cc_for_build
Packit 6d72ef
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
Packit 6d72ef
			| grep -q __ELF__
Packit 6d72ef
		then
Packit 6d72ef
		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
Packit 6d72ef
		    # Return netbsd for either.  FIX?
Packit 6d72ef
		    os=netbsd
Packit 6d72ef
		else
Packit 6d72ef
		    os=netbsdelf
Packit 6d72ef
		fi
Packit 6d72ef
		;;
Packit 6d72ef
	    *)
Packit 6d72ef
		os=netbsd
Packit 6d72ef
		;;
Packit 6d72ef
	esac
Packit 6d72ef
	# The OS release
Packit 6d72ef
	# Debian GNU/NetBSD machines have a different userland, and
Packit 6d72ef
	# thus, need a distinct triplet. However, they do not need
Packit 6d72ef
	# kernel version information, so it can be replaced with a
Packit 6d72ef
	# suitable tag, in the style of linux-gnu.
Packit 6d72ef
	case "${UNAME_VERSION}" in
Packit 6d72ef
	    Debian*)
Packit 6d72ef
		release='-gnu'
Packit 6d72ef
		;;
Packit 6d72ef
	    *)
Packit 6d72ef
		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
Packit 6d72ef
		;;
Packit 6d72ef
	esac
Packit 6d72ef
	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
Packit 6d72ef
	# contains redundant information, the shorter form:
Packit 6d72ef
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
Packit 6d72ef
	echo "${machine}-${os}${release}"
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:OpenBSD:*:*)
Packit 6d72ef
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
Packit 6d72ef
	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:ekkoBSD:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:SolidBSD:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    macppc:MirBSD:*:*)
Packit 6d72ef
	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:MirBSD:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    alpha:OSF1:*:*)
Packit 6d72ef
	case $UNAME_RELEASE in
Packit 6d72ef
	*4.0)
Packit 6d72ef
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
Packit 6d72ef
		;;
Packit 6d72ef
	*5.*)
Packit 6d72ef
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
Packit 6d72ef
		;;
Packit 6d72ef
	esac
Packit 6d72ef
	# According to Compaq, /usr/sbin/psrinfo has been available on
Packit 6d72ef
	# OSF/1 and Tru64 systems produced since 1995.  I hope that
Packit 6d72ef
	# covers most systems running today.  This code pipes the CPU
Packit 6d72ef
	# types through head -n 1, so we only detect the type of CPU 0.
Packit 6d72ef
	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
Packit 6d72ef
	case "$ALPHA_CPU_TYPE" in
Packit 6d72ef
	    "EV4 (21064)")
Packit 6d72ef
		UNAME_MACHINE="alpha" ;;
Packit 6d72ef
	    "EV4.5 (21064)")
Packit 6d72ef
		UNAME_MACHINE="alpha" ;;
Packit 6d72ef
	    "LCA4 (21066/21068)")
Packit 6d72ef
		UNAME_MACHINE="alpha" ;;
Packit 6d72ef
	    "EV5 (21164)")
Packit 6d72ef
		UNAME_MACHINE="alphaev5" ;;
Packit 6d72ef
	    "EV5.6 (21164A)")
Packit 6d72ef
		UNAME_MACHINE="alphaev56" ;;
Packit 6d72ef
	    "EV5.6 (21164PC)")
Packit 6d72ef
		UNAME_MACHINE="alphapca56" ;;
Packit 6d72ef
	    "EV5.7 (21164PC)")
Packit 6d72ef
		UNAME_MACHINE="alphapca57" ;;
Packit 6d72ef
	    "EV6 (21264)")
Packit 6d72ef
		UNAME_MACHINE="alphaev6" ;;
Packit 6d72ef
	    "EV6.7 (21264A)")
Packit 6d72ef
		UNAME_MACHINE="alphaev67" ;;
Packit 6d72ef
	    "EV6.8CB (21264C)")
Packit 6d72ef
		UNAME_MACHINE="alphaev68" ;;
Packit 6d72ef
	    "EV6.8AL (21264B)")
Packit 6d72ef
		UNAME_MACHINE="alphaev68" ;;
Packit 6d72ef
	    "EV6.8CX (21264D)")
Packit 6d72ef
		UNAME_MACHINE="alphaev68" ;;
Packit 6d72ef
	    "EV6.9A (21264/EV69A)")
Packit 6d72ef
		UNAME_MACHINE="alphaev69" ;;
Packit 6d72ef
	    "EV7 (21364)")
Packit 6d72ef
		UNAME_MACHINE="alphaev7" ;;
Packit 6d72ef
	    "EV7.9 (21364A)")
Packit 6d72ef
		UNAME_MACHINE="alphaev79" ;;
Packit 6d72ef
	esac
Packit 6d72ef
	# A Pn.n version is a patched version.
Packit 6d72ef
	# A Vn.n version is a released version.
Packit 6d72ef
	# A Tn.n version is a released field test version.
Packit 6d72ef
	# A Xn.n version is an unreleased experimental baselevel.
Packit 6d72ef
	# 1.2 uses "1.2" for uname -r.
Packit 6d72ef
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
Packit 6d72ef
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
Packit 6d72ef
	exitcode=$?
Packit 6d72ef
	trap '' 0
Packit 6d72ef
	exit $exitcode ;;
Packit 6d72ef
    Alpha\ *:Windows_NT*:*)
Packit 6d72ef
	# How do we know it's Interix rather than the generic POSIX subsystem?
Packit 6d72ef
	# Should we change UNAME_MACHINE based on the output of uname instead
Packit 6d72ef
	# of the specific Alpha model?
Packit 6d72ef
	echo alpha-pc-interix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    21064:Windows_NT:50:3)
Packit 6d72ef
	echo alpha-dec-winnt3.5
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Amiga*:UNIX_System_V:4.0:*)
Packit 6d72ef
	echo m68k-unknown-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:[Aa]miga[Oo][Ss]:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-amigaos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:[Mm]orph[Oo][Ss]:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-morphos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:OS/390:*:*)
Packit 6d72ef
	echo i370-ibm-openedition
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:z/VM:*:*)
Packit 6d72ef
	echo s390-ibm-zvmoe
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:OS400:*:*)
Packit 6d72ef
	echo powerpc-ibm-os400
Packit 6d72ef
	exit ;;
Packit 6d72ef
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
Packit 6d72ef
	echo arm-acorn-riscix${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    arm:riscos:*:*|arm:RISCOS:*:*)
Packit 6d72ef
	echo arm-unknown-riscos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
Packit 6d72ef
	echo hppa1.1-hitachi-hiuxmpp
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
Packit 6d72ef
	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
Packit 6d72ef
	if test "`(/bin/universe) 2>/dev/null`" = att ; then
Packit 6d72ef
		echo pyramid-pyramid-sysv3
Packit 6d72ef
	else
Packit 6d72ef
		echo pyramid-pyramid-bsd
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    NILE*:*:*:dcosx)
Packit 6d72ef
	echo pyramid-pyramid-svr4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    DRS?6000:unix:4.0:6*)
Packit 6d72ef
	echo sparc-icl-nx6
Packit 6d72ef
	exit ;;
Packit 6d72ef
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
Packit 6d72ef
	case `/usr/bin/uname -p` in
Packit 6d72ef
	    sparc) echo sparc-icl-nx7; exit ;;
Packit 6d72ef
	esac ;;
Packit 6d72ef
    s390x:SunOS:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sun4H:SunOS:5.*:*)
Packit 6d72ef
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
Packit 6d72ef
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
Packit 6d72ef
	echo i386-pc-auroraux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
Packit 6d72ef
	eval $set_cc_for_build
Packit 6d72ef
	SUN_ARCH="i386"
Packit 6d72ef
	# If there is a compiler, see if it is configured for 64-bit objects.
Packit 6d72ef
	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
Packit 6d72ef
	# This test works for both compilers.
Packit 6d72ef
	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
Packit 6d72ef
	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
Packit 6d72ef
		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
Packit 6d72ef
		grep IS_64BIT_ARCH >/dev/null
Packit 6d72ef
	    then
Packit 6d72ef
		SUN_ARCH="x86_64"
Packit 6d72ef
	    fi
Packit 6d72ef
	fi
Packit 6d72ef
	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sun4*:SunOS:6*:*)
Packit 6d72ef
	# According to config.sub, this is the proper way to canonicalize
Packit 6d72ef
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
Packit 6d72ef
	# it's likely to be more like Solaris than SunOS4.
Packit 6d72ef
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sun4*:SunOS:*:*)
Packit 6d72ef
	case "`/usr/bin/arch -k`" in
Packit 6d72ef
	    Series*|S4*)
Packit 6d72ef
		UNAME_RELEASE=`uname -v`
Packit 6d72ef
		;;
Packit 6d72ef
	esac
Packit 6d72ef
	# Japanese Language versions have a version number like `4.1.3-JL'.
Packit 6d72ef
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sun3*:SunOS:*:*)
Packit 6d72ef
	echo m68k-sun-sunos${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sun*:*:4.2BSD:*)
Packit 6d72ef
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
Packit 6d72ef
	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
Packit 6d72ef
	case "`/bin/arch`" in
Packit 6d72ef
	    sun3)
Packit 6d72ef
		echo m68k-sun-sunos${UNAME_RELEASE}
Packit 6d72ef
		;;
Packit 6d72ef
	    sun4)
Packit 6d72ef
		echo sparc-sun-sunos${UNAME_RELEASE}
Packit 6d72ef
		;;
Packit 6d72ef
	esac
Packit 6d72ef
	exit ;;
Packit 6d72ef
    aushp:SunOS:*:*)
Packit 6d72ef
	echo sparc-auspex-sunos${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    # The situation for MiNT is a little confusing.  The machine name
Packit 6d72ef
    # can be virtually everything (everything which is not
Packit 6d72ef
    # "atarist" or "atariste" at least should have a processor
Packit 6d72ef
    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
Packit 6d72ef
    # to the lowercase version "mint" (or "freemint").  Finally
Packit 6d72ef
    # the system name "TOS" denotes a system which is actually not
Packit 6d72ef
    # MiNT.  But MiNT is downward compatible to TOS, so this should
Packit 6d72ef
    # be no problem.
Packit 6d72ef
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
Packit 6d72ef
	echo m68k-atari-mint${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
Packit 6d72ef
	echo m68k-atari-mint${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
Packit 6d72ef
	echo m68k-atari-mint${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
Packit 6d72ef
	echo m68k-milan-mint${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
Packit 6d72ef
	echo m68k-hades-mint${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
Packit 6d72ef
	echo m68k-unknown-mint${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    m68k:machten:*:*)
Packit 6d72ef
	echo m68k-apple-machten${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    powerpc:machten:*:*)
Packit 6d72ef
	echo powerpc-apple-machten${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    RISC*:Mach:*:*)
Packit 6d72ef
	echo mips-dec-mach_bsd4.3
Packit 6d72ef
	exit ;;
Packit 6d72ef
    RISC*:ULTRIX:*:*)
Packit 6d72ef
	echo mips-dec-ultrix${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    VAX*:ULTRIX*:*:*)
Packit 6d72ef
	echo vax-dec-ultrix${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    2020:CLIX:*:* | 2430:CLIX:*:*)
Packit 6d72ef
	echo clipper-intergraph-clix${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    mips:*:*:UMIPS | mips:*:*:RISCos)
Packit 6d72ef
	eval $set_cc_for_build
Packit 6d72ef
	sed 's/^	//' << EOF >$dummy.c
Packit 6d72ef
#ifdef __cplusplus
Packit 6d72ef
#include <stdio.h>  /* for printf() prototype */
Packit 6d72ef
	int main (int argc, char *argv[]) {
Packit 6d72ef
#else
Packit 6d72ef
	int main (argc, argv) int argc; char *argv[]; {
Packit 6d72ef
#endif
Packit 6d72ef
	#if defined (host_mips) && defined (MIPSEB)
Packit 6d72ef
	#if defined (SYSTYPE_SYSV)
Packit 6d72ef
	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
Packit 6d72ef
	#endif
Packit 6d72ef
	#if defined (SYSTYPE_SVR4)
Packit 6d72ef
	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
Packit 6d72ef
	#endif
Packit 6d72ef
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
Packit 6d72ef
	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
Packit 6d72ef
	#endif
Packit 6d72ef
	#endif
Packit 6d72ef
	  exit (-1);
Packit 6d72ef
	}
Packit 6d72ef
EOF
Packit 6d72ef
	$CC_FOR_BUILD -o $dummy $dummy.c &&
Packit 6d72ef
	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
Packit 6d72ef
	  SYSTEM_NAME=`$dummy $dummyarg` &&
Packit 6d72ef
	    { echo "$SYSTEM_NAME"; exit; }
Packit 6d72ef
	echo mips-mips-riscos${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Motorola:PowerMAX_OS:*:*)
Packit 6d72ef
	echo powerpc-motorola-powermax
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Motorola:*:4.3:PL8-*)
Packit 6d72ef
	echo powerpc-harris-powermax
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
Packit 6d72ef
	echo powerpc-harris-powermax
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Night_Hawk:Power_UNIX:*:*)
Packit 6d72ef
	echo powerpc-harris-powerunix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    m88k:CX/UX:7*:*)
Packit 6d72ef
	echo m88k-harris-cxux7
Packit 6d72ef
	exit ;;
Packit 6d72ef
    m88k:*:4*:R4*)
Packit 6d72ef
	echo m88k-motorola-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    m88k:*:3*:R3*)
Packit 6d72ef
	echo m88k-motorola-sysv3
Packit 6d72ef
	exit ;;
Packit 6d72ef
    AViiON:dgux:*:*)
Packit 6d72ef
	# DG/UX returns AViiON for all architectures
Packit 6d72ef
	UNAME_PROCESSOR=`/usr/bin/uname -p`
Packit 6d72ef
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
Packit 6d72ef
	then
Packit 6d72ef
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
Packit 6d72ef
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
Packit 6d72ef
	    then
Packit 6d72ef
		echo m88k-dg-dgux${UNAME_RELEASE}
Packit 6d72ef
	    else
Packit 6d72ef
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
Packit 6d72ef
	    fi
Packit 6d72ef
	else
Packit 6d72ef
	    echo i586-dg-dgux${UNAME_RELEASE}
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
Packit 6d72ef
	echo m88k-dolphin-sysv3
Packit 6d72ef
	exit ;;
Packit 6d72ef
    M88*:*:R3*:*)
Packit 6d72ef
	# Delta 88k system running SVR3
Packit 6d72ef
	echo m88k-motorola-sysv3
Packit 6d72ef
	exit ;;
Packit 6d72ef
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
Packit 6d72ef
	echo m88k-tektronix-sysv3
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
Packit 6d72ef
	echo m68k-tektronix-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:IRIX*:*:*)
Packit 6d72ef
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
Packit 6d72ef
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
Packit 6d72ef
	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
Packit 6d72ef
    i*86:AIX:*:*)
Packit 6d72ef
	echo i386-ibm-aix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    ia64:AIX:*:*)
Packit 6d72ef
	if [ -x /usr/bin/oslevel ] ; then
Packit 6d72ef
		IBM_REV=`/usr/bin/oslevel`
Packit 6d72ef
	else
Packit 6d72ef
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
Packit 6d72ef
	fi
Packit 6d72ef
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:AIX:2:3)
Packit 6d72ef
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
Packit 6d72ef
		eval $set_cc_for_build
Packit 6d72ef
		sed 's/^		//' << EOF >$dummy.c
Packit 6d72ef
		#include <sys/systemcfg.h>
Packit 6d72ef
Packit 6d72ef
		main()
Packit 6d72ef
			{
Packit 6d72ef
			if (!__power_pc())
Packit 6d72ef
				exit(1);
Packit 6d72ef
			puts("powerpc-ibm-aix3.2.5");
Packit 6d72ef
			exit(0);
Packit 6d72ef
			}
Packit 6d72ef
EOF
Packit 6d72ef
		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
Packit 6d72ef
		then
Packit 6d72ef
			echo "$SYSTEM_NAME"
Packit 6d72ef
		else
Packit 6d72ef
			echo rs6000-ibm-aix3.2.5
Packit 6d72ef
		fi
Packit 6d72ef
	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
Packit 6d72ef
		echo rs6000-ibm-aix3.2.4
Packit 6d72ef
	else
Packit 6d72ef
		echo rs6000-ibm-aix3.2
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:AIX:*:[4567])
Packit 6d72ef
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
Packit 6d72ef
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
Packit 6d72ef
		IBM_ARCH=rs6000
Packit 6d72ef
	else
Packit 6d72ef
		IBM_ARCH=powerpc
Packit 6d72ef
	fi
Packit 6d72ef
	if [ -x /usr/bin/oslevel ] ; then
Packit 6d72ef
		IBM_REV=`/usr/bin/oslevel`
Packit 6d72ef
	else
Packit 6d72ef
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
Packit 6d72ef
	fi
Packit 6d72ef
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:AIX:*:*)
Packit 6d72ef
	echo rs6000-ibm-aix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
Packit 6d72ef
	echo romp-ibm-bsd4.4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
Packit 6d72ef
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
Packit 6d72ef
	exit ;;                             # report: romp-ibm BSD 4.3
Packit 6d72ef
    *:BOSX:*:*)
Packit 6d72ef
	echo rs6000-bull-bosx
Packit 6d72ef
	exit ;;
Packit 6d72ef
    DPX/2?00:B.O.S.:*:*)
Packit 6d72ef
	echo m68k-bull-sysv3
Packit 6d72ef
	exit ;;
Packit 6d72ef
    9000/[34]??:4.3bsd:1.*:*)
Packit 6d72ef
	echo m68k-hp-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
Packit 6d72ef
	echo m68k-hp-bsd4.4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    9000/[34678]??:HP-UX:*:*)
Packit 6d72ef
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
Packit 6d72ef
	case "${UNAME_MACHINE}" in
Packit 6d72ef
	    9000/31? )            HP_ARCH=m68000 ;;
Packit 6d72ef
	    9000/[34]?? )         HP_ARCH=m68k ;;
Packit 6d72ef
	    9000/[678][0-9][0-9])
Packit 6d72ef
		if [ -x /usr/bin/getconf ]; then
Packit 6d72ef
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
Packit 6d72ef
		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
Packit 6d72ef
		    case "${sc_cpu_version}" in
Packit 6d72ef
		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
Packit 6d72ef
		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
Packit 6d72ef
		      532)                      # CPU_PA_RISC2_0
Packit 6d72ef
			case "${sc_kernel_bits}" in
Packit 6d72ef
			  32) HP_ARCH="hppa2.0n" ;;
Packit 6d72ef
			  64) HP_ARCH="hppa2.0w" ;;
Packit 6d72ef
			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
Packit 6d72ef
			esac ;;
Packit 6d72ef
		    esac
Packit 6d72ef
		fi
Packit 6d72ef
		if [ "${HP_ARCH}" = "" ]; then
Packit 6d72ef
		    eval $set_cc_for_build
Packit 6d72ef
		    sed 's/^		//' << EOF >$dummy.c
Packit 6d72ef
Packit 6d72ef
		#define _HPUX_SOURCE
Packit 6d72ef
		#include <stdlib.h>
Packit 6d72ef
		#include <unistd.h>
Packit 6d72ef
Packit 6d72ef
		int main ()
Packit 6d72ef
		{
Packit 6d72ef
		#if defined(_SC_KERNEL_BITS)
Packit 6d72ef
		    long bits = sysconf(_SC_KERNEL_BITS);
Packit 6d72ef
		#endif
Packit 6d72ef
		    long cpu  = sysconf (_SC_CPU_VERSION);
Packit 6d72ef
Packit 6d72ef
		    switch (cpu)
Packit 6d72ef
			{
Packit 6d72ef
			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
Packit 6d72ef
			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
Packit 6d72ef
			case CPU_PA_RISC2_0:
Packit 6d72ef
		#if defined(_SC_KERNEL_BITS)
Packit 6d72ef
			    switch (bits)
Packit 6d72ef
				{
Packit 6d72ef
				case 64: puts ("hppa2.0w"); break;
Packit 6d72ef
				case 32: puts ("hppa2.0n"); break;
Packit 6d72ef
				default: puts ("hppa2.0"); break;
Packit 6d72ef
				} break;
Packit 6d72ef
		#else  /* !defined(_SC_KERNEL_BITS) */
Packit 6d72ef
			    puts ("hppa2.0"); break;
Packit 6d72ef
		#endif
Packit 6d72ef
			default: puts ("hppa1.0"); break;
Packit 6d72ef
			}
Packit 6d72ef
		    exit (0);
Packit 6d72ef
		}
Packit 6d72ef
EOF
Packit 6d72ef
		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
Packit 6d72ef
		    test -z "$HP_ARCH" && HP_ARCH=hppa
Packit 6d72ef
		fi ;;
Packit 6d72ef
	esac
Packit 6d72ef
	if [ ${HP_ARCH} = "hppa2.0w" ]
Packit 6d72ef
	then
Packit 6d72ef
	    eval $set_cc_for_build
Packit 6d72ef
Packit 6d72ef
	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
Packit 6d72ef
	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
Packit 6d72ef
	    # generating 64-bit code.  GNU and HP use different nomenclature:
Packit 6d72ef
	    #
Packit 6d72ef
	    # $ CC_FOR_BUILD=cc ./config.guess
Packit 6d72ef
	    # => hppa2.0w-hp-hpux11.23
Packit 6d72ef
	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
Packit 6d72ef
	    # => hppa64-hp-hpux11.23
Packit 6d72ef
Packit 6d72ef
	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
Packit 6d72ef
		grep -q __LP64__
Packit 6d72ef
	    then
Packit 6d72ef
		HP_ARCH="hppa2.0w"
Packit 6d72ef
	    else
Packit 6d72ef
		HP_ARCH="hppa64"
Packit 6d72ef
	    fi
Packit 6d72ef
	fi
Packit 6d72ef
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    ia64:HP-UX:*:*)
Packit 6d72ef
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
Packit 6d72ef
	echo ia64-hp-hpux${HPUX_REV}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    3050*:HI-UX:*:*)
Packit 6d72ef
	eval $set_cc_for_build
Packit 6d72ef
	sed 's/^	//' << EOF >$dummy.c
Packit 6d72ef
	#include <unistd.h>
Packit 6d72ef
	int
Packit 6d72ef
	main ()
Packit 6d72ef
	{
Packit 6d72ef
	  long cpu = sysconf (_SC_CPU_VERSION);
Packit 6d72ef
	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
Packit 6d72ef
	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
Packit 6d72ef
	     results, however.  */
Packit 6d72ef
	  if (CPU_IS_PA_RISC (cpu))
Packit 6d72ef
	    {
Packit 6d72ef
	      switch (cpu)
Packit 6d72ef
		{
Packit 6d72ef
		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
Packit 6d72ef
		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
Packit 6d72ef
		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
Packit 6d72ef
		  default: puts ("hppa-hitachi-hiuxwe2"); break;
Packit 6d72ef
		}
Packit 6d72ef
	    }
Packit 6d72ef
	  else if (CPU_IS_HP_MC68K (cpu))
Packit 6d72ef
	    puts ("m68k-hitachi-hiuxwe2");
Packit 6d72ef
	  else puts ("unknown-hitachi-hiuxwe2");
Packit 6d72ef
	  exit (0);
Packit 6d72ef
	}
Packit 6d72ef
EOF
Packit 6d72ef
	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
Packit 6d72ef
		{ echo "$SYSTEM_NAME"; exit; }
Packit 6d72ef
	echo unknown-hitachi-hiuxwe2
Packit 6d72ef
	exit ;;
Packit 6d72ef
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
Packit 6d72ef
	echo hppa1.1-hp-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    9000/8??:4.3bsd:*:*)
Packit 6d72ef
	echo hppa1.0-hp-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
Packit 6d72ef
	echo hppa1.0-hp-mpeix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
Packit 6d72ef
	echo hppa1.1-hp-osf
Packit 6d72ef
	exit ;;
Packit 6d72ef
    hp8??:OSF1:*:*)
Packit 6d72ef
	echo hppa1.0-hp-osf
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:OSF1:*:*)
Packit 6d72ef
	if [ -x /usr/sbin/sysversion ] ; then
Packit 6d72ef
	    echo ${UNAME_MACHINE}-unknown-osf1mk
Packit 6d72ef
	else
Packit 6d72ef
	    echo ${UNAME_MACHINE}-unknown-osf1
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    parisc*:Lites*:*:*)
Packit 6d72ef
	echo hppa1.1-hp-lites
Packit 6d72ef
	exit ;;
Packit 6d72ef
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
Packit 6d72ef
	echo c1-convex-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
Packit 6d72ef
	if getsysinfo -f scalar_acc
Packit 6d72ef
	then echo c32-convex-bsd
Packit 6d72ef
	else echo c2-convex-bsd
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
Packit 6d72ef
	echo c34-convex-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
Packit 6d72ef
	echo c38-convex-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
Packit 6d72ef
	echo c4-convex-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    CRAY*Y-MP:*:*:*)
Packit 6d72ef
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
Packit 6d72ef
	exit ;;
Packit 6d72ef
    CRAY*[A-Z]90:*:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
Packit 6d72ef
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
Packit 6d72ef
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
Packit 6d72ef
	      -e 's/\.[^.]*$/.X/'
Packit 6d72ef
	exit ;;
Packit 6d72ef
    CRAY*TS:*:*:*)
Packit 6d72ef
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
Packit 6d72ef
	exit ;;
Packit 6d72ef
    CRAY*T3E:*:*:*)
Packit 6d72ef
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
Packit 6d72ef
	exit ;;
Packit 6d72ef
    CRAY*SV1:*:*:*)
Packit 6d72ef
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:UNICOS/mp:*:*)
Packit 6d72ef
	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
Packit 6d72ef
	exit ;;
Packit 6d72ef
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
Packit 6d72ef
	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
Packit 6d72ef
	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
Packit 6d72ef
	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
Packit 6d72ef
	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
Packit 6d72ef
	exit ;;
Packit 6d72ef
    5000:UNIX_System_V:4.*:*)
Packit 6d72ef
	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
Packit 6d72ef
	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
Packit 6d72ef
	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sparc*:BSD/OS:*:*)
Packit 6d72ef
	echo sparc-unknown-bsdi${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:BSD/OS:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:FreeBSD:*:*)
Packit 6d72ef
	UNAME_PROCESSOR=`/usr/bin/uname -p`
Packit 6d72ef
	case ${UNAME_PROCESSOR} in
Packit 6d72ef
	    amd64)
Packit 6d72ef
		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
Packit 6d72ef
	    *)
Packit 6d72ef
		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
Packit 6d72ef
	esac
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*:CYGWIN*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-cygwin
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:MINGW*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-mingw32
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*:MSYS*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-msys
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*:windows32*:*)
Packit 6d72ef
	# uname -m includes "-pc" on this system.
Packit 6d72ef
	echo ${UNAME_MACHINE}-mingw32
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*:PW*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-pw32
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:Interix*:*)
Packit 6d72ef
	case ${UNAME_MACHINE} in
Packit 6d72ef
	    x86)
Packit 6d72ef
		echo i586-pc-interix${UNAME_RELEASE}
Packit 6d72ef
		exit ;;
Packit 6d72ef
	    authenticamd | genuineintel | EM64T)
Packit 6d72ef
		echo x86_64-unknown-interix${UNAME_RELEASE}
Packit 6d72ef
		exit ;;
Packit 6d72ef
	    IA64)
Packit 6d72ef
		echo ia64-unknown-interix${UNAME_RELEASE}
Packit 6d72ef
		exit ;;
Packit 6d72ef
	esac ;;
Packit 6d72ef
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
Packit 6d72ef
	echo i${UNAME_MACHINE}-pc-mks
Packit 6d72ef
	exit ;;
Packit 6d72ef
    8664:Windows_NT:*)
Packit 6d72ef
	echo x86_64-pc-mks
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
Packit 6d72ef
	# How do we know it's Interix rather than the generic POSIX subsystem?
Packit 6d72ef
	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
Packit 6d72ef
	# UNAME_MACHINE based on the output of uname instead of i386?
Packit 6d72ef
	echo i586-pc-interix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*:UWIN*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-uwin
Packit 6d72ef
	exit ;;
Packit 6d72ef
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
Packit 6d72ef
	echo x86_64-unknown-cygwin
Packit 6d72ef
	exit ;;
Packit 6d72ef
    p*:CYGWIN*:*)
Packit 6d72ef
	echo powerpcle-unknown-cygwin
Packit 6d72ef
	exit ;;
Packit 6d72ef
    prep*:SunOS:5.*:*)
Packit 6d72ef
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:GNU:*:*)
Packit 6d72ef
	# the GNU system
Packit 6d72ef
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:GNU/*:*:*)
Packit 6d72ef
	# other systems with GNU libc and userland
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:Minix:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-minix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    aarch64:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    aarch64_be:Linux:*:*)
Packit 6d72ef
	UNAME_MACHINE=aarch64_be
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    alpha:Linux:*:*)
Packit 6d72ef
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
Packit 6d72ef
	  EV5)   UNAME_MACHINE=alphaev5 ;;
Packit 6d72ef
	  EV56)  UNAME_MACHINE=alphaev56 ;;
Packit 6d72ef
	  PCA56) UNAME_MACHINE=alphapca56 ;;
Packit 6d72ef
	  PCA57) UNAME_MACHINE=alphapca56 ;;
Packit 6d72ef
	  EV6)   UNAME_MACHINE=alphaev6 ;;
Packit 6d72ef
	  EV67)  UNAME_MACHINE=alphaev67 ;;
Packit 6d72ef
	  EV68*) UNAME_MACHINE=alphaev68 ;;
Packit 6d72ef
	esac
Packit 6d72ef
	objdump --private-headers /bin/sh | grep -q ld.so.1
Packit 6d72ef
	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    arm*:Linux:*:*)
Packit 6d72ef
	eval $set_cc_for_build
Packit 6d72ef
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
Packit 6d72ef
	    | grep -q __ARM_EABI__
Packit 6d72ef
	then
Packit 6d72ef
	    echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	else
Packit 6d72ef
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
Packit 6d72ef
		| grep -q __ARM_PCS_VFP
Packit 6d72ef
	    then
Packit 6d72ef
		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
Packit 6d72ef
	    else
Packit 6d72ef
		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
Packit 6d72ef
	    fi
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    avr32*:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    cris:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-axis-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    crisv32:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-axis-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    frv:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    hexagon:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:Linux:*:*)
Packit 6d72ef
	LIBC=gnu
Packit 6d72ef
	eval $set_cc_for_build
Packit 6d72ef
	sed 's/^	//' << EOF >$dummy.c
Packit 6d72ef
	#ifdef __dietlibc__
Packit 6d72ef
	LIBC=dietlibc
Packit 6d72ef
	#endif
Packit 6d72ef
EOF
Packit 6d72ef
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
Packit 6d72ef
	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
Packit 6d72ef
	exit ;;
Packit 6d72ef
    ia64:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    m32r*:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    m68*:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    mips:Linux:*:* | mips64:Linux:*:*)
Packit 6d72ef
	eval $set_cc_for_build
Packit 6d72ef
	sed 's/^	//' << EOF >$dummy.c
Packit 6d72ef
	#undef CPU
Packit 6d72ef
	#undef ${UNAME_MACHINE}
Packit 6d72ef
	#undef ${UNAME_MACHINE}el
Packit 6d72ef
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
Packit 6d72ef
	CPU=${UNAME_MACHINE}el
Packit 6d72ef
	#else
Packit 6d72ef
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
Packit 6d72ef
	CPU=${UNAME_MACHINE}
Packit 6d72ef
	#else
Packit 6d72ef
	CPU=
Packit 6d72ef
	#endif
Packit 6d72ef
	#endif
Packit 6d72ef
EOF
Packit 6d72ef
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
Packit 6d72ef
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
Packit 6d72ef
	;;
Packit 6d72ef
    or32:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    padre:Linux:*:*)
Packit 6d72ef
	echo sparc-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    parisc64:Linux:*:* | hppa64:Linux:*:*)
Packit 6d72ef
	echo hppa64-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    parisc:Linux:*:* | hppa:Linux:*:*)
Packit 6d72ef
	# Look for CPU level
Packit 6d72ef
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
Packit 6d72ef
	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
Packit 6d72ef
	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
Packit 6d72ef
	  *)    echo hppa-unknown-linux-gnu ;;
Packit 6d72ef
	esac
Packit 6d72ef
	exit ;;
Packit 6d72ef
    ppc64:Linux:*:*)
Packit 6d72ef
	echo powerpc64-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    ppc:Linux:*:*)
Packit 6d72ef
	echo powerpc-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    s390:Linux:*:* | s390x:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-ibm-linux
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sh64*:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sh*:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    sparc:Linux:*:* | sparc64:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    tile*:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    vax:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-dec-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    x86_64:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    xtensa*:Linux:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:DYNIX/ptx:4*:*)
Packit 6d72ef
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
Packit 6d72ef
	# earlier versions are messed up and put the nodename in both
Packit 6d72ef
	# sysname and nodename.
Packit 6d72ef
	echo i386-sequent-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:UNIX_SV:4.2MP:2.*)
Packit 6d72ef
	# Unixware is an offshoot of SVR4, but it has its own version
Packit 6d72ef
	# number series starting with 2...
Packit 6d72ef
	# I am not positive that other SVR4 systems won't match this,
Packit 6d72ef
	# I just have to hope.  -- rms.
Packit 6d72ef
	# Use sysv4.2uw... so that sysv4* matches it.
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:OS/2:*:*)
Packit 6d72ef
	# If we were able to find `uname', then EMX Unix compatibility
Packit 6d72ef
	# is probably installed.
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-os2-emx
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:XTS-300:*:STOP)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-stop
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:atheos:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-atheos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:syllable:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-syllable
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
Packit 6d72ef
	echo i386-unknown-lynxos${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:*DOS:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
Packit 6d72ef
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
Packit 6d72ef
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
Packit 6d72ef
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
Packit 6d72ef
	else
Packit 6d72ef
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:*:5:[678]*)
Packit 6d72ef
	# UnixWare 7.x, OpenUNIX and OpenServer 6.
Packit 6d72ef
	case `/bin/uname -X | grep "^Machine"` in
Packit 6d72ef
	    *486*)	     UNAME_MACHINE=i486 ;;
Packit 6d72ef
	    *Pentium)	     UNAME_MACHINE=i586 ;;
Packit 6d72ef
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
Packit 6d72ef
	esac
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:*:3.2:*)
Packit 6d72ef
	if test -f /usr/options/cb.name; then
Packit 6d72ef
		UNAME_REL=`sed -n 's/.*Version //p' 
Packit 6d72ef
		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
Packit 6d72ef
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
Packit 6d72ef
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
Packit 6d72ef
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
Packit 6d72ef
		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
Packit 6d72ef
			&& UNAME_MACHINE=i586
Packit 6d72ef
		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
Packit 6d72ef
			&& UNAME_MACHINE=i686
Packit 6d72ef
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
Packit 6d72ef
			&& UNAME_MACHINE=i686
Packit 6d72ef
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
Packit 6d72ef
	else
Packit 6d72ef
		echo ${UNAME_MACHINE}-pc-sysv32
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    pc:*:*:*)
Packit 6d72ef
	# Left here for compatibility:
Packit 6d72ef
	# uname -m prints for DJGPP always 'pc', but it prints nothing about
Packit 6d72ef
	# the processor, so we play safe by assuming i586.
Packit 6d72ef
	# Note: whatever this is, it MUST be the same as what config.sub
Packit 6d72ef
	# prints for the "djgpp" host, or else GDB configury will decide that
Packit 6d72ef
	# this is a cross-build.
Packit 6d72ef
	echo i586-pc-msdosdjgpp
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Intel:Mach:3*:*)
Packit 6d72ef
	echo i386-pc-mach3
Packit 6d72ef
	exit ;;
Packit 6d72ef
    paragon:*:*:*)
Packit 6d72ef
	echo i860-intel-osf1
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i860:*:4.*:*) # i860-SVR4
Packit 6d72ef
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
Packit 6d72ef
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
Packit 6d72ef
	else # Add other i860-SVR4 vendors below as they are discovered.
Packit 6d72ef
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    mini*:CTIX:SYS*5:*)
Packit 6d72ef
	# "miniframe"
Packit 6d72ef
	echo m68010-convergent-sysv
Packit 6d72ef
	exit ;;
Packit 6d72ef
    mc68k:UNIX:SYSTEM5:3.51m)
Packit 6d72ef
	echo m68k-convergent-sysv
Packit 6d72ef
	exit ;;
Packit 6d72ef
    M680?0:D-NIX:5.3:*)
Packit 6d72ef
	echo m68k-diab-dnix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    M68*:*:R3V[5678]*:*)
Packit 6d72ef
	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
Packit 6d72ef
    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)
Packit 6d72ef
	OS_REL=''
Packit 6d72ef
	test -r /etc/.relid \
Packit 6d72ef
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
Packit 6d72ef
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
Packit 6d72ef
	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
Packit 6d72ef
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
Packit 6d72ef
	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
Packit 6d72ef
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
Packit 6d72ef
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
Packit 6d72ef
	  && { echo i486-ncr-sysv4; exit; } ;;
Packit 6d72ef
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
Packit 6d72ef
	OS_REL='.3'
Packit 6d72ef
	test -r /etc/.relid \
Packit 6d72ef
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
Packit 6d72ef
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
Packit 6d72ef
	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
Packit 6d72ef
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
Packit 6d72ef
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
Packit 6d72ef
	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
Packit 6d72ef
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
Packit 6d72ef
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
Packit 6d72ef
	echo m68k-unknown-lynxos${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    mc68030:UNIX_System_V:4.*:*)
Packit 6d72ef
	echo m68k-atari-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    TSUNAMI:LynxOS:2.*:*)
Packit 6d72ef
	echo sparc-unknown-lynxos${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    rs6000:LynxOS:2.*:*)
Packit 6d72ef
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
Packit 6d72ef
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SM[BE]S:UNIX_SV:*:*)
Packit 6d72ef
	echo mips-dde-sysv${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    RM*:ReliantUNIX-*:*:*)
Packit 6d72ef
	echo mips-sni-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    RM*:SINIX-*:*:*)
Packit 6d72ef
	echo mips-sni-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:SINIX-*:*:*)
Packit 6d72ef
	if uname -p 2>/dev/null >/dev/null ; then
Packit 6d72ef
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
Packit 6d72ef
		echo ${UNAME_MACHINE}-sni-sysv4
Packit 6d72ef
	else
Packit 6d72ef
		echo ns32k-sni-sysv
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
Packit 6d72ef
			# says <Richard.M.Bartel@ccMail.Census.GOV>
Packit 6d72ef
	echo i586-unisys-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:UNIX_System_V:4*:FTX*)
Packit 6d72ef
	# From Gerald Hewes <hewes@openmarket.com>.
Packit 6d72ef
	# How about differentiating between stratus architectures? -djm
Packit 6d72ef
	echo hppa1.1-stratus-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:*:*:FTX*)
Packit 6d72ef
	# From seanf@swdc.stratus.com.
Packit 6d72ef
	echo i860-stratus-sysv4
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:VOS:*:*)
Packit 6d72ef
	# From Paul.Green@stratus.com.
Packit 6d72ef
	echo ${UNAME_MACHINE}-stratus-vos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:VOS:*:*)
Packit 6d72ef
	# From Paul.Green@stratus.com.
Packit 6d72ef
	echo hppa1.1-stratus-vos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    mc68*:A/UX:*:*)
Packit 6d72ef
	echo m68k-apple-aux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    news*:NEWS-OS:6*:*)
Packit 6d72ef
	echo mips-sony-newsos6
Packit 6d72ef
	exit ;;
Packit 6d72ef
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
Packit 6d72ef
	if [ -d /usr/nec ]; then
Packit 6d72ef
		echo mips-nec-sysv${UNAME_RELEASE}
Packit 6d72ef
	else
Packit 6d72ef
		echo mips-unknown-sysv${UNAME_RELEASE}
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
Packit 6d72ef
	echo powerpc-be-beos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
Packit 6d72ef
	echo powerpc-apple-beos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
Packit 6d72ef
	echo i586-pc-beos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
Packit 6d72ef
	echo i586-pc-haiku
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SX-4:SUPER-UX:*:*)
Packit 6d72ef
	echo sx4-nec-superux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SX-5:SUPER-UX:*:*)
Packit 6d72ef
	echo sx5-nec-superux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SX-6:SUPER-UX:*:*)
Packit 6d72ef
	echo sx6-nec-superux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SX-7:SUPER-UX:*:*)
Packit 6d72ef
	echo sx7-nec-superux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SX-8:SUPER-UX:*:*)
Packit 6d72ef
	echo sx8-nec-superux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SX-8R:SUPER-UX:*:*)
Packit 6d72ef
	echo sx8r-nec-superux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    Power*:Rhapsody:*:*)
Packit 6d72ef
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:Rhapsody:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:Darwin:*:*)
Packit 6d72ef
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
Packit 6d72ef
	case $UNAME_PROCESSOR in
Packit 6d72ef
	    i386)
Packit 6d72ef
		eval $set_cc_for_build
Packit 6d72ef
		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
Packit 6d72ef
		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
Packit 6d72ef
		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
Packit 6d72ef
		      grep IS_64BIT_ARCH >/dev/null
Packit 6d72ef
		  then
Packit 6d72ef
		      UNAME_PROCESSOR="x86_64"
Packit 6d72ef
		  fi
Packit 6d72ef
		fi ;;
Packit 6d72ef
	    unknown) UNAME_PROCESSOR=powerpc ;;
Packit 6d72ef
	esac
Packit 6d72ef
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
Packit 6d72ef
	UNAME_PROCESSOR=`uname -p`
Packit 6d72ef
	if test "$UNAME_PROCESSOR" = "x86"; then
Packit 6d72ef
		UNAME_PROCESSOR=i386
Packit 6d72ef
		UNAME_MACHINE=pc
Packit 6d72ef
	fi
Packit 6d72ef
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:QNX:*:4*)
Packit 6d72ef
	echo i386-pc-qnx
Packit 6d72ef
	exit ;;
Packit 6d72ef
    NEO-?:NONSTOP_KERNEL:*:*)
Packit 6d72ef
	echo neo-tandem-nsk${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    NSE-?:NONSTOP_KERNEL:*:*)
Packit 6d72ef
	echo nse-tandem-nsk${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    NSR-?:NONSTOP_KERNEL:*:*)
Packit 6d72ef
	echo nsr-tandem-nsk${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:NonStop-UX:*:*)
Packit 6d72ef
	echo mips-compaq-nonstopux
Packit 6d72ef
	exit ;;
Packit 6d72ef
    BS2000:POSIX*:*:*)
Packit 6d72ef
	echo bs2000-siemens-sysv
Packit 6d72ef
	exit ;;
Packit 6d72ef
    DS/*:UNIX_System_V:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:Plan9:*:*)
Packit 6d72ef
	# "uname -m" is not consistent, so use $cputype instead. 386
Packit 6d72ef
	# is converted to i386 for consistency with other x86
Packit 6d72ef
	# operating systems.
Packit 6d72ef
	if test "$cputype" = "386"; then
Packit 6d72ef
	    UNAME_MACHINE=i386
Packit 6d72ef
	else
Packit 6d72ef
	    UNAME_MACHINE="$cputype"
Packit 6d72ef
	fi
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-plan9
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:TOPS-10:*:*)
Packit 6d72ef
	echo pdp10-unknown-tops10
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:TENEX:*:*)
Packit 6d72ef
	echo pdp10-unknown-tenex
Packit 6d72ef
	exit ;;
Packit 6d72ef
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
Packit 6d72ef
	echo pdp10-dec-tops20
Packit 6d72ef
	exit ;;
Packit 6d72ef
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
Packit 6d72ef
	echo pdp10-xkl-tops20
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:TOPS-20:*:*)
Packit 6d72ef
	echo pdp10-unknown-tops20
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:ITS:*:*)
Packit 6d72ef
	echo pdp10-unknown-its
Packit 6d72ef
	exit ;;
Packit 6d72ef
    SEI:*:*:SEIUX)
Packit 6d72ef
	echo mips-sei-seiux${UNAME_RELEASE}
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:DragonFly:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
Packit 6d72ef
	exit ;;
Packit 6d72ef
    *:*VMS:*:*)
Packit 6d72ef
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
Packit 6d72ef
	case "${UNAME_MACHINE}" in
Packit 6d72ef
	    A*) echo alpha-dec-vms ; exit ;;
Packit 6d72ef
	    I*) echo ia64-dec-vms ; exit ;;
Packit 6d72ef
	    V*) echo vax-dec-vms ; exit ;;
Packit 6d72ef
	esac ;;
Packit 6d72ef
    *:XENIX:*:SysV)
Packit 6d72ef
	echo i386-pc-xenix
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:skyos:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:rdos:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-rdos
Packit 6d72ef
	exit ;;
Packit 6d72ef
    i*86:AROS:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-pc-aros
Packit 6d72ef
	exit ;;
Packit 6d72ef
    x86_64:VMkernel:*:*)
Packit 6d72ef
	echo ${UNAME_MACHINE}-unknown-esx
Packit 6d72ef
	exit ;;
Packit 6d72ef
esac
Packit 6d72ef
Packit 6d72ef
#echo '(No uname command or uname output not recognized.)' 1>&2
Packit 6d72ef
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
Packit 6d72ef
Packit 6d72ef
eval $set_cc_for_build
Packit 6d72ef
cat >$dummy.c <
Packit 6d72ef
#ifdef _SEQUENT_
Packit 6d72ef
# include <sys/types.h>
Packit 6d72ef
# include <sys/utsname.h>
Packit 6d72ef
#endif
Packit 6d72ef
main ()
Packit 6d72ef
{
Packit 6d72ef
#if defined (sony)
Packit 6d72ef
#if defined (MIPSEB)
Packit 6d72ef
  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
Packit 6d72ef
     I don't know....  */
Packit 6d72ef
  printf ("mips-sony-bsd\n"); exit (0);
Packit 6d72ef
#else
Packit 6d72ef
#include <sys/param.h>
Packit 6d72ef
  printf ("m68k-sony-newsos%s\n",
Packit 6d72ef
#ifdef NEWSOS4
Packit 6d72ef
	"4"
Packit 6d72ef
#else
Packit 6d72ef
	""
Packit 6d72ef
#endif
Packit 6d72ef
	); exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (__arm) && defined (__acorn) && defined (__unix)
Packit 6d72ef
  printf ("arm-acorn-riscix\n"); exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (hp300) && !defined (hpux)
Packit 6d72ef
  printf ("m68k-hp-bsd\n"); exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (NeXT)
Packit 6d72ef
#if !defined (__ARCHITECTURE__)
Packit 6d72ef
#define __ARCHITECTURE__ "m68k"
Packit 6d72ef
#endif
Packit 6d72ef
  int version;
Packit 6d72ef
  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
Packit 6d72ef
  if (version < 4)
Packit 6d72ef
    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
Packit 6d72ef
  else
Packit 6d72ef
    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
Packit 6d72ef
  exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (MULTIMAX) || defined (n16)
Packit 6d72ef
#if defined (UMAXV)
Packit 6d72ef
  printf ("ns32k-encore-sysv\n"); exit (0);
Packit 6d72ef
#else
Packit 6d72ef
#if defined (CMU)
Packit 6d72ef
  printf ("ns32k-encore-mach\n"); exit (0);
Packit 6d72ef
#else
Packit 6d72ef
  printf ("ns32k-encore-bsd\n"); exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
#endif
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (__386BSD__)
Packit 6d72ef
  printf ("i386-pc-bsd\n"); exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (sequent)
Packit 6d72ef
#if defined (i386)
Packit 6d72ef
  printf ("i386-sequent-dynix\n"); exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
#if defined (ns32000)
Packit 6d72ef
  printf ("ns32k-sequent-dynix\n"); exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (_SEQUENT_)
Packit 6d72ef
    struct utsname un;
Packit 6d72ef
Packit 6d72ef
    uname(&un;;
Packit 6d72ef
Packit 6d72ef
    if (strncmp(un.version, "V2", 2) == 0) {
Packit 6d72ef
	printf ("i386-sequent-ptx2\n"); exit (0);
Packit 6d72ef
    }
Packit 6d72ef
    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
Packit 6d72ef
	printf ("i386-sequent-ptx1\n"); exit (0);
Packit 6d72ef
    }
Packit 6d72ef
    printf ("i386-sequent-ptx\n"); exit (0);
Packit 6d72ef
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (vax)
Packit 6d72ef
# if !defined (ultrix)
Packit 6d72ef
#  include <sys/param.h>
Packit 6d72ef
#  if defined (BSD)
Packit 6d72ef
#   if BSD == 43
Packit 6d72ef
      printf ("vax-dec-bsd4.3\n"); exit (0);
Packit 6d72ef
#   else
Packit 6d72ef
#    if BSD == 199006
Packit 6d72ef
      printf ("vax-dec-bsd4.3reno\n"); exit (0);
Packit 6d72ef
#    else
Packit 6d72ef
      printf ("vax-dec-bsd\n"); exit (0);
Packit 6d72ef
#    endif
Packit 6d72ef
#   endif
Packit 6d72ef
#  else
Packit 6d72ef
    printf ("vax-dec-bsd\n"); exit (0);
Packit 6d72ef
#  endif
Packit 6d72ef
# else
Packit 6d72ef
    printf ("vax-dec-ultrix\n"); exit (0);
Packit 6d72ef
# endif
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
#if defined (alliant) && defined (i860)
Packit 6d72ef
  printf ("i860-alliant-bsd\n"); exit (0);
Packit 6d72ef
#endif
Packit 6d72ef
Packit 6d72ef
  exit (1);
Packit 6d72ef
}
Packit 6d72ef
EOF
Packit 6d72ef
Packit 6d72ef
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
Packit 6d72ef
	{ echo "$SYSTEM_NAME"; exit; }
Packit 6d72ef
Packit 6d72ef
# Apollos put the system type in the environment.
Packit 6d72ef
Packit 6d72ef
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
Packit 6d72ef
Packit 6d72ef
# Convex versions that predate uname can use getsysinfo(1)
Packit 6d72ef
Packit 6d72ef
if [ -x /usr/convex/getsysinfo ]
Packit 6d72ef
then
Packit 6d72ef
    case `getsysinfo -f cpu_type` in
Packit 6d72ef
    c1*)
Packit 6d72ef
	echo c1-convex-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    c2*)
Packit 6d72ef
	if getsysinfo -f scalar_acc
Packit 6d72ef
	then echo c32-convex-bsd
Packit 6d72ef
	else echo c2-convex-bsd
Packit 6d72ef
	fi
Packit 6d72ef
	exit ;;
Packit 6d72ef
    c34*)
Packit 6d72ef
	echo c34-convex-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    c38*)
Packit 6d72ef
	echo c38-convex-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    c4*)
Packit 6d72ef
	echo c4-convex-bsd
Packit 6d72ef
	exit ;;
Packit 6d72ef
    esac
Packit 6d72ef
fi
Packit 6d72ef
Packit 6d72ef
cat >&2 <
Packit 6d72ef
$0: unable to guess system type
Packit 6d72ef
Packit 6d72ef
This script, last modified $timestamp, has failed to recognize
Packit 6d72ef
the operating system you are using. It is advised that you
Packit 6d72ef
download the most up to date version of the config scripts from
Packit 6d72ef
Packit 6d72ef
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
Packit 6d72ef
and
Packit 6d72ef
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
Packit 6d72ef
Packit 6d72ef
If the version you run ($0) is already up to date, please
Packit 6d72ef
send the following data and any information you think might be
Packit 6d72ef
pertinent to <config-patches@gnu.org> in order to provide the needed
Packit 6d72ef
information to handle your system.
Packit 6d72ef
Packit 6d72ef
config.guess timestamp = $timestamp
Packit 6d72ef
Packit 6d72ef
uname -m = `(uname -m) 2>/dev/null || echo unknown`
Packit 6d72ef
uname -r = `(uname -r) 2>/dev/null || echo unknown`
Packit 6d72ef
uname -s = `(uname -s) 2>/dev/null || echo unknown`
Packit 6d72ef
uname -v = `(uname -v) 2>/dev/null || echo unknown`
Packit 6d72ef
Packit 6d72ef
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
Packit 6d72ef
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
Packit 6d72ef
Packit 6d72ef
hostinfo               = `(hostinfo) 2>/dev/null`
Packit 6d72ef
/bin/universe          = `(/bin/universe) 2>/dev/null`
Packit 6d72ef
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
Packit 6d72ef
/bin/arch              = `(/bin/arch) 2>/dev/null`
Packit 6d72ef
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
Packit 6d72ef
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
Packit 6d72ef
Packit 6d72ef
UNAME_MACHINE = ${UNAME_MACHINE}
Packit 6d72ef
UNAME_RELEASE = ${UNAME_RELEASE}
Packit 6d72ef
UNAME_SYSTEM  = ${UNAME_SYSTEM}
Packit 6d72ef
UNAME_VERSION = ${UNAME_VERSION}
Packit 6d72ef
EOF
Packit 6d72ef
Packit 6d72ef
exit 1
Packit 6d72ef
Packit 6d72ef
# Local variables:
Packit 6d72ef
# eval: (add-hook 'write-file-hooks 'time-stamp)
Packit 6d72ef
# time-stamp-start: "timestamp='"
Packit 6d72ef
# time-stamp-format: "%:y-%02m-%02d"
Packit 6d72ef
# time-stamp-end: "'"
Packit 6d72ef
# End: