config.guess revision 7b5fefc8
12227fc13Smrg#! /bin/sh
22227fc13Smrg# Attempt to guess a canonical system name.
37b5fefc8Smrg#   Copyright 1992-2023 Free Software Foundation, Inc.
42227fc13Smrg
57b5fefc8Smrg# shellcheck disable=SC2006,SC2268 # see below for rationale
67b5fefc8Smrg
77b5fefc8Smrgtimestamp='2023-01-01'
82227fc13Smrg
92227fc13Smrg# This file is free software; you can redistribute it and/or modify it
102227fc13Smrg# under the terms of the GNU General Public License as published by
117b5fefc8Smrg# the Free Software Foundation, either version 3 of the License, or
122227fc13Smrg# (at your option) any later version.
132227fc13Smrg#
142227fc13Smrg# This program is distributed in the hope that it will be useful, but
152227fc13Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
162227fc13Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
172227fc13Smrg# General Public License for more details.
182227fc13Smrg#
192227fc13Smrg# You should have received a copy of the GNU General Public License
207b5fefc8Smrg# along with this program; if not, see <https://www.gnu.org/licenses/>.
212227fc13Smrg#
222227fc13Smrg# As a special exception to the GNU General Public License, if you
232227fc13Smrg# distribute this file as part of a program that contains a
242227fc13Smrg# configuration script generated by Autoconf, you may include it under
257b5fefc8Smrg# the same distribution terms that you use for the rest of that
267b5fefc8Smrg# program.  This Exception is an additional permission under section 7
277b5fefc8Smrg# of the GNU General Public License, version 3 ("GPLv3").
282227fc13Smrg#
297b5fefc8Smrg# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
302227fc13Smrg#
312227fc13Smrg# You can get the latest version of this script from:
327b5fefc8Smrg# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
337b5fefc8Smrg#
347b5fefc8Smrg# Please send patches to <config-patches@gnu.org>.
357b5fefc8Smrg
367b5fefc8Smrg
377b5fefc8Smrg# The "shellcheck disable" line above the timestamp inhibits complaints
387b5fefc8Smrg# about features and limitations of the classic Bourne shell that were
397b5fefc8Smrg# superseded or lifted in POSIX.  However, this script identifies a wide
407b5fefc8Smrg# variety of pre-POSIX systems that do not have POSIX shells at all, and
417b5fefc8Smrg# even some reasonably current systems (Solaris 10 as case-in-point) still
427b5fefc8Smrg# have a pre-POSIX /bin/sh.
437b5fefc8Smrg
442227fc13Smrg
452227fc13Smrgme=`echo "$0" | sed -e 's,.*/,,'`
462227fc13Smrg
472227fc13Smrgusage="\
482227fc13SmrgUsage: $0 [OPTION]
492227fc13Smrg
502227fc13SmrgOutput the configuration name of the system \`$me' is run on.
512227fc13Smrg
527b5fefc8SmrgOptions:
532227fc13Smrg  -h, --help         print this help, then exit
542227fc13Smrg  -t, --time-stamp   print date of last modification, then exit
552227fc13Smrg  -v, --version      print version number, then exit
562227fc13Smrg
572227fc13SmrgReport bugs and patches to <config-patches@gnu.org>."
582227fc13Smrg
592227fc13Smrgversion="\
602227fc13SmrgGNU config.guess ($timestamp)
612227fc13Smrg
622227fc13SmrgOriginally written by Per Bothner.
637b5fefc8SmrgCopyright 1992-2023 Free Software Foundation, Inc.
642227fc13Smrg
652227fc13SmrgThis is free software; see the source for copying conditions.  There is NO
662227fc13Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
672227fc13Smrg
682227fc13Smrghelp="
692227fc13SmrgTry \`$me --help' for more information."
702227fc13Smrg
712227fc13Smrg# Parse command line
722227fc13Smrgwhile test $# -gt 0 ; do
732227fc13Smrg  case $1 in
742227fc13Smrg    --time-stamp | --time* | -t )
752227fc13Smrg       echo "$timestamp" ; exit ;;
762227fc13Smrg    --version | -v )
772227fc13Smrg       echo "$version" ; exit ;;
782227fc13Smrg    --help | --h* | -h )
792227fc13Smrg       echo "$usage"; exit ;;
802227fc13Smrg    -- )     # Stop option processing
812227fc13Smrg       shift; break ;;
822227fc13Smrg    - )	# Use stdin as input.
832227fc13Smrg       break ;;
842227fc13Smrg    -* )
852227fc13Smrg       echo "$me: invalid option $1$help" >&2
862227fc13Smrg       exit 1 ;;
872227fc13Smrg    * )
882227fc13Smrg       break ;;
892227fc13Smrg  esac
902227fc13Smrgdone
912227fc13Smrg
922227fc13Smrgif test $# != 0; then
932227fc13Smrg  echo "$me: too many arguments$help" >&2
942227fc13Smrg  exit 1
952227fc13Smrgfi
962227fc13Smrg
977b5fefc8Smrg# Just in case it came from the environment.
987b5fefc8SmrgGUESS=
992227fc13Smrg
1002227fc13Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
1012227fc13Smrg# compiler to aid in system detection is discouraged as it requires
1022227fc13Smrg# temporary files to be created and, as you can see below, it is a
1032227fc13Smrg# headache to deal with in a portable fashion.
1042227fc13Smrg
1052227fc13Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
1062227fc13Smrg# use `HOST_CC' if defined, but it is deprecated.
1072227fc13Smrg
1082227fc13Smrg# Portable tmp directory creation inspired by the Autoconf team.
1092227fc13Smrg
1107b5fefc8Smrgtmp=
1117b5fefc8Smrg# shellcheck disable=SC2172
1127b5fefc8Smrgtrap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
1137b5fefc8Smrg
1147b5fefc8Smrgset_cc_for_build() {
1157b5fefc8Smrg    # prevent multiple calls if $tmp is already set
1167b5fefc8Smrg    test "$tmp" && return 0
1177b5fefc8Smrg    : "${TMPDIR=/tmp}"
1187b5fefc8Smrg    # shellcheck disable=SC2039,SC3028
1197b5fefc8Smrg    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
1207b5fefc8Smrg	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
1217b5fefc8Smrg	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
1227b5fefc8Smrg	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
1237b5fefc8Smrg    dummy=$tmp/dummy
1247b5fefc8Smrg    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
1257b5fefc8Smrg	,,)    echo "int x;" > "$dummy.c"
1267b5fefc8Smrg	       for driver in cc gcc c89 c99 ; do
1277b5fefc8Smrg		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
1287b5fefc8Smrg		       CC_FOR_BUILD=$driver
1297b5fefc8Smrg		       break
1307b5fefc8Smrg		   fi
1317b5fefc8Smrg	       done
1327b5fefc8Smrg	       if test x"$CC_FOR_BUILD" = x ; then
1337b5fefc8Smrg		   CC_FOR_BUILD=no_compiler_found
1347b5fefc8Smrg	       fi
1357b5fefc8Smrg	       ;;
1367b5fefc8Smrg	,,*)   CC_FOR_BUILD=$CC ;;
1377b5fefc8Smrg	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
1387b5fefc8Smrg    esac
1397b5fefc8Smrg}
1402227fc13Smrg
1412227fc13Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
1422227fc13Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
1437b5fefc8Smrgif test -f /.attbin/uname ; then
1442227fc13Smrg	PATH=$PATH:/.attbin ; export PATH
1452227fc13Smrgfi
1462227fc13Smrg
1472227fc13SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
1482227fc13SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
1497b5fefc8SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
1502227fc13SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
1512227fc13Smrg
1527b5fefc8Smrgcase $UNAME_SYSTEM in
1537b5fefc8SmrgLinux|GNU|GNU/*)
1547b5fefc8Smrg	LIBC=unknown
1557b5fefc8Smrg
1567b5fefc8Smrg	set_cc_for_build
1577b5fefc8Smrg	cat <<-EOF > "$dummy.c"
1582227fc13Smrg	#include <features.h>
1597b5fefc8Smrg	#if defined(__UCLIBC__)
1602227fc13Smrg	LIBC=uclibc
1617b5fefc8Smrg	#elif defined(__dietlibc__)
1622227fc13Smrg	LIBC=dietlibc
1637b5fefc8Smrg	#elif defined(__GLIBC__)
1642227fc13Smrg	LIBC=gnu
1657b5fefc8Smrg	#else
1667b5fefc8Smrg	#include <stdarg.h>
1677b5fefc8Smrg	/* First heuristic to detect musl libc.  */
1687b5fefc8Smrg	#ifdef __DEFINED_va_list
1697b5fefc8Smrg	LIBC=musl
1707b5fefc8Smrg	#endif
1712227fc13Smrg	#endif
1722227fc13Smrg	EOF
1737b5fefc8Smrg	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
1747b5fefc8Smrg	eval "$cc_set_libc"
1757b5fefc8Smrg
1767b5fefc8Smrg	# Second heuristic to detect musl libc.
1777b5fefc8Smrg	if [ "$LIBC" = unknown ] &&
1787b5fefc8Smrg	   command -v ldd >/dev/null &&
1797b5fefc8Smrg	   ldd --version 2>&1 | grep -q ^musl; then
1807b5fefc8Smrg		LIBC=musl
1817b5fefc8Smrg	fi
1827b5fefc8Smrg
1837b5fefc8Smrg	# If the system lacks a compiler, then just pick glibc.
1847b5fefc8Smrg	# We could probably try harder.
1857b5fefc8Smrg	if [ "$LIBC" = unknown ]; then
1867b5fefc8Smrg		LIBC=gnu
1877b5fefc8Smrg	fi
1882227fc13Smrg	;;
1892227fc13Smrgesac
1902227fc13Smrg
1912227fc13Smrg# Note: order is significant - the case branches are not exclusive.
1922227fc13Smrg
1937b5fefc8Smrgcase $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
1942227fc13Smrg    *:NetBSD:*:*)
1952227fc13Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
1967b5fefc8Smrg	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
1972227fc13Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
1982227fc13Smrg	# switched to ELF, *-*-netbsd* would select the old
1992227fc13Smrg	# object file format.  This provides both forward
2002227fc13Smrg	# compatibility and a consistent mechanism for selecting the
2012227fc13Smrg	# object file format.
2022227fc13Smrg	#
2032227fc13Smrg	# Note: NetBSD doesn't particularly care about the vendor
2042227fc13Smrg	# portion of the name.  We always set it to "unknown".
2057b5fefc8Smrg	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
2067b5fefc8Smrg	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
2077b5fefc8Smrg	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
2087b5fefc8Smrg	    echo unknown)`
2097b5fefc8Smrg	case $UNAME_MACHINE_ARCH in
2107b5fefc8Smrg	    aarch64eb) machine=aarch64_be-unknown ;;
2112227fc13Smrg	    armeb) machine=armeb-unknown ;;
2122227fc13Smrg	    arm*) machine=arm-unknown ;;
2132227fc13Smrg	    sh3el) machine=shl-unknown ;;
2142227fc13Smrg	    sh3eb) machine=sh-unknown ;;
2152227fc13Smrg	    sh5el) machine=sh5le-unknown ;;
2167b5fefc8Smrg	    earmv*)
2177b5fefc8Smrg		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
2187b5fefc8Smrg		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
2197b5fefc8Smrg		machine=${arch}${endian}-unknown
2207b5fefc8Smrg		;;
2217b5fefc8Smrg	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
2222227fc13Smrg	esac
2232227fc13Smrg	# The Operating System including object format, if it has switched
2247b5fefc8Smrg	# to ELF recently (or will in the future) and ABI.
2257b5fefc8Smrg	case $UNAME_MACHINE_ARCH in
2267b5fefc8Smrg	    earm*)
2277b5fefc8Smrg		os=netbsdelf
2287b5fefc8Smrg		;;
2292227fc13Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
2307b5fefc8Smrg		set_cc_for_build
2312227fc13Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
2322227fc13Smrg			| grep -q __ELF__
2332227fc13Smrg		then
2342227fc13Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
2352227fc13Smrg		    # Return netbsd for either.  FIX?
2362227fc13Smrg		    os=netbsd
2372227fc13Smrg		else
2382227fc13Smrg		    os=netbsdelf
2392227fc13Smrg		fi
2402227fc13Smrg		;;
2412227fc13Smrg	    *)
2427b5fefc8Smrg		os=netbsd
2437b5fefc8Smrg		;;
2447b5fefc8Smrg	esac
2457b5fefc8Smrg	# Determine ABI tags.
2467b5fefc8Smrg	case $UNAME_MACHINE_ARCH in
2477b5fefc8Smrg	    earm*)
2487b5fefc8Smrg		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
2497b5fefc8Smrg		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
2502227fc13Smrg		;;
2512227fc13Smrg	esac
2522227fc13Smrg	# The OS release
2532227fc13Smrg	# Debian GNU/NetBSD machines have a different userland, and
2542227fc13Smrg	# thus, need a distinct triplet. However, they do not need
2552227fc13Smrg	# kernel version information, so it can be replaced with a
2562227fc13Smrg	# suitable tag, in the style of linux-gnu.
2577b5fefc8Smrg	case $UNAME_VERSION in
2582227fc13Smrg	    Debian*)
2592227fc13Smrg		release='-gnu'
2602227fc13Smrg		;;
2612227fc13Smrg	    *)
2627b5fefc8Smrg		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
2632227fc13Smrg		;;
2642227fc13Smrg	esac
2652227fc13Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
2662227fc13Smrg	# contains redundant information, the shorter form:
2672227fc13Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
2687b5fefc8Smrg	GUESS=$machine-${os}${release}${abi-}
2697b5fefc8Smrg	;;
2707b5fefc8Smrg    *:Bitrig:*:*)
2717b5fefc8Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
2727b5fefc8Smrg	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
2737b5fefc8Smrg	;;
2742227fc13Smrg    *:OpenBSD:*:*)
2752227fc13Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
2767b5fefc8Smrg	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
2777b5fefc8Smrg	;;
2787b5fefc8Smrg    *:SecBSD:*:*)
2797b5fefc8Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
2807b5fefc8Smrg	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
2817b5fefc8Smrg	;;
2827b5fefc8Smrg    *:LibertyBSD:*:*)
2837b5fefc8Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
2847b5fefc8Smrg	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
2857b5fefc8Smrg	;;
2867b5fefc8Smrg    *:MidnightBSD:*:*)
2877b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
2887b5fefc8Smrg	;;
2892227fc13Smrg    *:ekkoBSD:*:*)
2907b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
2917b5fefc8Smrg	;;
2922227fc13Smrg    *:SolidBSD:*:*)
2937b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
2947b5fefc8Smrg	;;
2957b5fefc8Smrg    *:OS108:*:*)
2967b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
2977b5fefc8Smrg	;;
2982227fc13Smrg    macppc:MirBSD:*:*)
2997b5fefc8Smrg	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
3007b5fefc8Smrg	;;
3012227fc13Smrg    *:MirBSD:*:*)
3027b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
3037b5fefc8Smrg	;;
3047b5fefc8Smrg    *:Sortix:*:*)
3057b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-sortix
3067b5fefc8Smrg	;;
3077b5fefc8Smrg    *:Twizzler:*:*)
3087b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-twizzler
3097b5fefc8Smrg	;;
3107b5fefc8Smrg    *:Redox:*:*)
3117b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-redox
3127b5fefc8Smrg	;;
3137b5fefc8Smrg    mips:OSF1:*.*)
3147b5fefc8Smrg	GUESS=mips-dec-osf1
3157b5fefc8Smrg	;;
3162227fc13Smrg    alpha:OSF1:*:*)
3177b5fefc8Smrg	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
3187b5fefc8Smrg	trap '' 0
3192227fc13Smrg	case $UNAME_RELEASE in
3202227fc13Smrg	*4.0)
3212227fc13Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
3222227fc13Smrg		;;
3232227fc13Smrg	*5.*)
3247b5fefc8Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
3252227fc13Smrg		;;
3262227fc13Smrg	esac
3272227fc13Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
3282227fc13Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
3292227fc13Smrg	# covers most systems running today.  This code pipes the CPU
3302227fc13Smrg	# types through head -n 1, so we only detect the type of CPU 0.
3312227fc13Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
3327b5fefc8Smrg	case $ALPHA_CPU_TYPE in
3332227fc13Smrg	    "EV4 (21064)")
3347b5fefc8Smrg		UNAME_MACHINE=alpha ;;
3352227fc13Smrg	    "EV4.5 (21064)")
3367b5fefc8Smrg		UNAME_MACHINE=alpha ;;
3372227fc13Smrg	    "LCA4 (21066/21068)")
3387b5fefc8Smrg		UNAME_MACHINE=alpha ;;
3392227fc13Smrg	    "EV5 (21164)")
3407b5fefc8Smrg		UNAME_MACHINE=alphaev5 ;;
3412227fc13Smrg	    "EV5.6 (21164A)")
3427b5fefc8Smrg		UNAME_MACHINE=alphaev56 ;;
3432227fc13Smrg	    "EV5.6 (21164PC)")
3447b5fefc8Smrg		UNAME_MACHINE=alphapca56 ;;
3452227fc13Smrg	    "EV5.7 (21164PC)")
3467b5fefc8Smrg		UNAME_MACHINE=alphapca57 ;;
3472227fc13Smrg	    "EV6 (21264)")
3487b5fefc8Smrg		UNAME_MACHINE=alphaev6 ;;
3492227fc13Smrg	    "EV6.7 (21264A)")
3507b5fefc8Smrg		UNAME_MACHINE=alphaev67 ;;
3512227fc13Smrg	    "EV6.8CB (21264C)")
3527b5fefc8Smrg		UNAME_MACHINE=alphaev68 ;;
3532227fc13Smrg	    "EV6.8AL (21264B)")
3547b5fefc8Smrg		UNAME_MACHINE=alphaev68 ;;
3552227fc13Smrg	    "EV6.8CX (21264D)")
3567b5fefc8Smrg		UNAME_MACHINE=alphaev68 ;;
3572227fc13Smrg	    "EV6.9A (21264/EV69A)")
3587b5fefc8Smrg		UNAME_MACHINE=alphaev69 ;;
3592227fc13Smrg	    "EV7 (21364)")
3607b5fefc8Smrg		UNAME_MACHINE=alphaev7 ;;
3612227fc13Smrg	    "EV7.9 (21364A)")
3627b5fefc8Smrg		UNAME_MACHINE=alphaev79 ;;
3632227fc13Smrg	esac
3642227fc13Smrg	# A Pn.n version is a patched version.
3652227fc13Smrg	# A Vn.n version is a released version.
3662227fc13Smrg	# A Tn.n version is a released field test version.
3672227fc13Smrg	# A Xn.n version is an unreleased experimental baselevel.
3682227fc13Smrg	# 1.2 uses "1.2" for uname -r.
3697b5fefc8Smrg	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
3707b5fefc8Smrg	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
3717b5fefc8Smrg	;;
3722227fc13Smrg    Amiga*:UNIX_System_V:4.0:*)
3737b5fefc8Smrg	GUESS=m68k-unknown-sysv4
3747b5fefc8Smrg	;;
3752227fc13Smrg    *:[Aa]miga[Oo][Ss]:*:*)
3767b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-amigaos
3777b5fefc8Smrg	;;
3782227fc13Smrg    *:[Mm]orph[Oo][Ss]:*:*)
3797b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-morphos
3807b5fefc8Smrg	;;
3812227fc13Smrg    *:OS/390:*:*)
3827b5fefc8Smrg	GUESS=i370-ibm-openedition
3837b5fefc8Smrg	;;
3842227fc13Smrg    *:z/VM:*:*)
3857b5fefc8Smrg	GUESS=s390-ibm-zvmoe
3867b5fefc8Smrg	;;
3872227fc13Smrg    *:OS400:*:*)
3887b5fefc8Smrg	GUESS=powerpc-ibm-os400
3897b5fefc8Smrg	;;
3902227fc13Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
3917b5fefc8Smrg	GUESS=arm-acorn-riscix$UNAME_RELEASE
3927b5fefc8Smrg	;;
3937b5fefc8Smrg    arm*:riscos:*:*|arm*:RISCOS:*:*)
3947b5fefc8Smrg	GUESS=arm-unknown-riscos
3957b5fefc8Smrg	;;
3962227fc13Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
3977b5fefc8Smrg	GUESS=hppa1.1-hitachi-hiuxmpp
3987b5fefc8Smrg	;;
3992227fc13Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
4002227fc13Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
4017b5fefc8Smrg	case `(/bin/universe) 2>/dev/null` in
4027b5fefc8Smrg	    att) GUESS=pyramid-pyramid-sysv3 ;;
4037b5fefc8Smrg	    *)   GUESS=pyramid-pyramid-bsd   ;;
4047b5fefc8Smrg	esac
4057b5fefc8Smrg	;;
4062227fc13Smrg    NILE*:*:*:dcosx)
4077b5fefc8Smrg	GUESS=pyramid-pyramid-svr4
4087b5fefc8Smrg	;;
4092227fc13Smrg    DRS?6000:unix:4.0:6*)
4107b5fefc8Smrg	GUESS=sparc-icl-nx6
4117b5fefc8Smrg	;;
4122227fc13Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
4132227fc13Smrg	case `/usr/bin/uname -p` in
4147b5fefc8Smrg	    sparc) GUESS=sparc-icl-nx7 ;;
4157b5fefc8Smrg	esac
4167b5fefc8Smrg	;;
4172227fc13Smrg    s390x:SunOS:*:*)
4187b5fefc8Smrg	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
4197b5fefc8Smrg	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
4207b5fefc8Smrg	;;
4212227fc13Smrg    sun4H:SunOS:5.*:*)
4227b5fefc8Smrg	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
4237b5fefc8Smrg	GUESS=sparc-hal-solaris2$SUN_REL
4247b5fefc8Smrg	;;
4252227fc13Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
4267b5fefc8Smrg	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
4277b5fefc8Smrg	GUESS=sparc-sun-solaris2$SUN_REL
4287b5fefc8Smrg	;;
4292227fc13Smrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
4307b5fefc8Smrg	GUESS=i386-pc-auroraux$UNAME_RELEASE
4317b5fefc8Smrg	;;
4322227fc13Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
4337b5fefc8Smrg	set_cc_for_build
4347b5fefc8Smrg	SUN_ARCH=i386
4352227fc13Smrg	# If there is a compiler, see if it is configured for 64-bit objects.
4362227fc13Smrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
4372227fc13Smrg	# This test works for both compilers.
4387b5fefc8Smrg	if test "$CC_FOR_BUILD" != no_compiler_found; then
4392227fc13Smrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
4407b5fefc8Smrg		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
4412227fc13Smrg		grep IS_64BIT_ARCH >/dev/null
4422227fc13Smrg	    then
4437b5fefc8Smrg		SUN_ARCH=x86_64
4442227fc13Smrg	    fi
4452227fc13Smrg	fi
4467b5fefc8Smrg	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
4477b5fefc8Smrg	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
4487b5fefc8Smrg	;;
4492227fc13Smrg    sun4*:SunOS:6*:*)
4502227fc13Smrg	# According to config.sub, this is the proper way to canonicalize
4512227fc13Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
4522227fc13Smrg	# it's likely to be more like Solaris than SunOS4.
4537b5fefc8Smrg	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
4547b5fefc8Smrg	GUESS=sparc-sun-solaris3$SUN_REL
4557b5fefc8Smrg	;;
4562227fc13Smrg    sun4*:SunOS:*:*)
4577b5fefc8Smrg	case `/usr/bin/arch -k` in
4582227fc13Smrg	    Series*|S4*)
4592227fc13Smrg		UNAME_RELEASE=`uname -v`
4602227fc13Smrg		;;
4612227fc13Smrg	esac
4622227fc13Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
4637b5fefc8Smrg	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
4647b5fefc8Smrg	GUESS=sparc-sun-sunos$SUN_REL
4657b5fefc8Smrg	;;
4662227fc13Smrg    sun3*:SunOS:*:*)
4677b5fefc8Smrg	GUESS=m68k-sun-sunos$UNAME_RELEASE
4687b5fefc8Smrg	;;
4692227fc13Smrg    sun*:*:4.2BSD:*)
4702227fc13Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
4717b5fefc8Smrg	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
4727b5fefc8Smrg	case `/bin/arch` in
4732227fc13Smrg	    sun3)
4747b5fefc8Smrg		GUESS=m68k-sun-sunos$UNAME_RELEASE
4752227fc13Smrg		;;
4762227fc13Smrg	    sun4)
4777b5fefc8Smrg		GUESS=sparc-sun-sunos$UNAME_RELEASE
4782227fc13Smrg		;;
4792227fc13Smrg	esac
4807b5fefc8Smrg	;;
4812227fc13Smrg    aushp:SunOS:*:*)
4827b5fefc8Smrg	GUESS=sparc-auspex-sunos$UNAME_RELEASE
4837b5fefc8Smrg	;;
4842227fc13Smrg    # The situation for MiNT is a little confusing.  The machine name
4852227fc13Smrg    # can be virtually everything (everything which is not
4862227fc13Smrg    # "atarist" or "atariste" at least should have a processor
4872227fc13Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
4882227fc13Smrg    # to the lowercase version "mint" (or "freemint").  Finally
4892227fc13Smrg    # the system name "TOS" denotes a system which is actually not
4902227fc13Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
4912227fc13Smrg    # be no problem.
4922227fc13Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
4937b5fefc8Smrg	GUESS=m68k-atari-mint$UNAME_RELEASE
4947b5fefc8Smrg	;;
4952227fc13Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
4967b5fefc8Smrg	GUESS=m68k-atari-mint$UNAME_RELEASE
4977b5fefc8Smrg	;;
4982227fc13Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
4997b5fefc8Smrg	GUESS=m68k-atari-mint$UNAME_RELEASE
5007b5fefc8Smrg	;;
5012227fc13Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
5027b5fefc8Smrg	GUESS=m68k-milan-mint$UNAME_RELEASE
5037b5fefc8Smrg	;;
5042227fc13Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
5057b5fefc8Smrg	GUESS=m68k-hades-mint$UNAME_RELEASE
5067b5fefc8Smrg	;;
5072227fc13Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
5087b5fefc8Smrg	GUESS=m68k-unknown-mint$UNAME_RELEASE
5097b5fefc8Smrg	;;
5102227fc13Smrg    m68k:machten:*:*)
5117b5fefc8Smrg	GUESS=m68k-apple-machten$UNAME_RELEASE
5127b5fefc8Smrg	;;
5132227fc13Smrg    powerpc:machten:*:*)
5147b5fefc8Smrg	GUESS=powerpc-apple-machten$UNAME_RELEASE
5157b5fefc8Smrg	;;
5162227fc13Smrg    RISC*:Mach:*:*)
5177b5fefc8Smrg	GUESS=mips-dec-mach_bsd4.3
5187b5fefc8Smrg	;;
5192227fc13Smrg    RISC*:ULTRIX:*:*)
5207b5fefc8Smrg	GUESS=mips-dec-ultrix$UNAME_RELEASE
5217b5fefc8Smrg	;;
5222227fc13Smrg    VAX*:ULTRIX*:*:*)
5237b5fefc8Smrg	GUESS=vax-dec-ultrix$UNAME_RELEASE
5247b5fefc8Smrg	;;
5252227fc13Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
5267b5fefc8Smrg	GUESS=clipper-intergraph-clix$UNAME_RELEASE
5277b5fefc8Smrg	;;
5282227fc13Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
5297b5fefc8Smrg	set_cc_for_build
5307b5fefc8Smrg	sed 's/^	//' << EOF > "$dummy.c"
5312227fc13Smrg#ifdef __cplusplus
5322227fc13Smrg#include <stdio.h>  /* for printf() prototype */
5332227fc13Smrg	int main (int argc, char *argv[]) {
5342227fc13Smrg#else
5352227fc13Smrg	int main (argc, argv) int argc; char *argv[]; {
5362227fc13Smrg#endif
5372227fc13Smrg	#if defined (host_mips) && defined (MIPSEB)
5382227fc13Smrg	#if defined (SYSTYPE_SYSV)
5397b5fefc8Smrg	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
5402227fc13Smrg	#endif
5412227fc13Smrg	#if defined (SYSTYPE_SVR4)
5427b5fefc8Smrg	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
5432227fc13Smrg	#endif
5442227fc13Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
5457b5fefc8Smrg	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
5462227fc13Smrg	#endif
5472227fc13Smrg	#endif
5482227fc13Smrg	  exit (-1);
5492227fc13Smrg	}
5502227fc13SmrgEOF
5517b5fefc8Smrg	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
5527b5fefc8Smrg	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
5537b5fefc8Smrg	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
5542227fc13Smrg	    { echo "$SYSTEM_NAME"; exit; }
5557b5fefc8Smrg	GUESS=mips-mips-riscos$UNAME_RELEASE
5567b5fefc8Smrg	;;
5572227fc13Smrg    Motorola:PowerMAX_OS:*:*)
5587b5fefc8Smrg	GUESS=powerpc-motorola-powermax
5597b5fefc8Smrg	;;
5602227fc13Smrg    Motorola:*:4.3:PL8-*)
5617b5fefc8Smrg	GUESS=powerpc-harris-powermax
5627b5fefc8Smrg	;;
5632227fc13Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
5647b5fefc8Smrg	GUESS=powerpc-harris-powermax
5657b5fefc8Smrg	;;
5662227fc13Smrg    Night_Hawk:Power_UNIX:*:*)
5677b5fefc8Smrg	GUESS=powerpc-harris-powerunix
5687b5fefc8Smrg	;;
5692227fc13Smrg    m88k:CX/UX:7*:*)
5707b5fefc8Smrg	GUESS=m88k-harris-cxux7
5717b5fefc8Smrg	;;
5722227fc13Smrg    m88k:*:4*:R4*)
5737b5fefc8Smrg	GUESS=m88k-motorola-sysv4
5747b5fefc8Smrg	;;
5752227fc13Smrg    m88k:*:3*:R3*)
5767b5fefc8Smrg	GUESS=m88k-motorola-sysv3
5777b5fefc8Smrg	;;
5782227fc13Smrg    AViiON:dgux:*:*)
5797b5fefc8Smrg	# DG/UX returns AViiON for all architectures
5807b5fefc8Smrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
5817b5fefc8Smrg	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
5822227fc13Smrg	then
5837b5fefc8Smrg	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
5847b5fefc8Smrg	       test "$TARGET_BINARY_INTERFACE"x = x
5852227fc13Smrg	    then
5867b5fefc8Smrg		GUESS=m88k-dg-dgux$UNAME_RELEASE
5872227fc13Smrg	    else
5887b5fefc8Smrg		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
5892227fc13Smrg	    fi
5902227fc13Smrg	else
5917b5fefc8Smrg	    GUESS=i586-dg-dgux$UNAME_RELEASE
5922227fc13Smrg	fi
5937b5fefc8Smrg	;;
5942227fc13Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
5957b5fefc8Smrg	GUESS=m88k-dolphin-sysv3
5967b5fefc8Smrg	;;
5972227fc13Smrg    M88*:*:R3*:*)
5982227fc13Smrg	# Delta 88k system running SVR3
5997b5fefc8Smrg	GUESS=m88k-motorola-sysv3
6007b5fefc8Smrg	;;
6012227fc13Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
6027b5fefc8Smrg	GUESS=m88k-tektronix-sysv3
6037b5fefc8Smrg	;;
6042227fc13Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
6057b5fefc8Smrg	GUESS=m68k-tektronix-bsd
6067b5fefc8Smrg	;;
6072227fc13Smrg    *:IRIX*:*:*)
6087b5fefc8Smrg	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
6097b5fefc8Smrg	GUESS=mips-sgi-irix$IRIX_REL
6107b5fefc8Smrg	;;
6112227fc13Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
6127b5fefc8Smrg	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
6137b5fefc8Smrg	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
6142227fc13Smrg    i*86:AIX:*:*)
6157b5fefc8Smrg	GUESS=i386-ibm-aix
6167b5fefc8Smrg	;;
6172227fc13Smrg    ia64:AIX:*:*)
6187b5fefc8Smrg	if test -x /usr/bin/oslevel ; then
6192227fc13Smrg		IBM_REV=`/usr/bin/oslevel`
6202227fc13Smrg	else
6217b5fefc8Smrg		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
6222227fc13Smrg	fi
6237b5fefc8Smrg	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
6247b5fefc8Smrg	;;
6252227fc13Smrg    *:AIX:2:3)
6262227fc13Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
6277b5fefc8Smrg		set_cc_for_build
6287b5fefc8Smrg		sed 's/^		//' << EOF > "$dummy.c"
6292227fc13Smrg		#include <sys/systemcfg.h>
6302227fc13Smrg
6312227fc13Smrg		main()
6322227fc13Smrg			{
6332227fc13Smrg			if (!__power_pc())
6342227fc13Smrg				exit(1);
6352227fc13Smrg			puts("powerpc-ibm-aix3.2.5");
6362227fc13Smrg			exit(0);
6372227fc13Smrg			}
6382227fc13SmrgEOF
6397b5fefc8Smrg		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
6402227fc13Smrg		then
6417b5fefc8Smrg			GUESS=$SYSTEM_NAME
6422227fc13Smrg		else
6437b5fefc8Smrg			GUESS=rs6000-ibm-aix3.2.5
6442227fc13Smrg		fi
6452227fc13Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
6467b5fefc8Smrg		GUESS=rs6000-ibm-aix3.2.4
6472227fc13Smrg	else
6487b5fefc8Smrg		GUESS=rs6000-ibm-aix3.2
6492227fc13Smrg	fi
6507b5fefc8Smrg	;;
6512227fc13Smrg    *:AIX:*:[4567])
6522227fc13Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
6537b5fefc8Smrg	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
6542227fc13Smrg		IBM_ARCH=rs6000
6552227fc13Smrg	else
6562227fc13Smrg		IBM_ARCH=powerpc
6572227fc13Smrg	fi
6587b5fefc8Smrg	if test -x /usr/bin/lslpp ; then
6597b5fefc8Smrg		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
6607b5fefc8Smrg			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
6612227fc13Smrg	else
6627b5fefc8Smrg		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
6632227fc13Smrg	fi
6647b5fefc8Smrg	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
6657b5fefc8Smrg	;;
6662227fc13Smrg    *:AIX:*:*)
6677b5fefc8Smrg	GUESS=rs6000-ibm-aix
6687b5fefc8Smrg	;;
6697b5fefc8Smrg    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
6707b5fefc8Smrg	GUESS=romp-ibm-bsd4.4
6717b5fefc8Smrg	;;
6722227fc13Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
6737b5fefc8Smrg	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
6747b5fefc8Smrg	;;                                  # report: romp-ibm BSD 4.3
6752227fc13Smrg    *:BOSX:*:*)
6767b5fefc8Smrg	GUESS=rs6000-bull-bosx
6777b5fefc8Smrg	;;
6782227fc13Smrg    DPX/2?00:B.O.S.:*:*)
6797b5fefc8Smrg	GUESS=m68k-bull-sysv3
6807b5fefc8Smrg	;;
6812227fc13Smrg    9000/[34]??:4.3bsd:1.*:*)
6827b5fefc8Smrg	GUESS=m68k-hp-bsd
6837b5fefc8Smrg	;;
6842227fc13Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
6857b5fefc8Smrg	GUESS=m68k-hp-bsd4.4
6867b5fefc8Smrg	;;
6872227fc13Smrg    9000/[34678]??:HP-UX:*:*)
6887b5fefc8Smrg	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
6897b5fefc8Smrg	case $UNAME_MACHINE in
6907b5fefc8Smrg	    9000/31?)            HP_ARCH=m68000 ;;
6917b5fefc8Smrg	    9000/[34]??)         HP_ARCH=m68k ;;
6922227fc13Smrg	    9000/[678][0-9][0-9])
6937b5fefc8Smrg		if test -x /usr/bin/getconf; then
6942227fc13Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
6957b5fefc8Smrg		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
6967b5fefc8Smrg		    case $sc_cpu_version in
6977b5fefc8Smrg		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
6987b5fefc8Smrg		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
6997b5fefc8Smrg		      532)                      # CPU_PA_RISC2_0
7007b5fefc8Smrg			case $sc_kernel_bits in
7017b5fefc8Smrg			  32) HP_ARCH=hppa2.0n ;;
7027b5fefc8Smrg			  64) HP_ARCH=hppa2.0w ;;
7037b5fefc8Smrg			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
7047b5fefc8Smrg			esac ;;
7057b5fefc8Smrg		    esac
7062227fc13Smrg		fi
7077b5fefc8Smrg		if test "$HP_ARCH" = ""; then
7087b5fefc8Smrg		    set_cc_for_build
7097b5fefc8Smrg		    sed 's/^		//' << EOF > "$dummy.c"
7107b5fefc8Smrg
7117b5fefc8Smrg		#define _HPUX_SOURCE
7127b5fefc8Smrg		#include <stdlib.h>
7137b5fefc8Smrg		#include <unistd.h>
7147b5fefc8Smrg
7157b5fefc8Smrg		int main ()
7167b5fefc8Smrg		{
7177b5fefc8Smrg		#if defined(_SC_KERNEL_BITS)
7187b5fefc8Smrg		    long bits = sysconf(_SC_KERNEL_BITS);
7197b5fefc8Smrg		#endif
7207b5fefc8Smrg		    long cpu  = sysconf (_SC_CPU_VERSION);
7217b5fefc8Smrg
7227b5fefc8Smrg		    switch (cpu)
7237b5fefc8Smrg			{
7247b5fefc8Smrg			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
7257b5fefc8Smrg			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
7267b5fefc8Smrg			case CPU_PA_RISC2_0:
7277b5fefc8Smrg		#if defined(_SC_KERNEL_BITS)
7287b5fefc8Smrg			    switch (bits)
7297b5fefc8Smrg				{
7307b5fefc8Smrg				case 64: puts ("hppa2.0w"); break;
7317b5fefc8Smrg				case 32: puts ("hppa2.0n"); break;
7327b5fefc8Smrg				default: puts ("hppa2.0"); break;
7337b5fefc8Smrg				} break;
7347b5fefc8Smrg		#else  /* !defined(_SC_KERNEL_BITS) */
7357b5fefc8Smrg			    puts ("hppa2.0"); break;
7367b5fefc8Smrg		#endif
7377b5fefc8Smrg			default: puts ("hppa1.0"); break;
7387b5fefc8Smrg			}
7397b5fefc8Smrg		    exit (0);
7407b5fefc8Smrg		}
7412227fc13SmrgEOF
7427b5fefc8Smrg		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
7432227fc13Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
7442227fc13Smrg		fi ;;
7452227fc13Smrg	esac
7467b5fefc8Smrg	if test "$HP_ARCH" = hppa2.0w
7472227fc13Smrg	then
7487b5fefc8Smrg	    set_cc_for_build
7492227fc13Smrg
7502227fc13Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
7512227fc13Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
7522227fc13Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
7532227fc13Smrg	    #
7542227fc13Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
7552227fc13Smrg	    # => hppa2.0w-hp-hpux11.23
7562227fc13Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
7572227fc13Smrg	    # => hppa64-hp-hpux11.23
7582227fc13Smrg
7597b5fefc8Smrg	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
7602227fc13Smrg		grep -q __LP64__
7612227fc13Smrg	    then
7627b5fefc8Smrg		HP_ARCH=hppa2.0w
7632227fc13Smrg	    else
7647b5fefc8Smrg		HP_ARCH=hppa64
7652227fc13Smrg	    fi
7662227fc13Smrg	fi
7677b5fefc8Smrg	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
7687b5fefc8Smrg	;;
7692227fc13Smrg    ia64:HP-UX:*:*)
7707b5fefc8Smrg	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
7717b5fefc8Smrg	GUESS=ia64-hp-hpux$HPUX_REV
7727b5fefc8Smrg	;;
7732227fc13Smrg    3050*:HI-UX:*:*)
7747b5fefc8Smrg	set_cc_for_build
7757b5fefc8Smrg	sed 's/^	//' << EOF > "$dummy.c"
7762227fc13Smrg	#include <unistd.h>
7772227fc13Smrg	int
7782227fc13Smrg	main ()
7792227fc13Smrg	{
7802227fc13Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
7812227fc13Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
7822227fc13Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
7832227fc13Smrg	     results, however.  */
7842227fc13Smrg	  if (CPU_IS_PA_RISC (cpu))
7852227fc13Smrg	    {
7862227fc13Smrg	      switch (cpu)
7872227fc13Smrg		{
7882227fc13Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
7892227fc13Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
7902227fc13Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
7912227fc13Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
7922227fc13Smrg		}
7932227fc13Smrg	    }
7942227fc13Smrg	  else if (CPU_IS_HP_MC68K (cpu))
7952227fc13Smrg	    puts ("m68k-hitachi-hiuxwe2");
7962227fc13Smrg	  else puts ("unknown-hitachi-hiuxwe2");
7972227fc13Smrg	  exit (0);
7982227fc13Smrg	}
7992227fc13SmrgEOF
8007b5fefc8Smrg	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
8012227fc13Smrg		{ echo "$SYSTEM_NAME"; exit; }
8027b5fefc8Smrg	GUESS=unknown-hitachi-hiuxwe2
8037b5fefc8Smrg	;;
8047b5fefc8Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
8057b5fefc8Smrg	GUESS=hppa1.1-hp-bsd
8067b5fefc8Smrg	;;
8072227fc13Smrg    9000/8??:4.3bsd:*:*)
8087b5fefc8Smrg	GUESS=hppa1.0-hp-bsd
8097b5fefc8Smrg	;;
8102227fc13Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
8117b5fefc8Smrg	GUESS=hppa1.0-hp-mpeix
8127b5fefc8Smrg	;;
8137b5fefc8Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
8147b5fefc8Smrg	GUESS=hppa1.1-hp-osf
8157b5fefc8Smrg	;;
8162227fc13Smrg    hp8??:OSF1:*:*)
8177b5fefc8Smrg	GUESS=hppa1.0-hp-osf
8187b5fefc8Smrg	;;
8192227fc13Smrg    i*86:OSF1:*:*)
8207b5fefc8Smrg	if test -x /usr/sbin/sysversion ; then
8217b5fefc8Smrg	    GUESS=$UNAME_MACHINE-unknown-osf1mk
8222227fc13Smrg	else
8237b5fefc8Smrg	    GUESS=$UNAME_MACHINE-unknown-osf1
8242227fc13Smrg	fi
8257b5fefc8Smrg	;;
8262227fc13Smrg    parisc*:Lites*:*:*)
8277b5fefc8Smrg	GUESS=hppa1.1-hp-lites
8287b5fefc8Smrg	;;
8292227fc13Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
8307b5fefc8Smrg	GUESS=c1-convex-bsd
8317b5fefc8Smrg	;;
8322227fc13Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
8332227fc13Smrg	if getsysinfo -f scalar_acc
8342227fc13Smrg	then echo c32-convex-bsd
8352227fc13Smrg	else echo c2-convex-bsd
8362227fc13Smrg	fi
8377b5fefc8Smrg	exit ;;
8382227fc13Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
8397b5fefc8Smrg	GUESS=c34-convex-bsd
8407b5fefc8Smrg	;;
8412227fc13Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
8427b5fefc8Smrg	GUESS=c38-convex-bsd
8437b5fefc8Smrg	;;
8442227fc13Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
8457b5fefc8Smrg	GUESS=c4-convex-bsd
8467b5fefc8Smrg	;;
8472227fc13Smrg    CRAY*Y-MP:*:*:*)
8487b5fefc8Smrg	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
8497b5fefc8Smrg	GUESS=ymp-cray-unicos$CRAY_REL
8507b5fefc8Smrg	;;
8512227fc13Smrg    CRAY*[A-Z]90:*:*:*)
8527b5fefc8Smrg	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
8532227fc13Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
8542227fc13Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
8552227fc13Smrg	      -e 's/\.[^.]*$/.X/'
8562227fc13Smrg	exit ;;
8572227fc13Smrg    CRAY*TS:*:*:*)
8587b5fefc8Smrg	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
8597b5fefc8Smrg	GUESS=t90-cray-unicos$CRAY_REL
8607b5fefc8Smrg	;;
8612227fc13Smrg    CRAY*T3E:*:*:*)
8627b5fefc8Smrg	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
8637b5fefc8Smrg	GUESS=alphaev5-cray-unicosmk$CRAY_REL
8647b5fefc8Smrg	;;
8652227fc13Smrg    CRAY*SV1:*:*:*)
8667b5fefc8Smrg	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
8677b5fefc8Smrg	GUESS=sv1-cray-unicos$CRAY_REL
8687b5fefc8Smrg	;;
8692227fc13Smrg    *:UNICOS/mp:*:*)
8707b5fefc8Smrg	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
8717b5fefc8Smrg	GUESS=craynv-cray-unicosmp$CRAY_REL
8727b5fefc8Smrg	;;
8732227fc13Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
8747b5fefc8Smrg	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
8757b5fefc8Smrg	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
8767b5fefc8Smrg	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
8777b5fefc8Smrg	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
8787b5fefc8Smrg	;;
8792227fc13Smrg    5000:UNIX_System_V:4.*:*)
8807b5fefc8Smrg	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
8817b5fefc8Smrg	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
8827b5fefc8Smrg	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
8837b5fefc8Smrg	;;
8842227fc13Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
8857b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
8867b5fefc8Smrg	;;
8872227fc13Smrg    sparc*:BSD/OS:*:*)
8887b5fefc8Smrg	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
8897b5fefc8Smrg	;;
8902227fc13Smrg    *:BSD/OS:*:*)
8917b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
8927b5fefc8Smrg	;;
8937b5fefc8Smrg    arm:FreeBSD:*:*)
8947b5fefc8Smrg	UNAME_PROCESSOR=`uname -p`
8957b5fefc8Smrg	set_cc_for_build
8967b5fefc8Smrg	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
8977b5fefc8Smrg	    | grep -q __ARM_PCS_VFP
8987b5fefc8Smrg	then
8997b5fefc8Smrg	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
9007b5fefc8Smrg	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
9017b5fefc8Smrg	else
9027b5fefc8Smrg	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
9037b5fefc8Smrg	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
9047b5fefc8Smrg	fi
9057b5fefc8Smrg	;;
9062227fc13Smrg    *:FreeBSD:*:*)
9077b5fefc8Smrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
9087b5fefc8Smrg	case $UNAME_PROCESSOR in
9092227fc13Smrg	    amd64)
9107b5fefc8Smrg		UNAME_PROCESSOR=x86_64 ;;
9117b5fefc8Smrg	    i386)
9127b5fefc8Smrg		UNAME_PROCESSOR=i586 ;;
9132227fc13Smrg	esac
9147b5fefc8Smrg	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
9157b5fefc8Smrg	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
9167b5fefc8Smrg	;;
9172227fc13Smrg    i*:CYGWIN*:*)
9187b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-cygwin
9197b5fefc8Smrg	;;
9207b5fefc8Smrg    *:MINGW64*:*)
9217b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-mingw64
9227b5fefc8Smrg	;;
9232227fc13Smrg    *:MINGW*:*)
9247b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-mingw32
9257b5fefc8Smrg	;;
9267b5fefc8Smrg    *:MSYS*:*)
9277b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-msys
9287b5fefc8Smrg	;;
9292227fc13Smrg    i*:PW*:*)
9307b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-pw32
9317b5fefc8Smrg	;;
9327b5fefc8Smrg    *:SerenityOS:*:*)
9337b5fefc8Smrg        GUESS=$UNAME_MACHINE-pc-serenity
9347b5fefc8Smrg        ;;
9352227fc13Smrg    *:Interix*:*)
9367b5fefc8Smrg	case $UNAME_MACHINE in
9372227fc13Smrg	    x86)
9387b5fefc8Smrg		GUESS=i586-pc-interix$UNAME_RELEASE
9397b5fefc8Smrg		;;
9402227fc13Smrg	    authenticamd | genuineintel | EM64T)
9417b5fefc8Smrg		GUESS=x86_64-unknown-interix$UNAME_RELEASE
9427b5fefc8Smrg		;;
9432227fc13Smrg	    IA64)
9447b5fefc8Smrg		GUESS=ia64-unknown-interix$UNAME_RELEASE
9457b5fefc8Smrg		;;
9462227fc13Smrg	esac ;;
9472227fc13Smrg    i*:UWIN*:*)
9487b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-uwin
9497b5fefc8Smrg	;;
9502227fc13Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
9517b5fefc8Smrg	GUESS=x86_64-pc-cygwin
9527b5fefc8Smrg	;;
9532227fc13Smrg    prep*:SunOS:5.*:*)
9547b5fefc8Smrg	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
9557b5fefc8Smrg	GUESS=powerpcle-unknown-solaris2$SUN_REL
9567b5fefc8Smrg	;;
9572227fc13Smrg    *:GNU:*:*)
9582227fc13Smrg	# the GNU system
9597b5fefc8Smrg	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
9607b5fefc8Smrg	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
9617b5fefc8Smrg	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
9627b5fefc8Smrg	;;
9632227fc13Smrg    *:GNU/*:*:*)
9642227fc13Smrg	# other systems with GNU libc and userland
9657b5fefc8Smrg	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
9667b5fefc8Smrg	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
9677b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
9687b5fefc8Smrg	;;
9697b5fefc8Smrg    x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
9707b5fefc8Smrg	GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
9717b5fefc8Smrg	;;
9727b5fefc8Smrg    *:[Mm]anagarm:*:*)
9737b5fefc8Smrg	GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
9747b5fefc8Smrg	;;
9757b5fefc8Smrg    *:Minix:*:*)
9767b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-minix
9777b5fefc8Smrg	;;
9787b5fefc8Smrg    aarch64:Linux:*:*)
9797b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
9807b5fefc8Smrg	;;
9817b5fefc8Smrg    aarch64_be:Linux:*:*)
9827b5fefc8Smrg	UNAME_MACHINE=aarch64_be
9837b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
9847b5fefc8Smrg	;;
9857b5fefc8Smrg    alpha:Linux:*:*)
9867b5fefc8Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
9877b5fefc8Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
9882227fc13Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
9892227fc13Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
9902227fc13Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
9912227fc13Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
9922227fc13Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
9932227fc13Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
9947b5fefc8Smrg	esac
9952227fc13Smrg	objdump --private-headers /bin/sh | grep -q ld.so.1
9967b5fefc8Smrg	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
9977b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
9987b5fefc8Smrg	;;
9997b5fefc8Smrg    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
10007b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10017b5fefc8Smrg	;;
10022227fc13Smrg    arm*:Linux:*:*)
10037b5fefc8Smrg	set_cc_for_build
10042227fc13Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
10052227fc13Smrg	    | grep -q __ARM_EABI__
10062227fc13Smrg	then
10077b5fefc8Smrg	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10082227fc13Smrg	else
10097b5fefc8Smrg	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
10107b5fefc8Smrg		| grep -q __ARM_PCS_VFP
10117b5fefc8Smrg	    then
10127b5fefc8Smrg		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
10137b5fefc8Smrg	    else
10147b5fefc8Smrg		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
10157b5fefc8Smrg	    fi
10162227fc13Smrg	fi
10177b5fefc8Smrg	;;
10182227fc13Smrg    avr32*:Linux:*:*)
10197b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10207b5fefc8Smrg	;;
10212227fc13Smrg    cris:Linux:*:*)
10227b5fefc8Smrg	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
10237b5fefc8Smrg	;;
10242227fc13Smrg    crisv32:Linux:*:*)
10257b5fefc8Smrg	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
10267b5fefc8Smrg	;;
10277b5fefc8Smrg    e2k:Linux:*:*)
10287b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10297b5fefc8Smrg	;;
10302227fc13Smrg    frv:Linux:*:*)
10317b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10327b5fefc8Smrg	;;
10337b5fefc8Smrg    hexagon:Linux:*:*)
10347b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10357b5fefc8Smrg	;;
10362227fc13Smrg    i*86:Linux:*:*)
10377b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
10387b5fefc8Smrg	;;
10392227fc13Smrg    ia64:Linux:*:*)
10407b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10417b5fefc8Smrg	;;
10427b5fefc8Smrg    k1om:Linux:*:*)
10437b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10447b5fefc8Smrg	;;
10457b5fefc8Smrg    loongarch32:Linux:*:* | loongarch64:Linux:*:*)
10467b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10477b5fefc8Smrg	;;
10482227fc13Smrg    m32r*:Linux:*:*)
10497b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10507b5fefc8Smrg	;;
10512227fc13Smrg    m68*:Linux:*:*)
10527b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
10537b5fefc8Smrg	;;
10542227fc13Smrg    mips:Linux:*:* | mips64:Linux:*:*)
10557b5fefc8Smrg	set_cc_for_build
10567b5fefc8Smrg	IS_GLIBC=0
10577b5fefc8Smrg	test x"${LIBC}" = xgnu && IS_GLIBC=1
10587b5fefc8Smrg	sed 's/^	//' << EOF > "$dummy.c"
10592227fc13Smrg	#undef CPU
10607b5fefc8Smrg	#undef mips
10617b5fefc8Smrg	#undef mipsel
10627b5fefc8Smrg	#undef mips64
10637b5fefc8Smrg	#undef mips64el
10647b5fefc8Smrg	#if ${IS_GLIBC} && defined(_ABI64)
10657b5fefc8Smrg	LIBCABI=gnuabi64
10667b5fefc8Smrg	#else
10677b5fefc8Smrg	#if ${IS_GLIBC} && defined(_ABIN32)
10687b5fefc8Smrg	LIBCABI=gnuabin32
10697b5fefc8Smrg	#else
10707b5fefc8Smrg	LIBCABI=${LIBC}
10717b5fefc8Smrg	#endif
10727b5fefc8Smrg	#endif
10737b5fefc8Smrg
10747b5fefc8Smrg	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
10757b5fefc8Smrg	CPU=mipsisa64r6
10767b5fefc8Smrg	#else
10777b5fefc8Smrg	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
10787b5fefc8Smrg	CPU=mipsisa32r6
10797b5fefc8Smrg	#else
10807b5fefc8Smrg	#if defined(__mips64)
10817b5fefc8Smrg	CPU=mips64
10827b5fefc8Smrg	#else
10837b5fefc8Smrg	CPU=mips
10847b5fefc8Smrg	#endif
10857b5fefc8Smrg	#endif
10867b5fefc8Smrg	#endif
10877b5fefc8Smrg
10882227fc13Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
10897b5fefc8Smrg	MIPS_ENDIAN=el
10902227fc13Smrg	#else
10912227fc13Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
10927b5fefc8Smrg	MIPS_ENDIAN=
10932227fc13Smrg	#else
10947b5fefc8Smrg	MIPS_ENDIAN=
10952227fc13Smrg	#endif
10962227fc13Smrg	#endif
10972227fc13SmrgEOF
10987b5fefc8Smrg	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
10997b5fefc8Smrg	eval "$cc_set_vars"
11007b5fefc8Smrg	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
11017b5fefc8Smrg	;;
11027b5fefc8Smrg    mips64el:Linux:*:*)
11037b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11047b5fefc8Smrg	;;
11057b5fefc8Smrg    openrisc*:Linux:*:*)
11067b5fefc8Smrg	GUESS=or1k-unknown-linux-$LIBC
11077b5fefc8Smrg	;;
11087b5fefc8Smrg    or32:Linux:*:* | or1k*:Linux:*:*)
11097b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11102227fc13Smrg	;;
11112227fc13Smrg    padre:Linux:*:*)
11127b5fefc8Smrg	GUESS=sparc-unknown-linux-$LIBC
11137b5fefc8Smrg	;;
11142227fc13Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
11157b5fefc8Smrg	GUESS=hppa64-unknown-linux-$LIBC
11167b5fefc8Smrg	;;
11172227fc13Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
11182227fc13Smrg	# Look for CPU level
11192227fc13Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
11207b5fefc8Smrg	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
11217b5fefc8Smrg	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
11227b5fefc8Smrg	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
11232227fc13Smrg	esac
11247b5fefc8Smrg	;;
11252227fc13Smrg    ppc64:Linux:*:*)
11267b5fefc8Smrg	GUESS=powerpc64-unknown-linux-$LIBC
11277b5fefc8Smrg	;;
11282227fc13Smrg    ppc:Linux:*:*)
11297b5fefc8Smrg	GUESS=powerpc-unknown-linux-$LIBC
11307b5fefc8Smrg	;;
11317b5fefc8Smrg    ppc64le:Linux:*:*)
11327b5fefc8Smrg	GUESS=powerpc64le-unknown-linux-$LIBC
11337b5fefc8Smrg	;;
11347b5fefc8Smrg    ppcle:Linux:*:*)
11357b5fefc8Smrg	GUESS=powerpcle-unknown-linux-$LIBC
11367b5fefc8Smrg	;;
11377b5fefc8Smrg    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
11387b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11397b5fefc8Smrg	;;
11402227fc13Smrg    s390:Linux:*:* | s390x:Linux:*:*)
11417b5fefc8Smrg	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
11427b5fefc8Smrg	;;
11432227fc13Smrg    sh64*:Linux:*:*)
11447b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11457b5fefc8Smrg	;;
11462227fc13Smrg    sh*:Linux:*:*)
11477b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11487b5fefc8Smrg	;;
11492227fc13Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
11507b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11517b5fefc8Smrg	;;
11522227fc13Smrg    tile*:Linux:*:*)
11537b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11547b5fefc8Smrg	;;
11552227fc13Smrg    vax:Linux:*:*)
11567b5fefc8Smrg	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
11577b5fefc8Smrg	;;
11582227fc13Smrg    x86_64:Linux:*:*)
11597b5fefc8Smrg	set_cc_for_build
11607b5fefc8Smrg	CPU=$UNAME_MACHINE
11617b5fefc8Smrg	LIBCABI=$LIBC
11627b5fefc8Smrg	if test "$CC_FOR_BUILD" != no_compiler_found; then
11637b5fefc8Smrg	    ABI=64
11647b5fefc8Smrg	    sed 's/^	    //' << EOF > "$dummy.c"
11657b5fefc8Smrg	    #ifdef __i386__
11667b5fefc8Smrg	    ABI=x86
11677b5fefc8Smrg	    #else
11687b5fefc8Smrg	    #ifdef __ILP32__
11697b5fefc8Smrg	    ABI=x32
11707b5fefc8Smrg	    #endif
11717b5fefc8Smrg	    #endif
11727b5fefc8SmrgEOF
11737b5fefc8Smrg	    cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
11747b5fefc8Smrg	    eval "$cc_set_abi"
11757b5fefc8Smrg	    case $ABI in
11767b5fefc8Smrg		x86) CPU=i686 ;;
11777b5fefc8Smrg		x32) LIBCABI=${LIBC}x32 ;;
11787b5fefc8Smrg	    esac
11797b5fefc8Smrg	fi
11807b5fefc8Smrg	GUESS=$CPU-pc-linux-$LIBCABI
11817b5fefc8Smrg	;;
11822227fc13Smrg    xtensa*:Linux:*:*)
11837b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
11847b5fefc8Smrg	;;
11852227fc13Smrg    i*86:DYNIX/ptx:4*:*)
11862227fc13Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
11872227fc13Smrg	# earlier versions are messed up and put the nodename in both
11882227fc13Smrg	# sysname and nodename.
11897b5fefc8Smrg	GUESS=i386-sequent-sysv4
11907b5fefc8Smrg	;;
11912227fc13Smrg    i*86:UNIX_SV:4.2MP:2.*)
11927b5fefc8Smrg	# Unixware is an offshoot of SVR4, but it has its own version
11937b5fefc8Smrg	# number series starting with 2...
11947b5fefc8Smrg	# I am not positive that other SVR4 systems won't match this,
11952227fc13Smrg	# I just have to hope.  -- rms.
11967b5fefc8Smrg	# Use sysv4.2uw... so that sysv4* matches it.
11977b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
11987b5fefc8Smrg	;;
11992227fc13Smrg    i*86:OS/2:*:*)
12002227fc13Smrg	# If we were able to find `uname', then EMX Unix compatibility
12012227fc13Smrg	# is probably installed.
12027b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-os2-emx
12037b5fefc8Smrg	;;
12042227fc13Smrg    i*86:XTS-300:*:STOP)
12057b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-stop
12067b5fefc8Smrg	;;
12072227fc13Smrg    i*86:atheos:*:*)
12087b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-atheos
12097b5fefc8Smrg	;;
12102227fc13Smrg    i*86:syllable:*:*)
12117b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-syllable
12127b5fefc8Smrg	;;
12132227fc13Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
12147b5fefc8Smrg	GUESS=i386-unknown-lynxos$UNAME_RELEASE
12157b5fefc8Smrg	;;
12162227fc13Smrg    i*86:*DOS:*:*)
12177b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
12187b5fefc8Smrg	;;
12197b5fefc8Smrg    i*86:*:4.*:*)
12207b5fefc8Smrg	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
12212227fc13Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
12227b5fefc8Smrg		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
12232227fc13Smrg	else
12247b5fefc8Smrg		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
12252227fc13Smrg	fi
12267b5fefc8Smrg	;;
12272227fc13Smrg    i*86:*:5:[678]*)
12287b5fefc8Smrg	# UnixWare 7.x, OpenUNIX and OpenServer 6.
12292227fc13Smrg	case `/bin/uname -X | grep "^Machine"` in
12302227fc13Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
12312227fc13Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
12322227fc13Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
12332227fc13Smrg	esac
12347b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
12357b5fefc8Smrg	;;
12362227fc13Smrg    i*86:*:3.2:*)
12372227fc13Smrg	if test -f /usr/options/cb.name; then
12382227fc13Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
12397b5fefc8Smrg		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
12402227fc13Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
12412227fc13Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
12422227fc13Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
12432227fc13Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
12442227fc13Smrg			&& UNAME_MACHINE=i586
12452227fc13Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
12462227fc13Smrg			&& UNAME_MACHINE=i686
12472227fc13Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
12482227fc13Smrg			&& UNAME_MACHINE=i686
12497b5fefc8Smrg		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
12502227fc13Smrg	else
12517b5fefc8Smrg		GUESS=$UNAME_MACHINE-pc-sysv32
12522227fc13Smrg	fi
12537b5fefc8Smrg	;;
12542227fc13Smrg    pc:*:*:*)
12552227fc13Smrg	# Left here for compatibility:
12567b5fefc8Smrg	# uname -m prints for DJGPP always 'pc', but it prints nothing about
12577b5fefc8Smrg	# the processor, so we play safe by assuming i586.
12582227fc13Smrg	# Note: whatever this is, it MUST be the same as what config.sub
12597b5fefc8Smrg	# prints for the "djgpp" host, or else GDB configure will decide that
12602227fc13Smrg	# this is a cross-build.
12617b5fefc8Smrg	GUESS=i586-pc-msdosdjgpp
12627b5fefc8Smrg	;;
12632227fc13Smrg    Intel:Mach:3*:*)
12647b5fefc8Smrg	GUESS=i386-pc-mach3
12657b5fefc8Smrg	;;
12662227fc13Smrg    paragon:*:*:*)
12677b5fefc8Smrg	GUESS=i860-intel-osf1
12687b5fefc8Smrg	;;
12692227fc13Smrg    i860:*:4.*:*) # i860-SVR4
12702227fc13Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
12717b5fefc8Smrg	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
12722227fc13Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
12737b5fefc8Smrg	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
12742227fc13Smrg	fi
12757b5fefc8Smrg	;;
12762227fc13Smrg    mini*:CTIX:SYS*5:*)
12772227fc13Smrg	# "miniframe"
12787b5fefc8Smrg	GUESS=m68010-convergent-sysv
12797b5fefc8Smrg	;;
12802227fc13Smrg    mc68k:UNIX:SYSTEM5:3.51m)
12817b5fefc8Smrg	GUESS=m68k-convergent-sysv
12827b5fefc8Smrg	;;
12832227fc13Smrg    M680?0:D-NIX:5.3:*)
12847b5fefc8Smrg	GUESS=m68k-diab-dnix
12857b5fefc8Smrg	;;
12862227fc13Smrg    M68*:*:R3V[5678]*:*)
12872227fc13Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
12882227fc13Smrg    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)
12892227fc13Smrg	OS_REL=''
12902227fc13Smrg	test -r /etc/.relid \
12912227fc13Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
12922227fc13Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
12937b5fefc8Smrg	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
12942227fc13Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
12957b5fefc8Smrg	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
12962227fc13Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
12977b5fefc8Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
12987b5fefc8Smrg	  && { echo i486-ncr-sysv4; exit; } ;;
12992227fc13Smrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
13002227fc13Smrg	OS_REL='.3'
13012227fc13Smrg	test -r /etc/.relid \
13022227fc13Smrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
13032227fc13Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
13047b5fefc8Smrg	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
13052227fc13Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
13067b5fefc8Smrg	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
13072227fc13Smrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
13087b5fefc8Smrg	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
13092227fc13Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
13107b5fefc8Smrg	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
13117b5fefc8Smrg	;;
13122227fc13Smrg    mc68030:UNIX_System_V:4.*:*)
13137b5fefc8Smrg	GUESS=m68k-atari-sysv4
13147b5fefc8Smrg	;;
13152227fc13Smrg    TSUNAMI:LynxOS:2.*:*)
13167b5fefc8Smrg	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
13177b5fefc8Smrg	;;
13182227fc13Smrg    rs6000:LynxOS:2.*:*)
13197b5fefc8Smrg	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
13207b5fefc8Smrg	;;
13212227fc13Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
13227b5fefc8Smrg	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
13237b5fefc8Smrg	;;
13242227fc13Smrg    SM[BE]S:UNIX_SV:*:*)
13257b5fefc8Smrg	GUESS=mips-dde-sysv$UNAME_RELEASE
13267b5fefc8Smrg	;;
13272227fc13Smrg    RM*:ReliantUNIX-*:*:*)
13287b5fefc8Smrg	GUESS=mips-sni-sysv4
13297b5fefc8Smrg	;;
13302227fc13Smrg    RM*:SINIX-*:*:*)
13317b5fefc8Smrg	GUESS=mips-sni-sysv4
13327b5fefc8Smrg	;;
13332227fc13Smrg    *:SINIX-*:*:*)
13342227fc13Smrg	if uname -p 2>/dev/null >/dev/null ; then
13352227fc13Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
13367b5fefc8Smrg		GUESS=$UNAME_MACHINE-sni-sysv4
13372227fc13Smrg	else
13387b5fefc8Smrg		GUESS=ns32k-sni-sysv
13392227fc13Smrg	fi
13407b5fefc8Smrg	;;
13417b5fefc8Smrg    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
13427b5fefc8Smrg			# says <Richard.M.Bartel@ccMail.Census.GOV>
13437b5fefc8Smrg	GUESS=i586-unisys-sysv4
13447b5fefc8Smrg	;;
13452227fc13Smrg    *:UNIX_System_V:4*:FTX*)
13462227fc13Smrg	# From Gerald Hewes <hewes@openmarket.com>.
13472227fc13Smrg	# How about differentiating between stratus architectures? -djm
13487b5fefc8Smrg	GUESS=hppa1.1-stratus-sysv4
13497b5fefc8Smrg	;;
13502227fc13Smrg    *:*:*:FTX*)
13512227fc13Smrg	# From seanf@swdc.stratus.com.
13527b5fefc8Smrg	GUESS=i860-stratus-sysv4
13537b5fefc8Smrg	;;
13542227fc13Smrg    i*86:VOS:*:*)
13552227fc13Smrg	# From Paul.Green@stratus.com.
13567b5fefc8Smrg	GUESS=$UNAME_MACHINE-stratus-vos
13577b5fefc8Smrg	;;
13582227fc13Smrg    *:VOS:*:*)
13592227fc13Smrg	# From Paul.Green@stratus.com.
13607b5fefc8Smrg	GUESS=hppa1.1-stratus-vos
13617b5fefc8Smrg	;;
13622227fc13Smrg    mc68*:A/UX:*:*)
13637b5fefc8Smrg	GUESS=m68k-apple-aux$UNAME_RELEASE
13647b5fefc8Smrg	;;
13652227fc13Smrg    news*:NEWS-OS:6*:*)
13667b5fefc8Smrg	GUESS=mips-sony-newsos6
13677b5fefc8Smrg	;;
13682227fc13Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
13697b5fefc8Smrg	if test -d /usr/nec; then
13707b5fefc8Smrg		GUESS=mips-nec-sysv$UNAME_RELEASE
13712227fc13Smrg	else
13727b5fefc8Smrg		GUESS=mips-unknown-sysv$UNAME_RELEASE
13732227fc13Smrg	fi
13747b5fefc8Smrg	;;
13752227fc13Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
13767b5fefc8Smrg	GUESS=powerpc-be-beos
13777b5fefc8Smrg	;;
13782227fc13Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
13797b5fefc8Smrg	GUESS=powerpc-apple-beos
13807b5fefc8Smrg	;;
13812227fc13Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
13827b5fefc8Smrg	GUESS=i586-pc-beos
13837b5fefc8Smrg	;;
13842227fc13Smrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
13857b5fefc8Smrg	GUESS=i586-pc-haiku
13867b5fefc8Smrg	;;
13877b5fefc8Smrg    ppc:Haiku:*:*)	# Haiku running on Apple PowerPC
13887b5fefc8Smrg	GUESS=powerpc-apple-haiku
13897b5fefc8Smrg	;;
13907b5fefc8Smrg    *:Haiku:*:*)	# Haiku modern gcc (not bound by BeOS compat)
13917b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-haiku
13927b5fefc8Smrg	;;
13932227fc13Smrg    SX-4:SUPER-UX:*:*)
13947b5fefc8Smrg	GUESS=sx4-nec-superux$UNAME_RELEASE
13957b5fefc8Smrg	;;
13962227fc13Smrg    SX-5:SUPER-UX:*:*)
13977b5fefc8Smrg	GUESS=sx5-nec-superux$UNAME_RELEASE
13987b5fefc8Smrg	;;
13992227fc13Smrg    SX-6:SUPER-UX:*:*)
14007b5fefc8Smrg	GUESS=sx6-nec-superux$UNAME_RELEASE
14017b5fefc8Smrg	;;
14022227fc13Smrg    SX-7:SUPER-UX:*:*)
14037b5fefc8Smrg	GUESS=sx7-nec-superux$UNAME_RELEASE
14047b5fefc8Smrg	;;
14052227fc13Smrg    SX-8:SUPER-UX:*:*)
14067b5fefc8Smrg	GUESS=sx8-nec-superux$UNAME_RELEASE
14077b5fefc8Smrg	;;
14082227fc13Smrg    SX-8R:SUPER-UX:*:*)
14097b5fefc8Smrg	GUESS=sx8r-nec-superux$UNAME_RELEASE
14107b5fefc8Smrg	;;
14117b5fefc8Smrg    SX-ACE:SUPER-UX:*:*)
14127b5fefc8Smrg	GUESS=sxace-nec-superux$UNAME_RELEASE
14137b5fefc8Smrg	;;
14142227fc13Smrg    Power*:Rhapsody:*:*)
14157b5fefc8Smrg	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
14167b5fefc8Smrg	;;
14172227fc13Smrg    *:Rhapsody:*:*)
14187b5fefc8Smrg	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
14197b5fefc8Smrg	;;
14207b5fefc8Smrg    arm64:Darwin:*:*)
14217b5fefc8Smrg	GUESS=aarch64-apple-darwin$UNAME_RELEASE
14227b5fefc8Smrg	;;
14232227fc13Smrg    *:Darwin:*:*)
14247b5fefc8Smrg	UNAME_PROCESSOR=`uname -p`
14252227fc13Smrg	case $UNAME_PROCESSOR in
14262227fc13Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
14272227fc13Smrg	esac
14287b5fefc8Smrg	if command -v xcode-select > /dev/null 2> /dev/null && \
14297b5fefc8Smrg		! xcode-select --print-path > /dev/null 2> /dev/null ; then
14307b5fefc8Smrg	    # Avoid executing cc if there is no toolchain installed as
14317b5fefc8Smrg	    # cc will be a stub that puts up a graphical alert
14327b5fefc8Smrg	    # prompting the user to install developer tools.
14337b5fefc8Smrg	    CC_FOR_BUILD=no_compiler_found
14347b5fefc8Smrg	else
14357b5fefc8Smrg	    set_cc_for_build
14367b5fefc8Smrg	fi
14377b5fefc8Smrg	if test "$CC_FOR_BUILD" != no_compiler_found; then
14387b5fefc8Smrg	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
14397b5fefc8Smrg		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
14407b5fefc8Smrg		   grep IS_64BIT_ARCH >/dev/null
14417b5fefc8Smrg	    then
14427b5fefc8Smrg		case $UNAME_PROCESSOR in
14437b5fefc8Smrg		    i386) UNAME_PROCESSOR=x86_64 ;;
14447b5fefc8Smrg		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
14457b5fefc8Smrg		esac
14467b5fefc8Smrg	    fi
14477b5fefc8Smrg	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
14487b5fefc8Smrg	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
14497b5fefc8Smrg		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
14507b5fefc8Smrg		   grep IS_PPC >/dev/null
14517b5fefc8Smrg	    then
14527b5fefc8Smrg		UNAME_PROCESSOR=powerpc
14537b5fefc8Smrg	    fi
14547b5fefc8Smrg	elif test "$UNAME_PROCESSOR" = i386 ; then
14557b5fefc8Smrg	    # uname -m returns i386 or x86_64
14567b5fefc8Smrg	    UNAME_PROCESSOR=$UNAME_MACHINE
14577b5fefc8Smrg	fi
14587b5fefc8Smrg	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
14597b5fefc8Smrg	;;
14602227fc13Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
14612227fc13Smrg	UNAME_PROCESSOR=`uname -p`
14627b5fefc8Smrg	if test "$UNAME_PROCESSOR" = x86; then
14632227fc13Smrg		UNAME_PROCESSOR=i386
14642227fc13Smrg		UNAME_MACHINE=pc
14652227fc13Smrg	fi
14667b5fefc8Smrg	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
14677b5fefc8Smrg	;;
14682227fc13Smrg    *:QNX:*:4*)
14697b5fefc8Smrg	GUESS=i386-pc-qnx
14707b5fefc8Smrg	;;
14717b5fefc8Smrg    NEO-*:NONSTOP_KERNEL:*:*)
14727b5fefc8Smrg	GUESS=neo-tandem-nsk$UNAME_RELEASE
14737b5fefc8Smrg	;;
14747b5fefc8Smrg    NSE-*:NONSTOP_KERNEL:*:*)
14757b5fefc8Smrg	GUESS=nse-tandem-nsk$UNAME_RELEASE
14767b5fefc8Smrg	;;
14777b5fefc8Smrg    NSR-*:NONSTOP_KERNEL:*:*)
14787b5fefc8Smrg	GUESS=nsr-tandem-nsk$UNAME_RELEASE
14797b5fefc8Smrg	;;
14807b5fefc8Smrg    NSV-*:NONSTOP_KERNEL:*:*)
14817b5fefc8Smrg	GUESS=nsv-tandem-nsk$UNAME_RELEASE
14827b5fefc8Smrg	;;
14837b5fefc8Smrg    NSX-*:NONSTOP_KERNEL:*:*)
14847b5fefc8Smrg	GUESS=nsx-tandem-nsk$UNAME_RELEASE
14857b5fefc8Smrg	;;
14862227fc13Smrg    *:NonStop-UX:*:*)
14877b5fefc8Smrg	GUESS=mips-compaq-nonstopux
14887b5fefc8Smrg	;;
14892227fc13Smrg    BS2000:POSIX*:*:*)
14907b5fefc8Smrg	GUESS=bs2000-siemens-sysv
14917b5fefc8Smrg	;;
14922227fc13Smrg    DS/*:UNIX_System_V:*:*)
14937b5fefc8Smrg	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
14947b5fefc8Smrg	;;
14952227fc13Smrg    *:Plan9:*:*)
14962227fc13Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
14972227fc13Smrg	# is converted to i386 for consistency with other x86
14982227fc13Smrg	# operating systems.
14997b5fefc8Smrg	if test "${cputype-}" = 386; then
15002227fc13Smrg	    UNAME_MACHINE=i386
15017b5fefc8Smrg	elif test "x${cputype-}" != x; then
15027b5fefc8Smrg	    UNAME_MACHINE=$cputype
15032227fc13Smrg	fi
15047b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-plan9
15057b5fefc8Smrg	;;
15062227fc13Smrg    *:TOPS-10:*:*)
15077b5fefc8Smrg	GUESS=pdp10-unknown-tops10
15087b5fefc8Smrg	;;
15092227fc13Smrg    *:TENEX:*:*)
15107b5fefc8Smrg	GUESS=pdp10-unknown-tenex
15117b5fefc8Smrg	;;
15122227fc13Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
15137b5fefc8Smrg	GUESS=pdp10-dec-tops20
15147b5fefc8Smrg	;;
15152227fc13Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
15167b5fefc8Smrg	GUESS=pdp10-xkl-tops20
15177b5fefc8Smrg	;;
15182227fc13Smrg    *:TOPS-20:*:*)
15197b5fefc8Smrg	GUESS=pdp10-unknown-tops20
15207b5fefc8Smrg	;;
15212227fc13Smrg    *:ITS:*:*)
15227b5fefc8Smrg	GUESS=pdp10-unknown-its
15237b5fefc8Smrg	;;
15242227fc13Smrg    SEI:*:*:SEIUX)
15257b5fefc8Smrg	GUESS=mips-sei-seiux$UNAME_RELEASE
15267b5fefc8Smrg	;;
15272227fc13Smrg    *:DragonFly:*:*)
15287b5fefc8Smrg	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
15297b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
15307b5fefc8Smrg	;;
15312227fc13Smrg    *:*VMS:*:*)
15327b5fefc8Smrg	UNAME_MACHINE=`(uname -p) 2>/dev/null`
15337b5fefc8Smrg	case $UNAME_MACHINE in
15347b5fefc8Smrg	    A*) GUESS=alpha-dec-vms ;;
15357b5fefc8Smrg	    I*) GUESS=ia64-dec-vms ;;
15367b5fefc8Smrg	    V*) GUESS=vax-dec-vms ;;
15372227fc13Smrg	esac ;;
15382227fc13Smrg    *:XENIX:*:SysV)
15397b5fefc8Smrg	GUESS=i386-pc-xenix
15407b5fefc8Smrg	;;
15412227fc13Smrg    i*86:skyos:*:*)
15427b5fefc8Smrg	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
15437b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
15447b5fefc8Smrg	;;
15452227fc13Smrg    i*86:rdos:*:*)
15467b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-rdos
15477b5fefc8Smrg	;;
15487b5fefc8Smrg    i*86:Fiwix:*:*)
15497b5fefc8Smrg	GUESS=$UNAME_MACHINE-pc-fiwix
15507b5fefc8Smrg	;;
15517b5fefc8Smrg    *:AROS:*:*)
15527b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-aros
15537b5fefc8Smrg	;;
15547b5fefc8Smrg    x86_64:VMkernel:*:*)
15557b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-esx
15567b5fefc8Smrg	;;
15577b5fefc8Smrg    amd64:Isilon\ OneFS:*:*)
15587b5fefc8Smrg	GUESS=x86_64-unknown-onefs
15597b5fefc8Smrg	;;
15607b5fefc8Smrg    *:Unleashed:*:*)
15617b5fefc8Smrg	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
15627b5fefc8Smrg	;;
15632227fc13Smrgesac
15642227fc13Smrg
15657b5fefc8Smrg# Do we have a guess based on uname results?
15667b5fefc8Smrgif test "x$GUESS" != x; then
15677b5fefc8Smrg    echo "$GUESS"
15687b5fefc8Smrg    exit
15697b5fefc8Smrgfi
15702227fc13Smrg
15717b5fefc8Smrg# No uname command or uname output not recognized.
15727b5fefc8Smrgset_cc_for_build
15737b5fefc8Smrgcat > "$dummy.c" <<EOF
15742227fc13Smrg#ifdef _SEQUENT_
15757b5fefc8Smrg#include <sys/types.h>
15767b5fefc8Smrg#include <sys/utsname.h>
15777b5fefc8Smrg#endif
15787b5fefc8Smrg#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
15797b5fefc8Smrg#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
15807b5fefc8Smrg#include <signal.h>
15817b5fefc8Smrg#if defined(_SIZE_T_) || defined(SIGLOST)
15827b5fefc8Smrg#include <sys/utsname.h>
15837b5fefc8Smrg#endif
15847b5fefc8Smrg#endif
15852227fc13Smrg#endif
15862227fc13Smrgmain ()
15872227fc13Smrg{
15882227fc13Smrg#if defined (sony)
15892227fc13Smrg#if defined (MIPSEB)
15902227fc13Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
15912227fc13Smrg     I don't know....  */
15922227fc13Smrg  printf ("mips-sony-bsd\n"); exit (0);
15932227fc13Smrg#else
15942227fc13Smrg#include <sys/param.h>
15952227fc13Smrg  printf ("m68k-sony-newsos%s\n",
15962227fc13Smrg#ifdef NEWSOS4
15977b5fefc8Smrg  "4"
15982227fc13Smrg#else
15997b5fefc8Smrg  ""
16002227fc13Smrg#endif
16017b5fefc8Smrg  ); exit (0);
16022227fc13Smrg#endif
16032227fc13Smrg#endif
16042227fc13Smrg
16052227fc13Smrg#if defined (NeXT)
16062227fc13Smrg#if !defined (__ARCHITECTURE__)
16072227fc13Smrg#define __ARCHITECTURE__ "m68k"
16082227fc13Smrg#endif
16092227fc13Smrg  int version;
16102227fc13Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
16112227fc13Smrg  if (version < 4)
16122227fc13Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
16132227fc13Smrg  else
16142227fc13Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
16152227fc13Smrg  exit (0);
16162227fc13Smrg#endif
16172227fc13Smrg
16182227fc13Smrg#if defined (MULTIMAX) || defined (n16)
16192227fc13Smrg#if defined (UMAXV)
16202227fc13Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
16212227fc13Smrg#else
16222227fc13Smrg#if defined (CMU)
16232227fc13Smrg  printf ("ns32k-encore-mach\n"); exit (0);
16242227fc13Smrg#else
16252227fc13Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
16262227fc13Smrg#endif
16272227fc13Smrg#endif
16282227fc13Smrg#endif
16292227fc13Smrg
16302227fc13Smrg#if defined (__386BSD__)
16312227fc13Smrg  printf ("i386-pc-bsd\n"); exit (0);
16322227fc13Smrg#endif
16332227fc13Smrg
16342227fc13Smrg#if defined (sequent)
16352227fc13Smrg#if defined (i386)
16362227fc13Smrg  printf ("i386-sequent-dynix\n"); exit (0);
16372227fc13Smrg#endif
16382227fc13Smrg#if defined (ns32000)
16392227fc13Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
16402227fc13Smrg#endif
16412227fc13Smrg#endif
16422227fc13Smrg
16432227fc13Smrg#if defined (_SEQUENT_)
16447b5fefc8Smrg  struct utsname un;
16452227fc13Smrg
16467b5fefc8Smrg  uname(&un);
16477b5fefc8Smrg  if (strncmp(un.version, "V2", 2) == 0) {
16487b5fefc8Smrg    printf ("i386-sequent-ptx2\n"); exit (0);
16497b5fefc8Smrg  }
16507b5fefc8Smrg  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
16517b5fefc8Smrg    printf ("i386-sequent-ptx1\n"); exit (0);
16527b5fefc8Smrg  }
16537b5fefc8Smrg  printf ("i386-sequent-ptx\n"); exit (0);
16542227fc13Smrg#endif
16552227fc13Smrg
16562227fc13Smrg#if defined (vax)
16577b5fefc8Smrg#if !defined (ultrix)
16587b5fefc8Smrg#include <sys/param.h>
16597b5fefc8Smrg#if defined (BSD)
16607b5fefc8Smrg#if BSD == 43
16617b5fefc8Smrg  printf ("vax-dec-bsd4.3\n"); exit (0);
16627b5fefc8Smrg#else
16637b5fefc8Smrg#if BSD == 199006
16647b5fefc8Smrg  printf ("vax-dec-bsd4.3reno\n"); exit (0);
16657b5fefc8Smrg#else
16667b5fefc8Smrg  printf ("vax-dec-bsd\n"); exit (0);
16677b5fefc8Smrg#endif
16687b5fefc8Smrg#endif
16697b5fefc8Smrg#else
16707b5fefc8Smrg  printf ("vax-dec-bsd\n"); exit (0);
16717b5fefc8Smrg#endif
16727b5fefc8Smrg#else
16737b5fefc8Smrg#if defined(_SIZE_T_) || defined(SIGLOST)
16747b5fefc8Smrg  struct utsname un;
16757b5fefc8Smrg  uname (&un);
16767b5fefc8Smrg  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
16777b5fefc8Smrg#else
16787b5fefc8Smrg  printf ("vax-dec-ultrix\n"); exit (0);
16797b5fefc8Smrg#endif
16807b5fefc8Smrg#endif
16817b5fefc8Smrg#endif
16827b5fefc8Smrg#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
16837b5fefc8Smrg#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
16847b5fefc8Smrg#if defined(_SIZE_T_) || defined(SIGLOST)
16857b5fefc8Smrg  struct utsname *un;
16867b5fefc8Smrg  uname (&un);
16877b5fefc8Smrg  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
16887b5fefc8Smrg#else
16897b5fefc8Smrg  printf ("mips-dec-ultrix\n"); exit (0);
16907b5fefc8Smrg#endif
16917b5fefc8Smrg#endif
16922227fc13Smrg#endif
16932227fc13Smrg
16942227fc13Smrg#if defined (alliant) && defined (i860)
16952227fc13Smrg  printf ("i860-alliant-bsd\n"); exit (0);
16962227fc13Smrg#endif
16972227fc13Smrg
16982227fc13Smrg  exit (1);
16992227fc13Smrg}
17002227fc13SmrgEOF
17012227fc13Smrg
17027b5fefc8Smrg$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
17032227fc13Smrg	{ echo "$SYSTEM_NAME"; exit; }
17042227fc13Smrg
17052227fc13Smrg# Apollos put the system type in the environment.
17067b5fefc8Smrgtest -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
17072227fc13Smrg
17087b5fefc8Smrgecho "$0: unable to guess system type" >&2
17092227fc13Smrg
17107b5fefc8Smrgcase $UNAME_MACHINE:$UNAME_SYSTEM in
17117b5fefc8Smrg    mips:Linux | mips64:Linux)
17127b5fefc8Smrg	# If we got here on MIPS GNU/Linux, output extra information.
17137b5fefc8Smrg	cat >&2 <<EOF
17142227fc13Smrg
17157b5fefc8SmrgNOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
17167b5fefc8Smrgthe system type. Please install a C compiler and try again.
17177b5fefc8SmrgEOF
17187b5fefc8Smrg	;;
17197b5fefc8Smrgesac
17202227fc13Smrg
17212227fc13Smrgcat >&2 <<EOF
17222227fc13Smrg
17237b5fefc8SmrgThis script (version $timestamp), has failed to recognize the
17247b5fefc8Smrgoperating system you are using. If your script is old, overwrite *all*
17257b5fefc8Smrgcopies of config.guess and config.sub with the latest versions from:
17262227fc13Smrg
17277b5fefc8Smrg  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
17282227fc13Smrgand
17297b5fefc8Smrg  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
17307b5fefc8SmrgEOF
17312227fc13Smrg
17327b5fefc8Smrgour_year=`echo $timestamp | sed 's,-.*,,'`
17337b5fefc8Smrgthisyear=`date +%Y`
17347b5fefc8Smrg# shellcheck disable=SC2003
17357b5fefc8Smrgscript_age=`expr "$thisyear" - "$our_year"`
17367b5fefc8Smrgif test "$script_age" -lt 3 ; then
17377b5fefc8Smrg   cat >&2 <<EOF
17387b5fefc8Smrg
17397b5fefc8SmrgIf $0 has already been updated, send the following data and any
17407b5fefc8Smrginformation you think might be pertinent to config-patches@gnu.org to
17417b5fefc8Smrgprovide the necessary information to handle your system.
17422227fc13Smrg
17432227fc13Smrgconfig.guess timestamp = $timestamp
17442227fc13Smrg
17452227fc13Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
17462227fc13Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
17472227fc13Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
17482227fc13Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
17492227fc13Smrg
17502227fc13Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
17512227fc13Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
17522227fc13Smrg
17532227fc13Smrghostinfo               = `(hostinfo) 2>/dev/null`
17542227fc13Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
17552227fc13Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
17562227fc13Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
17572227fc13Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
17582227fc13Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
17592227fc13Smrg
17607b5fefc8SmrgUNAME_MACHINE = "$UNAME_MACHINE"
17617b5fefc8SmrgUNAME_RELEASE = "$UNAME_RELEASE"
17627b5fefc8SmrgUNAME_SYSTEM  = "$UNAME_SYSTEM"
17637b5fefc8SmrgUNAME_VERSION = "$UNAME_VERSION"
17642227fc13SmrgEOF
17657b5fefc8Smrgfi
17662227fc13Smrg
17672227fc13Smrgexit 1
17682227fc13Smrg
17692227fc13Smrg# Local variables:
17707b5fefc8Smrg# eval: (add-hook 'before-save-hook 'time-stamp)
17712227fc13Smrg# time-stamp-start: "timestamp='"
17722227fc13Smrg# time-stamp-format: "%:y-%02m-%02d"
17732227fc13Smrg# time-stamp-end: "'"
17742227fc13Smrg# End:
1775