head	1.4;
access;
symbols
	netbsd-11-0-RC4:1.3
	jemailoc-5-3-1:1.1.1.3
	netbsd-11-0-RC3:1.3
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.2
	netbsd-11-base:1.3
	netbsd-10-1-RELEASE:1.2
	jemalloc-5-3-0:1.1.1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.8
	perseant-exfatfs-base:1.2
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.2
	netbsd-10-0-RC6:1.2
	netbsd-10-0-RC5:1.2
	netbsd-10-0-RC4:1.2
	netbsd-10-0-RC3:1.2
	netbsd-10-0-RC2:1.2
	netbsd-10-0-RC1:1.2
	netbsd-10:1.2.0.6
	netbsd-10-base:1.2
	netbsd-9-3-RELEASE:1.1.1.1
	cjep_sun2x-base1:1.2
	cjep_sun2x:1.2.0.4
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	netbsd-9-2-RELEASE:1.1.1.1
	cjep_staticlib_x:1.2.0.2
	cjep_staticlib_x-base:1.2
	netbsd-9-1-RELEASE:1.1.1.1
	phil-wifi-20200421:1.1.1.1
	phil-wifi-20200411:1.1.1.1
	is-mlppp:1.1.1.1.0.6
	is-mlppp-base:1.1.1.1
	phil-wifi-20200406:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	phil-wifi-20191119:1.1.1.1
	netbsd-9:1.1.1.1.0.4
	netbsd-9-base:1.1.1.1
	phil-wifi:1.1.1.1.0.2
	phil-wifi-20190609:1.1.1.1
	jemalloc-5-1-0:1.1.1.1
	JASONE:1.1.1;
locks; strict;
comment	@# @;


1.4
date	2026.04.19.22.41.06;	author christos;	state Exp;
branches;
next	1.3;
commitid	75cpKviPXnFJACCG;

1.3
date	2024.09.23.15.03.40;	author christos;	state Exp;
branches;
next	1.2;
commitid	hfFQo255eAMOtWqF;

1.2
date	2020.11.17.10.35.12;	author rin;	state Exp;
branches
	1.2.8.1;
next	1.1;
commitid	hRb62eUrAIizbewC;

1.1
date	2019.03.04.17.10.22;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	nOvZu7WcBJUVq4eB;

1.2.8.1
date	2025.08.02.05.21.06;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.1.1.1
date	2019.03.04.17.10.22;	author christos;	state Exp;
branches
	1.1.1.1.2.1;
next	1.1.1.2;
commitid	nOvZu7WcBJUVq4eB;

1.1.1.2
date	2024.09.23.14.59.42;	author christos;	state Exp;
branches;
next	1.1.1.3;
commitid	2SuWNlBNa5W9sWqF;

1.1.1.3
date	2026.04.19.16.20.48;	author christos;	state Exp;
branches;
next	;
commitid	otienUsF45k2uACG;

1.1.1.1.2.1
date	2019.03.04.17.10.22;	author christos;	state dead;
branches;
next	1.1.1.1.2.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.1.1.2.2
date	2019.06.10.21.44.51;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;


desc
@@


1.4
log
@merge changes between jemalloc-5.3.0 and 5.3.1
@
text
@#! /bin/sh
# Attempt to guess a canonical system name.
#   Copyright 1992-2025 Free Software Foundation, Inc.

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

timestamp='2025-07-10'

# 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-2025 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 c17 c99 c89 ; 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"
	#if defined(__ANDROID__)
	LIBC=android
	#else
	#include <features.h>
	#if defined(__UCLIBC__)
	LIBC=uclibc
	#elif defined(__dietlibc__)
	LIBC=dietlibc
	#elif defined(__GLIBC__)
	LIBC=gnu
	#elif defined(__LLVM_LIBC__)
	LIBC=llvm
	#else
	#include <stdarg.h>
	/* First heuristic to detect musl libc.  */
	#ifdef __DEFINED_va_list
	LIBC=musl
	#endif
	#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 ;;
	    sh3el) machine=shl-unknown ;;
	    sh3eb) machine=sh-unknown ;;
	    sh5el) machine=sh5le-unknown ;;
	    earmv*)
		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
		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/^earmv[0-9]/-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 -m64 -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>

		int
		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=`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
	;;
    *:SerenityOS:*:*)
        GUESS=$UNAME_MACHINE-pc-serenity
        ;;
    *: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
	;;
    x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
	GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
	;;
    *:[Mm]anagarm:*:*)
	GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
	;;
    *:Minix:*:*)
	GUESS=$UNAME_MACHINE-unknown-minix
	;;
    aarch64:Linux:*:*)
	set_cc_for_build
	CPU=$UNAME_MACHINE
	LIBCABI=$LIBC
	if test "$CC_FOR_BUILD" != no_compiler_found; then
	    ABI=64
	    sed 's/^	    //' << EOF > "$dummy.c"
	    #ifdef __ARM_EABI__
	    #ifdef __ARM_PCS_VFP
	    ABI=eabihf
	    #else
	    ABI=eabi
	    #endif
	    #endif
EOF
	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
	    eval "$cc_set_abi"
	    case $ABI in
		eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
	    esac
	fi
	GUESS=$CPU-unknown-linux-$LIBCABI
	;;
    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
	;;
    kvx:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    kvx:cos:*:*)
	GUESS=$UNAME_MACHINE-unknown-cos
	;;
    kvx:mbr:*:*)
	GUESS=$UNAME_MACHINE-unknown-mbr
	;;
    loongarch32:Linux:*:* | loongarch64: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
	CPU=$UNAME_MACHINE
	LIBCABI=$LIBC
	if test "$CC_FOR_BUILD" != no_compiler_found; then
	    ABI=64
	    sed 's/^	    //' << EOF > "$dummy.c"
	    #ifdef __i386__
	    ABI=x86
	    #else
	    #ifdef __ILP32__
	    ABI=x32
	    #endif
	    #endif
EOF
	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
	    eval "$cc_set_abi"
	    case $ABI in
		x86) CPU=i686 ;;
		x32) LIBCABI=${LIBC}x32 ;;
	    esac
	fi
	GUESS=$CPU-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
	;;
    ppc:Haiku:*:*)	# Haiku running on Apple PowerPC
	GUESS=powerpc-apple-haiku
	;;
    *:Haiku:*:*)	# Haiku modern gcc (not bound by BeOS compat)
	GUESS=$UNAME_MACHINE-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
	;;
    i*86:Fiwix:*:*)
	GUESS=$UNAME_MACHINE-pc-fiwix
	;;
    *: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
	;;
    x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*)
	GUESS=$UNAME_MACHINE-pc-ironclad-mlibc
	;;
    *:[Ii]ronclad:*:*)
	GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc
	;;
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
int
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 nil t)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%Y-%02m-%02d"
# time-stamp-end: "'"
# End:
@


1.3
log
@merge changes for jemalloc-5.3.0
@
text
@d3 1
a3 1
#   Copyright 1992-2021 Free Software Foundation, Inc.
d5 3
a7 1
timestamp='2021-01-01'
d11 1
a11 1
# the Free Software Foundation; either version 3 of the License, or
d37 9
a45 1
me=$(echo "$0" | sed -e 's,.*/,,')
d50 1
a50 1
Output the configuration name of the system \`$me' is run on.
d63 1
a63 1
Copyright 1992-2021 Free Software Foundation, Inc.
d69 1
a69 1
Try \`$me --help' for more information."
d97 3
d105 2
a106 2
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
d118 2
a119 2
    # shellcheck disable=SC2039
    { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } ||
d126 1
a126 1
	       for driver in cc gcc c89 c99 ; do
d128 1
a128 1
		       CC_FOR_BUILD="$driver"
d147 4
a150 4
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
d152 1
a152 1
case "$UNAME_SYSTEM" in
d158 3
d168 2
d177 1
d179 2
a180 1
	eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')"
d199 1
a199 1
case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
d211 5
a215 6
	sysctl="sysctl -n hw.machine_arch"
	UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \
	    "/sbin/$sysctl" 2>/dev/null || \
	    "/usr/sbin/$sysctl" 2>/dev/null || \
	    echo unknown))
	case "$UNAME_MACHINE_ARCH" in
d223 3
a225 3
		arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,')
		endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p')
		machine="${arch}${endian}"-unknown
d227 1
a227 1
	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
d231 1
a231 1
	case "$UNAME_MACHINE_ARCH" in
d252 1
a252 1
	case "$UNAME_MACHINE_ARCH" in
d255 1
a255 1
		abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr")
d263 1
a263 1
	case "$UNAME_VERSION" in
d268 1
a268 1
		release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2)
d274 2
a275 2
	echo "$machine-${os}${release}${abi-}"
	exit ;;
d277 3
a279 3
	UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
	exit ;;
d281 7
a287 3
	UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
	exit ;;
d289 3
a291 3
	UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
	exit ;;
d293 2
a294 2
	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
	exit ;;
d296 2
a297 2
	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
	exit ;;
d299 2
a300 2
	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
	exit ;;
d302 2
a303 2
	echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
	exit ;;
d305 2
a306 2
	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
	exit ;;
d308 2
a309 2
	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
	exit ;;
d311 2
a312 2
	echo "$UNAME_MACHINE"-unknown-sortix
	exit ;;
d314 2
a315 2
	echo "$UNAME_MACHINE"-unknown-twizzler
	exit ;;
d317 2
a318 2
	echo "$UNAME_MACHINE"-unknown-redox
	exit ;;
d320 2
a321 2
	echo mips-dec-osf1
	exit ;;
d323 2
d327 1
a327 1
		UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}')
d330 1
a330 1
		UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}')
d337 2
a338 2
	ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1)
	case "$ALPHA_CPU_TYPE" in
d375 3
a377 5
	echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)"
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
	exitcode=$?
	trap '' 0
	exit $exitcode ;;
d379 2
a380 2
	echo m68k-unknown-sysv4
	exit ;;
d382 2
a383 2
	echo "$UNAME_MACHINE"-unknown-amigaos
	exit ;;
d385 2
a386 2
	echo "$UNAME_MACHINE"-unknown-morphos
	exit ;;
d388 2
a389 2
	echo i370-ibm-openedition
	exit ;;
d391 2
a392 2
	echo s390-ibm-zvmoe
	exit ;;
d394 2
a395 2
	echo powerpc-ibm-os400
	exit ;;
d397 2
a398 2
	echo arm-acorn-riscix"$UNAME_RELEASE"
	exit ;;
d400 2
a401 2
	echo arm-unknown-riscos
	exit ;;
d403 2
a404 2
	echo hppa1.1-hitachi-hiuxmpp
	exit ;;
d407 5
a411 6
	if test "$( (/bin/universe) 2>/dev/null)" = att ; then
		echo pyramid-pyramid-sysv3
	else
		echo pyramid-pyramid-bsd
	fi
	exit ;;
d413 2
a414 2
	echo pyramid-pyramid-svr4
	exit ;;
d416 2
a417 2
	echo sparc-icl-nx6
	exit ;;
d419 4
a422 3
	case $(/usr/bin/uname -p) in
	    sparc) echo sparc-icl-nx7; exit ;;
	esac ;;
d424 3
a426 2
	echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
	exit ;;
d428 3
a430 2
	echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
	exit ;;
d432 3
a434 2
	echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
	exit ;;
d436 2
a437 2
	echo i386-pc-auroraux"$UNAME_RELEASE"
	exit ;;
d446 1
a446 1
		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
d452 3
a454 2
	echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
	exit ;;
d459 3
a461 2
	echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
	exit ;;
d463 1
a463 1
	case "$(/usr/bin/arch -k)" in
d465 1
a465 1
		UNAME_RELEASE=$(uname -v)
d468 4
a471 3
	# Japanese Language versions have a version number like `4.1.3-JL'.
	echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')"
	exit ;;
d473 2
a474 2
	echo m68k-sun-sunos"$UNAME_RELEASE"
	exit ;;
d476 1
a476 1
	UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null)
d478 1
a478 1
	case "$(/bin/arch)" in
d480 1
a480 1
		echo m68k-sun-sunos"$UNAME_RELEASE"
d483 1
a483 1
		echo sparc-sun-sunos"$UNAME_RELEASE"
d486 1
a486 1
	exit ;;
d488 2
a489 2
	echo sparc-auspex-sunos"$UNAME_RELEASE"
	exit ;;
d499 2
a500 2
	echo m68k-atari-mint"$UNAME_RELEASE"
	exit ;;
d502 2
a503 2
	echo m68k-atari-mint"$UNAME_RELEASE"
	exit ;;
d505 2
a506 2
	echo m68k-atari-mint"$UNAME_RELEASE"
	exit ;;
d508 2
a509 2
	echo m68k-milan-mint"$UNAME_RELEASE"
	exit ;;
d511 2
a512 2
	echo m68k-hades-mint"$UNAME_RELEASE"
	exit ;;
d514 2
a515 2
	echo m68k-unknown-mint"$UNAME_RELEASE"
	exit ;;
d517 2
a518 2
	echo m68k-apple-machten"$UNAME_RELEASE"
	exit ;;
d520 2
a521 2
	echo powerpc-apple-machten"$UNAME_RELEASE"
	exit ;;
d523 2
a524 2
	echo mips-dec-mach_bsd4.3
	exit ;;
d526 2
a527 2
	echo mips-dec-ultrix"$UNAME_RELEASE"
	exit ;;
d529 2
a530 2
	echo vax-dec-ultrix"$UNAME_RELEASE"
	exit ;;
d532 2
a533 2
	echo clipper-intergraph-clix"$UNAME_RELEASE"
	exit ;;
d558 2
a559 2
	  dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') &&
	  SYSTEM_NAME=$("$dummy" "$dummyarg") &&
d561 2
a562 2
	echo mips-mips-riscos"$UNAME_RELEASE"
	exit ;;
d564 2
a565 2
	echo powerpc-motorola-powermax
	exit ;;
d567 2
a568 2
	echo powerpc-harris-powermax
	exit ;;
d570 2
a571 2
	echo powerpc-harris-powermax
	exit ;;
d573 2
a574 2
	echo powerpc-harris-powerunix
	exit ;;
d576 2
a577 2
	echo m88k-harris-cxux7
	exit ;;
d579 2
a580 2
	echo m88k-motorola-sysv4
	exit ;;
d582 2
a583 2
	echo m88k-motorola-sysv3
	exit ;;
d586 1
a586 1
	UNAME_PROCESSOR=$(/usr/bin/uname -p)
d592 1
a592 1
		echo m88k-dg-dgux"$UNAME_RELEASE"
d594 1
a594 1
		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
d597 1
a597 1
	    echo i586-dg-dgux"$UNAME_RELEASE"
d599 1
a599 1
	exit ;;
d601 2
a602 2
	echo m88k-dolphin-sysv3
	exit ;;
d605 2
a606 2
	echo m88k-motorola-sysv3
	exit ;;
d608 2
a609 2
	echo m88k-tektronix-sysv3
	exit ;;
d611 2
a612 2
	echo m68k-tektronix-bsd
	exit ;;
d614 3
a616 2
	echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')"
	exit ;;
d618 2
a619 2
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
	exit ;;               # Note that: echo "'$(uname -s)'" gives 'AIX '
d621 2
a622 2
	echo i386-ibm-aix
	exit ;;
d625 1
a625 1
		IBM_REV=$(/usr/bin/oslevel)
d627 1
a627 1
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
d629 2
a630 2
	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
	exit ;;
d637 2
a638 1
		main()
d646 1
a646 1
		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy")
d648 1
a648 1
			echo "$SYSTEM_NAME"
d650 1
a650 1
			echo rs6000-ibm-aix3.2.5
d653 1
a653 1
		echo rs6000-ibm-aix3.2.4
d655 1
a655 1
		echo rs6000-ibm-aix3.2
d657 1
a657 1
	exit ;;
d659 1
a659 1
	IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }')
d666 2
a667 2
		IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc |
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/)
d669 1
a669 1
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
d671 2
a672 2
	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
	exit ;;
d674 2
a675 2
	echo rs6000-ibm-aix
	exit ;;
d677 2
a678 2
	echo romp-ibm-bsd4.4
	exit ;;
d680 2
a681 2
	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
	exit ;;                             # report: romp-ibm BSD 4.3
d683 2
a684 2
	echo rs6000-bull-bosx
	exit ;;
d686 2
a687 2
	echo m68k-bull-sysv3
	exit ;;
d689 2
a690 2
	echo m68k-hp-bsd
	exit ;;
d692 2
a693 2
	echo m68k-hp-bsd4.4
	exit ;;
d695 2
a696 2
	HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
	case "$UNAME_MACHINE" in
d701 3
a703 3
		    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
d707 1
a707 1
			case "$sc_kernel_bits" in
d722 2
a723 1
		int main ()
d750 1
a750 1
		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy")
d775 2
a776 2
	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
	exit ;;
d778 3
a780 3
	HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
	echo ia64-hp-hpux"$HPUX_REV"
	exit ;;
d808 1
a808 1
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") &&
d810 2
a811 2
	echo unknown-hitachi-hiuxwe2
	exit ;;
d813 2
a814 2
	echo hppa1.1-hp-bsd
	exit ;;
d816 2
a817 2
	echo hppa1.0-hp-bsd
	exit ;;
d819 2
a820 2
	echo hppa1.0-hp-mpeix
	exit ;;
d822 2
a823 2
	echo hppa1.1-hp-osf
	exit ;;
d825 2
a826 2
	echo hppa1.0-hp-osf
	exit ;;
d829 1
a829 1
	    echo "$UNAME_MACHINE"-unknown-osf1mk
d831 1
a831 1
	    echo "$UNAME_MACHINE"-unknown-osf1
d833 1
a833 1
	exit ;;
d835 2
a836 2
	echo hppa1.1-hp-lites
	exit ;;
d838 2
a839 2
	echo c1-convex-bsd
	exit ;;
d847 2
a848 2
	echo c34-convex-bsd
	exit ;;
d850 2
a851 2
	echo c38-convex-bsd
	exit ;;
d853 2
a854 2
	echo c4-convex-bsd
	exit ;;
d856 3
a858 2
	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d866 3
a868 2
	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d870 3
a872 2
	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d874 3
a876 2
	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d878 3
a880 2
	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
	exit ;;
d882 5
a886 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 ;;
d888 4
a891 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 ;;
d893 2
a894 2
	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
	exit ;;
d896 2
a897 2
	echo sparc-unknown-bsdi"$UNAME_RELEASE"
	exit ;;
d899 2
a900 2
	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
	exit ;;
d902 1
a902 1
	UNAME_PROCESSOR=$(uname -p)
d907 2
a908 1
	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi
d910 2
a911 1
	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf
d913 1
a913 1
	exit ;;
d915 2
a916 2
	UNAME_PROCESSOR=$(/usr/bin/uname -p)
	case "$UNAME_PROCESSOR" in
d922 3
a924 2
	echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
	exit ;;
d926 2
a927 2
	echo "$UNAME_MACHINE"-pc-cygwin
	exit ;;
d929 2
a930 2
	echo "$UNAME_MACHINE"-pc-mingw64
	exit ;;
d932 2
a933 2
	echo "$UNAME_MACHINE"-pc-mingw32
	exit ;;
d935 2
a936 2
	echo "$UNAME_MACHINE"-pc-msys
	exit ;;
d938 5
a942 2
	echo "$UNAME_MACHINE"-pc-pw32
	exit ;;
d944 1
a944 1
	case "$UNAME_MACHINE" in
d946 2
a947 2
		echo i586-pc-interix"$UNAME_RELEASE"
		exit ;;
d949 2
a950 2
		echo x86_64-unknown-interix"$UNAME_RELEASE"
		exit ;;
d952 2
a953 2
		echo ia64-unknown-interix"$UNAME_RELEASE"
		exit ;;
d956 2
a957 2
	echo "$UNAME_MACHINE"-pc-uwin
	exit ;;
d959 2
a960 2
	echo x86_64-pc-cygwin
	exit ;;
d962 3
a964 2
	echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
	exit ;;
d967 4
a970 2
	echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')"
	exit ;;
d973 10
a982 2
	echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC"
	exit ;;
d984 2
a985 2
	echo "$UNAME_MACHINE"-unknown-minix
	exit ;;
d987 22
a1008 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1011 2
a1012 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1014 1
a1014 1
	case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in
d1025 5
a1029 5
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    arc:Linux:*:* | arceb:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1035 1
a1035 1
	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1040 1
a1040 1
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
d1042 1
a1042 1
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
d1045 1
a1045 1
	exit ;;
d1047 2
a1048 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1050 2
a1051 2
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
	exit ;;
d1053 2
a1054 2
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
	exit ;;
d1056 2
a1057 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1059 2
a1060 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1062 2
a1063 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1065 2
a1066 2
	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
	exit ;;
d1068 2
a1069 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1071 14
a1084 5
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1086 2
a1087 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1089 2
a1090 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1135 2
a1136 1
	eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')"
d1140 2
a1141 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1143 2
a1144 2
	echo or1k-unknown-linux-"$LIBC"
	exit ;;
d1146 2
a1147 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1149 2
a1150 2
	echo sparc-unknown-linux-"$LIBC"
	exit ;;
d1152 2
a1153 2
	echo hppa64-unknown-linux-"$LIBC"
	exit ;;
d1156 4
a1159 4
	case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in
	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
	  *)    echo hppa-unknown-linux-"$LIBC" ;;
d1161 1
a1161 1
	exit ;;
d1163 2
a1164 2
	echo powerpc64-unknown-linux-"$LIBC"
	exit ;;
d1166 2
a1167 2
	echo powerpc-unknown-linux-"$LIBC"
	exit ;;
d1169 2
a1170 2
	echo powerpc64le-unknown-linux-"$LIBC"
	exit ;;
d1172 2
a1173 2
	echo powerpcle-unknown-linux-"$LIBC"
	exit ;;
d1175 2
a1176 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1178 2
a1179 2
	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
	exit ;;
d1181 2
a1182 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1184 2
a1185 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1187 2
a1188 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1190 2
a1191 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1193 2
a1194 2
	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
	exit ;;
d1197 1
d1200 16
a1215 6
	    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
d1217 2
a1218 2
	echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
	exit ;;
d1220 2
a1221 2
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
d1226 2
a1227 2
	echo i386-sequent-sysv4
	exit ;;
d1234 2
a1235 2
	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
	exit ;;
d1237 1
a1237 1
	# If we were able to find `uname', then EMX Unix compatibility
d1239 2
a1240 2
	echo "$UNAME_MACHINE"-pc-os2-emx
	exit ;;
d1242 2
a1243 2
	echo "$UNAME_MACHINE"-unknown-stop
	exit ;;
d1245 2
a1246 2
	echo "$UNAME_MACHINE"-unknown-atheos
	exit ;;
d1248 2
a1249 2
	echo "$UNAME_MACHINE"-pc-syllable
	exit ;;
d1251 2
a1252 2
	echo i386-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
d1254 2
a1255 2
	echo "$UNAME_MACHINE"-pc-msdosdjgpp
	exit ;;
d1257 1
a1257 1
	UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//')
d1259 1
a1259 1
		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
d1261 1
a1261 1
		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
d1263 1
a1263 1
	exit ;;
d1266 1
a1266 1
	case $(/bin/uname -X | grep "^Machine") in
d1271 2
a1272 2
	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
	exit ;;
d1275 2
a1276 2
		UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name)
		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
d1278 1
a1278 1
		UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //'))
d1286 1
a1286 1
		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
d1288 1
a1288 1
		echo "$UNAME_MACHINE"-pc-sysv32
d1290 1
a1290 1
	exit ;;
d1298 2
a1299 2
	echo i586-pc-msdosdjgpp
	exit ;;
d1301 2
a1302 2
	echo i386-pc-mach3
	exit ;;
d1304 2
a1305 2
	echo i860-intel-osf1
	exit ;;
d1308 1
a1308 1
	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
d1310 1
a1310 1
	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
d1312 1
a1312 1
	exit ;;
d1315 2
a1316 2
	echo m68010-convergent-sysv
	exit ;;
d1318 2
a1319 2
	echo m68k-convergent-sysv
	exit ;;
d1321 2
a1322 2
	echo m68k-diab-dnix
	exit ;;
d1328 1
a1328 1
	&& OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid)
d1339 1
a1339 1
	    && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid)
d1347 2
a1348 2
	echo m68k-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
d1350 2
a1351 2
	echo m68k-atari-sysv4
	exit ;;
d1353 2
a1354 2
	echo sparc-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
d1356 2
a1357 2
	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
d1359 2
a1360 2
	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
	exit ;;
d1362 2
a1363 2
	echo mips-dde-sysv"$UNAME_RELEASE"
	exit ;;
d1365 2
a1366 2
	echo mips-sni-sysv4
	exit ;;
d1368 2
a1369 2
	echo mips-sni-sysv4
	exit ;;
d1372 2
a1373 2
		UNAME_MACHINE=$( (uname -p) 2>/dev/null)
		echo "$UNAME_MACHINE"-sni-sysv4
d1375 1
a1375 1
		echo ns32k-sni-sysv
d1377 2
a1378 2
	exit ;;
    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
d1380 2
a1381 2
	echo i586-unisys-sysv4
	exit ;;
d1385 2
a1386 2
	echo hppa1.1-stratus-sysv4
	exit ;;
d1389 2
a1390 2
	echo i860-stratus-sysv4
	exit ;;
d1393 2
a1394 2
	echo "$UNAME_MACHINE"-stratus-vos
	exit ;;
d1397 2
a1398 2
	echo hppa1.1-stratus-vos
	exit ;;
d1400 2
a1401 2
	echo m68k-apple-aux"$UNAME_RELEASE"
	exit ;;
d1403 2
a1404 2
	echo mips-sony-newsos6
	exit ;;
d1407 1
a1407 1
		echo mips-nec-sysv"$UNAME_RELEASE"
d1409 1
a1409 1
		echo mips-unknown-sysv"$UNAME_RELEASE"
d1411 1
a1411 1
	exit ;;
d1413 2
a1414 2
	echo powerpc-be-beos
	exit ;;
d1416 2
a1417 2
	echo powerpc-apple-beos
	exit ;;
d1419 2
a1420 2
	echo i586-pc-beos
	exit ;;
d1422 8
a1429 5
	echo i586-pc-haiku
	exit ;;
    x86_64:Haiku:*:*)
	echo x86_64-unknown-haiku
	exit ;;
d1431 2
a1432 2
	echo sx4-nec-superux"$UNAME_RELEASE"
	exit ;;
d1434 2
a1435 2
	echo sx5-nec-superux"$UNAME_RELEASE"
	exit ;;
d1437 2
a1438 2
	echo sx6-nec-superux"$UNAME_RELEASE"
	exit ;;
d1440 2
a1441 2
	echo sx7-nec-superux"$UNAME_RELEASE"
	exit ;;
d1443 2
a1444 2
	echo sx8-nec-superux"$UNAME_RELEASE"
	exit ;;
d1446 2
a1447 2
	echo sx8r-nec-superux"$UNAME_RELEASE"
	exit ;;
d1449 2
a1450 2
	echo sxace-nec-superux"$UNAME_RELEASE"
	exit ;;
d1452 2
a1453 2
	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
	exit ;;
d1455 2
a1456 2
	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
	exit ;;
d1458 2
a1459 2
	echo aarch64-apple-darwin"$UNAME_RELEASE"
	exit ;;
d1461 1
a1461 1
	UNAME_PROCESSOR=$(uname -p)
d1495 2
a1496 2
	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
	exit ;;
d1498 1
a1498 1
	UNAME_PROCESSOR=$(uname -p)
d1503 2
a1504 2
	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
	exit ;;
d1506 2
a1507 2
	echo i386-pc-qnx
	exit ;;
d1509 2
a1510 2
	echo neo-tandem-nsk"$UNAME_RELEASE"
	exit ;;
d1512 2
a1513 2
	echo nse-tandem-nsk"$UNAME_RELEASE"
	exit ;;
d1515 2
a1516 2
	echo nsr-tandem-nsk"$UNAME_RELEASE"
	exit ;;
d1518 2
a1519 2
	echo nsv-tandem-nsk"$UNAME_RELEASE"
	exit ;;
d1521 2
a1522 2
	echo nsx-tandem-nsk"$UNAME_RELEASE"
	exit ;;
d1524 2
a1525 2
	echo mips-compaq-nonstopux
	exit ;;
d1527 2
a1528 2
	echo bs2000-siemens-sysv
	exit ;;
d1530 2
a1531 2
	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
	exit ;;
d1536 1
a1536 2
	# shellcheck disable=SC2154
	if test "$cputype" = 386; then
d1538 2
a1539 2
	else
	    UNAME_MACHINE="$cputype"
d1541 2
a1542 2
	echo "$UNAME_MACHINE"-unknown-plan9
	exit ;;
d1544 2
a1545 2
	echo pdp10-unknown-tops10
	exit ;;
d1547 2
a1548 2
	echo pdp10-unknown-tenex
	exit ;;
d1550 2
a1551 2
	echo pdp10-dec-tops20
	exit ;;
d1553 2
a1554 2
	echo pdp10-xkl-tops20
	exit ;;
d1556 2
a1557 2
	echo pdp10-unknown-tops20
	exit ;;
d1559 2
a1560 2
	echo pdp10-unknown-its
	exit ;;
d1562 2
a1563 2
	echo mips-sei-seiux"$UNAME_RELEASE"
	exit ;;
d1565 3
a1567 2
	echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
	exit ;;
d1569 5
a1573 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 ;;
d1576 2
a1577 2
	echo i386-pc-xenix
	exit ;;
d1579 3
a1581 2
	echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')"
	exit ;;
d1583 8
a1590 5
	echo "$UNAME_MACHINE"-pc-rdos
	exit ;;
    i*86:AROS:*:*)
	echo "$UNAME_MACHINE"-pc-aros
	exit ;;
d1592 2
a1593 2
	echo "$UNAME_MACHINE"-unknown-esx
	exit ;;
d1595 2
a1596 2
	echo x86_64-unknown-onefs
	exit ;;
d1598 8
a1605 2
	echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
	exit ;;
d1608 6
d1629 1
d1654 1
a1654 1
  version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null);
d1746 1
a1746 1
$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) &&
d1754 1
a1754 1
case "$UNAME_MACHINE:$UNAME_SYSTEM" in
d1776 2
a1777 1
year=$(echo $timestamp | sed 's,-.*,,')
d1779 2
a1780 1
if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then
d1789 14
a1802 14
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)
d1814 1
a1814 1
# eval: (add-hook 'before-save-hook 'time-stamp)
d1816 1
a1816 1
# time-stamp-format: "%:y-%02m-%02d"
@


1.2
log
@Support aarch64eb in */config.guess.

Cherry-picked from upstream:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=1c4398015583eb77bc043234f5734be055e64bea

Everything except external/apache2/llvm/dist/llvm/cmake/config.guess
is patched, which is under vendor tag and cannot be modified. I expect
that this file is not actually used as we use hand-crafted version of
configure script instead of cmake for building LLVM.

Note that external/apache2/llvm/autoconf/autoconf/config.guess has
already been committed on Oct. 20, but commit message disappeared as
cvs aborted due to "permission denied" when trying to modify the file
mentioned above. Sorry for confusing you.

Also note that GMP uses its own config.guess Patch for
external/lgpl3/gmp/dist/config.guess is provided by ryo@@. Thanks!
@
text
@d3 1
a3 1
#   Copyright 1992-2016 Free Software Foundation, Inc.
d5 1
a5 1
timestamp='2016-10-02'
d18 1
a18 1
# along with this program; if not, see <http://www.gnu.org/licenses/>.
d30 1
a30 1
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
d35 1
a35 1
me=`echo "$0" | sed -e 's,.*/,,'`
d42 1
a42 1
Operation modes:
d53 1
a53 1
Copyright 1992-2016 Free Software Foundation, Inc.
a86 2
trap 'exit 1' 1 2 15

d97 30
a126 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= ;'
d130 1
a130 1
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
d134 4
a137 4
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
d139 1
a139 1
case "${UNAME_SYSTEM}" in
d141 1
a141 3
	# If the system lacks a compiler, then just pick glibc.
	# We could probably try harder.
	LIBC=gnu
d143 2
a144 2
	eval $set_cc_for_build
	cat <<-EOF > $dummy.c
d150 2
d153 5
a157 1
	LIBC=gnu
d160 14
a173 1
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
d179 1
a179 1
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
d192 5
a196 5
	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
	    /sbin/$sysctl 2>/dev/null || \
	    /usr/sbin/$sysctl 2>/dev/null || \
	    echo unknown)`
	case "${UNAME_MACHINE_ARCH}" in
d204 3
a206 3
		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
		machine=${arch}${endian}-unknown
d208 1
a208 1
	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
d212 1
a212 1
	case "${UNAME_MACHINE_ARCH}" in
d217 1
a217 1
		eval $set_cc_for_build
d233 1
a233 1
	case "${UNAME_MACHINE_ARCH}" in
d236 1
a236 1
		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
d244 1
a244 1
	case "${UNAME_VERSION}" in
d249 1
a249 1
		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
d255 1
a255 1
	echo "${machine}-${os}${release}${abi}"
d258 2
a259 2
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
d262 2
a263 2
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
d266 5
a270 2
	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
d273 1
a273 1
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
d276 4
a279 1
	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
d282 1
a282 1
	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
d285 1
a285 1
	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
d288 10
a297 1
	echo ${UNAME_MACHINE}-unknown-sortix
d302 1
a302 1
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
d305 1
a305 1
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
d312 1
a312 1
	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
d350 1
a350 1
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
a354 9
    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 ;;
d359 1
a359 1
	echo ${UNAME_MACHINE}-unknown-amigaos
d362 1
a362 1
	echo ${UNAME_MACHINE}-unknown-morphos
d374 1
a374 1
	echo arm-acorn-riscix${UNAME_RELEASE}
d384 1
a384 1
	if test "`(/bin/universe) 2>/dev/null`" = att ; then
d397 1
a397 1
	case `/usr/bin/uname -p` in
d401 1
a401 1
	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
d404 1
a404 1
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
d407 1
a407 1
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
d410 1
a410 1
	echo i386-pc-auroraux${UNAME_RELEASE}
d413 1
a413 1
	eval $set_cc_for_build
d418 1
a418 1
	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
d426 1
a426 1
	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
d432 1
a432 1
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
d435 1
a435 1
	case "`/usr/bin/arch -k`" in
d437 1
a437 1
		UNAME_RELEASE=`uname -v`
d441 1
a441 1
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
d444 1
a444 1
	echo m68k-sun-sunos${UNAME_RELEASE}
d447 3
a449 3
	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
d451 1
a451 1
		echo m68k-sun-sunos${UNAME_RELEASE}
d454 1
a454 1
		echo sparc-sun-sunos${UNAME_RELEASE}
d459 1
a459 1
	echo sparc-auspex-sunos${UNAME_RELEASE}
d470 1
a470 1
	echo m68k-atari-mint${UNAME_RELEASE}
d473 1
a473 1
	echo m68k-atari-mint${UNAME_RELEASE}
d476 1
a476 1
	echo m68k-atari-mint${UNAME_RELEASE}
d479 1
a479 1
	echo m68k-milan-mint${UNAME_RELEASE}
d482 1
a482 1
	echo m68k-hades-mint${UNAME_RELEASE}
d485 1
a485 1
	echo m68k-unknown-mint${UNAME_RELEASE}
d488 1
a488 1
	echo m68k-apple-machten${UNAME_RELEASE}
d491 1
a491 1
	echo powerpc-apple-machten${UNAME_RELEASE}
d497 1
a497 1
	echo mips-dec-ultrix${UNAME_RELEASE}
d500 1
a500 1
	echo vax-dec-ultrix${UNAME_RELEASE}
d503 1
a503 1
	echo clipper-intergraph-clix${UNAME_RELEASE}
d506 2
a507 2
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
d516 1
a516 1
	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
d519 1
a519 1
	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
d522 1
a522 1
	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
d528 3
a530 3
	$CC_FOR_BUILD -o $dummy $dummy.c &&
	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
	  SYSTEM_NAME=`$dummy $dummyarg` &&
d532 1
a532 1
	echo mips-mips-riscos${UNAME_RELEASE}
d557 2
a558 2
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
d560 2
a561 2
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
d563 1
a563 1
		echo m88k-dg-dgux${UNAME_RELEASE}
d565 1
a565 1
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
d568 1
a568 1
	    echo i586-dg-dgux${UNAME_RELEASE}
d585 1
a585 1
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
d589 1
a589 1
	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
d594 2
a595 2
	if [ -x /usr/bin/oslevel ] ; then
		IBM_REV=`/usr/bin/oslevel`
d597 1
a597 1
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
d599 1
a599 1
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
d603 2
a604 2
		eval $set_cc_for_build
		sed 's/^		//' << EOF >$dummy.c
d615 1
a615 1
		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
d628 2
a629 2
	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
d634 3
a636 3
	if [ -x /usr/bin/lslpp ] ; then
		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
d638 1
a638 1
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
d640 1
a640 1
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
d645 1
a645 1
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
d649 1
a649 1
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
d664 4
a667 4
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	case "${UNAME_MACHINE}" in
	    9000/31? )            HP_ARCH=m68000 ;;
	    9000/[34]?? )         HP_ARCH=m68k ;;
d669 4
a672 4
		if [ -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
d676 1
a676 1
			case "${sc_kernel_bits}" in
d683 3
a685 3
		if [ "${HP_ARCH}" = "" ]; then
		    eval $set_cc_for_build
		    sed 's/^		//' << EOF >$dummy.c
d718 1
a718 1
		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
d722 1
a722 1
	if [ ${HP_ARCH} = hppa2.0w ]
d724 1
a724 1
	    eval $set_cc_for_build
d743 1
a743 1
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
d746 2
a747 2
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	echo ia64-hp-hpux${HPUX_REV}
d750 2
a751 2
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
d776 1
a776 1
	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
d780 1
a780 1
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
d789 1
a789 1
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
d796 2
a797 2
	if [ -x /usr/sbin/sysversion ] ; then
	    echo ${UNAME_MACHINE}-unknown-osf1mk
d799 1
a799 1
	    echo ${UNAME_MACHINE}-unknown-osf1
d824 1
a824 1
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
d827 1
a827 1
	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
d833 1
a833 1
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
d836 1
a836 1
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
d839 1
a839 1
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
d842 1
a842 1
	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
d845 3
a847 3
	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/ /_/'`
d851 2
a852 2
	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
d856 1
a856 1
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
d859 1
a859 1
	echo sparc-unknown-bsdi${UNAME_RELEASE}
d862 12
a873 1
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
d876 2
a877 2
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	case ${UNAME_PROCESSOR} in
d879 3
a881 3
		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
	    *)
		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
d883 1
d886 1
a886 1
	echo ${UNAME_MACHINE}-pc-cygwin
d889 1
a889 1
	echo ${UNAME_MACHINE}-pc-mingw64
d892 1
a892 1
	echo ${UNAME_MACHINE}-pc-mingw32
d895 1
a895 5
	echo ${UNAME_MACHINE}-pc-msys
	exit ;;
    i*:windows32*:*)
	# uname -m includes "-pc" on this system.
	echo ${UNAME_MACHINE}-mingw32
d898 1
a898 1
	echo ${UNAME_MACHINE}-pc-pw32
d901 1
a901 1
	case ${UNAME_MACHINE} in
d903 1
a903 1
		echo i586-pc-interix${UNAME_RELEASE}
d906 1
a906 1
		echo x86_64-unknown-interix${UNAME_RELEASE}
d909 1
a909 1
		echo ia64-unknown-interix${UNAME_RELEASE}
a911 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 ;;
d913 1
a913 1
	echo ${UNAME_MACHINE}-pc-uwin
d916 1
a916 4
	echo x86_64-unknown-cygwin
	exit ;;
    p*:CYGWIN*:*)
	echo powerpcle-unknown-cygwin
d919 1
a919 1
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
d923 1
a923 1
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
d927 1
a927 1
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
d929 2
a930 2
    i*86:Minix:*:*)
	echo ${UNAME_MACHINE}-pc-minix
d933 1
a933 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d937 1
a937 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d940 1
a940 1
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
d951 1
a951 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d954 1
a954 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d957 1
a957 1
	eval $set_cc_for_build
d961 1
a961 1
	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d966 1
a966 1
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
d968 1
a968 1
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
d973 1
a973 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d976 1
a976 1
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
d979 1
a979 1
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
d982 1
a982 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d985 1
a985 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d988 1
a988 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d991 1
a991 1
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
d994 1
a994 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d997 4
a1000 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1003 1
a1003 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1006 1
a1006 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1009 4
a1012 2
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
d1014 28
a1041 2
	#undef ${UNAME_MACHINE}
	#undef ${UNAME_MACHINE}el
d1043 1
a1043 1
	CPU=${UNAME_MACHINE}el
d1046 1
a1046 1
	CPU=${UNAME_MACHINE}
d1048 1
a1048 1
	CPU=
d1052 2
a1053 2
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
d1056 1
a1056 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1059 1
a1059 1
	echo or1k-unknown-linux-${LIBC}
d1062 1
a1062 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1065 1
a1065 1
	echo sparc-unknown-linux-${LIBC}
d1068 1
a1068 1
	echo hppa64-unknown-linux-${LIBC}
d1072 4
a1075 4
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
	  *)    echo hppa-unknown-linux-${LIBC} ;;
d1079 1
a1079 1
	echo powerpc64-unknown-linux-${LIBC}
d1082 1
a1082 1
	echo powerpc-unknown-linux-${LIBC}
d1085 1
a1085 1
	echo powerpc64le-unknown-linux-${LIBC}
d1088 1
a1088 1
	echo powerpcle-unknown-linux-${LIBC}
d1090 2
a1091 2
    riscv32:Linux:*:* | riscv64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1094 1
a1094 1
	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
d1097 1
a1097 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1100 1
a1100 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1103 1
a1103 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1106 1
a1106 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1109 1
a1109 1
	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
d1112 11
a1122 1
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
d1125 1
a1125 1
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
d1139 1
a1139 1
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
d1144 1
a1144 1
	echo ${UNAME_MACHINE}-pc-os2-emx
d1147 1
a1147 1
	echo ${UNAME_MACHINE}-unknown-stop
d1150 1
a1150 1
	echo ${UNAME_MACHINE}-unknown-atheos
d1153 1
a1153 1
	echo ${UNAME_MACHINE}-pc-syllable
d1156 1
a1156 1
	echo i386-unknown-lynxos${UNAME_RELEASE}
d1159 1
a1159 1
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
d1161 2
a1162 2
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
d1164 1
a1164 1
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
d1166 1
a1166 1
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
d1171 1
a1171 1
	case `/bin/uname -X | grep "^Machine"` in
d1176 1
a1176 1
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
d1180 2
a1181 2
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
d1183 1
a1183 1
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
d1191 1
a1191 1
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
d1193 1
a1193 1
		echo ${UNAME_MACHINE}-pc-sysv32
d1213 1
a1213 1
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
d1215 1
a1215 1
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
d1233 1
a1233 1
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
d1235 1
a1235 1
	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
d1237 1
a1237 1
	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
d1244 1
a1244 1
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
d1246 1
a1246 1
	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
d1248 1
a1248 1
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
d1250 1
a1250 1
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
d1252 1
a1252 1
	echo m68k-unknown-lynxos${UNAME_RELEASE}
d1258 1
a1258 1
	echo sparc-unknown-lynxos${UNAME_RELEASE}
d1261 1
a1261 1
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
d1264 1
a1264 1
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
d1267 1
a1267 1
	echo mips-dde-sysv${UNAME_RELEASE}
d1277 2
a1278 2
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
		echo ${UNAME_MACHINE}-sni-sysv4
d1298 1
a1298 1
	echo ${UNAME_MACHINE}-stratus-vos
d1305 1
a1305 1
	echo m68k-apple-aux${UNAME_RELEASE}
d1311 2
a1312 2
	if [ -d /usr/nec ]; then
		echo mips-nec-sysv${UNAME_RELEASE}
d1314 1
a1314 1
		echo mips-unknown-sysv${UNAME_RELEASE}
d1333 1
a1333 1
	echo sx4-nec-superux${UNAME_RELEASE}
d1336 1
a1336 1
	echo sx5-nec-superux${UNAME_RELEASE}
d1339 1
a1339 1
	echo sx6-nec-superux${UNAME_RELEASE}
d1342 1
a1342 1
	echo sx7-nec-superux${UNAME_RELEASE}
d1345 1
a1345 1
	echo sx8-nec-superux${UNAME_RELEASE}
d1348 1
a1348 1
	echo sx8r-nec-superux${UNAME_RELEASE}
d1351 1
a1351 1
	echo sxace-nec-superux${UNAME_RELEASE}
d1354 1
a1354 1
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
d1357 4
a1360 1
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
d1363 29
a1391 16
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
	eval $set_cc_for_build
	if test "$UNAME_PROCESSOR" = unknown ; then
	    UNAME_PROCESSOR=powerpc
	fi
	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
	    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
		    case $UNAME_PROCESSOR in
			i386) UNAME_PROCESSOR=x86_64 ;;
			powerpc) UNAME_PROCESSOR=powerpc64 ;;
		    esac
		fi
d1394 2
a1395 7
	    # Avoid executing cc on OS X 10.9, as it ships with a stub
	    # that puts up a graphical alert prompting to install
	    # developer tools.  Any system running Mac OS X 10.7 or
	    # later (Darwin 11 and later) is required to have a 64-bit
	    # processor. This is not true of the ARM version of Darwin
	    # that Apple uses in portable devices.
	    UNAME_PROCESSOR=x86_64
d1397 1
a1397 1
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
d1400 1
a1400 1
	UNAME_PROCESSOR=`uname -p`
d1405 1
a1405 1
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
d1410 2
a1411 2
    NEO-?:NONSTOP_KERNEL:*:*)
	echo neo-tandem-nsk${UNAME_RELEASE}
d1414 7
a1420 1
	echo nse-tandem-nsk${UNAME_RELEASE}
d1422 2
a1423 2
    NSR-?:NONSTOP_KERNEL:*:*)
	echo nsr-tandem-nsk${UNAME_RELEASE}
d1432 1
a1432 1
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
d1438 1
d1444 1
a1444 1
	echo ${UNAME_MACHINE}-unknown-plan9
d1465 1
a1465 1
	echo mips-sei-seiux${UNAME_RELEASE}
d1468 1
a1468 1
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
d1471 2
a1472 2
	UNAME_MACHINE=`(uname -p) 2>/dev/null`
	case "${UNAME_MACHINE}" in
d1481 1
a1481 1
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
d1484 1
a1484 1
	echo ${UNAME_MACHINE}-pc-rdos
d1487 1
a1487 1
	echo ${UNAME_MACHINE}-pc-aros
d1490 1
a1490 1
	echo ${UNAME_MACHINE}-unknown-esx
d1495 153
a1650 1
$0: unable to guess system type
d1653 2
a1654 2
operating system you are using. If your script is old, overwrite
config.guess and config.sub with the latest versions from:
d1656 1
a1656 1
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
d1658 7
a1664 1
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
d1672 19
a1690 19
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}
d1692 1
d1697 1
a1697 1
# eval: (add-hook 'write-file-hooks 'time-stamp)
@


1.2.8.1
log
@Sync with HEAD
@
text
@d3 1
a3 1
#   Copyright 1992-2021 Free Software Foundation, Inc.
d5 1
a5 1
timestamp='2021-01-01'
d18 1
a18 1
# along with this program; if not, see <https://www.gnu.org/licenses/>.
d30 1
a30 1
# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
d35 1
a35 1
me=$(echo "$0" | sed -e 's,.*/,,')
d42 1
a42 1
Options:
d53 1
a53 1
Copyright 1992-2021 Free Software Foundation, Inc.
d87 2
d99 24
a122 30
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
    { 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
}
d126 1
a126 1
if test -f /.attbin/uname ; then
d130 4
a133 4
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
d135 1
a135 1
case "$UNAME_SYSTEM" in
d137 3
a139 1
	LIBC=unknown
d141 2
a142 2
	set_cc_for_build
	cat <<-EOF > "$dummy.c"
d148 1
a148 1
	#elif defined(__GLIBC__)
a149 6
	#else
	#include <stdarg.h>
	/* First heuristic to detect musl libc.  */
	#ifdef __DEFINED_va_list
	LIBC=musl
	#endif
d152 1
a152 14
	eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')"

	# 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
d158 1
a158 1
case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
d171 5
a175 5
	UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \
	    "/sbin/$sysctl" 2>/dev/null || \
	    "/usr/sbin/$sysctl" 2>/dev/null || \
	    echo unknown))
	case "$UNAME_MACHINE_ARCH" in
d183 3
a185 3
		arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,')
		endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p')
		machine="${arch}${endian}"-unknown
d187 1
a187 1
	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
d191 1
a191 1
	case "$UNAME_MACHINE_ARCH" in
d196 1
a196 1
		set_cc_for_build
d212 1
a212 1
	case "$UNAME_MACHINE_ARCH" in
d215 1
a215 1
		abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr")
d223 1
a223 1
	case "$UNAME_VERSION" in
d228 1
a228 1
		release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2)
d234 1
a234 1
	echo "$machine-${os}${release}${abi-}"
d237 2
a238 2
	UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
d241 2
a242 2
	UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
d245 2
a246 5
	UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
	exit ;;
    *:MidnightBSD:*:*)
	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
d249 1
a249 1
	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
d252 1
a252 4
	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
	exit ;;
    *:OS108:*:*)
	echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
d255 1
a255 1
	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
d258 1
a258 1
	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
d261 1
a261 10
	echo "$UNAME_MACHINE"-unknown-sortix
	exit ;;
    *:Twizzler:*:*)
	echo "$UNAME_MACHINE"-unknown-twizzler
	exit ;;
    *:Redox:*:*)
	echo "$UNAME_MACHINE"-unknown-redox
	exit ;;
    mips:OSF1:*.*)
	echo mips-dec-osf1
d266 1
a266 1
		UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}')
d269 1
a269 1
		UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}')
d276 1
a276 1
	ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1)
d314 1
a314 1
	echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)"
d319 9
d332 1
a332 1
	echo "$UNAME_MACHINE"-unknown-amigaos
d335 1
a335 1
	echo "$UNAME_MACHINE"-unknown-morphos
d347 1
a347 1
	echo arm-acorn-riscix"$UNAME_RELEASE"
d357 1
a357 1
	if test "$( (/bin/universe) 2>/dev/null)" = att ; then
d370 1
a370 1
	case $(/usr/bin/uname -p) in
d374 1
a374 1
	echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
d377 1
a377 1
	echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
d380 1
a380 1
	echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
d383 1
a383 1
	echo i386-pc-auroraux"$UNAME_RELEASE"
d386 1
a386 1
	set_cc_for_build
d391 1
a391 1
	if test "$CC_FOR_BUILD" != no_compiler_found; then
d399 1
a399 1
	echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
d405 1
a405 1
	echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
d408 1
a408 1
	case "$(/usr/bin/arch -k)" in
d410 1
a410 1
		UNAME_RELEASE=$(uname -v)
d414 1
a414 1
	echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')"
d417 1
a417 1
	echo m68k-sun-sunos"$UNAME_RELEASE"
d420 3
a422 3
	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
d424 1
a424 1
		echo m68k-sun-sunos"$UNAME_RELEASE"
d427 1
a427 1
		echo sparc-sun-sunos"$UNAME_RELEASE"
d432 1
a432 1
	echo sparc-auspex-sunos"$UNAME_RELEASE"
d443 1
a443 1
	echo m68k-atari-mint"$UNAME_RELEASE"
d446 1
a446 1
	echo m68k-atari-mint"$UNAME_RELEASE"
d449 1
a449 1
	echo m68k-atari-mint"$UNAME_RELEASE"
d452 1
a452 1
	echo m68k-milan-mint"$UNAME_RELEASE"
d455 1
a455 1
	echo m68k-hades-mint"$UNAME_RELEASE"
d458 1
a458 1
	echo m68k-unknown-mint"$UNAME_RELEASE"
d461 1
a461 1
	echo m68k-apple-machten"$UNAME_RELEASE"
d464 1
a464 1
	echo powerpc-apple-machten"$UNAME_RELEASE"
d470 1
a470 1
	echo mips-dec-ultrix"$UNAME_RELEASE"
d473 1
a473 1
	echo vax-dec-ultrix"$UNAME_RELEASE"
d476 1
a476 1
	echo clipper-intergraph-clix"$UNAME_RELEASE"
d479 2
a480 2
	set_cc_for_build
	sed 's/^	//' << EOF > "$dummy.c"
d489 1
a489 1
	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
d492 1
a492 1
	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
d495 1
a495 1
	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
d501 3
a503 3
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
	  dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') &&
	  SYSTEM_NAME=$("$dummy" "$dummyarg") &&
d505 1
a505 1
	echo mips-mips-riscos"$UNAME_RELEASE"
d530 2
a531 2
	UNAME_PROCESSOR=$(/usr/bin/uname -p)
	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
d533 2
a534 2
	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
	       test "$TARGET_BINARY_INTERFACE"x = x
d536 1
a536 1
		echo m88k-dg-dgux"$UNAME_RELEASE"
d538 1
a538 1
		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
d541 1
a541 1
	    echo i586-dg-dgux"$UNAME_RELEASE"
d558 1
a558 1
	echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')"
d562 1
a562 1
	exit ;;               # Note that: echo "'$(uname -s)'" gives 'AIX '
d567 2
a568 2
	if test -x /usr/bin/oslevel ; then
		IBM_REV=$(/usr/bin/oslevel)
d570 1
a570 1
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
d572 1
a572 1
	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
d576 2
a577 2
		set_cc_for_build
		sed 's/^		//' << EOF > "$dummy.c"
d588 1
a588 1
		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy")
d601 2
a602 2
	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
d607 3
a609 3
	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/)
d611 1
a611 1
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
d613 1
a613 1
	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
d618 1
a618 1
    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
d622 1
a622 1
	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
d637 4
a640 4
	HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
	case "$UNAME_MACHINE" in
	    9000/31?)            HP_ARCH=m68000 ;;
	    9000/[34]??)         HP_ARCH=m68k ;;
d642 4
a645 4
		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
d649 1
a649 1
			case "$sc_kernel_bits" in
d656 3
a658 3
		if test "$HP_ARCH" = ""; then
		    set_cc_for_build
		    sed 's/^		//' << EOF > "$dummy.c"
d691 1
a691 1
		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy")
d695 1
a695 1
	if test "$HP_ARCH" = hppa2.0w
d697 1
a697 1
	    set_cc_for_build
d716 1
a716 1
	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
d719 2
a720 2
	HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
	echo ia64-hp-hpux"$HPUX_REV"
d723 2
a724 2
	set_cc_for_build
	sed 's/^	//' << EOF > "$dummy.c"
d749 1
a749 1
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") &&
d753 1
a753 1
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
d762 1
a762 1
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
d769 2
a770 2
	if test -x /usr/sbin/sysversion ; then
	    echo "$UNAME_MACHINE"-unknown-osf1mk
d772 1
a772 1
	    echo "$UNAME_MACHINE"-unknown-osf1
d797 1
a797 1
	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d800 1
a800 1
	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
d806 1
a806 1
	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d809 1
a809 1
	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d812 1
a812 1
	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d815 1
a815 1
	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d818 3
a820 3
	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/ /_/')
d824 2
a825 2
	FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///')
	FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/')
d829 1
a829 1
	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
d832 1
a832 1
	echo sparc-unknown-bsdi"$UNAME_RELEASE"
d835 1
a835 12
	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
	exit ;;
    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
	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi
	else
	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf
	fi
d838 2
a839 2
	UNAME_PROCESSOR=$(/usr/bin/uname -p)
	case "$UNAME_PROCESSOR" in
d841 3
a843 3
		UNAME_PROCESSOR=x86_64 ;;
	    i386)
		UNAME_PROCESSOR=i586 ;;
a844 1
	echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
d847 1
a847 1
	echo "$UNAME_MACHINE"-pc-cygwin
d850 1
a850 1
	echo "$UNAME_MACHINE"-pc-mingw64
d853 1
a853 1
	echo "$UNAME_MACHINE"-pc-mingw32
d856 5
a860 1
	echo "$UNAME_MACHINE"-pc-msys
d863 1
a863 1
	echo "$UNAME_MACHINE"-pc-pw32
d866 1
a866 1
	case "$UNAME_MACHINE" in
d868 1
a868 1
		echo i586-pc-interix"$UNAME_RELEASE"
d871 1
a871 1
		echo x86_64-unknown-interix"$UNAME_RELEASE"
d874 1
a874 1
		echo ia64-unknown-interix"$UNAME_RELEASE"
d877 12
d890 1
a890 1
	echo "$UNAME_MACHINE"-pc-uwin
d893 4
a896 1
	echo x86_64-pc-cygwin
d899 1
a899 1
	echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
d903 1
a903 1
	echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')"
d907 1
a907 1
	echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC"
d909 2
a910 2
    *:Minix:*:*)
	echo "$UNAME_MACHINE"-unknown-minix
d913 1
a913 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d917 1
a917 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d920 1
a920 1
	case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in
d931 1
a931 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d934 1
a934 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d937 1
a937 1
	set_cc_for_build
d941 1
a941 1
	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d946 1
a946 1
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
d948 1
a948 1
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
d953 1
a953 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d956 1
a956 1
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
d959 1
a959 1
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
d962 1
a962 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d965 1
a965 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d968 1
a968 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d971 1
a971 1
	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
d974 1
a974 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d977 1
a977 4
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d980 1
a980 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d983 1
a983 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d986 2
a987 4
	set_cc_for_build
	IS_GLIBC=0
	test x"${LIBC}" = xgnu && IS_GLIBC=1
	sed 's/^	//' << EOF > "$dummy.c"
d989 2
a990 28
	#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

d992 1
a992 1
	MIPS_ENDIAN=el
d995 1
a995 1
	MIPS_ENDIAN=
d997 1
a997 1
	MIPS_ENDIAN=
d1001 2
a1002 2
	eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')"
	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
d1005 1
a1005 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1008 1
a1008 1
	echo or1k-unknown-linux-"$LIBC"
d1011 1
a1011 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1014 1
a1014 1
	echo sparc-unknown-linux-"$LIBC"
d1017 1
a1017 1
	echo hppa64-unknown-linux-"$LIBC"
d1021 4
a1024 4
	case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in
	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
	  *)    echo hppa-unknown-linux-"$LIBC" ;;
d1028 1
a1028 1
	echo powerpc64-unknown-linux-"$LIBC"
d1031 1
a1031 1
	echo powerpc-unknown-linux-"$LIBC"
d1034 1
a1034 1
	echo powerpc64le-unknown-linux-"$LIBC"
d1037 1
a1037 1
	echo powerpcle-unknown-linux-"$LIBC"
d1039 2
a1040 2
    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1043 1
a1043 1
	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
d1046 1
a1046 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1049 1
a1049 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1052 1
a1052 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1055 1
a1055 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1058 1
a1058 1
	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
d1061 1
a1061 11
	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
	echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
d1064 1
a1064 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1078 1
a1078 1
	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
d1083 1
a1083 1
	echo "$UNAME_MACHINE"-pc-os2-emx
d1086 1
a1086 1
	echo "$UNAME_MACHINE"-unknown-stop
d1089 1
a1089 1
	echo "$UNAME_MACHINE"-unknown-atheos
d1092 1
a1092 1
	echo "$UNAME_MACHINE"-pc-syllable
d1095 1
a1095 1
	echo i386-unknown-lynxos"$UNAME_RELEASE"
d1098 1
a1098 1
	echo "$UNAME_MACHINE"-pc-msdosdjgpp
d1100 2
a1101 2
    i*86:*:4.*:*)
	UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//')
d1103 1
a1103 1
		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
d1105 1
a1105 1
		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
d1110 1
a1110 1
	case $(/bin/uname -X | grep "^Machine") in
d1115 1
a1115 1
	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
d1119 2
a1120 2
		UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name)
		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
d1122 1
a1122 1
		UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //'))
d1130 1
a1130 1
		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
d1132 1
a1132 1
		echo "$UNAME_MACHINE"-pc-sysv32
d1152 1
a1152 1
	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
d1154 1
a1154 1
	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
d1172 1
a1172 1
	&& OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid)
d1174 1
a1174 1
	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
d1176 1
a1176 1
	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
d1183 1
a1183 1
	    && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid)
d1185 1
a1185 1
	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
d1187 1
a1187 1
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
d1189 1
a1189 1
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
d1191 1
a1191 1
	echo m68k-unknown-lynxos"$UNAME_RELEASE"
d1197 1
a1197 1
	echo sparc-unknown-lynxos"$UNAME_RELEASE"
d1200 1
a1200 1
	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
d1203 1
a1203 1
	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
d1206 1
a1206 1
	echo mips-dde-sysv"$UNAME_RELEASE"
d1216 2
a1217 2
		UNAME_MACHINE=$( (uname -p) 2>/dev/null)
		echo "$UNAME_MACHINE"-sni-sysv4
d1237 1
a1237 1
	echo "$UNAME_MACHINE"-stratus-vos
d1244 1
a1244 1
	echo m68k-apple-aux"$UNAME_RELEASE"
d1250 2
a1251 2
	if test -d /usr/nec; then
		echo mips-nec-sysv"$UNAME_RELEASE"
d1253 1
a1253 1
		echo mips-unknown-sysv"$UNAME_RELEASE"
d1272 1
a1272 1
	echo sx4-nec-superux"$UNAME_RELEASE"
d1275 1
a1275 1
	echo sx5-nec-superux"$UNAME_RELEASE"
d1278 1
a1278 1
	echo sx6-nec-superux"$UNAME_RELEASE"
d1281 1
a1281 1
	echo sx7-nec-superux"$UNAME_RELEASE"
d1284 1
a1284 1
	echo sx8-nec-superux"$UNAME_RELEASE"
d1287 1
a1287 1
	echo sx8r-nec-superux"$UNAME_RELEASE"
d1290 1
a1290 1
	echo sxace-nec-superux"$UNAME_RELEASE"
d1293 1
a1293 1
	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
d1296 1
a1296 4
	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
	exit ;;
    arm64:Darwin:*:*)
	echo aarch64-apple-darwin"$UNAME_RELEASE"
d1299 16
a1314 29
	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
d1317 7
a1323 2
	    # uname -m returns i386 or x86_64
	    UNAME_PROCESSOR=$UNAME_MACHINE
d1325 1
a1325 1
	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
d1328 1
a1328 1
	UNAME_PROCESSOR=$(uname -p)
d1333 1
a1333 1
	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
d1338 2
a1339 2
    NEO-*:NONSTOP_KERNEL:*:*)
	echo neo-tandem-nsk"$UNAME_RELEASE"
d1342 1
a1342 7
	echo nse-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    NSR-*:NONSTOP_KERNEL:*:*)
	echo nsr-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    NSV-*:NONSTOP_KERNEL:*:*)
	echo nsv-tandem-nsk"$UNAME_RELEASE"
d1344 2
a1345 2
    NSX-*:NONSTOP_KERNEL:*:*)
	echo nsx-tandem-nsk"$UNAME_RELEASE"
d1354 1
a1354 1
	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
a1359 1
	# shellcheck disable=SC2154
d1365 1
a1365 1
	echo "$UNAME_MACHINE"-unknown-plan9
d1386 1
a1386 1
	echo mips-sei-seiux"$UNAME_RELEASE"
d1389 1
a1389 1
	echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
d1392 2
a1393 2
	UNAME_MACHINE=$( (uname -p) 2>/dev/null)
	case "$UNAME_MACHINE" in
d1402 1
a1402 1
	echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')"
d1405 1
a1405 1
	echo "$UNAME_MACHINE"-pc-rdos
d1408 1
a1408 1
	echo "$UNAME_MACHINE"-pc-aros
d1411 1
a1411 1
	echo "$UNAME_MACHINE"-unknown-esx
a1415 153
    *:Unleashed:*:*)
	echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
	exit ;;
esac

# 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
	;;
d1419 1
d1422 2
a1423 2
operating system you are using. If your script is old, overwrite *all*
copies of config.guess and config.sub with the latest versions from:
d1425 1
a1425 1
  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
d1427 1
a1427 7
  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
EOF

year=$(echo $timestamp | sed 's,-.*,,')
# shellcheck disable=SC2003
if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then
   cat >&2 <<EOF
d1435 19
a1453 19
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"
a1454 1
fi
d1459 1
a1459 1
# eval: (add-hook 'before-save-hook 'time-stamp)
@


1.1
log
@Initial revision
@
text
@d176 1
@


1.1.1.1
log
@import jemalloc-5.1.0
@
text
@@


1.1.1.2
log
@Import jemalloc-5.3.0 (previous was 5.1.0)

* 5.3.0 (May 6, 2022)

  This release contains many speed and space optimizations, from micro
  optimizations on common paths to rework of internal data structures and
  locking schemes, and many more too detailed to list below.  Multiple percent
  of system level metric improvements were measured in tested production
  workloads.  The release has gone through large-scale production testing.

  New features:
  - Add the thread.idle mallctl which hints that the calling thread will be
    idle for a nontrivial period of time.  (@@davidtgoldblatt)
  - Allow small size classes to be the maximum size class to cache in the
    thread-specific cache, through the opt.[lg_]tcache_max option.  (@@interwq,
    @@jordalgo)
  - Make the behavior of realloc(ptr, 0) configurable with opt.zero_realloc.
    (@@davidtgoldblatt)
  - Add 'make uninstall' support.  (@@sangshuduo, @@Lapenkov)
  - Support C++17 over-aligned allocation.  (@@marksantaniello)
  - Add the thread.peak mallctl for approximate per-thread peak memory tracking.
    (@@davidtgoldblatt)
  - Add interval-based stats output opt.stats_interval.  (@@interwq)
  - Add prof.prefix to override filename prefixes for dumps.  (@@zhxchen17)
  - Add high resolution timestamp support for profiling.  (@@tyroguru)
  - Add the --collapsed flag to jeprof for flamegraph generation.
    (@@igorwwwwwwwwwwwwwwwwwwww)
  - Add the --debug-syms-by-id option to jeprof for debug symbols discovery.
    (@@DeannaGelbart)
  - Add the opt.prof_leak_error option to exit with error code when leak is
    detected using opt.prof_final.  (@@yunxuo)
  - Add opt.cache_oblivious as an runtime alternative to config.cache_oblivious.
    (@@interwq)
  - Add mallctl interfaces:
    + opt.zero_realloc  (@@davidtgoldblatt)
    + opt.cache_oblivious  (@@interwq)
    + opt.prof_leak_error  (@@yunxuo)
    + opt.stats_interval  (@@interwq)
    + opt.stats_interval_opts  (@@interwq)
    + opt.tcache_max  (@@interwq)
    + opt.trust_madvise  (@@azat)
    + prof.prefix  (@@zhxchen17)
    + stats.zero_reallocs  (@@davidtgoldblatt)
    + thread.idle  (@@davidtgoldblatt)
    + thread.peak.{read,reset}  (@@davidtgoldblatt)

  Bug fixes:
  - Fix the synchronization around explicit tcache creation which could cause
    invalid tcache identifiers.  This regression was first released in 5.0.0.
    (@@yoshinorim, @@davidtgoldblatt)
  - Fix a profiling biasing issue which could cause incorrect heap usage and
    object counts.  This issue existed in all previous releases with the heap
    profiling feature.  (@@davidtgoldblatt)
  - Fix the order of stats counter updating on large realloc which could cause
    failed assertions.  This regression was first released in 5.0.0.  (@@azat)
  - Fix the locking on the arena destroy mallctl, which could cause concurrent
    arena creations to fail.  This functionality was first introduced in 5.0.0.
    (@@interwq)

  Portability improvements:
  - Remove nothrow from system function declarations on macOS and FreeBSD.
    (@@davidtgoldblatt, @@fredemmott, @@leres)
  - Improve overcommit and page alignment settings on NetBSD.  (@@zoulasc)
  - Improve CPU affinity support on BSD platforms.  (@@devnexen)
  - Improve utrace detection and support.  (@@devnexen)
  - Improve QEMU support with MADV_DONTNEED zeroed pages detection.  (@@azat)
  - Add memcntl support on Solaris / illumos.  (@@devnexen)
  - Improve CPU_SPINWAIT on ARM.  (@@AWSjswinney)
  - Improve TSD cleanup on FreeBSD.  (@@Lapenkov)
  - Disable percpu_arena if the CPU count cannot be reliably detected.  (@@azat)
  - Add malloc_size(3) override support.  (@@devnexen)
  - Add mmap VM_MAKE_TAG support.  (@@devnexen)
  - Add support for MADV_[NO]CORE.  (@@devnexen)
  - Add support for DragonFlyBSD.  (@@devnexen)
  - Fix the QUANTUM setting on MIPS64.  (@@brooksdavis)
  - Add the QUANTUM setting for ARC.  (@@vineetgarc)
  - Add the QUANTUM setting for LoongArch.  (@@wangjl-uos)
  - Add QNX support.  (@@jqian-aurora)
  - Avoid atexit(3) calls unless the relevant profiling features are enabled.
    (@@BusyJay, @@laiwei-rice, @@interwq)
  - Fix unknown option detection when using Clang.  (@@Lapenkov)
  - Fix symbol conflict with musl libc.  (@@georgthegreat)
  - Add -Wimplicit-fallthrough checks.  (@@nickdesaulniers)
  - Add __forceinline support on MSVC.  (@@santagada)
  - Improve FreeBSD and Windows CI support.  (@@Lapenkov)
  - Add CI support for PPC64LE architecture.  (@@ezeeyahoo)

  Incompatible changes:
  - Maximum size class allowed in tcache (opt.[lg_]tcache_max) now has an upper
    bound of 8MiB.  (@@interwq)

  Optimizations and refactors (@@davidtgoldblatt, @@Lapenkov, @@interwq):
  - Optimize the common cases of the thread cache operations.
  - Optimize internal data structures, including RB tree and pairing heap.
  - Optimize the internal locking on extent management.
  - Extract and refactor the internal page allocator and interface modules.

  Documentation:
  - Fix doc build with --with-install-suffix.  (@@lawmurray, @@interwq)
  - Add PROFILING_INTERNALS.md.  (@@davidtgoldblatt)
  - Ensure the proper order of doc building and installation.  (@@Mingli-Yu)

* 5.2.1 (August 5, 2019)

  This release is primarily about Windows.  A critical virtual memory leak is
  resolved on all Windows platforms.  The regression was present in all releases
  since 5.0.0.

  Bug fixes:
  - Fix a severe virtual memory leak on Windows.  This regression was first
    released in 5.0.0.  (@@Ignition, @@j0t, @@frederik-h, @@davidtgoldblatt,
    @@interwq)
  - Fix size 0 handling in posix_memalign().  This regression was first released
    in 5.2.0.  (@@interwq)
  - Fix the prof_log unit test which may observe unexpected backtraces from
    compiler optimizations.  The test was first added in 5.2.0.  (@@marxin,
    @@gnzlbg, @@interwq)
  - Fix the declaration of the extent_avail tree.  This regression was first
    released in 5.1.0.  (@@zoulasc)
  - Fix an incorrect reference in jeprof.  This functionality was first released
    in 3.0.0.  (@@prehistoric-penguin)
  - Fix an assertion on the deallocation fast-path.  This regression was first
    released in 5.2.0.  (@@yinan1048576)
  - Fix the TLS_MODEL attribute in headers.  This regression was first released
    in 5.0.0.  (@@zoulasc, @@interwq)

  Optimizations and refactors:
  - Implement opt.retain on Windows and enable by default on 64-bit.  (@@interwq,
    @@davidtgoldblatt)
  - Optimize away a branch on the operator delete[] path.  (@@mgrice)
  - Add format annotation to the format generator function.  (@@zoulasc)
  - Refactor and improve the size class header generation.  (@@yinan1048576)
  - Remove best fit.  (@@djwatson)
  - Avoid blocking on background thread locks for stats.  (@@oranagra, @@interwq)

* 5.2.0 (April 2, 2019)

  This release includes a few notable improvements, which are summarized below:
  1) improved fast-path performance from the optimizations by @@djwatson; 2)
  reduced virtual memory fragmentation and metadata usage; and 3) bug fixes on
  setting the number of background threads.  In addition, peak / spike memory
  usage is improved with certain allocation patterns.  As usual, the release and
  prior dev versions have gone through large-scale production testing.

  New features:
  - Implement oversize_threshold, which uses a dedicated arena for allocations
    crossing the specified threshold to reduce fragmentation.  (@@interwq)
  - Add extents usage information to stats.  (@@tyleretzel)
  - Log time information for sampled allocations.  (@@tyleretzel)
  - Support 0 size in sdallocx.  (@@djwatson)
  - Output rate for certain counters in malloc_stats.  (@@zinoale)
  - Add configure option --enable-readlinkat, which allows the use of readlinkat
    over readlink.  (@@davidtgoldblatt)
  - Add configure options --{enable,disable}-{static,shared} to allow not
    building unwanted libraries.  (@@Ericson2314)
  - Add configure option --disable-libdl to enable fully static builds.
    (@@interwq)
  - Add mallctl interfaces:
	+ opt.oversize_threshold (@@interwq)
	+ stats.arenas.<i>.extent_avail (@@tyleretzel)
	+ stats.arenas.<i>.extents.<j>.n{dirty,muzzy,retained} (@@tyleretzel)
	+ stats.arenas.<i>.extents.<j>.{dirty,muzzy,retained}_bytes
	  (@@tyleretzel)

  Portability improvements:
  - Update MSVC builds.  (@@maksqwe, @@rustyx)
  - Workaround a compiler optimizer bug on s390x.  (@@rkmisra)
  - Make use of pthread_set_name_np(3) on FreeBSD.  (@@trasz)
  - Implement malloc_getcpu() to enable percpu_arena for windows.  (@@santagada)
  - Link against -pthread instead of -lpthread.  (@@paravoid)
  - Make background_thread not dependent on libdl.  (@@interwq)
  - Add stringify to fix a linker directive issue on MSVC.  (@@daverigby)
  - Detect and fall back when 8-bit atomics are unavailable.  (@@interwq)
  - Fall back to the default pthread_create if dlsym(3) fails.  (@@interwq)

  Optimizations and refactors:
  - Refactor the TSD module.  (@@davidtgoldblatt)
  - Avoid taking extents_muzzy mutex when muzzy is disabled.  (@@interwq)
  - Avoid taking large_mtx for auto arenas on the tcache flush path.  (@@interwq)
  - Optimize ixalloc by avoiding a size lookup.  (@@interwq)
  - Implement opt.oversize_threshold which uses a dedicated arena for requests
    crossing the threshold, also eagerly purges the oversize extents.  Default
    the threshold to 8 MiB.  (@@interwq)
  - Clean compilation with -Wextra.  (@@gnzlbg, @@jasone)
  - Refactor the size class module.  (@@davidtgoldblatt)
  - Refactor the stats emitter.  (@@tyleretzel)
  - Optimize pow2_ceil.  (@@rkmisra)
  - Avoid runtime detection of lazy purging on FreeBSD.  (@@trasz)
  - Optimize mmap(2) alignment handling on FreeBSD.  (@@trasz)
  - Improve error handling for THP state initialization.  (@@jsteemann)
  - Rework the malloc() fast path.  (@@djwatson)
  - Rework the free() fast path.  (@@djwatson)
  - Refactor and optimize the tcache fill / flush paths.  (@@djwatson)
  - Optimize sync / lwsync on PowerPC.  (@@chmeeedalf)
  - Bypass extent_dalloc() when retain is enabled.  (@@interwq)
  - Optimize the locking on large deallocation.  (@@interwq)
  - Reduce the number of pages committed from sanity checking in debug build.
    (@@trasz, @@interwq)
  - Deprecate OSSpinLock.  (@@interwq)
  - Lower the default number of background threads to 4 (when the feature
    is enabled).  (@@interwq)
  - Optimize the trylock spin wait.  (@@djwatson)
  - Use arena index for arena-matching checks.  (@@interwq)
  - Avoid forced decay on thread termination when using background threads.
    (@@interwq)
  - Disable muzzy decay by default.  (@@djwatson, @@interwq)
  - Only initialize libgcc unwinder when profiling is enabled.  (@@paravoid,
    @@interwq)

  Bug fixes (all only relevant to jemalloc 5.x):
  - Fix background thread index issues with max_background_threads.  (@@djwatson,
    @@interwq)
  - Fix stats output for opt.lg_extent_max_active_fit.  (@@interwq)
  - Fix opt.prof_prefix initialization.  (@@davidtgoldblatt)
  - Properly trigger decay on tcache destroy.  (@@interwq, @@amosbird)
  - Fix tcache.flush.  (@@interwq)
  - Detect whether explicit extent zero out is necessary with huge pages or
    custom extent hooks, which may change the purge semantics.  (@@interwq)
  - Fix a side effect caused by extent_max_active_fit combined with decay-based
    purging, where freed extents can accumulate and not be reused for an
    extended period of time.  (@@interwq, @@mpghf)
  - Fix a missing unlock on extent register error handling.  (@@zoulasc)

  Testing:
  - Simplify the Travis script output.  (@@gnzlbg)
  - Update the test scripts for FreeBSD.  (@@devnexen)
  - Add unit tests for the producer-consumer pattern.  (@@interwq)
  - Add Cirrus-CI config for FreeBSD builds.  (@@jasone)
  - Add size-matching sanity checks on tcache flush.  (@@davidtgoldblatt,
    @@interwq)

  Incompatible changes:
  - Remove --with-lg-page-sizes.  (@@davidtgoldblatt)

  Documentation:
  - Attempt to build docs by default, however skip doc building when xsltproc
    is missing. (@@interwq, @@cmuellner)
@
text
@d3 1
a3 1
#   Copyright 1992-2021 Free Software Foundation, Inc.
d5 1
a5 1
timestamp='2021-01-01'
d18 1
a18 1
# along with this program; if not, see <https://www.gnu.org/licenses/>.
d30 1
a30 1
# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
d35 1
a35 1
me=$(echo "$0" | sed -e 's,.*/,,')
d42 1
a42 1
Options:
d53 1
a53 1
Copyright 1992-2021 Free Software Foundation, Inc.
d87 2
d99 24
a122 30
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
    { 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
}
d126 1
a126 1
if test -f /.attbin/uname ; then
d130 4
a133 4
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
d135 1
a135 1
case "$UNAME_SYSTEM" in
d137 3
a139 1
	LIBC=unknown
d141 2
a142 2
	set_cc_for_build
	cat <<-EOF > "$dummy.c"
d148 1
a148 1
	#elif defined(__GLIBC__)
a149 6
	#else
	#include <stdarg.h>
	/* First heuristic to detect musl libc.  */
	#ifdef __DEFINED_va_list
	LIBC=musl
	#endif
d152 1
a152 14
	eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')"

	# 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
d158 1
a158 1
case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
d171 5
a175 6
	UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \
	    "/sbin/$sysctl" 2>/dev/null || \
	    "/usr/sbin/$sysctl" 2>/dev/null || \
	    echo unknown))
	case "$UNAME_MACHINE_ARCH" in
	    aarch64eb) machine=aarch64_be-unknown ;;
d182 3
a184 3
		arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,')
		endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p')
		machine="${arch}${endian}"-unknown
d186 1
a186 1
	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
d190 1
a190 1
	case "$UNAME_MACHINE_ARCH" in
d195 1
a195 1
		set_cc_for_build
d211 1
a211 1
	case "$UNAME_MACHINE_ARCH" in
d214 1
a214 1
		abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr")
d222 1
a222 1
	case "$UNAME_VERSION" in
d227 1
a227 1
		release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2)
d233 1
a233 1
	echo "$machine-${os}${release}${abi-}"
d236 2
a237 2
	UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
d240 2
a241 2
	UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
d244 2
a245 5
	UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//')
	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
	exit ;;
    *:MidnightBSD:*:*)
	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
d248 1
a248 1
	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
d251 1
a251 4
	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
	exit ;;
    *:OS108:*:*)
	echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
d254 1
a254 1
	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
d257 1
a257 1
	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
d260 1
a260 10
	echo "$UNAME_MACHINE"-unknown-sortix
	exit ;;
    *:Twizzler:*:*)
	echo "$UNAME_MACHINE"-unknown-twizzler
	exit ;;
    *:Redox:*:*)
	echo "$UNAME_MACHINE"-unknown-redox
	exit ;;
    mips:OSF1:*.*)
	echo mips-dec-osf1
d265 1
a265 1
		UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}')
d268 1
a268 1
		UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}')
d275 1
a275 1
	ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1)
d313 1
a313 1
	echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)"
d318 9
d331 1
a331 1
	echo "$UNAME_MACHINE"-unknown-amigaos
d334 1
a334 1
	echo "$UNAME_MACHINE"-unknown-morphos
d346 1
a346 1
	echo arm-acorn-riscix"$UNAME_RELEASE"
d356 1
a356 1
	if test "$( (/bin/universe) 2>/dev/null)" = att ; then
d369 1
a369 1
	case $(/usr/bin/uname -p) in
d373 1
a373 1
	echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
d376 1
a376 1
	echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
d379 1
a379 1
	echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')"
d382 1
a382 1
	echo i386-pc-auroraux"$UNAME_RELEASE"
d385 1
a385 1
	set_cc_for_build
d390 1
a390 1
	if test "$CC_FOR_BUILD" != no_compiler_found; then
d398 1
a398 1
	echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
d404 1
a404 1
	echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
d407 1
a407 1
	case "$(/usr/bin/arch -k)" in
d409 1
a409 1
		UNAME_RELEASE=$(uname -v)
d413 1
a413 1
	echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')"
d416 1
a416 1
	echo m68k-sun-sunos"$UNAME_RELEASE"
d419 3
a421 3
	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
d423 1
a423 1
		echo m68k-sun-sunos"$UNAME_RELEASE"
d426 1
a426 1
		echo sparc-sun-sunos"$UNAME_RELEASE"
d431 1
a431 1
	echo sparc-auspex-sunos"$UNAME_RELEASE"
d442 1
a442 1
	echo m68k-atari-mint"$UNAME_RELEASE"
d445 1
a445 1
	echo m68k-atari-mint"$UNAME_RELEASE"
d448 1
a448 1
	echo m68k-atari-mint"$UNAME_RELEASE"
d451 1
a451 1
	echo m68k-milan-mint"$UNAME_RELEASE"
d454 1
a454 1
	echo m68k-hades-mint"$UNAME_RELEASE"
d457 1
a457 1
	echo m68k-unknown-mint"$UNAME_RELEASE"
d460 1
a460 1
	echo m68k-apple-machten"$UNAME_RELEASE"
d463 1
a463 1
	echo powerpc-apple-machten"$UNAME_RELEASE"
d469 1
a469 1
	echo mips-dec-ultrix"$UNAME_RELEASE"
d472 1
a472 1
	echo vax-dec-ultrix"$UNAME_RELEASE"
d475 1
a475 1
	echo clipper-intergraph-clix"$UNAME_RELEASE"
d478 2
a479 2
	set_cc_for_build
	sed 's/^	//' << EOF > "$dummy.c"
d488 1
a488 1
	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
d491 1
a491 1
	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
d494 1
a494 1
	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
d500 3
a502 3
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
	  dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') &&
	  SYSTEM_NAME=$("$dummy" "$dummyarg") &&
d504 1
a504 1
	echo mips-mips-riscos"$UNAME_RELEASE"
d529 2
a530 2
	UNAME_PROCESSOR=$(/usr/bin/uname -p)
	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
d532 2
a533 2
	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
	       test "$TARGET_BINARY_INTERFACE"x = x
d535 1
a535 1
		echo m88k-dg-dgux"$UNAME_RELEASE"
d537 1
a537 1
		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
d540 1
a540 1
	    echo i586-dg-dgux"$UNAME_RELEASE"
d557 1
a557 1
	echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')"
d561 1
a561 1
	exit ;;               # Note that: echo "'$(uname -s)'" gives 'AIX '
d566 2
a567 2
	if test -x /usr/bin/oslevel ; then
		IBM_REV=$(/usr/bin/oslevel)
d569 1
a569 1
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
d571 1
a571 1
	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
d575 2
a576 2
		set_cc_for_build
		sed 's/^		//' << EOF > "$dummy.c"
d587 1
a587 1
		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy")
d600 2
a601 2
	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
d606 3
a608 3
	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/)
d610 1
a610 1
		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
d612 1
a612 1
	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
d617 1
a617 1
    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
d621 1
a621 1
	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
d636 4
a639 4
	HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
	case "$UNAME_MACHINE" in
	    9000/31?)            HP_ARCH=m68000 ;;
	    9000/[34]??)         HP_ARCH=m68k ;;
d641 4
a644 4
		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
d648 1
a648 1
			case "$sc_kernel_bits" in
d655 3
a657 3
		if test "$HP_ARCH" = ""; then
		    set_cc_for_build
		    sed 's/^		//' << EOF > "$dummy.c"
d690 1
a690 1
		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy")
d694 1
a694 1
	if test "$HP_ARCH" = hppa2.0w
d696 1
a696 1
	    set_cc_for_build
d715 1
a715 1
	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
d718 2
a719 2
	HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//')
	echo ia64-hp-hpux"$HPUX_REV"
d722 2
a723 2
	set_cc_for_build
	sed 's/^	//' << EOF > "$dummy.c"
d748 1
a748 1
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") &&
d752 1
a752 1
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
d761 1
a761 1
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
d768 2
a769 2
	if test -x /usr/sbin/sysversion ; then
	    echo "$UNAME_MACHINE"-unknown-osf1mk
d771 1
a771 1
	    echo "$UNAME_MACHINE"-unknown-osf1
d796 1
a796 1
	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d799 1
a799 1
	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
d805 1
a805 1
	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d808 1
a808 1
	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d811 1
a811 1
	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d814 1
a814 1
	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
d817 3
a819 3
	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/ /_/')
d823 2
a824 2
	FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///')
	FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/')
d828 1
a828 1
	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
d831 1
a831 1
	echo sparc-unknown-bsdi"$UNAME_RELEASE"
d834 1
a834 12
	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
	exit ;;
    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
	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi
	else
	    echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf
	fi
d837 2
a838 2
	UNAME_PROCESSOR=$(/usr/bin/uname -p)
	case "$UNAME_PROCESSOR" in
d840 3
a842 3
		UNAME_PROCESSOR=x86_64 ;;
	    i386)
		UNAME_PROCESSOR=i586 ;;
a843 1
	echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
d846 1
a846 1
	echo "$UNAME_MACHINE"-pc-cygwin
d849 1
a849 1
	echo "$UNAME_MACHINE"-pc-mingw64
d852 1
a852 1
	echo "$UNAME_MACHINE"-pc-mingw32
d855 5
a859 1
	echo "$UNAME_MACHINE"-pc-msys
d862 1
a862 1
	echo "$UNAME_MACHINE"-pc-pw32
d865 1
a865 1
	case "$UNAME_MACHINE" in
d867 1
a867 1
		echo i586-pc-interix"$UNAME_RELEASE"
d870 1
a870 1
		echo x86_64-unknown-interix"$UNAME_RELEASE"
d873 1
a873 1
		echo ia64-unknown-interix"$UNAME_RELEASE"
d876 12
d889 1
a889 1
	echo "$UNAME_MACHINE"-pc-uwin
d892 4
a895 1
	echo x86_64-pc-cygwin
d898 1
a898 1
	echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
d902 1
a902 1
	echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')"
d906 1
a906 1
	echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC"
d908 2
a909 2
    *:Minix:*:*)
	echo "$UNAME_MACHINE"-unknown-minix
d912 1
a912 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d916 1
a916 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d919 1
a919 1
	case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in
d930 1
a930 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d933 1
a933 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d936 1
a936 1
	set_cc_for_build
d940 1
a940 1
	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d945 1
a945 1
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
d947 1
a947 1
		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
d952 1
a952 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d955 1
a955 1
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
d958 1
a958 1
	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
d961 1
a961 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d964 1
a964 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d967 1
a967 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d970 1
a970 1
	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
d973 1
a973 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d976 1
a976 4
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
	exit ;;
    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d979 1
a979 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d982 1
a982 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d985 2
a986 4
	set_cc_for_build
	IS_GLIBC=0
	test x"${LIBC}" = xgnu && IS_GLIBC=1
	sed 's/^	//' << EOF > "$dummy.c"
d988 2
a989 28
	#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

d991 1
a991 1
	MIPS_ENDIAN=el
d994 1
a994 1
	MIPS_ENDIAN=
d996 1
a996 1
	MIPS_ENDIAN=
d1000 2
a1001 2
	eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')"
	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
d1004 1
a1004 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1007 1
a1007 1
	echo or1k-unknown-linux-"$LIBC"
d1010 1
a1010 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1013 1
a1013 1
	echo sparc-unknown-linux-"$LIBC"
d1016 1
a1016 1
	echo hppa64-unknown-linux-"$LIBC"
d1020 4
a1023 4
	case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in
	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
	  *)    echo hppa-unknown-linux-"$LIBC" ;;
d1027 1
a1027 1
	echo powerpc64-unknown-linux-"$LIBC"
d1030 1
a1030 1
	echo powerpc-unknown-linux-"$LIBC"
d1033 1
a1033 1
	echo powerpc64le-unknown-linux-"$LIBC"
d1036 1
a1036 1
	echo powerpcle-unknown-linux-"$LIBC"
d1038 2
a1039 2
    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1042 1
a1042 1
	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
d1045 1
a1045 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1048 1
a1048 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1051 1
a1051 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1054 1
a1054 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1057 1
a1057 1
	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
d1060 1
a1060 11
	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
	echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
d1063 1
a1063 1
	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
d1077 1
a1077 1
	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
d1082 1
a1082 1
	echo "$UNAME_MACHINE"-pc-os2-emx
d1085 1
a1085 1
	echo "$UNAME_MACHINE"-unknown-stop
d1088 1
a1088 1
	echo "$UNAME_MACHINE"-unknown-atheos
d1091 1
a1091 1
	echo "$UNAME_MACHINE"-pc-syllable
d1094 1
a1094 1
	echo i386-unknown-lynxos"$UNAME_RELEASE"
d1097 1
a1097 1
	echo "$UNAME_MACHINE"-pc-msdosdjgpp
d1099 2
a1100 2
    i*86:*:4.*:*)
	UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//')
d1102 1
a1102 1
		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
d1104 1
a1104 1
		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
d1109 1
a1109 1
	case $(/bin/uname -X | grep "^Machine") in
d1114 1
a1114 1
	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
d1118 2
a1119 2
		UNAME_REL=$(sed -n 's/.*Version //p' </usr/options/cb.name)
		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
d1121 1
a1121 1
		UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //'))
d1129 1
a1129 1
		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
d1131 1
a1131 1
		echo "$UNAME_MACHINE"-pc-sysv32
d1151 1
a1151 1
	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
d1153 1
a1153 1
	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
d1171 1
a1171 1
	&& OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid)
d1173 1
a1173 1
	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
d1175 1
a1175 1
	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
d1182 1
a1182 1
	    && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid)
d1184 1
a1184 1
	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
d1186 1
a1186 1
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
d1188 1
a1188 1
	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
d1190 1
a1190 1
	echo m68k-unknown-lynxos"$UNAME_RELEASE"
d1196 1
a1196 1
	echo sparc-unknown-lynxos"$UNAME_RELEASE"
d1199 1
a1199 1
	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
d1202 1
a1202 1
	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
d1205 1
a1205 1
	echo mips-dde-sysv"$UNAME_RELEASE"
d1215 2
a1216 2
		UNAME_MACHINE=$( (uname -p) 2>/dev/null)
		echo "$UNAME_MACHINE"-sni-sysv4
d1236 1
a1236 1
	echo "$UNAME_MACHINE"-stratus-vos
d1243 1
a1243 1
	echo m68k-apple-aux"$UNAME_RELEASE"
d1249 2
a1250 2
	if test -d /usr/nec; then
		echo mips-nec-sysv"$UNAME_RELEASE"
d1252 1
a1252 1
		echo mips-unknown-sysv"$UNAME_RELEASE"
d1271 1
a1271 1
	echo sx4-nec-superux"$UNAME_RELEASE"
d1274 1
a1274 1
	echo sx5-nec-superux"$UNAME_RELEASE"
d1277 1
a1277 1
	echo sx6-nec-superux"$UNAME_RELEASE"
d1280 1
a1280 1
	echo sx7-nec-superux"$UNAME_RELEASE"
d1283 1
a1283 1
	echo sx8-nec-superux"$UNAME_RELEASE"
d1286 1
a1286 1
	echo sx8r-nec-superux"$UNAME_RELEASE"
d1289 1
a1289 1
	echo sxace-nec-superux"$UNAME_RELEASE"
d1292 1
a1292 1
	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
d1295 1
a1295 4
	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
	exit ;;
    arm64:Darwin:*:*)
	echo aarch64-apple-darwin"$UNAME_RELEASE"
d1298 16
a1313 29
	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
d1316 7
a1322 2
	    # uname -m returns i386 or x86_64
	    UNAME_PROCESSOR=$UNAME_MACHINE
d1324 1
a1324 1
	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
d1327 1
a1327 1
	UNAME_PROCESSOR=$(uname -p)
d1332 1
a1332 1
	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
d1337 2
a1338 2
    NEO-*:NONSTOP_KERNEL:*:*)
	echo neo-tandem-nsk"$UNAME_RELEASE"
d1341 1
a1341 7
	echo nse-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    NSR-*:NONSTOP_KERNEL:*:*)
	echo nsr-tandem-nsk"$UNAME_RELEASE"
	exit ;;
    NSV-*:NONSTOP_KERNEL:*:*)
	echo nsv-tandem-nsk"$UNAME_RELEASE"
d1343 2
a1344 2
    NSX-*:NONSTOP_KERNEL:*:*)
	echo nsx-tandem-nsk"$UNAME_RELEASE"
d1353 1
a1353 1
	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
a1358 1
	# shellcheck disable=SC2154
d1364 1
a1364 1
	echo "$UNAME_MACHINE"-unknown-plan9
d1385 1
a1385 1
	echo mips-sei-seiux"$UNAME_RELEASE"
d1388 1
a1388 1
	echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')"
d1391 2
a1392 2
	UNAME_MACHINE=$( (uname -p) 2>/dev/null)
	case "$UNAME_MACHINE" in
d1401 1
a1401 1
	echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')"
d1404 1
a1404 1
	echo "$UNAME_MACHINE"-pc-rdos
d1407 1
a1407 1
	echo "$UNAME_MACHINE"-pc-aros
d1410 1
a1410 1
	echo "$UNAME_MACHINE"-unknown-esx
a1414 153
    *:Unleashed:*:*)
	echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
	exit ;;
esac

# 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
	;;
d1418 1
d1421 2
a1422 2
operating system you are using. If your script is old, overwrite *all*
copies of config.guess and config.sub with the latest versions from:
d1424 1
a1424 1
  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
d1426 1
a1426 7
  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
EOF

year=$(echo $timestamp | sed 's,-.*,,')
# shellcheck disable=SC2003
if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then
   cat >&2 <<EOF
d1434 19
a1452 19
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"
a1453 1
fi
d1458 1
a1458 1
# eval: (add-hook 'before-save-hook 'time-stamp)
@


1.1.1.3
log
@Import jemalloc-5.3.1 (previous was 5.3.0)

This release includes over 390 commits spanning bug fixes, new features,
performance optimizations, and portability improvements. Multiple percent
of system-level metric improvements were measured in tested production
workloads. The release has gone through large-scale production testing
at Meta.

New features:

Support pvalloc. (@@Lapenkov: 5b1f2cc)
Add double free detection for the debug build. (@@izaitsevfb:
36366f3, @@guangli-dai: 42daa1a, @@divanorama: 1897f18)
Add compile-time option --enable-pageid to enable memory mapping
annotation. (@@devnexen: 4fc5c4f)
Add runtime option prof_bt_max to control the max stack depth for
profiling. (@@guangli-dai: a0734fd)
Add compile-time option --enable-force-getenv to use getenv instead
of secure_getenv. (@@interwq: 481bbfc)
Add compile-time option --disable-dss to disable the usage of
sbrk(2). (@@Svetlitski: ea5b7be)
Add runtime option tcache_ncached_max to control the number of items
in each size bin in the thread cache. (@@guangli-dai: 8a22d10)
Add runtime option calloc_madvise_threshold to determine if kernel or
memset is used to zero the allocations for calloc. (@@nullptr0-0:
5081c16)
Add compile-time option --disable-user-config to disable reading the
runtime configurations from /etc/malloc.conf or environment variable
MALLOC_CONF. (@@roblabla: c17bf8b)
Add runtime option disable_large_size_classes to guard the new usable
size calculation, which minimizes the memory overhead for large
allocations, i.e., >= 4 * PAGE. (@@guangli-dai: c067a55, 8347f10)
Enable process_madvise usage, add runtime option
process_madvise_max_batch to control the max # of regions in each
madvise batch. (@@interwq: 22440a0, @@spredolac: 4246475)
Add mallctl interfaces:
opt.prof_bt_max (@@guangli-dai: a0734fd)
arena.<i>.name to set and get arena names. (@@guangli-dai: ba19d2c)
thread.tcache.max to set and get the tcache_max of the current
thread. (@@guangli-dai: a442d9b)
thread.tcache.ncached_max.write and
thread.tcache.ncached_max.read_sizeclass to set and get the
ncached_max setup of the current thread. (@@guangli-dai: 630f7de,
6b197fd)
arenas.hugepage to return the hugepage size used, also exported to
malloc stats. (@@ilvokhin: 90c627e)
approximate_stats.active to return an estimate of the current active
bytes, which should not be compared with other stats retrieved.
(@@guangli-dai: 0988583)
Bug fixes:

Prevent potential deadlocks in decaying during reentrancy. (@@interwq:
434a68e)
Fix segfault in extent coalescing. (@@Svetlitski: 12311fe)
Add null pointer detections in mallctl calls. (@@Svetlitski: dc0a184,
0288126)
Make mallctl arenas.lookup triable without crashing on invalid
pointers. (@@auxten: 019cccc, 5bac384)
Demote sampled allocations for proper deallocations during
arena_reset. (@@Svetlitski: 62648c8)
Fix jemalloc's read(2) and write(2). (@@Svetlitski: d2c9ed3, @@lexprfuncall:
9fdc116)
Fix the pkg-config metadata file. (@@BtbN: ed7e6fe, ce8ce99)
Fix the autogen.sh so that it accepts quoted extra options.
(@@honggyukim: f6fe6ab)
Fix rallocx() to set errno to ENOMEM upon OOMing. (@@arter97: 38056fe,
@@interwq: 83b0757)
Avoid stack overflow for internal variable array usage. (@@nullptr0-0:
47c9bcd, 48f66cf, @@xinydev: 9169e92)
Fix background thread initialization race. (@@puzpuzpuz: 4d0ffa0)
Guard os_page_id against a NULL address. (@@lexprfuncall: 79cc7dc)
Handle tcache init failures gracefully. (@@lexprfuncall: a056c20)
Fix missing release of acquired neighbor edata in
extent_try_coalesce_impl. (@@spredolac: 675ab07)
Fix memory leak of old curr_reg on san_bump_grow_locked failure.
(@@spredolac: 5904a42)
Fix large alloc nrequests under-counting on cache misses. (@@spredolac:
3cc56d3)
Portability improvements:

Fix the build in C99. (@@abaelhe: 56ddbea)
Add pthread_setaffinity_np detection for non Linux/BSD platforms.
(@@devnexen: 4c95c95)
Make VARIABLE_ARRAY compatible with compilers not supporting VLA,
i.e., Visual Studio C compiler in C11 or C17 modes. (@@madscientist:
be65438)
Fix the build on Linux using musl library. (@@marv: aba1645, 45249cf)
Reduce the memory overhead in small allocation sampling for systems
with larger page sizes, e.g., ARM. (@@Svetlitski: 5a858c6)
Add C23's free_sized and free_aligned_sized. (@@Svetlitski:
cdb2c0e)
Enable heap profiling on MacOS. (@@nullptr0-0: 4b555c1)
Fix incorrect printing on 32bit. (@@sundb: 630434b)
Make JEMALLOC_CXX_THROW compatible with C++ versions newer than
C++17. (@@r-barnes, @@guangli-dai: 21bcc0a)
Fix mmap tag conflicts on MacOS. (@@kdrag0n: c893fcd)
Fix monotonic timer assumption for win32. (@@burtonli: 8dc97b1)
Fix VM over-reservation on systems with larger pages, e.g., aarch64.
(@@interwq: cd05b19)
Remove unreachable() macro conditionally to prevent definition
conflicts for C23+. (@@appujee: d8486b2, 4b88bdd)
Fix dlsym failure observed on FreeBSD. (@@rhelmot: 86bbaba)
Change the default page size to 64KB on aarch64 Linux. (@@lexprfuncall:
9442300)
Update config.guess and config.sub to the latest version.
(@@lexprfuncall: c51949e)
Determine the page size on Android from NDK header files.
(@@lexprfuncall: c51abba)
Improve the portability of grep patterns in configure.ac.
(@@lexprfuncall: 365747b)
Add compile-time option --with-cxx-stdlib to specify the C++ standard
library. (@@yuxuanchen1997: a10ef3e)
Optimizations and refactors:

Enable tcache for deallocation-only threads. (@@interwq: 143e9c4)
Inline to accelerate operator delete. (@@guangli-dai: e8f9f13)
Optimize pairing heap's performance. (@@deadalnix: 5266152, be6da4f,
543e2d6, 10d7131, 92aa52c, @@Svetlitski: 36ca0c1)
Inline the storage for thread name in the profiling data. (@@interwq:
ce0b7ab, e62aa47)
Optimize a hot function edata_cmp_summary_comp to accelerate it.
(@@Svetlitski: 6841110, @@guangli-dai: 0181aaa)
Allocate thread cache using the base allocator, which enables thread
cache to use thp when metadata_thp is turned on. (@@interwq:
72cfdce)
Allow oversize arena not to purge immediately when background threads
are enabled, although the default decay time is 0 to be back compatible.
(@@interwq: d131331)
Optimize thread-local storage implementation on Windows. (@@mcfi:
9e123a8, 3a0d9cd)
Optimize fast path to allow static size class computation. (@@interwq:
323ed2e)
Redesign tcache GC to regulate the frequency and make it
locality-aware. The new design is default on, guarded by option
experimental_tcache_gc. (@@nullptr0-0: 0c88be9, e2c9f3a,
14d5dc1, @@deadalnix: 5afff2e)
Reduce the arena switching overhead by avoiding forced purging when
background thread is enabled. (@@interwq: a3910b9)
Improve the reuse efficiency by limiting the maximum coalesced size for
large extents. (@@jiebinn: 3c14707)
Refactor thread events to allow registration of users' thread events
and remove prof_threshold as the built-in event. (@@spredolac: e6864c6,
015b017, 34ace91)
Documentation:

Update Windows building instructions. (@@Lapenkov: 3713932)
Add vcpkg installation instructions. (@@LilyWangLL: c0c9783)
Update profiling internals with an example. (@@jordalgo: b04e766)
@
text
@d3 1
a3 1
#   Copyright 1992-2025 Free Software Foundation, Inc.
d5 1
a5 3
# shellcheck disable=SC2006,SC2268 # see below for rationale

timestamp='2025-07-10'
d9 1
a9 1
# the Free Software Foundation, either version 3 of the License, or
d35 1
a35 9
# 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,.*/,,'`
d40 1
a40 1
Output the configuration name of the system '$me' is run on.
d53 1
a53 1
Copyright 1992-2025 Free Software Foundation, Inc.
d59 1
a59 1
Try '$me --help' for more information."
a86 3
# Just in case it came from the environment.
GUESS=

d92 2
a93 2
# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
# use 'HOST_CC' if defined, but it is deprecated.
d105 2
a106 2
    # shellcheck disable=SC2039,SC3028
    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
d113 1
a113 1
	       for driver in cc gcc c17 c99 c89 ; do
d115 1
a115 1
		       CC_FOR_BUILD=$driver
d134 4
a137 4
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
d139 1
a139 1
case $UNAME_SYSTEM in
a144 3
	#if defined(__ANDROID__)
	LIBC=android
	#else
a151 2
	#elif defined(__LLVM_LIBC__)
	LIBC=llvm
a158 1
	#endif
d160 1
a160 2
	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
	eval "$cc_set_libc"
d179 1
a179 1
case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
d191 6
a196 5
	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
d204 3
a206 3
		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
		machine=${arch}${endian}-unknown
d208 1
a208 1
	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
d212 1
a212 1
	case $UNAME_MACHINE_ARCH in
d233 1
a233 1
	case $UNAME_MACHINE_ARCH in
d236 1
a236 1
		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
d244 1
a244 1
	case $UNAME_VERSION in
d249 1
a249 1
		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
d255 2
a256 2
	GUESS=$machine-${os}${release}${abi-}
	;;
d258 3
a260 3
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
	;;
d262 3
a264 7
	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
	;;
d266 3
a268 3
	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
	;;
d270 2
a271 2
	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
	;;
d273 2
a274 2
	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
	;;
d276 2
a277 2
	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
	;;
d279 2
a280 2
	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
	;;
d282 2
a283 2
	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
	;;
d285 2
a286 2
	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
	;;
d288 2
a289 2
	GUESS=$UNAME_MACHINE-unknown-sortix
	;;
d291 2
a292 2
	GUESS=$UNAME_MACHINE-unknown-twizzler
	;;
d294 2
a295 2
	GUESS=$UNAME_MACHINE-unknown-redox
	;;
d297 2
a298 2
	GUESS=mips-dec-osf1
	;;
a299 2
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
	trap '' 0
d302 1
a302 1
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
d305 1
a305 1
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
d312 2
a313 2
	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
	case $ALPHA_CPU_TYPE in
d350 5
a354 3
	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
	;;
d356 2
a357 2
	GUESS=m68k-unknown-sysv4
	;;
d359 2
a360 2
	GUESS=$UNAME_MACHINE-unknown-amigaos
	;;
d362 2
a363 2
	GUESS=$UNAME_MACHINE-unknown-morphos
	;;
d365 2
a366 2
	GUESS=i370-ibm-openedition
	;;
d368 2
a369 2
	GUESS=s390-ibm-zvmoe
	;;
d371 2
a372 2
	GUESS=powerpc-ibm-os400
	;;
d374 2
a375 2
	GUESS=arm-acorn-riscix$UNAME_RELEASE
	;;
d377 2
a378 2
	GUESS=arm-unknown-riscos
	;;
d380 2
a381 2
	GUESS=hppa1.1-hitachi-hiuxmpp
	;;
d384 6
a389 5
	case `(/bin/universe) 2>/dev/null` in
	    att) GUESS=pyramid-pyramid-sysv3 ;;
	    *)   GUESS=pyramid-pyramid-bsd   ;;
	esac
	;;
d391 2
a392 2
	GUESS=pyramid-pyramid-svr4
	;;
d394 2
a395 2
	GUESS=sparc-icl-nx6
	;;
d397 3
a399 4
	case `/usr/bin/uname -p` in
	    sparc) GUESS=sparc-icl-nx7 ;;
	esac
	;;
d401 2
a402 3
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
	;;
d404 2
a405 3
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=sparc-hal-solaris2$SUN_REL
	;;
d407 2
a408 3
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=sparc-sun-solaris2$SUN_REL
	;;
d410 2
a411 2
	GUESS=i386-pc-auroraux$UNAME_RELEASE
	;;
d420 1
a420 1
		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
d426 2
a427 3
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
	;;
d432 2
a433 3
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=sparc-sun-solaris3$SUN_REL
	;;
d435 1
a435 1
	case `/usr/bin/arch -k` in
d437 1
a437 1
		UNAME_RELEASE=`uname -v`
d440 3
a442 4
	# 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
	;;
d444 2
a445 2
	GUESS=m68k-sun-sunos$UNAME_RELEASE
	;;
d447 1
a447 1
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
d449 1
a449 1
	case `/bin/arch` in
d451 1
a451 1
		GUESS=m68k-sun-sunos$UNAME_RELEASE
d454 1
a454 1
		GUESS=sparc-sun-sunos$UNAME_RELEASE
d457 1
a457 1
	;;
d459 2
a460 2
	GUESS=sparc-auspex-sunos$UNAME_RELEASE
	;;
d470 2
a471 2
	GUESS=m68k-atari-mint$UNAME_RELEASE
	;;
d473 2
a474 2
	GUESS=m68k-atari-mint$UNAME_RELEASE
	;;
d476 2
a477 2
	GUESS=m68k-atari-mint$UNAME_RELEASE
	;;
d479 2
a480 2
	GUESS=m68k-milan-mint$UNAME_RELEASE
	;;
d482 2
a483 2
	GUESS=m68k-hades-mint$UNAME_RELEASE
	;;
d485 2
a486 2
	GUESS=m68k-unknown-mint$UNAME_RELEASE
	;;
d488 2
a489 2
	GUESS=m68k-apple-machten$UNAME_RELEASE
	;;
d491 2
a492 2
	GUESS=powerpc-apple-machten$UNAME_RELEASE
	;;
d494 2
a495 2
	GUESS=mips-dec-mach_bsd4.3
	;;
d497 2
a498 2
	GUESS=mips-dec-ultrix$UNAME_RELEASE
	;;
d500 2
a501 2
	GUESS=vax-dec-ultrix$UNAME_RELEASE
	;;
d503 2
a504 2
	GUESS=clipper-intergraph-clix$UNAME_RELEASE
	;;
d529 2
a530 2
	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
d532 2
a533 2
	GUESS=mips-mips-riscos$UNAME_RELEASE
	;;
d535 2
a536 2
	GUESS=powerpc-motorola-powermax
	;;
d538 2
a539 2
	GUESS=powerpc-harris-powermax
	;;
d541 2
a542 2
	GUESS=powerpc-harris-powermax
	;;
d544 2
a545 2
	GUESS=powerpc-harris-powerunix
	;;
d547 2
a548 2
	GUESS=m88k-harris-cxux7
	;;
d550 2
a551 2
	GUESS=m88k-motorola-sysv4
	;;
d553 2
a554 2
	GUESS=m88k-motorola-sysv3
	;;
d557 1
a557 1
	UNAME_PROCESSOR=`/usr/bin/uname -p`
d563 1
a563 1
		GUESS=m88k-dg-dgux$UNAME_RELEASE
d565 1
a565 1
		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
d568 1
a568 1
	    GUESS=i586-dg-dgux$UNAME_RELEASE
d570 1
a570 1
	;;
d572 2
a573 2
	GUESS=m88k-dolphin-sysv3
	;;
d576 2
a577 2
	GUESS=m88k-motorola-sysv3
	;;
d579 2
a580 2
	GUESS=m88k-tektronix-sysv3
	;;
d582 2
a583 2
	GUESS=m68k-tektronix-bsd
	;;
d585 2
a586 3
	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
	GUESS=mips-sgi-irix$IRIX_REL
	;;
d588 2
a589 2
	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
d591 2
a592 2
	GUESS=i386-ibm-aix
	;;
d595 1
a595 1
		IBM_REV=`/usr/bin/oslevel`
d597 1
a597 1
		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
d599 2
a600 2
	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
	;;
d607 1
a607 2
		int
		main ()
d615 1
a615 1
		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
d617 1
a617 1
			GUESS=$SYSTEM_NAME
d619 1
a619 1
			GUESS=rs6000-ibm-aix3.2.5
d622 1
a622 1
		GUESS=rs6000-ibm-aix3.2.4
d624 1
a624 1
		GUESS=rs6000-ibm-aix3.2
d626 1
a626 1
	;;
d628 1
a628 1
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
d635 2
a636 2
		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
d638 1
a638 1
		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
d640 2
a641 2
	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
	;;
d643 2
a644 2
	GUESS=rs6000-ibm-aix
	;;
d646 2
a647 2
	GUESS=romp-ibm-bsd4.4
	;;
d649 2
a650 2
	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
	;;                                  # report: romp-ibm BSD 4.3
d652 2
a653 2
	GUESS=rs6000-bull-bosx
	;;
d655 2
a656 2
	GUESS=m68k-bull-sysv3
	;;
d658 2
a659 2
	GUESS=m68k-hp-bsd
	;;
d661 2
a662 2
	GUESS=m68k-hp-bsd4.4
	;;
d664 2
a665 2
	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
	case $UNAME_MACHINE in
d670 3
a672 3
		    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
d676 1
a676 1
			case $sc_kernel_bits in
d691 1
a691 2
		int
		main ()
d718 1
a718 1
		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
d743 2
a744 2
	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
	;;
d746 3
a748 3
	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
	GUESS=ia64-hp-hpux$HPUX_REV
	;;
d776 1
a776 1
	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
d778 2
a779 2
	GUESS=unknown-hitachi-hiuxwe2
	;;
d781 2
a782 2
	GUESS=hppa1.1-hp-bsd
	;;
d784 2
a785 2
	GUESS=hppa1.0-hp-bsd
	;;
d787 2
a788 2
	GUESS=hppa1.0-hp-mpeix
	;;
d790 2
a791 2
	GUESS=hppa1.1-hp-osf
	;;
d793 2
a794 2
	GUESS=hppa1.0-hp-osf
	;;
d797 1
a797 1
	    GUESS=$UNAME_MACHINE-unknown-osf1mk
d799 1
a799 1
	    GUESS=$UNAME_MACHINE-unknown-osf1
d801 1
a801 1
	;;
d803 2
a804 2
	GUESS=hppa1.1-hp-lites
	;;
d806 2
a807 2
	GUESS=c1-convex-bsd
	;;
d815 2
a816 2
	GUESS=c34-convex-bsd
	;;
d818 2
a819 2
	GUESS=c38-convex-bsd
	;;
d821 2
a822 2
	GUESS=c4-convex-bsd
	;;
d824 2
a825 3
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=ymp-cray-unicos$CRAY_REL
	;;
d833 2
a834 3
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=t90-cray-unicos$CRAY_REL
	;;
d836 2
a837 3
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=alphaev5-cray-unicosmk$CRAY_REL
	;;
d839 2
a840 3
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=sv1-cray-unicos$CRAY_REL
	;;
d842 2
a843 3
	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
	GUESS=craynv-cray-unicosmp$CRAY_REL
	;;
d845 5
a849 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/ /_/'`
	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
	;;
d851 4
a854 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}
	;;
d856 2
a857 2
	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
	;;
d859 2
a860 2
	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
	;;
d862 2
a863 2
	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
	;;
d865 1
a865 1
	UNAME_PROCESSOR=`uname -p`
d870 1
a870 2
	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
d872 1
a872 2
	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
d874 1
a874 1
	;;
d876 2
a877 2
	UNAME_PROCESSOR=`uname -p`
	case $UNAME_PROCESSOR in
d883 2
a884 3
	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
	;;
d886 2
a887 2
	GUESS=$UNAME_MACHINE-pc-cygwin
	;;
d889 2
a890 2
	GUESS=$UNAME_MACHINE-pc-mingw64
	;;
d892 2
a893 2
	GUESS=$UNAME_MACHINE-pc-mingw32
	;;
d895 2
a896 2
	GUESS=$UNAME_MACHINE-pc-msys
	;;
d898 2
a899 5
	GUESS=$UNAME_MACHINE-pc-pw32
	;;
    *:SerenityOS:*:*)
        GUESS=$UNAME_MACHINE-pc-serenity
        ;;
d901 1
a901 1
	case $UNAME_MACHINE in
d903 2
a904 2
		GUESS=i586-pc-interix$UNAME_RELEASE
		;;
d906 2
a907 2
		GUESS=x86_64-unknown-interix$UNAME_RELEASE
		;;
d909 2
a910 2
		GUESS=ia64-unknown-interix$UNAME_RELEASE
		;;
d913 2
a914 2
	GUESS=$UNAME_MACHINE-pc-uwin
	;;
d916 2
a917 2
	GUESS=x86_64-pc-cygwin
	;;
d919 2
a920 3
	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
	GUESS=powerpcle-unknown-solaris2$SUN_REL
	;;
d923 2
a924 4
	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
	;;
d927 2
a928 10
	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
	;;
    x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
	GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
	;;
    *:[Mm]anagarm:*:*)
	GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
	;;
d930 2
a931 2
	GUESS=$UNAME_MACHINE-unknown-minix
	;;
d933 2
a934 22
	set_cc_for_build
	CPU=$UNAME_MACHINE
	LIBCABI=$LIBC
	if test "$CC_FOR_BUILD" != no_compiler_found; then
	    ABI=64
	    sed 's/^	    //' << EOF > "$dummy.c"
	    #ifdef __ARM_EABI__
	    #ifdef __ARM_PCS_VFP
	    ABI=eabihf
	    #else
	    ABI=eabi
	    #endif
	    #endif
EOF
	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
	    eval "$cc_set_abi"
	    case $ABI in
		eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
	    esac
	fi
	GUESS=$CPU-unknown-linux-$LIBCABI
	;;
d937 2
a938 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d940 1
a940 1
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
d951 5
a955 5
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d961 1
a961 1
	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
d966 1
a966 1
		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
d968 1
a968 1
		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
d971 1
a971 1
	;;
d973 2
a974 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d976 2
a977 2
	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
	;;
d979 2
a980 2
	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
	;;
d982 2
a983 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d985 2
a986 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d988 2
a989 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d991 2
a992 2
	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
	;;
d994 2
a995 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d997 5
a1001 14
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    kvx:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
    kvx:cos:*:*)
	GUESS=$UNAME_MACHINE-unknown-cos
	;;
    kvx:mbr:*:*)
	GUESS=$UNAME_MACHINE-unknown-mbr
	;;
    loongarch32:Linux:*:* | loongarch64:Linux:*:*)
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1003 2
a1004 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1006 2
a1007 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1052 1
a1052 2
	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
	eval "$cc_set_vars"
d1056 2
a1057 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1059 2
a1060 2
	GUESS=or1k-unknown-linux-$LIBC
	;;
d1062 2
a1063 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1065 2
a1066 2
	GUESS=sparc-unknown-linux-$LIBC
	;;
d1068 2
a1069 2
	GUESS=hppa64-unknown-linux-$LIBC
	;;
d1072 4
a1075 4
	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 ;;
d1077 1
a1077 1
	;;
d1079 2
a1080 2
	GUESS=powerpc64-unknown-linux-$LIBC
	;;
d1082 2
a1083 2
	GUESS=powerpc-unknown-linux-$LIBC
	;;
d1085 2
a1086 2
	GUESS=powerpc64le-unknown-linux-$LIBC
	;;
d1088 2
a1089 2
	GUESS=powerpcle-unknown-linux-$LIBC
	;;
d1091 2
a1092 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1094 2
a1095 2
	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
	;;
d1097 2
a1098 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1100 2
a1101 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1103 2
a1104 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1106 2
a1107 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1109 2
a1110 2
	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
	;;
a1112 1
	CPU=$UNAME_MACHINE
d1115 6
a1120 16
	    ABI=64
	    sed 's/^	    //' << EOF > "$dummy.c"
	    #ifdef __i386__
	    ABI=x86
	    #else
	    #ifdef __ILP32__
	    ABI=x32
	    #endif
	    #endif
EOF
	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
	    eval "$cc_set_abi"
	    case $ABI in
		x86) CPU=i686 ;;
		x32) LIBCABI=${LIBC}x32 ;;
	    esac
d1122 2
a1123 2
	GUESS=$CPU-pc-linux-$LIBCABI
	;;
d1125 2
a1126 2
	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
	;;
d1131 2
a1132 2
	GUESS=i386-sequent-sysv4
	;;
d1139 2
a1140 2
	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
	;;
d1142 1
a1142 1
	# If we were able to find 'uname', then EMX Unix compatibility
d1144 2
a1145 2
	GUESS=$UNAME_MACHINE-pc-os2-emx
	;;
d1147 2
a1148 2
	GUESS=$UNAME_MACHINE-unknown-stop
	;;
d1150 2
a1151 2
	GUESS=$UNAME_MACHINE-unknown-atheos
	;;
d1153 2
a1154 2
	GUESS=$UNAME_MACHINE-pc-syllable
	;;
d1156 2
a1157 2
	GUESS=i386-unknown-lynxos$UNAME_RELEASE
	;;
d1159 2
a1160 2
	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
	;;
d1162 1
a1162 1
	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
d1164 1
a1164 1
		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
d1166 1
a1166 1
		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
d1168 1
a1168 1
	;;
d1171 1
a1171 1
	case `/bin/uname -X | grep "^Machine"` in
d1176 2
a1177 2
	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
	;;
d1180 2
a1181 2
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
d1183 1
a1183 1
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
d1191 1
a1191 1
		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
d1193 1
a1193 1
		GUESS=$UNAME_MACHINE-pc-sysv32
d1195 1
a1195 1
	;;
d1203 2
a1204 2
	GUESS=i586-pc-msdosdjgpp
	;;
d1206 2
a1207 2
	GUESS=i386-pc-mach3
	;;
d1209 2
a1210 2
	GUESS=i860-intel-osf1
	;;
d1213 1
a1213 1
	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
d1215 1
a1215 1
	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
d1217 1
a1217 1
	;;
d1220 2
a1221 2
	GUESS=m68010-convergent-sysv
	;;
d1223 2
a1224 2
	GUESS=m68k-convergent-sysv
	;;
d1226 2
a1227 2
	GUESS=m68k-diab-dnix
	;;
d1233 1
a1233 1
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
d1244 1
a1244 1
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
d1252 2
a1253 2
	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
	;;
d1255 2
a1256 2
	GUESS=m68k-atari-sysv4
	;;
d1258 2
a1259 2
	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
	;;
d1261 2
a1262 2
	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
	;;
d1264 2
a1265 2
	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
	;;
d1267 2
a1268 2
	GUESS=mips-dde-sysv$UNAME_RELEASE
	;;
d1270 2
a1271 2
	GUESS=mips-sni-sysv4
	;;
d1273 2
a1274 2
	GUESS=mips-sni-sysv4
	;;
d1277 2
a1278 2
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
		GUESS=$UNAME_MACHINE-sni-sysv4
d1280 1
a1280 1
		GUESS=ns32k-sni-sysv
d1282 2
a1283 2
	;;
    PENTIUM:*:4.0*:*)	# Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
d1285 2
a1286 2
	GUESS=i586-unisys-sysv4
	;;
d1290 2
a1291 2
	GUESS=hppa1.1-stratus-sysv4
	;;
d1294 2
a1295 2
	GUESS=i860-stratus-sysv4
	;;
d1298 2
a1299 2
	GUESS=$UNAME_MACHINE-stratus-vos
	;;
d1302 2
a1303 2
	GUESS=hppa1.1-stratus-vos
	;;
d1305 2
a1306 2
	GUESS=m68k-apple-aux$UNAME_RELEASE
	;;
d1308 2
a1309 2
	GUESS=mips-sony-newsos6
	;;
d1312 1
a1312 1
		GUESS=mips-nec-sysv$UNAME_RELEASE
d1314 1
a1314 1
		GUESS=mips-unknown-sysv$UNAME_RELEASE
d1316 1
a1316 1
	;;
d1318 2
a1319 2
	GUESS=powerpc-be-beos
	;;
d1321 2
a1322 2
	GUESS=powerpc-apple-beos
	;;
d1324 2
a1325 2
	GUESS=i586-pc-beos
	;;
d1327 5
a1331 8
	GUESS=i586-pc-haiku
	;;
    ppc:Haiku:*:*)	# Haiku running on Apple PowerPC
	GUESS=powerpc-apple-haiku
	;;
    *:Haiku:*:*)	# Haiku modern gcc (not bound by BeOS compat)
	GUESS=$UNAME_MACHINE-unknown-haiku
	;;
d1333 2
a1334 2
	GUESS=sx4-nec-superux$UNAME_RELEASE
	;;
d1336 2
a1337 2
	GUESS=sx5-nec-superux$UNAME_RELEASE
	;;
d1339 2
a1340 2
	GUESS=sx6-nec-superux$UNAME_RELEASE
	;;
d1342 2
a1343 2
	GUESS=sx7-nec-superux$UNAME_RELEASE
	;;
d1345 2
a1346 2
	GUESS=sx8-nec-superux$UNAME_RELEASE
	;;
d1348 2
a1349 2
	GUESS=sx8r-nec-superux$UNAME_RELEASE
	;;
d1351 2
a1352 2
	GUESS=sxace-nec-superux$UNAME_RELEASE
	;;
d1354 2
a1355 2
	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
	;;
d1357 2
a1358 2
	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
	;;
d1360 2
a1361 2
	GUESS=aarch64-apple-darwin$UNAME_RELEASE
	;;
d1363 1
a1363 1
	UNAME_PROCESSOR=`uname -p`
d1397 2
a1398 2
	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
	;;
d1400 1
a1400 1
	UNAME_PROCESSOR=`uname -p`
d1405 2
a1406 2
	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
	;;
d1408 2
a1409 2
	GUESS=i386-pc-qnx
	;;
d1411 2
a1412 2
	GUESS=neo-tandem-nsk$UNAME_RELEASE
	;;
d1414 2
a1415 2
	GUESS=nse-tandem-nsk$UNAME_RELEASE
	;;
d1417 2
a1418 2
	GUESS=nsr-tandem-nsk$UNAME_RELEASE
	;;
d1420 2
a1421 2
	GUESS=nsv-tandem-nsk$UNAME_RELEASE
	;;
d1423 2
a1424 2
	GUESS=nsx-tandem-nsk$UNAME_RELEASE
	;;
d1426 2
a1427 2
	GUESS=mips-compaq-nonstopux
	;;
d1429 2
a1430 2
	GUESS=bs2000-siemens-sysv
	;;
d1432 2
a1433 2
	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
	;;
d1438 2
a1439 1
	if test "${cputype-}" = 386; then
d1441 2
a1442 2
	elif test "x${cputype-}" != x; then
	    UNAME_MACHINE=$cputype
d1444 2
a1445 2
	GUESS=$UNAME_MACHINE-unknown-plan9
	;;
d1447 2
a1448 2
	GUESS=pdp10-unknown-tops10
	;;
d1450 2
a1451 2
	GUESS=pdp10-unknown-tenex
	;;
d1453 2
a1454 2
	GUESS=pdp10-dec-tops20
	;;
d1456 2
a1457 2
	GUESS=pdp10-xkl-tops20
	;;
d1459 2
a1460 2
	GUESS=pdp10-unknown-tops20
	;;
d1462 2
a1463 2
	GUESS=pdp10-unknown-its
	;;
d1465 2
a1466 2
	GUESS=mips-sei-seiux$UNAME_RELEASE
	;;
d1468 2
a1469 3
	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
	;;
d1471 5
a1475 5
	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 ;;
d1478 2
a1479 2
	GUESS=i386-pc-xenix
	;;
d1481 2
a1482 3
	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
	;;
d1484 5
a1488 8
	GUESS=$UNAME_MACHINE-pc-rdos
	;;
    i*86:Fiwix:*:*)
	GUESS=$UNAME_MACHINE-pc-fiwix
	;;
    *:AROS:*:*)
	GUESS=$UNAME_MACHINE-unknown-aros
	;;
d1490 2
a1491 2
	GUESS=$UNAME_MACHINE-unknown-esx
	;;
d1493 2
a1494 2
	GUESS=x86_64-unknown-onefs
	;;
d1496 2
a1497 8
	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
	;;
    x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*)
	GUESS=$UNAME_MACHINE-pc-ironclad-mlibc
	;;
    *:[Ii]ronclad:*:*)
	GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc
	;;
a1499 6
# Do we have a guess based on uname results?
if test "x$GUESS" != x; then
    echo "$GUESS"
    exit
fi

a1514 1
int
d1539 1
a1539 1
  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
d1631 1
a1631 1
$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
d1639 1
a1639 1
case $UNAME_MACHINE:$UNAME_SYSTEM in
d1661 1
a1661 2
our_year=`echo $timestamp | sed 's,-.*,,'`
thisyear=`date +%Y`
d1663 1
a1663 2
script_age=`expr "$thisyear" - "$our_year"`
if test "$script_age" -lt 3 ; then
d1672 14
a1685 14
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`
d1697 1
a1697 1
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
d1699 1
a1699 1
# time-stamp-format: "%Y-%02m-%02d"
@


1.1.1.1.2.1
log
@file config.guess was added on branch phil-wifi on 2019-06-10 21:44:51 +0000
@
text
@d1 1462
@


1.1.1.1.2.2
log
@Sync with HEAD
@
text
@a0 1462
#! /bin/sh
# Attempt to guess a canonical system name.
#   Copyright 1992-2016 Free Software Foundation, Inc.

timestamp='2016-10-02'

# 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 <http://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:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@@gnu.org>.


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

usage="\
Usage: $0 [OPTION]

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

Operation modes:
  -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-2016 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

trap 'exit 1' 1 2 15

# 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.

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= ;'

# 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) >/dev/null 2>&1 ; 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/*)
	# If the system lacks a compiler, then just pick glibc.
	# We could probably try harder.
	LIBC=gnu

	eval $set_cc_for_build
	cat <<-EOF > $dummy.c
	#include <features.h>
	#if defined(__UCLIBC__)
	LIBC=uclibc
	#elif defined(__dietlibc__)
	LIBC=dietlibc
	#else
	LIBC=gnu
	#endif
	EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
	;;
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".
	sysctl="sysctl -n hw.machine_arch"
	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
	    /sbin/$sysctl 2>/dev/null || \
	    /usr/sbin/$sysctl 2>/dev/null || \
	    echo unknown)`
	case "${UNAME_MACHINE_ARCH}" in
	    armeb) machine=armeb-unknown ;;
	    arm*) machine=arm-unknown ;;
	    sh3el) machine=shl-unknown ;;
	    sh3eb) machine=sh-unknown ;;
	    sh5el) machine=sh5le-unknown ;;
	    earmv*)
		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
		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)
		eval $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/^earmv[0-9]/-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.
	echo "${machine}-${os}${release}${abi}"
	exit ;;
    *:Bitrig:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
	exit ;;
    *:OpenBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
	exit ;;
    *:LibertyBSD:*:*)
	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
	exit ;;
    *:ekkoBSD:*:*)
	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
	exit ;;
    *:SolidBSD:*:*)
	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
	exit ;;
    macppc:MirBSD:*:*)
	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
	exit ;;
    *:MirBSD:*:*)
	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
	exit ;;
    *:Sortix:*:*)
	echo ${UNAME_MACHINE}-unknown-sortix
	exit ;;
    alpha:OSF1:*:*)
	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.
	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
	exitcode=$?
	trap '' 0
	exit $exitcode ;;
    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 ;;
    Amiga*:UNIX_System_V:4.0:*)
	echo m68k-unknown-sysv4
	exit ;;
    *:[Aa]miga[Oo][Ss]:*:*)
	echo ${UNAME_MACHINE}-unknown-amigaos
	exit ;;
    *:[Mm]orph[Oo][Ss]:*:*)
	echo ${UNAME_MACHINE}-unknown-morphos
	exit ;;
    *:OS/390:*:*)
	echo i370-ibm-openedition
	exit ;;
    *:z/VM:*:*)
	echo s390-ibm-zvmoe
	exit ;;
    *:OS400:*:*)
	echo powerpc-ibm-os400
	exit ;;
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
	echo arm-acorn-riscix${UNAME_RELEASE}
	exit ;;
    arm*:riscos:*:*|arm*:RISCOS:*:*)
	echo arm-unknown-riscos
	exit ;;
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
	echo hppa1.1-hitachi-hiuxmpp
	exit ;;
    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
	# akee@@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
	if test "`(/bin/universe) 2>/dev/null`" = att ; then
		echo pyramid-pyramid-sysv3
	else
		echo pyramid-pyramid-bsd
	fi
	exit ;;
    NILE*:*:*:dcosx)
	echo pyramid-pyramid-svr4
	exit ;;
    DRS?6000:unix:4.0:6*)
	echo sparc-icl-nx6
	exit ;;
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
	case `/usr/bin/uname -p` in
	    sparc) echo sparc-icl-nx7; exit ;;
	esac ;;
    s390x:SunOS:*:*)
	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    sun4H:SunOS:5.*:*)
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
	echo i386-pc-auroraux${UNAME_RELEASE}
	exit ;;
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
	eval $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 [ "$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
	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    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.
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    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'.
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
	exit ;;
    sun3*:SunOS:*:*)
	echo m68k-sun-sunos${UNAME_RELEASE}
	exit ;;
    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)
		echo m68k-sun-sunos${UNAME_RELEASE}
		;;
	    sun4)
		echo sparc-sun-sunos${UNAME_RELEASE}
		;;
	esac
	exit ;;
    aushp:SunOS:*:*)
	echo sparc-auspex-sunos${UNAME_RELEASE}
	exit ;;
    # 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:*:*)
	echo m68k-atari-mint${UNAME_RELEASE}
	exit ;;
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
	echo m68k-atari-mint${UNAME_RELEASE}
	exit ;;
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
	echo m68k-atari-mint${UNAME_RELEASE}
	exit ;;
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
	echo m68k-milan-mint${UNAME_RELEASE}
	exit ;;
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
	echo m68k-hades-mint${UNAME_RELEASE}
	exit ;;
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
	echo m68k-unknown-mint${UNAME_RELEASE}
	exit ;;
    m68k:machten:*:*)
	echo m68k-apple-machten${UNAME_RELEASE}
	exit ;;
    powerpc:machten:*:*)
	echo powerpc-apple-machten${UNAME_RELEASE}
	exit ;;
    RISC*:Mach:*:*)
	echo mips-dec-mach_bsd4.3
	exit ;;
    RISC*:ULTRIX:*:*)
	echo mips-dec-ultrix${UNAME_RELEASE}
	exit ;;
    VAX*:ULTRIX*:*:*)
	echo vax-dec-ultrix${UNAME_RELEASE}
	exit ;;
    2020:CLIX:*:* | 2430:CLIX:*:*)
	echo clipper-intergraph-clix${UNAME_RELEASE}
	exit ;;
    mips:*:*:UMIPS | mips:*:*:RISCos)
	eval $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; }
	echo mips-mips-riscos${UNAME_RELEASE}
	exit ;;
    Motorola:PowerMAX_OS:*:*)
	echo powerpc-motorola-powermax
	exit ;;
    Motorola:*:4.3:PL8-*)
	echo powerpc-harris-powermax
	exit ;;
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
	echo powerpc-harris-powermax
	exit ;;
    Night_Hawk:Power_UNIX:*:*)
	echo powerpc-harris-powerunix
	exit ;;
    m88k:CX/UX:7*:*)
	echo m88k-harris-cxux7
	exit ;;
    m88k:*:4*:R4*)
	echo m88k-motorola-sysv4
	exit ;;
    m88k:*:3*:R3*)
	echo m88k-motorola-sysv3
	exit ;;
    AViiON:dgux:*:*)
	# DG/UX returns AViiON for all architectures
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
	then
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
	    then
		echo m88k-dg-dgux${UNAME_RELEASE}
	    else
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
	    fi
	else
	    echo i586-dg-dgux${UNAME_RELEASE}
	fi
	exit ;;
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
	echo m88k-dolphin-sysv3
	exit ;;
    M88*:*:R3*:*)
	# Delta 88k system running SVR3
	echo m88k-motorola-sysv3
	exit ;;
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
	echo m88k-tektronix-sysv3
	exit ;;
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
	echo m68k-tektronix-bsd
	exit ;;
    *:IRIX*:*:*)
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
	exit ;;
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
    i*86:AIX:*:*)
	echo i386-ibm-aix
	exit ;;
    ia64:AIX:*:*)
	if [ -x /usr/bin/oslevel ] ; then
		IBM_REV=`/usr/bin/oslevel`
	else
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
	fi
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
	exit ;;
    *:AIX:2:3)
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
		eval $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
			echo "$SYSTEM_NAME"
		else
			echo rs6000-ibm-aix3.2.5
		fi
	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
		echo rs6000-ibm-aix3.2.4
	else
		echo rs6000-ibm-aix3.2
	fi
	exit ;;
    *: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 [ -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
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
	exit ;;
    *:AIX:*:*)
	echo rs6000-ibm-aix
	exit ;;
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
	echo romp-ibm-bsd4.4
	exit ;;
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
	exit ;;                             # report: romp-ibm BSD 4.3
    *:BOSX:*:*)
	echo rs6000-bull-bosx
	exit ;;
    DPX/2?00:B.O.S.:*:*)
	echo m68k-bull-sysv3
	exit ;;
    9000/[34]??:4.3bsd:1.*:*)
	echo m68k-hp-bsd
	exit ;;
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
	echo m68k-hp-bsd4.4
	exit ;;
    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 [ -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 [ "${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);
		}
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 [ ${HP_ARCH} = hppa2.0w ]
	then
	    eval $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
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
	exit ;;
    ia64:HP-UX:*:*)
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
	echo ia64-hp-hpux${HPUX_REV}
	exit ;;
    3050*:HI-UX:*:*)
	eval $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; }
	echo unknown-hitachi-hiuxwe2
	exit ;;
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
	echo hppa1.1-hp-bsd
	exit ;;
    9000/8??:4.3bsd:*:*)
	echo hppa1.0-hp-bsd
	exit ;;
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
	echo hppa1.0-hp-mpeix
	exit ;;
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
	echo hppa1.1-hp-osf
	exit ;;
    hp8??:OSF1:*:*)
	echo hppa1.0-hp-osf
	exit ;;
    i*86:OSF1:*:*)
	if [ -x /usr/sbin/sysversion ] ; then
	    echo ${UNAME_MACHINE}-unknown-osf1mk
	else
	    echo ${UNAME_MACHINE}-unknown-osf1
	fi
	exit ;;
    parisc*:Lites*:*:*)
	echo hppa1.1-hp-lites
	exit ;;
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
	echo c1-convex-bsd
	exit ;;
    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*:*)
	echo c34-convex-bsd
	exit ;;
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
	echo c38-convex-bsd
	exit ;;
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
	echo c4-convex-bsd
	exit ;;
    CRAY*Y-MP:*:*:*)
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    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:*:*:*)
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*T3E:*:*:*)
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    CRAY*SV1:*:*:*)
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    *:UNICOS/mp:*:*)
	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
	exit ;;
    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/ /_/'`
	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
	exit ;;
    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/ /_/'`
	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
	exit ;;
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
	exit ;;
    sparc*:BSD/OS:*:*)
	echo sparc-unknown-bsdi${UNAME_RELEASE}
	exit ;;
    *:BSD/OS:*:*)
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
	exit ;;
    *:FreeBSD:*:*)
	UNAME_PROCESSOR=`/usr/bin/uname -p`
	case ${UNAME_PROCESSOR} in
	    amd64)
		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
	    *)
		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
	esac
	exit ;;
    i*:CYGWIN*:*)
	echo ${UNAME_MACHINE}-pc-cygwin
	exit ;;
    *:MINGW64*:*)
	echo ${UNAME_MACHINE}-pc-mingw64
	exit ;;
    *:MINGW*:*)
	echo ${UNAME_MACHINE}-pc-mingw32
	exit ;;
    *:MSYS*:*)
	echo ${UNAME_MACHINE}-pc-msys
	exit ;;
    i*:windows32*:*)
	# uname -m includes "-pc" on this system.
	echo ${UNAME_MACHINE}-mingw32
	exit ;;
    i*:PW*:*)
	echo ${UNAME_MACHINE}-pc-pw32
	exit ;;
    *:Interix*:*)
	case ${UNAME_MACHINE} in
	    x86)
		echo i586-pc-interix${UNAME_RELEASE}
		exit ;;
	    authenticamd | genuineintel | EM64T)
		echo x86_64-unknown-interix${UNAME_RELEASE}
		exit ;;
	    IA64)
		echo ia64-unknown-interix${UNAME_RELEASE}
		exit ;;
	esac ;;
    [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 ;;
    i*:UWIN*:*)
	echo ${UNAME_MACHINE}-pc-uwin
	exit ;;
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
	echo x86_64-unknown-cygwin
	exit ;;
    p*:CYGWIN*:*)
	echo powerpcle-unknown-cygwin
	exit ;;
    prep*:SunOS:5.*:*)
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
	exit ;;
    *:GNU:*:*)
	# the GNU system
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
	exit ;;
    *:GNU/*:*:*)
	# other systems with GNU libc and userland
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
	exit ;;
    i*86:Minix:*:*)
	echo ${UNAME_MACHINE}-pc-minix
	exit ;;
    aarch64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    aarch64_be:Linux:*:*)
	UNAME_MACHINE=aarch64_be
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	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 -q ld.so.1
	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    arc:Linux:*:* | arceb:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    arm*:Linux:*:*)
	eval $set_cc_for_build
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
	    | grep -q __ARM_EABI__
	then
	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	else
	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
		| grep -q __ARM_PCS_VFP
	    then
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
	    else
		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
	    fi
	fi
	exit ;;
    avr32*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    cris:Linux:*:*)
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
	exit ;;
    crisv32:Linux:*:*)
	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
	exit ;;
    e2k:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    frv:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    hexagon:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    i*86:Linux:*:*)
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
	exit ;;
    ia64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    k1om:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    m32r*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    m68*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    mips:Linux:*:* | mips64:Linux:*:*)
	eval $set_cc_for_build
	sed 's/^	//' << EOF >$dummy.c
	#undef CPU
	#undef ${UNAME_MACHINE}
	#undef ${UNAME_MACHINE}el
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
	CPU=${UNAME_MACHINE}el
	#else
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
	CPU=${UNAME_MACHINE}
	#else
	CPU=
	#endif
	#endif
EOF
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
	;;
    mips64el:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    openrisc*:Linux:*:*)
	echo or1k-unknown-linux-${LIBC}
	exit ;;
    or32:Linux:*:* | or1k*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    padre:Linux:*:*)
	echo sparc-unknown-linux-${LIBC}
	exit ;;
    parisc64:Linux:*:* | hppa64:Linux:*:*)
	echo hppa64-unknown-linux-${LIBC}
	exit ;;
    parisc:Linux:*:* | hppa:Linux:*:*)
	# Look for CPU level
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
	  *)    echo hppa-unknown-linux-${LIBC} ;;
	esac
	exit ;;
    ppc64:Linux:*:*)
	echo powerpc64-unknown-linux-${LIBC}
	exit ;;
    ppc:Linux:*:*)
	echo powerpc-unknown-linux-${LIBC}
	exit ;;
    ppc64le:Linux:*:*)
	echo powerpc64le-unknown-linux-${LIBC}
	exit ;;
    ppcle:Linux:*:*)
	echo powerpcle-unknown-linux-${LIBC}
	exit ;;
    riscv32:Linux:*:* | riscv64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    s390:Linux:*:* | s390x:Linux:*:*)
	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
	exit ;;
    sh64*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    sh*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    sparc:Linux:*:* | sparc64:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    tile*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    vax:Linux:*:*)
	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
	exit ;;
    x86_64:Linux:*:*)
	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
	exit ;;
    xtensa*:Linux:*:*)
	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
	exit ;;
    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.
	echo i386-sequent-sysv4
	exit ;;
    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.
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
	exit ;;
    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 ;;
    i*86:XTS-300:*:STOP)
	echo ${UNAME_MACHINE}-unknown-stop
	exit ;;
    i*86:atheos:*:*)
	echo ${UNAME_MACHINE}-unknown-atheos
	exit ;;
    i*86:syllable:*:*)
	echo ${UNAME_MACHINE}-pc-syllable
	exit ;;
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
	echo i386-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    i*86:*DOS:*:*)
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
	exit ;;
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
	else
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
	fi
	exit ;;
    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
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
	exit ;;
    i*86:*:3.2:*)
	if test -f /usr/options/cb.name; then
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
		echo ${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
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
	else
		echo ${UNAME_MACHINE}-pc-sysv32
	fi
	exit ;;
    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.
	echo i586-pc-msdosdjgpp
	exit ;;
    Intel:Mach:3*:*)
	echo i386-pc-mach3
	exit ;;
    paragon:*:*:*)
	echo i860-intel-osf1
	exit ;;
    i860:*:4.*:*) # i860-SVR4
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
	else # Add other i860-SVR4 vendors below as they are discovered.
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
	fi
	exit ;;
    mini*:CTIX:SYS*5:*)
	# "miniframe"
	echo m68010-convergent-sysv
	exit ;;
    mc68k:UNIX:SYSTEM5:3.51m)
	echo m68k-convergent-sysv
	exit ;;
    M680?0:D-NIX:5.3:*)
	echo m68k-diab-dnix
	exit ;;
    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*:*)
	echo m68k-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    mc68030:UNIX_System_V:4.*:*)
	echo m68k-atari-sysv4
	exit ;;
    TSUNAMI:LynxOS:2.*:*)
	echo sparc-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    rs6000:LynxOS:2.*:*)
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
	exit ;;
    SM[BE]S:UNIX_SV:*:*)
	echo mips-dde-sysv${UNAME_RELEASE}
	exit ;;
    RM*:ReliantUNIX-*:*:*)
	echo mips-sni-sysv4
	exit ;;
    RM*:SINIX-*:*:*)
	echo mips-sni-sysv4
	exit ;;
    *:SINIX-*:*:*)
	if uname -p 2>/dev/null >/dev/null ; then
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
		echo ${UNAME_MACHINE}-sni-sysv4
	else
		echo ns32k-sni-sysv
	fi
	exit ;;
    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
			# says <Richard.M.Bartel@@ccMail.Census.GOV>
	echo i586-unisys-sysv4
	exit ;;
    *:UNIX_System_V:4*:FTX*)
	# From Gerald Hewes <hewes@@openmarket.com>.
	# How about differentiating between stratus architectures? -djm
	echo hppa1.1-stratus-sysv4
	exit ;;
    *:*:*:FTX*)
	# From seanf@@swdc.stratus.com.
	echo i860-stratus-sysv4
	exit ;;
    i*86:VOS:*:*)
	# From Paul.Green@@stratus.com.
	echo ${UNAME_MACHINE}-stratus-vos
	exit ;;
    *:VOS:*:*)
	# From Paul.Green@@stratus.com.
	echo hppa1.1-stratus-vos
	exit ;;
    mc68*:A/UX:*:*)
	echo m68k-apple-aux${UNAME_RELEASE}
	exit ;;
    news*:NEWS-OS:6*:*)
	echo mips-sony-newsos6
	exit ;;
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
	if [ -d /usr/nec ]; then
		echo mips-nec-sysv${UNAME_RELEASE}
	else
		echo mips-unknown-sysv${UNAME_RELEASE}
	fi
	exit ;;
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
	echo powerpc-be-beos
	exit ;;
    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
	echo powerpc-apple-beos
	exit ;;
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
	echo i586-pc-beos
	exit ;;
    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
	echo i586-pc-haiku
	exit ;;
    x86_64:Haiku:*:*)
	echo x86_64-unknown-haiku
	exit ;;
    SX-4:SUPER-UX:*:*)
	echo sx4-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-5:SUPER-UX:*:*)
	echo sx5-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-6:SUPER-UX:*:*)
	echo sx6-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-7:SUPER-UX:*:*)
	echo sx7-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-8:SUPER-UX:*:*)
	echo sx8-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-8R:SUPER-UX:*:*)
	echo sx8r-nec-superux${UNAME_RELEASE}
	exit ;;
    SX-ACE:SUPER-UX:*:*)
	echo sxace-nec-superux${UNAME_RELEASE}
	exit ;;
    Power*:Rhapsody:*:*)
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
	exit ;;
    *:Rhapsody:*:*)
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
	exit ;;
    *:Darwin:*:*)
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
	eval $set_cc_for_build
	if test "$UNAME_PROCESSOR" = unknown ; then
	    UNAME_PROCESSOR=powerpc
	fi
	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
	    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
		    case $UNAME_PROCESSOR in
			i386) UNAME_PROCESSOR=x86_64 ;;
			powerpc) UNAME_PROCESSOR=powerpc64 ;;
		    esac
		fi
	    fi
	elif test "$UNAME_PROCESSOR" = i386 ; then
	    # Avoid executing cc on OS X 10.9, as it ships with a stub
	    # that puts up a graphical alert prompting to install
	    # developer tools.  Any system running Mac OS X 10.7 or
	    # later (Darwin 11 and later) is required to have a 64-bit
	    # processor. This is not true of the ARM version of Darwin
	    # that Apple uses in portable devices.
	    UNAME_PROCESSOR=x86_64
	fi
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
	exit ;;
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
	UNAME_PROCESSOR=`uname -p`
	if test "$UNAME_PROCESSOR" = x86; then
		UNAME_PROCESSOR=i386
		UNAME_MACHINE=pc
	fi
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
	exit ;;
    *:QNX:*:4*)
	echo i386-pc-qnx
	exit ;;
    NEO-?:NONSTOP_KERNEL:*:*)
	echo neo-tandem-nsk${UNAME_RELEASE}
	exit ;;
    NSE-*:NONSTOP_KERNEL:*:*)
	echo nse-tandem-nsk${UNAME_RELEASE}
	exit ;;
    NSR-?:NONSTOP_KERNEL:*:*)
	echo nsr-tandem-nsk${UNAME_RELEASE}
	exit ;;
    *:NonStop-UX:*:*)
	echo mips-compaq-nonstopux
	exit ;;
    BS2000:POSIX*:*:*)
	echo bs2000-siemens-sysv
	exit ;;
    DS/*:UNIX_System_V:*:*)
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
	exit ;;
    *: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
	else
	    UNAME_MACHINE="$cputype"
	fi
	echo ${UNAME_MACHINE}-unknown-plan9
	exit ;;
    *:TOPS-10:*:*)
	echo pdp10-unknown-tops10
	exit ;;
    *:TENEX:*:*)
	echo pdp10-unknown-tenex
	exit ;;
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
	echo pdp10-dec-tops20
	exit ;;
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
	echo pdp10-xkl-tops20
	exit ;;
    *:TOPS-20:*:*)
	echo pdp10-unknown-tops20
	exit ;;
    *:ITS:*:*)
	echo pdp10-unknown-its
	exit ;;
    SEI:*:*:SEIUX)
	echo mips-sei-seiux${UNAME_RELEASE}
	exit ;;
    *:DragonFly:*:*)
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
	exit ;;
    *:*VMS:*:*)
	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 ;;
	esac ;;
    *:XENIX:*:SysV)
	echo i386-pc-xenix
	exit ;;
    i*86:skyos:*:*)
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
	exit ;;
    i*86:rdos:*:*)
	echo ${UNAME_MACHINE}-pc-rdos
	exit ;;
    i*86:AROS:*:*)
	echo ${UNAME_MACHINE}-pc-aros
	exit ;;
    x86_64:VMkernel:*:*)
	echo ${UNAME_MACHINE}-unknown-esx
	exit ;;
    amd64:Isilon\ OneFS:*:*)
	echo x86_64-unknown-onefs
	exit ;;
esac

cat >&2 <<EOF
$0: unable to guess system type

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

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub

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

exit 1

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


