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