head	1.5;
access;
symbols
	pkgsrc-2026Q1:1.5.0.18
	pkgsrc-2026Q1-base:1.5
	pkgsrc-2025Q4:1.5.0.16
	pkgsrc-2025Q4-base:1.5
	pkgsrc-2025Q3:1.5.0.14
	pkgsrc-2025Q3-base:1.5
	pkgsrc-2025Q2:1.5.0.12
	pkgsrc-2025Q2-base:1.5
	pkgsrc-2025Q1:1.5.0.10
	pkgsrc-2025Q1-base:1.5
	pkgsrc-2024Q4:1.5.0.8
	pkgsrc-2024Q4-base:1.5
	pkgsrc-2024Q3:1.5.0.6
	pkgsrc-2024Q3-base:1.5
	pkgsrc-2024Q2:1.5.0.4
	pkgsrc-2024Q2-base:1.5
	pkgsrc-2024Q1:1.5.0.2
	pkgsrc-2024Q1-base:1.5
	pkgsrc-2023Q4:1.4.0.84
	pkgsrc-2023Q4-base:1.4
	pkgsrc-2023Q3:1.4.0.82
	pkgsrc-2023Q3-base:1.4
	pkgsrc-2023Q2:1.4.0.80
	pkgsrc-2023Q2-base:1.4
	pkgsrc-2023Q1:1.4.0.78
	pkgsrc-2023Q1-base:1.4
	pkgsrc-2022Q4:1.4.0.76
	pkgsrc-2022Q4-base:1.4
	pkgsrc-2022Q3:1.4.0.74
	pkgsrc-2022Q3-base:1.4
	pkgsrc-2022Q2:1.4.0.72
	pkgsrc-2022Q2-base:1.4
	pkgsrc-2022Q1:1.4.0.70
	pkgsrc-2022Q1-base:1.4
	pkgsrc-2021Q4:1.4.0.68
	pkgsrc-2021Q4-base:1.4
	pkgsrc-2021Q3:1.4.0.66
	pkgsrc-2021Q3-base:1.4
	pkgsrc-2021Q2:1.4.0.64
	pkgsrc-2021Q2-base:1.4
	pkgsrc-2021Q1:1.4.0.62
	pkgsrc-2021Q1-base:1.4
	pkgsrc-2020Q4:1.4.0.60
	pkgsrc-2020Q4-base:1.4
	pkgsrc-2020Q3:1.4.0.58
	pkgsrc-2020Q3-base:1.4
	pkgsrc-2020Q2:1.4.0.54
	pkgsrc-2020Q2-base:1.4
	pkgsrc-2020Q1:1.4.0.34
	pkgsrc-2020Q1-base:1.4
	pkgsrc-2019Q4:1.4.0.56
	pkgsrc-2019Q4-base:1.4
	pkgsrc-2019Q3:1.4.0.52
	pkgsrc-2019Q3-base:1.4
	pkgsrc-2019Q2:1.4.0.50
	pkgsrc-2019Q2-base:1.4
	pkgsrc-2019Q1:1.4.0.48
	pkgsrc-2019Q1-base:1.4
	pkgsrc-2018Q4:1.4.0.46
	pkgsrc-2018Q4-base:1.4
	pkgsrc-2018Q3:1.4.0.44
	pkgsrc-2018Q3-base:1.4
	pkgsrc-2018Q2:1.4.0.42
	pkgsrc-2018Q2-base:1.4
	pkgsrc-2018Q1:1.4.0.40
	pkgsrc-2018Q1-base:1.4
	pkgsrc-2017Q4:1.4.0.38
	pkgsrc-2017Q4-base:1.4
	pkgsrc-2017Q3:1.4.0.36
	pkgsrc-2017Q3-base:1.4
	pkgsrc-2017Q2:1.4.0.32
	pkgsrc-2017Q2-base:1.4
	pkgsrc-2017Q1:1.4.0.30
	pkgsrc-2017Q1-base:1.4
	pkgsrc-2016Q4:1.4.0.28
	pkgsrc-2016Q4-base:1.4
	pkgsrc-2016Q3:1.4.0.26
	pkgsrc-2016Q3-base:1.4
	pkgsrc-2016Q2:1.4.0.24
	pkgsrc-2016Q2-base:1.4
	pkgsrc-2016Q1:1.4.0.22
	pkgsrc-2016Q1-base:1.4
	pkgsrc-2015Q4:1.4.0.20
	pkgsrc-2015Q4-base:1.4
	pkgsrc-2015Q3:1.4.0.18
	pkgsrc-2015Q3-base:1.4
	pkgsrc-2015Q2:1.4.0.16
	pkgsrc-2015Q2-base:1.4
	pkgsrc-2015Q1:1.4.0.14
	pkgsrc-2015Q1-base:1.4
	pkgsrc-2014Q4:1.4.0.12
	pkgsrc-2014Q4-base:1.4
	pkgsrc-2014Q3:1.4.0.10
	pkgsrc-2014Q3-base:1.4
	pkgsrc-2014Q2:1.4.0.8
	pkgsrc-2014Q2-base:1.4
	pkgsrc-2014Q1:1.4.0.6
	pkgsrc-2014Q1-base:1.4
	pkgsrc-2013Q4:1.4.0.4
	pkgsrc-2013Q4-base:1.4
	pkgsrc-2013Q3:1.4.0.2
	pkgsrc-2013Q3-base:1.4
	pkgsrc-2013Q2:1.3.0.56
	pkgsrc-2013Q2-base:1.3
	pkgsrc-2013Q1:1.3.0.54
	pkgsrc-2013Q1-base:1.3
	pkgsrc-2012Q4:1.3.0.52
	pkgsrc-2012Q4-base:1.3
	pkgsrc-2012Q3:1.3.0.50
	pkgsrc-2012Q3-base:1.3
	pkgsrc-2012Q2:1.3.0.48
	pkgsrc-2012Q2-base:1.3
	pkgsrc-2012Q1:1.3.0.46
	pkgsrc-2012Q1-base:1.3
	pkgsrc-2011Q4:1.3.0.44
	pkgsrc-2011Q4-base:1.3
	pkgsrc-2011Q3:1.3.0.42
	pkgsrc-2011Q3-base:1.3
	pkgsrc-2011Q2:1.3.0.40
	pkgsrc-2011Q2-base:1.3
	pkgsrc-2011Q1:1.3.0.38
	pkgsrc-2011Q1-base:1.3
	pkgsrc-2010Q4:1.3.0.36
	pkgsrc-2010Q4-base:1.3
	pkgsrc-2010Q3:1.3.0.34
	pkgsrc-2010Q3-base:1.3
	pkgsrc-2010Q2:1.3.0.32
	pkgsrc-2010Q2-base:1.3
	pkgsrc-2010Q1:1.3.0.30
	pkgsrc-2010Q1-base:1.3
	pkgsrc-2009Q4:1.3.0.28
	pkgsrc-2009Q4-base:1.3
	pkgsrc-2009Q3:1.3.0.26
	pkgsrc-2009Q3-base:1.3
	pkgsrc-2009Q2:1.3.0.24
	pkgsrc-2009Q2-base:1.3
	pkgsrc-2009Q1:1.3.0.22
	pkgsrc-2009Q1-base:1.3
	pkgsrc-2008Q4:1.3.0.20
	pkgsrc-2008Q4-base:1.3
	pkgsrc-2008Q3:1.3.0.18
	pkgsrc-2008Q3-base:1.3
	cube-native-xorg:1.3.0.16
	cube-native-xorg-base:1.3
	pkgsrc-2008Q2:1.3.0.14
	pkgsrc-2008Q2-base:1.3
	cwrapper:1.3.0.12
	pkgsrc-2008Q1:1.3.0.10
	pkgsrc-2008Q1-base:1.3
	pkgsrc-2007Q4:1.3.0.8
	pkgsrc-2007Q4-base:1.3
	pkgsrc-2007Q3:1.3.0.6
	pkgsrc-2007Q3-base:1.3
	pkgsrc-2007Q2:1.3.0.4
	pkgsrc-2007Q2-base:1.3
	pkgsrc-2007Q1:1.3.0.2
	pkgsrc-2007Q1-base:1.3
	pkgsrc-2006Q4:1.2.0.18
	pkgsrc-2006Q4-base:1.2
	pkgsrc-2006Q3:1.2.0.16
	pkgsrc-2006Q3-base:1.2
	pkgsrc-2006Q2:1.2.0.14
	pkgsrc-2006Q2-base:1.2
	pkgsrc-2006Q1:1.2.0.12
	pkgsrc-2006Q1-base:1.2
	pkgsrc-2005Q4:1.2.0.10
	pkgsrc-2005Q4-base:1.2
	pkgsrc-2005Q3:1.2.0.8
	pkgsrc-2005Q3-base:1.2
	pkgsrc-2005Q2:1.2.0.6
	pkgsrc-2005Q2-base:1.2
	pkgsrc-2005Q1:1.2.0.4
	pkgsrc-2005Q1-base:1.2
	pkgsrc-2004Q4:1.2.0.2
	pkgsrc-2004Q4-base:1.2
	pkgsrc-2004Q3:1.1.1.1.0.8
	pkgsrc-2004Q3-base:1.1.1.1
	pkgsrc-2004Q2:1.1.1.1.0.6
	pkgsrc-2004Q2-base:1.1.1.1
	pkgsrc-2004Q1:1.1.1.1.0.4
	pkgsrc-2004Q1-base:1.1.1.1
	pkgsrc-2003Q4:1.1.1.1.0.2
	pkgsrc-2003Q4-base:1.1.1.1
	pkgsrc-base:1.1.1.1
	TNF:1.1.1;
locks; strict;
comment	@# @;


1.5
date	2024.03.12.16.45.07;	author christos;	state Exp;
branches;
next	1.4;
commitid	dOj4kt3Z8LXijT1F;

1.4
date	2013.08.03.13.14.11;	author obache;	state Exp;
branches;
next	1.3;
commitid	dpWixlyTQH7YE00x;

1.3
date	2007.03.12.00.48.30;	author joerg;	state Exp;
branches;
next	1.2;

1.2
date	2004.12.12.00.46.29;	author grant;	state Exp;
branches;
next	1.1;

1.1
date	2003.08.18.17.34.56;	author agc;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2003.08.18.17.34.56;	author agc;	state Exp;
branches;
next	;


desc
@@


1.5
log
@update to the latest NetBSD sed(1)
@
text
@#! /bin/sh
# Attempt to guess a canonical system name.
#   Copyright 1992-2021 Free Software Foundation, Inc.

# shellcheck disable=SC2006,SC2268 # see below for rationale

timestamp='2021-06-03'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program.  This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
#
# Please send patches to <config-patches@@gnu.org>.


# The "shellcheck disable" line above the timestamp inhibits complaints
# about features and limitations of the classic Bourne shell that were
# superseded or lifted in POSIX.  However, this script identifies a wide
# variety of pre-POSIX systems that do not have POSIX shells at all, and
# even some reasonably current systems (Solaris 10 as case-in-point) still
# have a pre-POSIX /bin/sh.


me=`echo "$0" | sed -e 's,.*/,,'`

usage="\
Usage: $0 [OPTION]

Output the configuration name of the system \`$me' is run on.

Options:
  -h, --help         print this help, then exit
  -t, --time-stamp   print date of last modification, then exit
  -v, --version      print version number, then exit

Report bugs and patches to <config-patches@@gnu.org>."

version="\
GNU config.guess ($timestamp)

Originally written by Per Bothner.
Copyright 1992-2021 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

help="
Try \`$me --help' for more information."

# Parse command line
while test $# -gt 0 ; do
  case $1 in
    --time-stamp | --time* | -t )
       echo "$timestamp" ; exit ;;
    --version | -v )
       echo "$version" ; exit ;;
    --help | --h* | -h )
       echo "$usage"; exit ;;
    -- )     # Stop option processing
       shift; break ;;
    - )	# Use stdin as input.
       break ;;
    -* )
       echo "$me: invalid option $1$help" >&2
       exit 1 ;;
    * )
       break ;;
  esac
done

if test $# != 0; then
  echo "$me: too many arguments$help" >&2
  exit 1
fi

# Just in case it came from the environment.
GUESS=

# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.

# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.

# Portable tmp directory creation inspired by the Autoconf team.

tmp=
# shellcheck disable=SC2172
trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15

set_cc_for_build() {
    # prevent multiple calls if $tmp is already set
    test "$tmp" && return 0
    : "${TMPDIR=/tmp}"
    # shellcheck disable=SC2039,SC3028
    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
    dummy=$tmp/dummy
    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
	,,)    echo "int x;" > "$dummy.c"
	       for driver in cc gcc c89 c99 ; do
		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
		       CC_FOR_BUILD=$driver
		       break
		   fi
	       done
	       if test x"$CC_FOR_BUILD" = x ; then
		   CC_FOR_BUILD=no_compiler_found
	       fi
	       ;;
	,,*)   CC_FOR_BUILD=$CC ;;
	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    esac
}

# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@@noc.rutgers.edu 1994-08-24)
if test -f /.attbin/uname ; then
	PATH=$PATH:/.attbin ; export PATH
fi

UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown

case $UNAME_SYSTEM in
Linux|GNU|GNU/*)
	LIBC=unknown

	set_cc_for_build
	cat <<-EOF > "$dummy.c"
	#include <features.h>
	#if defined(__UCLIBC__)
	LIBC=uclibc
	#elif defined(__dietlibc__)
	LIBC=dietlibc
	#elif defined(__GLIBC__)
	LIBC=gnu
	#else
	#include <stdarg.h>
	/* First heuristic to detect musl libc.  */
	#ifdef __DEFINED_va_list
	LIBC=musl
	#endif
	#endif
	EOF
	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
	eval "$cc_set_libc"

	# Second heuristic to detect musl libc.
	if [ "$LIBC" = unknown ] &&
	   command -v ldd >/dev/null &&
	   ldd --version 2>&1 | grep -q ^musl; then
		LIBC=musl
	fi

	# If the system lacks a compiler, then just pick glibc.
	# We could probably try harder.
	if [ "$LIBC" = unknown ]; then
		LIBC=gnu
	fi
	;;
esac

# Note: order is significant - the case branches are not exclusive.

case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
    *:NetBSD:*:*)
	# NetBSD (nbsd) targets should (where applicable) match one or
	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
	# switched to ELF, *-*-netbsd* would select the old
	# object file format.  This provides both forward
	# compatibility and a consistent mechanism for selecting the
	# object file format.
	#
	# Note: NetBSD doesn't particularly care about the vendor
	# portion of the name.  We always set it to "unknown".
	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
	    echo unknown)`
	case $UNAME_MACHINE_ARCH in
	    aarch64eb) machine=aarch64_be-unknown ;;
	    armeb) machine=armeb-unknown ;;
	    arm*) machine=arm-unknown ;;
	    mipsn64eb) machine=mips64-unknown ;;
	    mipsn64el) machine=mips64el-unknown ;;
	    sh3el) machine=shl-unknown ;;
	    sh3eb) machine=sh-unknown ;;
	    sh5el) machine=sh5le-unknown ;;
	    earm*)
		arch="${UNAME_MACHINE_ARCH#e}"
		arch="${arch%eb}"
		arch="${arch%hf}"
		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
		machine=${arch}${endian}-unknown
		;;
	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
	esac
	# The Operating System including object format, if it has switched
	# to ELF recently (or will in the future) and ABI.
	case $UNAME_MACHINE_ARCH in
	    earm*)
		os=netbsdelf
		;;
	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
		set_cc_for_build
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
			| grep -q __ELF__
		then
		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
		    # Return netbsd for either.  FIX?
		    os=netbsd
		else
		    os=netbsdelf
		fi
		;;
	    *)
		os=netbsd
		;;
	esac
	# Determine ABI tags.
	case $UNAME_MACHINE_ARCH in
	    earm*)
		expr='s/v[0-9]//;s/earm/-eabi/;s/eb$//'
		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
		;;
	esac
	# The OS release
	# Debian GNU/NetBSD machines have a different userland, and
	# thus, need a distinct triplet. However, they do not need
	# kernel version information, so it can be replaced with a
	# suitable tag, in the style of linux-gnu.
	case $UNAME_VERSION in
	    Debian*)
		release='-gnu'
		;;
	    *)
		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
		;;
	esac
	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
	# contains redundant information, the shorter form:
	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
	GUESS=$machine-${os}${release}${abi-}
	;;
    *:Bitrig:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
	;;
    *:OpenBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
	;;
    *:SecBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
	;;
    *:LibertyBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
	;;
    *:MidnightBSD:*:*)
	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
	;;
    *:ekkoBSD:*:*)
	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
	;;
    *:SolidBSD:*:*)
	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
	;;
    *:OS108:*:*)
	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
	;;
    macppc:MirBSD:*:*)
	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
	;;
    *:MirBSD:*:*)
	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
	;;
    *:Sortix:*:*)
	GUESS=$UNAME_MACHINE-unknown-sortix
	;;
    *:Twizzler:*:*)
	GUESS=$UNAME_MACHINE-unknown-twizzler
	;;
    *:Redox:*:*)
	GUESS=$UNAME_MACHINE-unknown-redox
	;;
    mips:OSF1:*.*)
	GUESS=mips-dec-osf1
	;;
    alpha:OSF1:*:*)
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
	trap '' 0
	case $UNAME_RELEASE in
	*4.0)
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
		;;
	*5.*)
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
		;;
	esac
	# According to Compaq, /usr/sbin/psrinfo has been available on
	# OSF/1 and Tru64 systems produced since 1995.  I hope that
	# covers most systems running today.  This code pipes the CPU
	# types through head -n 1, so we only detect the type of CPU 0.
	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
	case $ALPHA_CPU_TYPE in
	    "EV4 (21064)")
		UNAME_MACHINE=alpha ;;
	    "EV4.5 (21064)")
		UNAME_MACHINE=alpha ;;
	    "LCA4 (21066/21068)")
		UNAME_MACHINE=alpha ;;
	    "EV5 (21164)")
		UNAME_MACHINE=alphaev5 ;;
	    "EV5.6 (21164A)")
		UNAME_MACHINE=alphaev56 ;;
	    "EV5.6 (21164PC)")
		UNAME_MACHINE=alphapca56 ;;
	    "EV5.7 (21164PC)")
		UNAME_MACHINE=alphapca57 ;;
	    "EV6 (21264)")
		UNAME_MACHINE=alphaev6 ;;
	    "EV6.7 (21264A)")
		UNAME_MACHINE=alphaev67 ;;
	    "EV6.8CB (21264C)")
		UNAME_MACHINE=alphaev68 ;;
	    "EV6.8AL (21264B)")
		UNAME_MACHINE=alphaev68 ;;
	    "EV6.8CX (21264D)")
		UNAME_MACHINE=alphaev68 ;;
	    "EV6.9A (21264/EV69A)")
		UNAME_MACHINE=alphaev69 ;;
	    "EV7 (21364)")
		UNAME_MACHINE=alphaev7 ;;
	    "EV7.9 (21364A)")
		UNAME_MACHINE=alphaev79 ;;
	esac
	# A Pn.n version is a patched version.
	# A Vn.n version is a released version.
	# A Tn.n version is a released field test version.
	# A Xn.n version is an unreleased experimental baselevel.
	# 1.2 uses "1.2" for uname -r.
	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
	;;
    Amiga*:UNIX_System_V:4.0:*)
	GUESS=m68k-unknown-sysv4
	;;
    *:[Aa]miga[Oo][Ss]:*:*)
	GUESS=$UNAME_MACHINE-unknown-amigaos
	;;
    *:[Mm]orph[Oo][Ss]:*:*)
	GUESS=$UNAME_MACHINE-unknown-morphos
	;;
    *:OS/390:*:*)
	GUESS=i370-ibm-openedition
	;;
    *:z/VM:*:*)
	GUESS=s390-ibm-zvmoe
	;;
    *:OS400:*:*)
	GUESS=powerpc-ibm-os400
	;;
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
	GUESS=arm-acorn-riscix$UNAME_RELEASE
	;;
    arm*:riscos:*:*|arm*:RISCOS:*:*)
	GUESS=arm-unknown-riscos
	;;
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
	GUESS=hppa1.1-hitachi-hiuxmpp
	;;
    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
	# akee@@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
	case `(/bin/universe) 2>/dev/null` in
	    att) GUESS=pyramid-pyramid-sysv3 ;;
	    *)   GUESS=pyramid-pyramid-bsd   ;;
	esac
	;;
    NILE*:*:*:dcosx)
	GUESS=pyramid-pyramid-svr4
	;;
    DRS?6000:unix:4.0:6*)
	GUESS=sparc-icl-nx6
	;;
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
	case `/usr/bin/uname -p` in
	    sparc) GUESS=sparc-icl-nx7 ;;
	esac
	;;
    s390x:SunOS:*:*)
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
	;;
    sun4H:SunOS:5.*:*)
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=sparc-hal-solaris2$SUN_REL
	;;
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=sparc-sun-solaris2$SUN_REL
	;;
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
	GUESS=i386-pc-auroraux$UNAME_RELEASE
	;;
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
	set_cc_for_build
	SUN_ARCH=i386
	# If there is a compiler, see if it is configured for 64-bit objects.
	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
	# This test works for both compilers.
	if test "$CC_FOR_BUILD" != no_compiler_found; then
	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
		grep IS_64BIT_ARCH >/dev/null
	    then
		SUN_ARCH=x86_64
	    fi
	fi
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
	;;
    sun4*:SunOS:6*:*)
	# According to config.sub, this is the proper way to canonicalize
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
	# it's likely to be more like Solaris than SunOS4.
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=sparc-sun-solaris3$SUN_REL
	;;
    sun4*:SunOS:*:*)
	case `/usr/bin/arch -k` in
	    Series*|S4*)
		UNAME_RELEASE=`uname -v`
		;;
	esac
	# Japanese Language versions have a version number like `4.1.3-JL'.
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
	GUESS=sparc-sun-sunos$SUN_REL
	;;
    sun3*:SunOS:*:*)
	GUESS=m68k-sun-sunos$UNAME_RELEASE
	;;
    sun*:*:4.2BSD:*)
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
	case `/bin/arch` in
	    sun3)
		GUESS=m68k-sun-sunos$UNAME_RELEASE
		;;
	    sun4)
		GUESS=sparc-sun-sunos$UNAME_RELEASE
		;;
	esac
	;;
    aushp:SunOS:*:*)
	GUESS=sparc-auspex-sunos$UNAME_RELEASE
	;;
    # The situation for MiNT is a little confusing.  The machine name
    # can be virtually everything (everything which is not
    # "atarist" or "atariste" at least should have a processor
    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
    # to the lowercase version "mint" (or "freemint").  Finally
    # the system name "TOS" denotes a system which is actually not
    # MiNT.  But MiNT is downward compatible to TOS, so this should
    # be no problem.
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
	GUESS=m68k-atari-mint$UNAME_RELEASE
	;;
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
	GUESS=m68k-atari-mint$UNAME_RELEASE
	;;
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
	GUESS=m68k-atari-mint$UNAME_RELEASE
	;;
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
	GUESS=m68k-milan-mint$UNAME_RELEASE
	;;
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
	GUESS=m68k-hades-mint$UNAME_RELEASE
	;;
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
	GUESS=m68k-unknown-mint$UNAME_RELEASE
	;;
    m68k:machten:*:*)
	GUESS=m68k-apple-machten$UNAME_RELEASE
	;;
    powerpc:machten:*:*)
	GUESS=powerpc-apple-machten$UNAME_RELEASE
	;;
    RISC*:Mach:*:*)
	GUESS=mips-dec-mach_bsd4.3
	;;
    RISC*:ULTRIX:*:*)
	GUESS=mips-dec-ultrix$UNAME_RELEASE
	;;
    VAX*:ULTRIX*:*:*)
	GUESS=vax-dec-ultrix$UNAME_RELEASE
	;;
    2020:CLIX:*:* | 2430:CLIX:*:*)
	GUESS=clipper-intergraph-clix$UNAME_RELEASE
	;;
    mips:*:*:UMIPS | mips:*:*:RISCos)
	set_cc_for_build
	sed 's/^	//' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h>  /* for printf() prototype */
	int main (int argc, char *argv[]) {
#else
	int main (argc, argv) int argc; char *argv[]; {
#endif
	#if defined (host_mips) && defined (MIPSEB)
	#if defined (SYSTYPE_SYSV)
	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
	#endif
	#if defined (SYSTYPE_SVR4)
	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
	#endif
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
	#endif
	#endif
	  exit (-1);
	}
EOF
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
	    { echo "$SYSTEM_NAME"; exit; }
	GUESS=mips-mips-riscos$UNAME_RELEASE
	;;
    Motorola:PowerMAX_OS:*:*)
	GUESS=powerpc-motorola-powermax
	;;
    Motorola:*:4.3:PL8-*)
	GUESS=powerpc-harris-powermax
	;;
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
	GUESS=powerpc-harris-powermax
	;;
    Night_Hawk:Power_UNIX:*:*)
	GUESS=powerpc-harris-powerunix
	;;
    m88k:CX/UX:7*:*)
	GUESS=m88k-harris-cxux7
	;;
    m88k:*:4*:R4*)
	GUESS=m88k-motorola-sysv4
	;;
    m88k:*:3*:R3*)
	GUESS=m88k-motorola-sysv3
	;;
    AViiON:dgux:*:*)
	# DG/UX returns AViiON for all architectures
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
	then
	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
	       test "$TARGET_BINARY_INTERFACE"x = x
	    then
		GUESS=m88k-dg-dgux$UNAME_RELEASE
	    else
		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
	    fi
	else
	    GUESS=i586-dg-dgux$UNAME_RELEASE
	fi
	;;
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
	GUESS=m88k-dolphin-sysv3
	;;
    M88*:*:R3*:*)
	# Delta 88k system running SVR3
	GUESS=m88k-motorola-sysv3
	;;
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
	GUESS=m88k-tektronix-sysv3
	;;
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
	GUESS=m68k-tektronix-bsd
	;;
    *:IRIX*:*:*)
	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
	GUESS=mips-sgi-irix$IRIX_REL
	;;
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
    i*86:AIX:*:*)
	GUESS=i386-ibm-aix
	;;
    ia64:AIX:*:*)
	if test -x /usr/bin/oslevel ; then
		IBM_REV=`/usr/bin/oslevel`
	else
		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
	fi
	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
	;;
    *:AIX:2:3)
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
		set_cc_for_build
		sed 's/^		//' << EOF > "$dummy.c"
		#include <sys/systemcfg.h>

		main()
			{
			if (!__power_pc())
				exit(1);
			puts("powerpc-ibm-aix3.2.5");
			exit(0);
			}
EOF
		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
		then
			GUESS=$SYSTEM_NAME
		else
			GUESS=rs6000-ibm-aix3.2.5
		fi
	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
		GUESS=rs6000-ibm-aix3.2.4
	else
		GUESS=rs6000-ibm-aix3.2
	fi
	;;
    *:AIX:*:[4567])
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
		IBM_ARCH=rs6000
	else
		IBM_ARCH=powerpc
	fi
	if test -x /usr/bin/lslpp ; then
		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
	else
		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
	fi
	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
	;;
    *:AIX:*:*)
	GUESS=rs6000-ibm-aix
	;;
    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
	GUESS=romp-ibm-bsd4.4
	;;
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
	;;                                  # report: romp-ibm BSD 4.3
    *:BOSX:*:*)
	GUESS=rs6000-bull-bosx
	;;
    DPX/2?00:B.O.S.:*:*)
	GUESS=m68k-bull-sysv3
	;;
    9000/[34]??:4.3bsd:1.*:*)
	GUESS=m68k-hp-bsd
	;;
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
	GUESS=m68k-hp-bsd4.4
	;;
    9000/[34678]??:HP-UX:*:*)
	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
	case $UNAME_MACHINE in
	    9000/31?)            HP_ARCH=m68000 ;;
	    9000/[34]??)         HP_ARCH=m68k ;;
	    9000/[678][0-9][0-9])
		if test -x /usr/bin/getconf; then
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
		    case $sc_cpu_version in
		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
		      532)                      # CPU_PA_RISC2_0
			case $sc_kernel_bits in
			  32) HP_ARCH=hppa2.0n ;;
			  64) HP_ARCH=hppa2.0w ;;
			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
			esac ;;
		    esac
		fi
		if test "$HP_ARCH" = ""; then
		    set_cc_for_build
		    sed 's/^		//' << EOF > "$dummy.c"

		#define _HPUX_SOURCE
		#include <stdlib.h>
		#include <unistd.h>

		int main ()
		{
		#if defined(_SC_KERNEL_BITS)
		    long bits = sysconf(_SC_KERNEL_BITS);
		#endif
		    long cpu  = sysconf (_SC_CPU_VERSION);

		    switch (cpu)
			{
			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
			case CPU_PA_RISC2_0:
		#if defined(_SC_KERNEL_BITS)
			    switch (bits)
				{
				case 64: puts ("hppa2.0w"); break;
				case 32: puts ("hppa2.0n"); break;
				default: puts ("hppa2.0"); break;
				} break;
		#else  /* !defined(_SC_KERNEL_BITS) */
			    puts ("hppa2.0"); break;
		#endif
			default: puts ("hppa1.0"); break;
			}
		    exit (0);
		}
EOF
		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
		    test -z "$HP_ARCH" && HP_ARCH=hppa
		fi ;;
	esac
	if test "$HP_ARCH" = hppa2.0w
	then
	    set_cc_for_build

	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
	    # generating 64-bit code.  GNU and HP use different nomenclature:
	    #
	    # $ CC_FOR_BUILD=cc ./config.guess
	    # => hppa2.0w-hp-hpux11.23
	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
	    # => hppa64-hp-hpux11.23

	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
		grep -q __LP64__
	    then
		HP_ARCH=hppa2.0w
	    else
		HP_ARCH=hppa64
	    fi
	fi
	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
	;;
    ia64:HP-UX:*:*)
	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
	GUESS=ia64-hp-hpux$HPUX_REV
	;;
    3050*:HI-UX:*:*)
	set_cc_for_build
	sed 's/^	//' << EOF > "$dummy.c"
	#include <unistd.h>
	int
	main ()
	{
	  long cpu = sysconf (_SC_CPU_VERSION);
	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
	     results, however.  */
	  if (CPU_IS_PA_RISC (cpu))
	    {
	      switch (cpu)
		{
		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
		  default: puts ("hppa-hitachi-hiuxwe2"); break;
		}
	    }
	  else if (CPU_IS_HP_MC68K (cpu))
	    puts ("m68k-hitachi-hiuxwe2");
	  else puts ("unknown-hitachi-hiuxwe2");
	  exit (0);
	}
EOF
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
		{ echo "$SYSTEM_NAME"; exit; }
	GUESS=unknown-hitachi-hiuxwe2
	;;
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
	GUESS=hppa1.1-hp-bsd
	;;
    9000/8??:4.3bsd:*:*)
	GUESS=hppa1.0-hp-bsd
	;;
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
	GUESS=hppa1.0-hp-mpeix
	;;
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
	GUESS=hppa1.1-hp-osf
	;;
    hp8??:OSF1:*:*)
	GUESS=hppa1.0-hp-osf
	;;
    i*86:OSF1:*:*)
	if test -x /usr/sbin/sysversion ; then
	    GUESS=$UNAME_MACHINE-unknown-osf1mk
	else
	    GUESS=$UNAME_MACHINE-unknown-osf1
	fi
	;;
    parisc*:Lites*:*:*)
	GUESS=hppa1.1-hp-lites
	;;
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
	GUESS=c1-convex-bsd
	;;
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
	if getsysinfo -f scalar_acc
	then echo c32-convex-bsd
	else echo c2-convex-bsd
	fi
	exit ;;
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
	GUESS=c34-convex-bsd
	;;
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
	GUESS=c38-convex-bsd
	;;
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
	GUESS=c4-convex-bsd
	;;
    CRAY*Y-MP:*:*:*)
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=ymp-cray-unicos$CRAY_REL
	;;
    CRAY*[A-Z]90:*:*:*)
	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
	      -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*TS:*:*:*)
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=t90-cray-unicos$CRAY_REL
	;;
    CRAY*T3E:*:*:*)
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=alphaev5-cray-unicosmk$CRAY_REL
	;;
    CRAY*SV1:*:*:*)
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=sv1-cray-unicos$CRAY_REL
	;;
    *:UNICOS/mp:*:*)
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=craynv-cray-unicosmp$CRAY_REL
	;;
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
	;;
    5000:UNIX_System_V:4.*:*)
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
	;;
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
	;;
    sparc*:BSD/OS:*:*)
	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
	;;
    *:BSD/OS:*:*)
	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
	;;
    arm:FreeBSD:*:*)
	UNAME_PROCESSOR=`uname -p`
	set_cc_for_build
	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
	    | grep -q __ARM_PCS_VFP
	then
	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
	else
	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
	fi
	;;
    *:FreeBSD:*:*)
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	case $UNAME_PROCESSOR in
	    amd64)
		UNAME_PROCESSOR=x86_64 ;;
	    i386)
		UNAME_PROCESSOR=i586 ;;
	esac
	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
	;;
    i*:CYGWIN*:*)
	GUESS=$UNAME_MACHINE-pc-cygwin
	;;
    *:MINGW64*:*)
	GUESS=$UNAME_MACHINE-pc-mingw64
	;;
    *:MINGW*:*)
	GUESS=$UNAME_MACHINE-pc-mingw32
	;;
    *:MSYS*:*)
	GUESS=$UNAME_MACHINE-pc-msys
	;;
    i*:PW*:*)
	GUESS=$UNAME_MACHINE-pc-pw32
	;;
    *:Interix*:*)
	case $UNAME_MACHINE in
	    x86)
		GUESS=i586-pc-interix$UNAME_RELEASE
		;;
	    authenticamd | genuineintel | EM64T)
		GUESS=x86_64-unknown-interix$UNAME_RELEASE
		;;
	    IA64)
		GUESS=ia64-unknown-interix$UNAME_RELEASE
		;;
	esac ;;
    i*:UWIN*:*)
	GUESS=$UNAME_MACHINE-pc-uwin
	;;
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
	GUESS=x86_64-pc-cygwin
	;;
    prep*:SunOS:5.*:*)
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=powerpcle-unknown-solaris2$SUN_REL
	;;
    *:GNU:*:*)
	# the GNU system
	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
	;;
    *:GNU/*:*:*)
	# other systems with GNU libc and userland
	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
	;;
    *:Minix:*:*)
	GUESS=$UNAME_MACHINE-unknown-minix
	;;
    aarch64:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    aarch64_be:Linux:*:*)
	UNAME_MACHINE=aarch64_be
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    alpha:Linux:*:*)
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
	  EV5)   UNAME_MACHINE=alphaev5 ;;
	  EV56)  UNAME_MACHINE=alphaev56 ;;
	  PCA56) UNAME_MACHINE=alphapca56 ;;
	  PCA57) UNAME_MACHINE=alphapca56 ;;
	  EV6)   UNAME_MACHINE=alphaev6 ;;
	  EV67)  UNAME_MACHINE=alphaev67 ;;
	  EV68*) UNAME_MACHINE=alphaev68 ;;
	esac
	objdump --private-headers /bin/sh | grep -q ld.so.1
	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    arm*:Linux:*:*)
	set_cc_for_build
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
	    | grep -q __ARM_EABI__
	then
	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	else
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
		| grep -q __ARM_PCS_VFP
	    then
		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
	    else
		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
	    fi
	fi
	;;
    avr32*:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    cris:Linux:*:*)
	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
	;;
    crisv32:Linux:*:*)
	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
	;;
    e2k:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    frv:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    hexagon:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    i*86:Linux:*:*)
	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
	;;
    ia64:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    k1om:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    m32r*:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    m68*:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    mips:Linux:*:* | mips64:Linux:*:*)
	set_cc_for_build
	IS_GLIBC=0
	test x"${LIBC}" = xgnu && IS_GLIBC=1
	sed 's/^	//' << EOF > "$dummy.c"
	#undef CPU
	#undef mips
	#undef mipsel
	#undef mips64
	#undef mips64el
	#if ${IS_GLIBC} && defined(_ABI64)
	LIBCABI=gnuabi64
	#else
	#if ${IS_GLIBC} && defined(_ABIN32)
	LIBCABI=gnuabin32
	#else
	LIBCABI=${LIBC}
	#endif
	#endif

	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
	CPU=mipsisa64r6
	#else
	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
	CPU=mipsisa32r6
	#else
	#if defined(__mips64)
	CPU=mips64
	#else
	CPU=mips
	#endif
	#endif
	#endif

	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
	MIPS_ENDIAN=el
	#else
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
	MIPS_ENDIAN=
	#else
	MIPS_ENDIAN=
	#endif
	#endif
EOF
	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
	eval "$cc_set_vars"
	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
	;;
    mips64el:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    openrisc*:Linux:*:*)
	GUESS=or1k-unknown-linux-$LIBC
	;;
    or32:Linux:*:* | or1k*:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    padre:Linux:*:*)
	GUESS=sparc-unknown-linux-$LIBC
	;;
    parisc64:Linux:*:* | hppa64:Linux:*:*)
	GUESS=hppa64-unknown-linux-$LIBC
	;;
    parisc:Linux:*:* | hppa:Linux:*:*)
	# Look for CPU level
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
	esac
	;;
    ppc64:Linux:*:*)
	GUESS=powerpc64-unknown-linux-$LIBC
	;;
    ppc:Linux:*:*)
	GUESS=powerpc-unknown-linux-$LIBC
	;;
    ppc64le:Linux:*:*)
	GUESS=powerpc64le-unknown-linux-$LIBC
	;;
    ppcle:Linux:*:*)
	GUESS=powerpcle-unknown-linux-$LIBC
	;;
    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    s390:Linux:*:* | s390x:Linux:*:*)
	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
	;;
    sh64*:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    sh*:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    sparc:Linux:*:* | sparc64:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    tile*:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    vax:Linux:*:*)
	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
	;;
    x86_64:Linux:*:*)
	set_cc_for_build
	LIBCABI=$LIBC
	if test "$CC_FOR_BUILD" != no_compiler_found; then
	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
		grep IS_X32 >/dev/null
	    then
		LIBCABI=${LIBC}x32
	    fi
	fi
	GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
	;;
    xtensa*:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    i*86:DYNIX/ptx:4*:*)
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
	# earlier versions are messed up and put the nodename in both
	# sysname and nodename.
	GUESS=i386-sequent-sysv4
	;;
    i*86:UNIX_SV:4.2MP:2.*)
	# Unixware is an offshoot of SVR4, but it has its own version
	# number series starting with 2...
	# I am not positive that other SVR4 systems won't match this,
	# I just have to hope.  -- rms.
	# Use sysv4.2uw... so that sysv4* matches it.
	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
	;;
    i*86:OS/2:*:*)
	# If we were able to find `uname', then EMX Unix compatibility
	# is probably installed.
	GUESS=$UNAME_MACHINE-pc-os2-emx
	;;
    i*86:XTS-300:*:STOP)
	GUESS=$UNAME_MACHINE-unknown-stop
	;;
    i*86:atheos:*:*)
	GUESS=$UNAME_MACHINE-unknown-atheos
	;;
    i*86:syllable:*:*)
	GUESS=$UNAME_MACHINE-pc-syllable
	;;
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
	GUESS=i386-unknown-lynxos$UNAME_RELEASE
	;;
    i*86:*DOS:*:*)
	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
	;;
    i*86:*:4.*:*)
	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
	else
		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
	fi
	;;
    i*86:*:5:[678]*)
	# UnixWare 7.x, OpenUNIX and OpenServer 6.
	case `/bin/uname -X | grep "^Machine"` in
	    *486*)	     UNAME_MACHINE=i486 ;;
	    *Pentium)	     UNAME_MACHINE=i586 ;;
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
	esac
	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
	;;
    i*86:*:3.2:*)
	if test -f /usr/options/cb.name; then
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
			&& UNAME_MACHINE=i586
		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
			&& UNAME_MACHINE=i686
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
			&& UNAME_MACHINE=i686
		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
	else
		GUESS=$UNAME_MACHINE-pc-sysv32
	fi
	;;
    pc:*:*:*)
	# Left here for compatibility:
	# uname -m prints for DJGPP always 'pc', but it prints nothing about
	# the processor, so we play safe by assuming i586.
	# Note: whatever this is, it MUST be the same as what config.sub
	# prints for the "djgpp" host, or else GDB configure will decide that
	# this is a cross-build.
	GUESS=i586-pc-msdosdjgpp
	;;
    Intel:Mach:3*:*)
	GUESS=i386-pc-mach3
	;;
    paragon:*:*:*)
	GUESS=i860-intel-osf1
	;;
    i860:*:4.*:*) # i860-SVR4
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
	else # Add other i860-SVR4 vendors below as they are discovered.
	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
	fi
	;;
    mini*:CTIX:SYS*5:*)
	# "miniframe"
	GUESS=m68010-convergent-sysv
	;;
    mc68k:UNIX:SYSTEM5:3.51m)
	GUESS=m68k-convergent-sysv
	;;
    M680?0:D-NIX:5.3:*)
	GUESS=m68k-diab-dnix
	;;
    M68*:*:R3V[5678]*:*)
	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
    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)
	OS_REL=''
	test -r /etc/.relid \
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	  && { echo i486-ncr-sysv4; exit; } ;;
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
	OS_REL='.3'
	test -r /etc/.relid \
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
	;;
    mc68030:UNIX_System_V:4.*:*)
	GUESS=m68k-atari-sysv4
	;;
    TSUNAMI:LynxOS:2.*:*)
	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
	;;
    rs6000:LynxOS:2.*:*)
	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
	;;
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
	;;
    SM[BE]S:UNIX_SV:*:*)
	GUESS=mips-dde-sysv$UNAME_RELEASE
	;;
    RM*:ReliantUNIX-*:*:*)
	GUESS=mips-sni-sysv4
	;;
    RM*:SINIX-*:*:*)
	GUESS=mips-sni-sysv4
	;;
    *:SINIX-*:*:*)
	if uname -p 2>/dev/null >/dev/null ; then
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
		GUESS=$UNAME_MACHINE-sni-sysv4
	else
		GUESS=ns32k-sni-sysv
	fi
	;;
    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
			# says <Richard.M.Bartel@@ccMail.Census.GOV>
	GUESS=i586-unisys-sysv4
	;;
    *:UNIX_System_V:4*:FTX*)
	# From Gerald Hewes <hewes@@openmarket.com>.
	# How about differentiating between stratus architectures? -djm
	GUESS=hppa1.1-stratus-sysv4
	;;
    *:*:*:FTX*)
	# From seanf@@swdc.stratus.com.
	GUESS=i860-stratus-sysv4
	;;
    i*86:VOS:*:*)
	# From Paul.Green@@stratus.com.
	GUESS=$UNAME_MACHINE-stratus-vos
	;;
    *:VOS:*:*)
	# From Paul.Green@@stratus.com.
	GUESS=hppa1.1-stratus-vos
	;;
    mc68*:A/UX:*:*)
	GUESS=m68k-apple-aux$UNAME_RELEASE
	;;
    news*:NEWS-OS:6*:*)
	GUESS=mips-sony-newsos6
	;;
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
	if test -d /usr/nec; then
		GUESS=mips-nec-sysv$UNAME_RELEASE
	else
		GUESS=mips-unknown-sysv$UNAME_RELEASE
	fi
	;;
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
	GUESS=powerpc-be-beos
	;;
    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
	GUESS=powerpc-apple-beos
	;;
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
	GUESS=i586-pc-beos
	;;
    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
	GUESS=i586-pc-haiku
	;;
    x86_64:Haiku:*:*)
	GUESS=x86_64-unknown-haiku
	;;
    SX-4:SUPER-UX:*:*)
	GUESS=sx4-nec-superux$UNAME_RELEASE
	;;
    SX-5:SUPER-UX:*:*)
	GUESS=sx5-nec-superux$UNAME_RELEASE
	;;
    SX-6:SUPER-UX:*:*)
	GUESS=sx6-nec-superux$UNAME_RELEASE
	;;
    SX-7:SUPER-UX:*:*)
	GUESS=sx7-nec-superux$UNAME_RELEASE
	;;
    SX-8:SUPER-UX:*:*)
	GUESS=sx8-nec-superux$UNAME_RELEASE
	;;
    SX-8R:SUPER-UX:*:*)
	GUESS=sx8r-nec-superux$UNAME_RELEASE
	;;
    SX-ACE:SUPER-UX:*:*)
	GUESS=sxace-nec-superux$UNAME_RELEASE
	;;
    Power*:Rhapsody:*:*)
	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
	;;
    *:Rhapsody:*:*)
	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
	;;
    arm64:Darwin:*:*)
	GUESS=aarch64-apple-darwin$UNAME_RELEASE
	;;
    *:Darwin:*:*)
	UNAME_PROCESSOR=`uname -p`
	case $UNAME_PROCESSOR in
	    unknown) UNAME_PROCESSOR=powerpc ;;
	esac
	if command -v xcode-select > /dev/null 2> /dev/null && \
		! xcode-select --print-path > /dev/null 2> /dev/null ; then
	    # Avoid executing cc if there is no toolchain installed as
	    # cc will be a stub that puts up a graphical alert
	    # prompting the user to install developer tools.
	    CC_FOR_BUILD=no_compiler_found
	else
	    set_cc_for_build
	fi
	if test "$CC_FOR_BUILD" != no_compiler_found; then
	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
		   grep IS_64BIT_ARCH >/dev/null
	    then
		case $UNAME_PROCESSOR in
		    i386) UNAME_PROCESSOR=x86_64 ;;
		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
		esac
	    fi
	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
		   grep IS_PPC >/dev/null
	    then
		UNAME_PROCESSOR=powerpc
	    fi
	elif test "$UNAME_PROCESSOR" = i386 ; then
	    # uname -m returns i386 or x86_64
	    UNAME_PROCESSOR=$UNAME_MACHINE
	fi
	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
	;;
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
	UNAME_PROCESSOR=`uname -p`
	if test "$UNAME_PROCESSOR" = x86; then
		UNAME_PROCESSOR=i386
		UNAME_MACHINE=pc
	fi
	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
	;;
    *:QNX:*:4*)
	GUESS=i386-pc-qnx
	;;
    NEO-*:NONSTOP_KERNEL:*:*)
	GUESS=neo-tandem-nsk$UNAME_RELEASE
	;;
    NSE-*:NONSTOP_KERNEL:*:*)
	GUESS=nse-tandem-nsk$UNAME_RELEASE
	;;
    NSR-*:NONSTOP_KERNEL:*:*)
	GUESS=nsr-tandem-nsk$UNAME_RELEASE
	;;
    NSV-*:NONSTOP_KERNEL:*:*)
	GUESS=nsv-tandem-nsk$UNAME_RELEASE
	;;
    NSX-*:NONSTOP_KERNEL:*:*)
	GUESS=nsx-tandem-nsk$UNAME_RELEASE
	;;
    *:NonStop-UX:*:*)
	GUESS=mips-compaq-nonstopux
	;;
    BS2000:POSIX*:*:*)
	GUESS=bs2000-siemens-sysv
	;;
    DS/*:UNIX_System_V:*:*)
	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
	;;
    *:Plan9:*:*)
	# "uname -m" is not consistent, so use $cputype instead. 386
	# is converted to i386 for consistency with other x86
	# operating systems.
	if test "${cputype-}" = 386; then
	    UNAME_MACHINE=i386
	elif test "x${cputype-}" != x; then
	    UNAME_MACHINE=$cputype
	fi
	GUESS=$UNAME_MACHINE-unknown-plan9
	;;
    *:TOPS-10:*:*)
	GUESS=pdp10-unknown-tops10
	;;
    *:TENEX:*:*)
	GUESS=pdp10-unknown-tenex
	;;
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
	GUESS=pdp10-dec-tops20
	;;
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
	GUESS=pdp10-xkl-tops20
	;;
    *:TOPS-20:*:*)
	GUESS=pdp10-unknown-tops20
	;;
    *:ITS:*:*)
	GUESS=pdp10-unknown-its
	;;
    SEI:*:*:SEIUX)
	GUESS=mips-sei-seiux$UNAME_RELEASE
	;;
    *:DragonFly:*:*)
	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
	;;
    *:*VMS:*:*)
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
	case $UNAME_MACHINE in
	    A*) GUESS=alpha-dec-vms ;;
	    I*) GUESS=ia64-dec-vms ;;
	    V*) GUESS=vax-dec-vms ;;
	esac ;;
    *:XENIX:*:SysV)
	GUESS=i386-pc-xenix
	;;
    i*86:skyos:*:*)
	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
	;;
    i*86:rdos:*:*)
	GUESS=$UNAME_MACHINE-pc-rdos
	;;
    *:AROS:*:*)
	GUESS=$UNAME_MACHINE-unknown-aros
	;;
    x86_64:VMkernel:*:*)
	GUESS=$UNAME_MACHINE-unknown-esx
	;;
    amd64:Isilon\ OneFS:*:*)
	GUESS=x86_64-unknown-onefs
	;;
    *:Unleashed:*:*)
	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
	;;
esac

# Do we have a guess based on uname results?
if test "x$GUESS" != x; then
    echo "$GUESS"
    exit
fi

# No uname command or uname output not recognized.
set_cc_for_build
cat > "$dummy.c" <<EOF
#ifdef _SEQUENT_
#include <sys/types.h>
#include <sys/utsname.h>
#endif
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
#include <signal.h>
#if defined(_SIZE_T_) || defined(SIGLOST)
#include <sys/utsname.h>
#endif
#endif
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
     I don't know....  */
  printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
  printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
  "4"
#else
  ""
#endif
  ); exit (0);
#endif
#endif

#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
  int version;
  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  if (version < 4)
    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  else
    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  exit (0);
#endif

#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
  printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
  printf ("ns32k-encore-mach\n"); exit (0);
#else
  printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif

#if defined (__386BSD__)
  printf ("i386-pc-bsd\n"); exit (0);
#endif

#if defined (sequent)
#if defined (i386)
  printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
  printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif

#if defined (_SEQUENT_)
  struct utsname un;

  uname(&un);
  if (strncmp(un.version, "V2", 2) == 0) {
    printf ("i386-sequent-ptx2\n"); exit (0);
  }
  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
    printf ("i386-sequent-ptx1\n"); exit (0);
  }
  printf ("i386-sequent-ptx\n"); exit (0);
#endif

#if defined (vax)
#if !defined (ultrix)
#include <sys/param.h>
#if defined (BSD)
#if BSD == 43
  printf ("vax-dec-bsd4.3\n"); exit (0);
#else
#if BSD == 199006
  printf ("vax-dec-bsd4.3reno\n"); exit (0);
#else
  printf ("vax-dec-bsd\n"); exit (0);
#endif
#endif
#else
  printf ("vax-dec-bsd\n"); exit (0);
#endif
#else
#if defined(_SIZE_T_) || defined(SIGLOST)
  struct utsname un;
  uname (&un);
  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
#else
  printf ("vax-dec-ultrix\n"); exit (0);
#endif
#endif
#endif
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
#if defined(_SIZE_T_) || defined(SIGLOST)
  struct utsname *un;
  uname (&un);
  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
#else
  printf ("mips-dec-ultrix\n"); exit (0);
#endif
#endif
#endif

#if defined (alliant) && defined (i860)
  printf ("i860-alliant-bsd\n"); exit (0);
#endif

  exit (1);
}
EOF

$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
	{ echo "$SYSTEM_NAME"; exit; }

# Apollos put the system type in the environment.
test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }

echo "$0: unable to guess system type" >&2

case $UNAME_MACHINE:$UNAME_SYSTEM in
    mips:Linux | mips64:Linux)
	# If we got here on MIPS GNU/Linux, output extra information.
	cat >&2 <<EOF

NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
the system type. Please install a C compiler and try again.
EOF
	;;
esac

cat >&2 <<EOF

This script (version $timestamp), has failed to recognize the
operating system you are using. If your script is old, overwrite *all*
copies of config.guess and config.sub with the latest versions from:

  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
and
  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
EOF

our_year=`echo $timestamp | sed 's,-.*,,'`
thisyear=`date +%Y`
# shellcheck disable=SC2003
script_age=`expr "$thisyear" - "$our_year"`
if test "$script_age" -lt 3 ; then
   cat >&2 <<EOF

If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@@gnu.org to
provide the necessary information to handle your system.

config.guess timestamp = $timestamp

uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`

hostinfo               = `(hostinfo) 2>/dev/null`
/bin/universe          = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch              = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`

UNAME_MACHINE = "$UNAME_MACHINE"
UNAME_RELEASE = "$UNAME_RELEASE"
UNAME_SYSTEM  = "$UNAME_SYSTEM"
UNAME_VERSION = "$UNAME_VERSION"
EOF
fi

exit 1

# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
@


1.4
log
@Update config.{guess,sub} from pkgsrc/mk/gnu-configure, for the case
required in bootstrap pkgsrc.
@
text
@d3 1
a3 3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
#   Free Software Foundation, Inc.
d5 3
a7 1
timestamp='2009-12-30'
d11 1
a11 1
# the Free Software Foundation; either version 2 of the License, or
d20 1
a20 3
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
d25 3
a27 6
# the same distribution terms that you use for the rest of that program.


# Originally written by Per Bothner.  Please send patches (context
# diff format) to <config-patches@@gnu.org> and include a ChangeLog
# entry.
d29 1
a29 3
# This script attempts to guess a canonical system name similar to
# config.sub.  If it succeeds, it prints the system name on stdout, and
# exits with 0.  Otherwise, it exits with 1.
d32 12
a43 1
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
d52 1
a52 1
Operation modes:
d63 1
a63 3
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
d97 2
a98 1
trap 'exit 1' 1 2 15
d110 30
a139 24
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
 ,,)    echo "int x;" > $dummy.c ;
	for c in cc gcc c89 c99 ; do
	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
	     CC_FOR_BUILD="$c"; break ;
	  fi ;
	done ;
	if test x"$CC_FOR_BUILD" = x ; then
	  CC_FOR_BUILD=no_compiler_found ;
	fi
	;;
 ,,*)   CC_FOR_BUILD=$CC ;;
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'
d143 1
a143 1
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
d149 1
a149 1
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
d152 39
d193 1
a193 1
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
d196 1
a196 1
	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
d205 6
a210 4
	sysctl="sysctl -n hw.machine_arch"
	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
	case "${UNAME_MACHINE_ARCH}" in
d213 2
d218 8
a225 1
	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
d228 5
a232 2
	# to ELF recently, or will in the future.
	case "${UNAME_MACHINE_ARCH}" in
d234 1
a234 1
		eval $set_cc_for_build
d246 8
a253 1
	        os=netbsd
d261 1
a261 1
	case "${UNAME_VERSION}" in
d266 1
a266 1
		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
d272 6
a277 2
	echo "${machine}-${os}${release}"
	exit ;;
d280 13
a292 2
	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
	exit ;;
d294 2
a295 2
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
	exit ;;
d297 5
a301 2
	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
	exit ;;
d303 2
a304 2
	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
	exit ;;
d306 14
a319 2
	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
	exit ;;
d321 2
d328 1
a328 1
	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
d336 1
a336 1
	case "$ALPHA_CPU_TYPE" in
d338 1
a338 1
		UNAME_MACHINE="alpha" ;;
d340 1
a340 1
		UNAME_MACHINE="alpha" ;;
d342 1
a342 1
		UNAME_MACHINE="alpha" ;;
d344 1
a344 1
		UNAME_MACHINE="alphaev5" ;;
d346 1
a346 1
		UNAME_MACHINE="alphaev56" ;;
d348 1
a348 1
		UNAME_MACHINE="alphapca56" ;;
d350 1
a350 1
		UNAME_MACHINE="alphapca57" ;;
d352 1
a352 1
		UNAME_MACHINE="alphaev6" ;;
d354 1
a354 1
		UNAME_MACHINE="alphaev67" ;;
d356 1
a356 1
		UNAME_MACHINE="alphaev68" ;;
d358 1
a358 1
		UNAME_MACHINE="alphaev68" ;;
d360 1
a360 1
		UNAME_MACHINE="alphaev68" ;;
d362 1
a362 1
		UNAME_MACHINE="alphaev69" ;;
d364 1
a364 1
		UNAME_MACHINE="alphaev7" ;;
d366 1
a366 1
		UNAME_MACHINE="alphaev79" ;;
d373 3
a375 11
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
	exit ;;
    Alpha\ *:Windows_NT*:*)
	# How do we know it's Interix rather than the generic POSIX subsystem?
	# Should we change UNAME_MACHINE based on the output of uname instead
	# of the specific Alpha model?
	echo alpha-pc-interix
	exit ;;
    21064:Windows_NT:50:3)
	echo alpha-dec-winnt3.5
	exit ;;
d377 2
a378 2
	echo m68k-unknown-sysv4
	exit ;;
d380 2
a381 2
	echo ${UNAME_MACHINE}-unknown-amigaos
	exit ;;
d383 2
a384 2
	echo ${UNAME_MACHINE}-unknown-morphos
	exit ;;
d386 2
a387 2
	echo i370-ibm-openedition
	exit ;;
d389 2
a390 2
	echo s390-ibm-zvmoe
	exit ;;
d392 2
a393 2
        echo powerpc-ibm-os400
	exit ;;
d395 5
a399 5
	echo arm-acorn-riscix${UNAME_RELEASE}
	exit ;;
    arm:riscos:*:*|arm:RISCOS:*:*)
	echo arm-unknown-riscos
	exit ;;
d401 2
a402 2
	echo hppa1.1-hitachi-hiuxmpp
	exit ;;
d405 5
a409 6
	if test "`(/bin/universe) 2>/dev/null`" = att ; then
		echo pyramid-pyramid-sysv3
	else
		echo pyramid-pyramid-bsd
	fi
	exit ;;
d411 2
a412 2
	echo pyramid-pyramid-svr4
	exit ;;
d414 2
a415 2
	echo sparc-icl-nx6
	exit ;;
d418 3
a420 2
	    sparc) echo sparc-icl-nx7; exit ;;
	esac ;;
d422 3
a424 2
	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
d426 3
a428 2
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
d430 3
a432 2
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
d434 2
a435 2
	echo i386-pc-auroraux${UNAME_RELEASE}
	exit ;;
d437 2
a438 2
	eval $set_cc_for_build
	SUN_ARCH="i386"
d442 1
a442 1
	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
d444 1
a444 1
		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
d447 1
a447 1
		SUN_ARCH="x86_64"
d450 3
a452 2
	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
d457 3
a459 2
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
d461 1
a461 1
	case "`/usr/bin/arch -k`" in
d467 3
a469 2
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
	exit ;;
d471 2
a472 2
	echo m68k-sun-sunos${UNAME_RELEASE}
	exit ;;
d475 2
a476 2
	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
	case "`/bin/arch`" in
d478 1
a478 1
		echo m68k-sun-sunos${UNAME_RELEASE}
d481 1
a481 1
		echo sparc-sun-sunos${UNAME_RELEASE}
d484 1
a484 1
	exit ;;
d486 2
a487 2
	echo sparc-auspex-sunos${UNAME_RELEASE}
	exit ;;
d497 2
a498 2
        echo m68k-atari-mint${UNAME_RELEASE}
	exit ;;
d500 2
a501 2
	echo m68k-atari-mint${UNAME_RELEASE}
        exit ;;
d503 2
a504 2
        echo m68k-atari-mint${UNAME_RELEASE}
	exit ;;
d506 2
a507 2
        echo m68k-milan-mint${UNAME_RELEASE}
        exit ;;
d509 2
a510 2
        echo m68k-hades-mint${UNAME_RELEASE}
        exit ;;
d512 2
a513 2
        echo m68k-unknown-mint${UNAME_RELEASE}
        exit ;;
d515 2
a516 2
	echo m68k-apple-machten${UNAME_RELEASE}
	exit ;;
d518 2
a519 2
	echo powerpc-apple-machten${UNAME_RELEASE}
	exit ;;
d521 2
a522 2
	echo mips-dec-mach_bsd4.3
	exit ;;
d524 2
a525 2
	echo mips-dec-ultrix${UNAME_RELEASE}
	exit ;;
d527 2
a528 2
	echo vax-dec-ultrix${UNAME_RELEASE}
	exit ;;
d530 2
a531 2
	echo clipper-intergraph-clix${UNAME_RELEASE}
	exit ;;
d533 2
a534 2
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
d543 1
a543 1
	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
d546 1
a546 1
	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
d549 1
a549 1
	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
d555 3
a557 3
	$CC_FOR_BUILD -o $dummy $dummy.c &&
	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
	  SYSTEM_NAME=`$dummy $dummyarg` &&
d559 2
a560 2
	echo mips-mips-riscos${UNAME_RELEASE}
	exit ;;
d562 2
a563 2
	echo powerpc-motorola-powermax
	exit ;;
d565 2
a566 2
	echo powerpc-harris-powermax
	exit ;;
d568 2
a569 2
	echo powerpc-harris-powermax
	exit ;;
d571 2
a572 2
	echo powerpc-harris-powerunix
	exit ;;
d574 2
a575 2
	echo m88k-harris-cxux7
	exit ;;
d577 2
a578 2
	echo m88k-motorola-sysv4
	exit ;;
d580 2
a581 2
	echo m88k-motorola-sysv3
	exit ;;
d583 3
a585 3
        # DG/UX returns AViiON for all architectures
        UNAME_PROCESSOR=`/usr/bin/uname -p`
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
d587 2
a588 2
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
d590 1
a590 1
		echo m88k-dg-dgux${UNAME_RELEASE}
d592 1
a592 1
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
d595 1
a595 1
	    echo i586-dg-dgux${UNAME_RELEASE}
d597 1
a597 1
 	exit ;;
d599 2
a600 2
	echo m88k-dolphin-sysv3
	exit ;;
d603 2
a604 2
	echo m88k-motorola-sysv3
	exit ;;
d606 2
a607 2
	echo m88k-tektronix-sysv3
	exit ;;
d609 2
a610 2
	echo m68k-tektronix-bsd
	exit ;;
d612 3
a614 2
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
	exit ;;
d616 2
a617 2
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
d619 2
a620 2
	echo i386-ibm-aix
	exit ;;
d622 1
a622 1
	if [ -x /usr/bin/oslevel ] ; then
d625 1
a625 1
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
d627 2
a628 2
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
	exit ;;
d631 2
a632 2
		eval $set_cc_for_build
		sed 's/^		//' << EOF >$dummy.c
d643 1
a643 1
		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
d645 1
a645 1
			echo "$SYSTEM_NAME"
d647 1
a647 1
			echo rs6000-ibm-aix3.2.5
d650 1
a650 1
		echo rs6000-ibm-aix3.2.4
d652 1
a652 1
		echo rs6000-ibm-aix3.2
d654 2
a655 2
	exit ;;
    *:AIX:*:[456])
d657 1
a657 1
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
d662 3
a664 2
	if [ -x /usr/bin/oslevel ] ; then
		IBM_REV=`/usr/bin/oslevel`
d666 1
a666 1
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
d668 2
a669 2
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
	exit ;;
d671 5
a675 5
	echo rs6000-ibm-aix
	exit ;;
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
	echo romp-ibm-bsd4.4
	exit ;;
d677 2
a678 2
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
	exit ;;                             # report: romp-ibm BSD 4.3
d680 2
a681 2
	echo rs6000-bull-bosx
	exit ;;
d683 2
a684 2
	echo m68k-bull-sysv3
	exit ;;
d686 2
a687 2
	echo m68k-hp-bsd
	exit ;;
d689 2
a690 2
	echo m68k-hp-bsd4.4
	exit ;;
d692 4
a695 4
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	case "${UNAME_MACHINE}" in
	    9000/31? )            HP_ARCH=m68000 ;;
	    9000/[34]?? )         HP_ARCH=m68k ;;
d697 1
a697 1
		if [ -x /usr/bin/getconf ]; then
d699 11
a709 11
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                    case "${sc_cpu_version}" in
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
                      532)                      # CPU_PA_RISC2_0
                        case "${sc_kernel_bits}" in
                          32) HP_ARCH="hppa2.0n" ;;
                          64) HP_ARCH="hppa2.0w" ;;
			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
                        esac ;;
                    esac
d711 34
a744 34
		if [ "${HP_ARCH}" = "" ]; then
		    eval $set_cc_for_build
		    sed 's/^              //' << EOF >$dummy.c

              #define _HPUX_SOURCE
              #include <stdlib.h>
              #include <unistd.h>

              int main ()
              {
              #if defined(_SC_KERNEL_BITS)
                  long bits = sysconf(_SC_KERNEL_BITS);
              #endif
                  long cpu  = sysconf (_SC_CPU_VERSION);

                  switch (cpu)
              	{
              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
              	case CPU_PA_RISC2_0:
              #if defined(_SC_KERNEL_BITS)
              	    switch (bits)
              		{
              		case 64: puts ("hppa2.0w"); break;
              		case 32: puts ("hppa2.0n"); break;
              		default: puts ("hppa2.0"); break;
              		} break;
              #else  /* !defined(_SC_KERNEL_BITS) */
              	    puts ("hppa2.0"); break;
              #endif
              	default: puts ("hppa1.0"); break;
              	}
                  exit (0);
              }
d746 1
a746 1
		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
d750 1
a750 1
	if [ ${HP_ARCH} = "hppa2.0w" ]
d752 1
a752 1
	    eval $set_cc_for_build
d763 1
a763 1
	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
d766 1
a766 1
		HP_ARCH="hppa2.0w"
d768 1
a768 1
		HP_ARCH="hppa64"
d771 2
a772 2
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
	exit ;;
d774 3
a776 3
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	echo ia64-hp-hpux${HPUX_REV}
	exit ;;
d778 2
a779 2
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
d804 1
a804 1
	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
d806 5
a810 5
	echo unknown-hitachi-hiuxwe2
	exit ;;
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
	echo hppa1.1-hp-bsd
	exit ;;
d812 2
a813 2
	echo hppa1.0-hp-bsd
	exit ;;
d815 5
a819 5
	echo hppa1.0-hp-mpeix
	exit ;;
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
	echo hppa1.1-hp-osf
	exit ;;
d821 2
a822 2
	echo hppa1.0-hp-osf
	exit ;;
d824 2
a825 2
	if [ -x /usr/sbin/sysversion ] ; then
	    echo ${UNAME_MACHINE}-unknown-osf1mk
d827 1
a827 1
	    echo ${UNAME_MACHINE}-unknown-osf1
d829 1
a829 1
	exit ;;
d831 2
a832 2
	echo hppa1.1-hp-lites
	exit ;;
d834 2
a835 2
	echo c1-convex-bsd
        exit ;;
d841 1
a841 1
        exit ;;
d843 2
a844 2
	echo c34-convex-bsd
        exit ;;
d846 2
a847 2
	echo c38-convex-bsd
        exit ;;
d849 2
a850 2
	echo c4-convex-bsd
        exit ;;
d852 3
a854 2
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d856 1
a856 1
	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
d862 3
a864 2
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d866 3
a868 2
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d870 3
a872 2
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d874 3
a876 2
	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d878 5
a882 5
	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
d884 4
a887 4
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
	exit ;;
d889 2
a890 2
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
	exit ;;
d892 2
a893 2
	echo sparc-unknown-bsdi${UNAME_RELEASE}
	exit ;;
d895 15
a909 2
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
	exit ;;
d911 2
a912 3
	case ${UNAME_MACHINE} in
	    pc98)
		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
d914 3
a916 3
		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
	    *)
		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
d918 3
a920 1
	exit ;;
d922 5
a926 2
	echo ${UNAME_MACHINE}-pc-cygwin
	exit ;;
d928 5
a932 6
	echo ${UNAME_MACHINE}-pc-mingw32
	exit ;;
    i*:windows32*:*)
    	# uname -m includes "-pc" on this system.
    	echo ${UNAME_MACHINE}-mingw32
	exit ;;
d934 2
a935 2
	echo ${UNAME_MACHINE}-pc-pw32
	exit ;;
d937 1
a937 1
    	case ${UNAME_MACHINE} in
d939 2
a940 2
		echo i586-pc-interix${UNAME_RELEASE}
		exit ;;
d942 2
a943 2
		echo x86_64-unknown-interix${UNAME_RELEASE}
		exit ;;
d945 2
a946 2
		echo ia64-unknown-interix${UNAME_RELEASE}
		exit ;;
a947 12
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
	echo i${UNAME_MACHINE}-pc-mks
	exit ;;
    8664:Windows_NT:*)
	echo x86_64-pc-mks
	exit ;;
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
	# How do we know it's Interix rather than the generic POSIX subsystem?
	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
	# UNAME_MACHINE based on the output of uname instead of i386?
	echo i586-pc-interix
	exit ;;
d949 2
a950 2
	echo ${UNAME_MACHINE}-pc-uwin
	exit ;;
d952 2
a953 5
	echo x86_64-unknown-cygwin
	exit ;;
    p*:CYGWIN*:*)
	echo powerpcle-unknown-cygwin
	exit ;;
d955 3
a957 2
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
d960 4
a963 2
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
	exit ;;
d966 16
a981 7
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
	exit ;;
    i*86:Minix:*:*)
	echo ${UNAME_MACHINE}-pc-minix
	exit ;;
    alpha:Linux:*:*)
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
d989 1
a989 1
        esac
d991 6
a996 3
	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
	exit ;;
d998 1
a998 1
	eval $set_cc_for_build
d1002 1
a1002 1
	    echo ${UNAME_MACHINE}-unknown-linux-gnu
d1004 7
a1010 1
	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
d1012 1
a1012 1
	exit ;;
d1014 2
a1015 2
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit ;;
d1017 2
a1018 2
	echo cris-axis-linux-gnu
	exit ;;
d1020 5
a1024 2
	echo crisv32-axis-linux-gnu
	exit ;;
d1026 5
a1030 2
    	echo frv-unknown-linux-gnu
	exit ;;
d1032 2
a1033 10
	LIBC=gnu
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#ifdef __dietlibc__
	LIBC=dietlibc
	#endif
EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
	exit ;;
d1035 8
a1042 2
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit ;;
d1044 2
a1045 2
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit ;;
d1047 2
a1048 2
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit ;;
d1050 4
a1053 2
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
d1055 28
a1082 2
	#undef ${UNAME_MACHINE}
	#undef ${UNAME_MACHINE}el
d1084 1
a1084 1
	CPU=${UNAME_MACHINE}el
d1087 1
a1087 1
	CPU=${UNAME_MACHINE}
d1089 1
a1089 1
	CPU=
d1093 12
a1104 2
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
a1105 3
    or32:Linux:*:*)
	echo or32-unknown-linux-gnu
	exit ;;
d1107 2
a1108 2
	echo sparc-unknown-linux-gnu
	exit ;;
d1110 2
a1111 2
	echo hppa64-unknown-linux-gnu
	exit ;;
d1115 3
a1117 3
	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
	  *)    echo hppa-unknown-linux-gnu ;;
d1119 1
a1119 1
	exit ;;
d1121 2
a1122 2
	echo powerpc64-unknown-linux-gnu
	exit ;;
d1124 11
a1134 2
	echo powerpc-unknown-linux-gnu
	exit ;;
d1136 2
a1137 2
	echo ${UNAME_MACHINE}-ibm-linux
	exit ;;
d1139 2
a1140 2
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit ;;
d1142 2
a1143 2
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit ;;
d1145 5
a1149 2
	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit ;;
d1151 2
a1152 2
	echo ${UNAME_MACHINE}-dec-linux-gnu
	exit ;;
d1154 12
a1165 2
	echo x86_64-unknown-linux-gnu
	exit ;;
d1167 2
a1168 2
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
	exit ;;
d1173 2
a1174 2
	echo i386-sequent-sysv4
	exit ;;
d1176 3
a1178 3
        # Unixware is an offshoot of SVR4, but it has its own version
        # number series starting with 2...
        # I am not positive that other SVR4 systems won't match this,
d1180 3
a1182 3
        # Use sysv4.2uw... so that sysv4* matches it.
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
	exit ;;
d1186 2
a1187 2
	echo ${UNAME_MACHINE}-pc-os2-emx
	exit ;;
d1189 2
a1190 2
	echo ${UNAME_MACHINE}-unknown-stop
	exit ;;
d1192 2
a1193 2
	echo ${UNAME_MACHINE}-unknown-atheos
	exit ;;
d1195 2
a1196 2
	echo ${UNAME_MACHINE}-pc-syllable
	exit ;;
d1198 2
a1199 2
	echo i386-unknown-lynxos${UNAME_RELEASE}
	exit ;;
d1201 4
a1204 4
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
	exit ;;
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
d1206 1
a1206 1
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
d1208 1
a1208 1
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
d1210 1
a1210 1
	exit ;;
d1212 1
a1212 1
    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
d1218 2
a1219 2
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
	exit ;;
d1223 1
a1223 1
		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
d1233 1
a1233 1
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
d1235 1
a1235 1
		echo ${UNAME_MACHINE}-pc-sysv32
d1237 1
a1237 1
	exit ;;
d1240 2
a1241 2
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
        # the processor, so we play safe by assuming i586.
d1243 1
a1243 1
	# prints for the "djgpp" host, or else GDB configury will decide that
d1245 2
a1246 2
	echo i586-pc-msdosdjgpp
        exit ;;
d1248 2
a1249 2
	echo i386-pc-mach3
	exit ;;
d1251 2
a1252 2
	echo i860-intel-osf1
	exit ;;
d1255 1
a1255 1
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
d1257 1
a1257 1
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
d1259 1
a1259 1
	exit ;;
d1262 2
a1263 2
	echo m68010-convergent-sysv
	exit ;;
d1265 2
a1266 2
	echo m68k-convergent-sysv
	exit ;;
d1268 2
a1269 2
	echo m68k-diab-dnix
	exit ;;
d1277 1
a1277 1
	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
d1279 1
a1279 1
	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
d1281 2
a1282 2
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
          && { echo i486-ncr-sysv4; exit; } ;;
d1288 1
a1288 1
	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
d1290 1
a1290 1
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
d1292 1
a1292 1
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
d1294 2
a1295 2
	echo m68k-unknown-lynxos${UNAME_RELEASE}
	exit ;;
d1297 2
a1298 2
	echo m68k-atari-sysv4
	exit ;;
d1300 2
a1301 2
	echo sparc-unknown-lynxos${UNAME_RELEASE}
	exit ;;
d1303 2
a1304 2
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
	exit ;;
d1306 2
a1307 2
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
	exit ;;
d1309 2
a1310 2
	echo mips-dde-sysv${UNAME_RELEASE}
	exit ;;
d1312 2
a1313 2
	echo mips-sni-sysv4
	exit ;;
d1315 2
a1316 2
	echo mips-sni-sysv4
	exit ;;
d1320 1
a1320 1
		echo ${UNAME_MACHINE}-sni-sysv4
d1322 1
a1322 1
		echo ns32k-sni-sysv
d1324 5
a1328 5
	exit ;;
    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                      # says <Richard.M.Bartel@@ccMail.Census.GOV>
        echo i586-unisys-sysv4
        exit ;;
d1332 2
a1333 2
	echo hppa1.1-stratus-sysv4
	exit ;;
d1336 2
a1337 2
	echo i860-stratus-sysv4
	exit ;;
d1340 2
a1341 2
	echo ${UNAME_MACHINE}-stratus-vos
	exit ;;
d1344 2
a1345 2
	echo hppa1.1-stratus-vos
	exit ;;
d1347 2
a1348 2
	echo m68k-apple-aux${UNAME_RELEASE}
	exit ;;
d1350 2
a1351 2
	echo mips-sony-newsos6
	exit ;;
d1353 2
a1354 2
	if [ -d /usr/nec ]; then
	        echo mips-nec-sysv${UNAME_RELEASE}
d1356 1
a1356 1
	        echo mips-unknown-sysv${UNAME_RELEASE}
d1358 1
a1358 1
        exit ;;
d1360 2
a1361 2
	echo powerpc-be-beos
	exit ;;
d1363 2
a1364 2
	echo powerpc-apple-beos
	exit ;;
d1366 2
a1367 2
	echo i586-pc-beos
	exit ;;
d1369 5
a1373 2
	echo i586-pc-haiku
	exit ;;
d1375 2
a1376 2
	echo sx4-nec-superux${UNAME_RELEASE}
	exit ;;
d1378 2
a1379 2
	echo sx5-nec-superux${UNAME_RELEASE}
	exit ;;
d1381 2
a1382 2
	echo sx6-nec-superux${UNAME_RELEASE}
	exit ;;
d1384 2
a1385 2
	echo sx7-nec-superux${UNAME_RELEASE}
	exit ;;
d1387 2
a1388 2
	echo sx8-nec-superux${UNAME_RELEASE}
	exit ;;
d1390 5
a1394 2
	echo sx8r-nec-superux${UNAME_RELEASE}
	exit ;;
d1396 2
a1397 2
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
	exit ;;
d1399 5
a1403 2
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
	exit ;;
d1405 1
a1405 1
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
a1406 10
	    i386)
		eval $set_cc_for_build
		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
		      grep IS_64BIT_ARCH >/dev/null
		  then
		      UNAME_PROCESSOR="x86_64"
		  fi
		fi ;;
d1409 32
a1440 2
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
	exit ;;
d1443 1
a1443 1
	if test "$UNAME_PROCESSOR" = "x86"; then
d1447 2
a1448 2
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
	exit ;;
d1450 17
a1466 8
	echo i386-pc-qnx
	exit ;;
    NSE-?:NONSTOP_KERNEL:*:*)
	echo nse-tandem-nsk${UNAME_RELEASE}
	exit ;;
    NSR-?:NONSTOP_KERNEL:*:*)
	echo nsr-tandem-nsk${UNAME_RELEASE}
	exit ;;
d1468 2
a1469 2
	echo mips-compaq-nonstopux
	exit ;;
d1471 2
a1472 2
	echo bs2000-siemens-sysv
	exit ;;
d1474 2
a1475 2
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
	exit ;;
d1480 1
a1480 1
	if test "$cputype" = "386"; then
d1482 2
a1483 2
	else
	    UNAME_MACHINE="$cputype"
d1485 2
a1486 2
	echo ${UNAME_MACHINE}-unknown-plan9
	exit ;;
d1488 2
a1489 2
	echo pdp10-unknown-tops10
	exit ;;
d1491 2
a1492 2
	echo pdp10-unknown-tenex
	exit ;;
d1494 2
a1495 2
	echo pdp10-dec-tops20
	exit ;;
d1497 2
a1498 2
	echo pdp10-xkl-tops20
	exit ;;
d1500 2
a1501 2
	echo pdp10-unknown-tops20
	exit ;;
d1503 2
a1504 2
	echo pdp10-unknown-its
	exit ;;
d1506 2
a1507 2
        echo mips-sei-seiux${UNAME_RELEASE}
	exit ;;
d1509 3
a1511 2
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
	exit ;;
d1513 5
a1517 5
    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
	case "${UNAME_MACHINE}" in
	    A*) echo alpha-dec-vms ; exit ;;
	    I*) echo ia64-dec-vms ; exit ;;
	    V*) echo vax-dec-vms ; exit ;;
d1520 2
a1521 2
	echo i386-pc-xenix
	exit ;;
d1523 3
a1525 2
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
	exit ;;
d1527 14
a1540 5
	echo ${UNAME_MACHINE}-pc-rdos
	exit ;;
    i*86:AROS:*:*)
	echo ${UNAME_MACHINE}-pc-aros
	exit ;;
d1543 5
a1547 2
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
d1549 3
a1551 2
eval $set_cc_for_build
cat >$dummy.c <<EOF
d1553 10
a1562 2
# include <sys/types.h>
# include <sys/utsname.h>
d1575 1
a1575 1
          "4"
d1577 1
a1577 3
	  ""
#endif
         ); exit (0);
d1579 1
a1580 7

#if defined (__arm) && defined (__acorn) && defined (__unix)
  printf ("arm-acorn-riscix\n"); exit (0);
#endif

#if defined (hp300) && !defined (hpux)
  printf ("m68k-hp-bsd\n"); exit (0);
d1622 1
a1622 11
    struct utsname un;

    uname(&un);

    if (strncmp(un.version, "V2", 2) == 0) {
	printf ("i386-sequent-ptx2\n"); exit (0);
    }
    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
	printf ("i386-sequent-ptx1\n"); exit (0);
    }
    printf ("i386-sequent-ptx\n"); exit (0);
d1624 8
d1635 35
a1669 18
# if !defined (ultrix)
#  include <sys/param.h>
#  if defined (BSD)
#   if BSD == 43
      printf ("vax-dec-bsd4.3\n"); exit (0);
#   else
#    if BSD == 199006
      printf ("vax-dec-bsd4.3reno\n"); exit (0);
#    else
      printf ("vax-dec-bsd\n"); exit (0);
#    endif
#   endif
#  else
    printf ("vax-dec-bsd\n"); exit (0);
#  endif
# else
    printf ("vax-dec-ultrix\n"); exit (0);
# endif
d1680 1
a1680 1
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
d1684 1
d1686 1
a1686 1
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
d1688 4
a1691 1
# Convex versions that predate uname can use getsysinfo(1)
d1693 5
a1697 23
if [ -x /usr/convex/getsysinfo ]
then
    case `getsysinfo -f cpu_type` in
    c1*)
	echo c1-convex-bsd
	exit ;;
    c2*)
	if getsysinfo -f scalar_acc
	then echo c32-convex-bsd
	else echo c2-convex-bsd
	fi
	exit ;;
    c34*)
	echo c34-convex-bsd
	exit ;;
    c38*)
	echo c38-convex-bsd
	exit ;;
    c4*)
	echo c4-convex-bsd
	exit ;;
    esac
fi
a1699 1
$0: unable to guess system type
d1701 3
a1703 3
This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
d1705 1
a1705 1
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
d1707 2
a1708 1
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
d1710 10
a1719 4
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@@gnu.org> in order to provide the needed
information to handle your system.
d1738 4
a1741 4
UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM  = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
d1743 1
d1748 1
a1748 1
# eval: (add-hook 'write-file-hooks 'time-stamp)
@


1.3
log
@Sync config.{guess,sub} with mk/gnu-configure.
@
text
@d4 2
a5 2
#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
#   Inc.
d7 1
a7 1
timestamp='2007-03-06'
d30 3
a32 3
# Originally written by Per Bothner <per@@bothner.com>.
# Please send patches to <config-patches@@gnu.org>.  Submit a context
# diff and a properly formatted ChangeLog entry.
d38 2
a39 2
# The plan is that this can be called by configure scripts if you
# don't specify an explicit build system type.
d59 3
a61 2
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
d174 1
a174 1
			| grep __ELF__ >/dev/null
d328 3
d337 18
a354 2
    i86pc:SunOS:5.*:*)
	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
d555 1
a555 1
    *:AIX:*:[45])
d663 1
a663 1
		grep __LP64__ >/dev/null
d814 1
a814 1
    *:Interix*:[3456]*)
d816 1
a816 1
	    x86) 
d819 1
a819 1
	    EM64T | authenticamd)
d822 3
d829 3
d861 14
d876 8
a883 1
	echo ${UNAME_MACHINE}-unknown-linux-gnu
d897 11
d917 1
a917 1
    mips:Linux:*:*)
d921 2
a922 2
	#undef mips
	#undef mipsel
d924 1
a924 1
	CPU=mipsel
d927 1
a927 1
	CPU=mips
d933 1
a933 28
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
	    /^CPU/{
		s: ::g
		p
	    }'`"
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
	;;
    mips64:Linux:*:*)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#undef CPU
	#undef mips64
	#undef mips64el
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
	CPU=mips64el
	#else
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
	CPU=mips64
	#else
	CPU=
	#endif
	#endif
EOF
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
	    /^CPU/{
		s: ::g
		p
	    }'`"
d939 2
a940 2
    ppc:Linux:*:*)
	echo powerpc-unknown-linux-gnu
d942 2
a943 16
    ppc64:Linux:*:*)
	echo powerpc64-unknown-linux-gnu
	exit ;;
    alpha:Linux:*:*)
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
	  EV5)   UNAME_MACHINE=alphaev5 ;;
	  EV56)  UNAME_MACHINE=alphaev56 ;;
	  PCA56) UNAME_MACHINE=alphapca56 ;;
	  PCA57) UNAME_MACHINE=alphapca56 ;;
	  EV6)   UNAME_MACHINE=alphaev6 ;;
	  EV67)  UNAME_MACHINE=alphaev67 ;;
	  EV68*) UNAME_MACHINE=alphaev68 ;;
        esac
	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
d953 5
a957 2
    parisc64:Linux:*:* | hppa64:Linux:*:*)
	echo hppa64-unknown-linux-gnu
d977 2
a978 2
    xtensa:Linux:*:*)
    	echo xtensa-unknown-linux-gnu
a979 63
    i*86:Linux:*:*)
	# The BFD linker knows what the default object file format is, so
	# first see if it will tell us. cd to the root directory to prevent
	# problems with other programs or directories called `ld' in the path.
	# Set LC_ALL=C to ensure ld outputs messages in English.
	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
			 | sed -ne '/supported targets:/!d
				    s/[ 	][ 	]*/ /g
				    s/.*supported targets: *//
				    s/ .*//
				    p'`
        case "$ld_supported_targets" in
	  elf32-i386)
		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
		;;
	  a.out-i386-linux)
		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
		exit ;;
	  coff-i386)
		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
		exit ;;
	  "")
		# Either a pre-BFD a.out linker (linux-gnuoldld) or
		# one that does not give us useful --help.
		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
		exit ;;
	esac
	# Determine whether the default compiler is a.out or elf
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#include <features.h>
	#ifdef __ELF__
	# ifdef __GLIBC__
	#  if __GLIBC__ >= 2
	LIBC=gnu
	#  else
	LIBC=gnulibc1
	#  endif
	# else
	LIBC=gnulibc1
	# endif
	#else
	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
	LIBC=gnu
	#else
	LIBC=gnuaout
	#endif
	#endif
	#ifdef __dietlibc__
	LIBC=dietlibc
	#endif
EOF
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
	    /^LIBC/{
		s: ::g
		p
	    }'`"
	test x"${LIBC}" != x && {
		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
		exit
	}
	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
	;;
d1008 1
a1008 1
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
d1052 5
a1056 2
        # the processor, so we play safe by assuming i386.
	echo i386-pc-msdosdjgpp
d1094 10
d1116 1
a1116 1
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
d1179 3
d1209 10
d1300 3
d1463 1
a1463 1
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
d1465 1
a1465 1
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
@


1.2
log
@update config.{sub,guess} for various bootstrap tools. fixes build on
newer platforms such as DragonFly.

fixes PR pkg/28579 from Todd Willey.
@
text
@a1 3
#
# $NetBSD: config.guess,v 1.8 2004/08/14 19:13:55 schmonz Exp $
#
d4 2
a5 1
#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
d7 1
a7 1
timestamp='2004-06-11'
d21 2
a22 1
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
d29 1
d59 1
a59 1
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
d72 1
a72 1
       echo "$timestamp" ; exit 0 ;;
d74 1
a74 1
       echo "$version" ; exit 0 ;;
d76 1
a76 1
       echo "$usage"; exit 0 ;;
d110 1
a110 1
 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
d129 1
a129 1
esac ;'
d203 1
a203 46
	exit 0 ;;
    amd64:OpenBSD:*:*)
	echo x86_64-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    amiga:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    arc:OpenBSD:*:*)
	echo mipsel-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    cats:OpenBSD:*:*)
	echo arm-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    hp300:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    luna88k:OpenBSD:*:*)
    	echo m88k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    mac68k:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    macppc:OpenBSD:*:*)
	echo powerpc-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    mvme68k:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    mvme88k:OpenBSD:*:*)
	echo m88k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    mvmeppc:OpenBSD:*:*)
	echo powerpc-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    pmax:OpenBSD:*:*)
	echo mipsel-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    sgi:OpenBSD:*:*)
	echo mipseb-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    sun3:OpenBSD:*:*)
	echo m68k-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
    wgrisc:OpenBSD:*:*)
	echo mipsel-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
d205 3
a207 2
	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
	exit 0 ;;
d210 4
a213 1
	exit 0 ;;
d215 2
a216 2
	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
	exit 0 ;;
d219 1
a219 1
	exit 0 ;;
d272 1
a272 4
	exit 0 ;;
    Alpha*:OpenVMS:*:*)
	echo alpha-hp-vms
	exit 0 ;;
d278 1
a278 1
	exit 0 ;;
d281 1
a281 1
	exit 0 ;;
d284 1
a284 1
	exit 0;;
d287 1
a287 1
	exit 0 ;;
d290 1
a290 1
	exit 0 ;;
d293 4
a296 1
	exit 0 ;;
d299 1
a299 1
	exit 0 ;;
d302 4
a305 1
	exit 0;;
d308 1
a308 1
	exit 0;;
d316 1
a316 1
	exit 0 ;;
d319 1
a319 1
	exit 0 ;;
d322 2
a323 2
	exit 0 ;;
    DRS?6000:UNIX_SV:4.2*:7*)
d325 1
a325 1
	    sparc) echo sparc-icl-nx7 && exit 0 ;;
d329 1
a329 1
	exit 0 ;;
d332 1
a332 1
	exit 0 ;;
d335 1
a335 1
	exit 0 ;;
d341 1
a341 1
	exit 0 ;;
d350 1
a350 1
	exit 0 ;;
d353 1
a353 1
	exit 0 ;;
d365 1
a365 1
	exit 0 ;;
d368 1
a368 1
	exit 0 ;;
d379 1
a379 1
	exit 0 ;;
d382 1
a382 1
        exit 0 ;;
d385 1
a385 1
	exit 0 ;;
d388 1
a388 1
        exit 0 ;;
d391 1
a391 1
        exit 0 ;;
d394 1
a394 1
        exit 0 ;;
d397 1
a397 1
	exit 0 ;;
d400 1
a400 1
	exit 0 ;;
d403 1
a403 1
	exit 0 ;;
d406 1
a406 1
	exit 0 ;;
d409 1
a409 1
	exit 0 ;;
d412 1
a412 1
	exit 0 ;;
d436 4
a439 3
	$CC_FOR_BUILD -o $dummy $dummy.c \
	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
	  && exit 0
d441 1
a441 1
	exit 0 ;;
d444 1
a444 1
	exit 0 ;;
d447 1
a447 1
	exit 0 ;;
d450 1
a450 1
	exit 0 ;;
d453 1
a453 1
	exit 0 ;;
d456 1
a456 1
	exit 0 ;;
d459 1
a459 1
	exit 0 ;;
d462 1
a462 1
	exit 0 ;;
d478 1
a478 1
 	exit 0 ;;
d481 1
a481 1
	exit 0 ;;
d485 1
a485 1
	exit 0 ;;
d488 1
a488 1
	exit 0 ;;
d491 1
a491 1
	exit 0 ;;
d494 1
a494 1
	exit 0 ;;
d496 2
a497 2
	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
d500 1
a500 1
	exit 0 ;;
d508 1
a508 1
	exit 0 ;;
d523 6
a528 2
		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
		echo rs6000-ibm-aix3.2.5
d534 1
a534 1
	exit 0 ;;
d548 1
a548 1
	exit 0 ;;
d551 1
a551 1
	exit 0 ;;
d554 1
a554 1
	exit 0 ;;
d557 1
a557 1
	exit 0 ;;                           # report: romp-ibm BSD 4.3
d560 1
a560 1
	exit 0 ;;
d563 1
a563 1
	exit 0 ;;
d566 1
a566 1
	exit 0 ;;
d569 1
a569 1
	exit 0 ;;
d631 13
a643 3
	    # avoid double evaluation of $set_cc_for_build
	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
d651 1
a651 1
	exit 0 ;;
d655 1
a655 1
	exit 0 ;;
d683 2
a684 1
	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
d686 1
a686 1
	exit 0 ;;
d689 1
a689 1
	exit 0 ;;
d692 1
a692 1
	exit 0 ;;
d695 1
a695 1
	exit 0 ;;
d698 1
a698 1
	exit 0 ;;
d701 1
a701 1
	exit 0 ;;
d708 1
a708 1
	exit 0 ;;
d711 1
a711 1
	exit 0 ;;
d714 1
a714 1
        exit 0 ;;
d720 1
a720 1
        exit 0 ;;
d723 1
a723 1
        exit 0 ;;
d726 1
a726 1
        exit 0 ;;
d729 1
a729 1
        exit 0 ;;
d732 1
a732 1
	exit 0 ;;
d738 1
a738 1
	exit 0 ;;
d741 1
a741 1
	exit 0 ;;
d744 1
a744 1
	exit 0 ;;
d747 1
a747 1
	exit 0 ;;
d749 2
a750 2
	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit 0 ;;
d756 1
a756 1
        exit 0 ;;
d761 1
a761 1
	exit 0 ;;
d764 1
a764 1
	exit 0 ;;
d767 1
a767 1
	exit 0 ;;
d770 1
a770 1
	exit 0 ;;
d772 9
a780 16
	# Determine whether the default compiler uses glibc.
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#include <features.h>
	#if __GLIBC__ >= 2
	LIBC=gnu
	#else
	LIBC=
	#endif
EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
	# FreeBSD's kernel, but not the complete OS.
	case ${LIBC} in gnu) kernel_only='k' ;; esac
	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
	exit 0 ;;
d783 2
a784 2
	exit 0 ;;
    i*:MINGW*:*)
d786 5
a790 1
	exit 0 ;;
d793 10
a802 4
	exit 0 ;;
    x86:Interix*:[34]*)
	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
	exit 0 ;;
d805 1
a805 1
	exit 0 ;;
d811 1
a811 1
	exit 0 ;;
d814 4
a817 1
	exit 0 ;;
d820 1
a820 1
	exit 0 ;;
d823 1
a823 1
	exit 0 ;;
d827 1
a827 1
	exit 0 ;;
d831 1
a831 1
	exit 0 ;;
d834 1
a834 1
	exit 0 ;;
d837 4
a840 1
	exit 0 ;;
d843 7
a849 1
	exit 0 ;;
d852 1
a852 1
	exit 0 ;;
d855 1
a855 1
	exit 0 ;;
d858 1
a858 1
	exit 0 ;;
d875 6
a880 2
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
d898 6
a903 2
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
d905 3
d910 1
a910 1
	exit 0 ;;
d913 1
a913 1
	exit 0 ;;
d927 1
a927 1
	exit 0 ;;
d935 1
a935 1
	exit 0 ;;
d938 1
a938 1
	exit 0 ;;
d941 1
a941 1
	exit 0 ;;
d944 1
a944 1
	exit 0 ;;
d947 1
a947 1
	exit 0 ;;
d950 4
a953 1
	exit 0 ;;
d956 4
a959 1
	exit 0 ;;
d977 1
a977 1
		exit 0 ;;
d980 1
a980 1
		exit 0 ;;
d985 1
a985 1
		exit 0 ;;
d1002 1
a1002 1
	#ifdef __INTEL_COMPILER
d1012 10
a1021 3
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
d1028 1
a1028 1
	exit 0 ;;
d1036 1
a1036 1
	exit 0 ;;
d1041 1
a1041 1
	exit 0 ;;
d1044 1
a1044 1
	exit 0 ;;
d1047 2
a1048 2
	exit 0 ;;
	i*86:syllable:*:*)
d1050 1
a1050 1
	exit 0 ;;
d1053 1
a1053 1
	exit 0 ;;
d1056 1
a1056 1
	exit 0 ;;
d1064 3
a1066 2
	exit 0 ;;
    i*86:*:5:[78]*)
d1073 1
a1073 1
	exit 0 ;;
d1091 1
a1091 1
	exit 0 ;;
d1097 1
a1097 1
        exit 0 ;;
d1100 1
a1100 1
	exit 0 ;;
d1103 1
a1103 1
	exit 0 ;;
d1110 1
a1110 1
	exit 0 ;;
d1114 1
a1114 1
	exit 0 ;;
d1117 1
a1117 1
	exit 0 ;;
d1120 1
a1120 1
	exit 0 ;;
d1122 2
a1123 2
	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    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)
d1128 1
a1128 1
	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
d1130 1
a1130 1
	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
d1133 1
a1133 1
          && echo i486-ncr-sysv4 && exit 0 ;;
d1136 1
a1136 1
	exit 0 ;;
d1139 1
a1139 1
	exit 0 ;;
d1142 1
a1142 1
	exit 0 ;;
d1145 1
a1145 1
	exit 0 ;;
d1148 1
a1148 1
	exit 0 ;;
d1151 1
a1151 1
	exit 0 ;;
d1154 1
a1154 1
	exit 0 ;;
d1157 1
a1157 1
	exit 0 ;;
d1165 1
a1165 1
	exit 0 ;;
d1169 1
a1169 1
        exit 0 ;;
d1174 1
a1174 1
	exit 0 ;;
d1178 5
a1182 1
	exit 0 ;;
d1186 1
a1186 1
	exit 0 ;;
d1189 1
a1189 1
	exit 0 ;;
d1192 1
a1192 1
	exit 0 ;;
d1199 1
a1199 1
        exit 0 ;;
d1202 1
a1202 1
	exit 0 ;;
d1205 1
a1205 1
	exit 0 ;;
d1208 1
a1208 1
	exit 0 ;;
d1211 1
a1211 1
	exit 0 ;;
d1214 1
a1214 1
	exit 0 ;;
d1217 10
a1226 1
	exit 0 ;;
d1229 1
a1229 1
	exit 0 ;;
d1232 1
a1232 1
	exit 0 ;;
d1234 3
a1236 3
	case `uname -p` in
	    *86) UNAME_PROCESSOR=i686 ;;
	    powerpc) UNAME_PROCESSOR=powerpc ;;
d1239 1
a1239 1
	exit 0 ;;
d1247 1
a1247 1
	exit 0 ;;
d1250 4
a1253 1
	exit 0 ;;
d1256 1
a1256 1
	exit 0 ;;
d1259 1
a1259 1
	exit 0 ;;
d1262 1
a1262 1
	exit 0 ;;
d1265 1
a1265 1
	exit 0 ;;
d1276 1
a1276 1
	exit 0 ;;
d1279 1
a1279 1
	exit 0 ;;
d1282 1
a1282 1
	exit 0 ;;
d1285 1
a1285 1
	exit 0 ;;
d1288 1
a1288 1
	exit 0 ;;
d1291 1
a1291 1
	exit 0 ;;
d1294 1
a1294 1
	exit 0 ;;
d1297 1
a1297 1
	exit 0 ;;
d1300 17
a1316 1
	exit 0 ;;
d1348 1
a1348 1
  printf ("arm-acorn-riscix"); exit (0);
d1437 2
a1438 1
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
d1442 1
a1442 1
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
d1451 1
a1451 1
	exit 0 ;;
d1457 1
a1457 1
	exit 0 ;;
d1460 1
a1460 1
	exit 0 ;;
d1463 1
a1463 1
	exit 0 ;;
d1466 1
a1466 1
	exit 0 ;;
d1477 3
a1479 1
    ftp://ftp.gnu.org/pub/gnu/config/
@


1.1
log
@Initial revision
@
text
@d2 3
d7 1
a7 1
#   2000, 2001, 2002 Free Software Foundation, Inc.
d9 1
a9 1
timestamp='2002-01-30'
d94 1
d96 4
a99 2
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
a100 1
# CC_FOR_BUILD -- compiler used by this script.
d104 16
a119 5
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
 ,,)    echo "int dummy(){}" > $dummy.c ;
	for c in cc gcc c89 ; do
	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
	  if test $? = 0 ; then
a122 1
	rm -f $dummy.c $dummy.o $dummy.rel ;
d129 1
a129 1
esac'
d156 3
a158 2
	UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
	    UNAME_MACHINE_ARCH=unknown
d160 1
d164 1
d187 12
a198 1
	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
d204 3
d213 3
d219 3
d252 9
d262 2
a263 1
	if test $UNAME_RELEASE = "V4.0"; then
d265 43
a307 1
	fi
d312 4
a315 54
	cat <<EOF >$dummy.s
	.data
\$Lformat:
	.byte 37,100,45,37,120,10,0	# "%d-%x\n"

	.text
	.globl main
	.align 4
	.ent main
main:
	.frame \$30,16,\$26,0
	ldgp \$29,0(\$27)
	.prologue 1
	.long 0x47e03d80 # implver \$0
	lda \$2,-1
	.long 0x47e20c21 # amask \$2,\$1
	lda \$16,\$Lformat
	mov \$0,\$17
	not \$1,\$18
	jsr \$26,printf
	ldgp \$29,0(\$26)
	mov 0,\$16
	jsr \$26,exit
	.end main
EOF
	eval $set_cc_for_build
	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
	if test "$?" = 0 ; then
		case `./$dummy` in
			0-0)
				UNAME_MACHINE="alpha"
				;;
			1-0)
				UNAME_MACHINE="alphaev5"
				;;
			1-1)
				UNAME_MACHINE="alphaev56"
				;;
			1-101)
				UNAME_MACHINE="alphapca56"
				;;
			2-303)
				UNAME_MACHINE="alphaev6"
				;;
			2-307)
				UNAME_MACHINE="alphaev67"
				;;
			2-1307)
				UNAME_MACHINE="alphaev68"
				;;
		esac
	fi
	rm -f $dummy.s $dummy
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
d338 3
d358 7
d393 1
a393 1
	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
d433 3
d474 3
a476 4
	$CC_FOR_BUILD $dummy.c -o $dummy \
	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
	  && rm -f $dummy.c $dummy && exit 0
	rm -f $dummy.c $dummy
d482 6
d560 1
a560 2
		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
		rm -f $dummy.c $dummy
d569 1
a569 1
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
d658 2
a659 3
		    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
		    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
		    rm -f $dummy.c $dummy
d662 11
d706 1
a706 2
	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
	rm -f $dummy.c $dummy
a751 3
    CRAY*X-MP:*:*:*)
	echo xmp-cray-unicos
        exit 0 ;;
a763 3
    CRAY*T3D:*:*:*)
	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit 0 ;;
d770 3
a772 3
    CRAY-2:*:*:*)
	echo cray2-cray-unicos
        exit 0 ;;
d779 5
d794 15
a808 1
	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
d819 5
a823 2
    x86:Interix*:3*)
	echo i386-pc-interix3
d829 1
a829 1
	echo i386-pc-interix
d841 1
d844 4
d854 3
d858 4
a861 1
	echo ${UNAME_MACHINE}-unknown-linux
d872 2
a873 2
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 
	CPU=mipsel 
d875 1
a875 1
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 
d880 1
a880 1
	#endif 
d883 20
a902 2
	rm -f $dummy.c
	test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
d938 3
d954 2
a955 3
	# Export LANG=C to prevent ld from outputting information in other
	# languages.
	ld_supported_targets=`LANG=C; export LANG; cd /; ld --help 2>&1 \
d967 1
a967 1
		exit 0 ;;		
d998 3
a1002 1
	rm -f $dummy.c
d1020 20
d1061 3
a1063 3
		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
d1065 1
a1065 1
		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
d1067 1
a1067 1
		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
a1073 3
    i*86:*DOS:*:*)
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
	exit 0 ;;
d1097 7
a1103 1
    M68*:*:R3V[567]*:*)
d1105 1
a1105 1
    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
a1121 3
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
	echo i386-unknown-lynxos${UNAME_RELEASE}
	exit 0 ;;
d1193 3
d1203 5
a1207 1
	echo `uname -p`-apple-darwin${UNAME_RELEASE}
d1210 3
a1212 1
	if test "${UNAME_MACHINE}" = "x86pc"; then
a1213 3
		echo i386-${UNAME_MACHINE}-nto-qnx
	else
		echo `uname -p`-${UNAME_MACHINE}-nto-qnx
d1215 1
d1220 1
a1220 1
    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
a1242 5
    i*86:OS/2:*:*)
	# If we were able to find `uname', then EMX Unix compatibility
	# is probably installed.
	echo ${UNAME_MACHINE}-pc-os2-emx
	exit 0 ;;
d1261 2
a1262 2
    i*86:XTS-300:*:STOP)
	echo ${UNAME_MACHINE}-unknown-stop
d1264 2
a1265 2
    i*86:atheos:*:*)
	echo ${UNAME_MACHINE}-unknown-atheos
d1387 1
a1387 2
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
@


1.1.1.1
log
@Initial import of an autoconf-ed version of NetBSD's sed(1).
@
text
@@
