config.guess revision 7cea3689
127702724Smrg#! /bin/sh
227702724Smrg# Attempt to guess a canonical system name.
37cea3689Smrg#   Copyright 1992-2018 Free Software Foundation, Inc.
427702724Smrg
57cea3689Smrgtimestamp='2018-03-01'
627702724Smrg
727702724Smrg# This file is free software; you can redistribute it and/or modify it
827702724Smrg# under the terms of the GNU General Public License as published by
9313a12fdSmrg# the Free Software Foundation; either version 3 of the License, or
1027702724Smrg# (at your option) any later version.
1127702724Smrg#
1227702724Smrg# This program is distributed in the hope that it will be useful, but
1327702724Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
1427702724Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1527702724Smrg# General Public License for more details.
1627702724Smrg#
1727702724Smrg# You should have received a copy of the GNU General Public License
187cea3689Smrg# along with this program; if not, see <https://www.gnu.org/licenses/>.
1927702724Smrg#
2027702724Smrg# As a special exception to the GNU General Public License, if you
2127702724Smrg# distribute this file as part of a program that contains a
2227702724Smrg# configuration script generated by Autoconf, you may include it under
23313a12fdSmrg# the same distribution terms that you use for the rest of that
24313a12fdSmrg# program.  This Exception is an additional permission under section 7
25313a12fdSmrg# of the GNU General Public License, version 3 ("GPLv3").
2627702724Smrg#
277cea3689Smrg# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
2827702724Smrg#
2900084f2cSmrg# You can get the latest version of this script from:
307cea3689Smrg# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31313a12fdSmrg#
327cea3689Smrg# Please send patches to <config-patches@gnu.org>.
33313a12fdSmrg
3427702724Smrg
3527702724Smrgme=`echo "$0" | sed -e 's,.*/,,'`
3627702724Smrg
3727702724Smrgusage="\
3827702724SmrgUsage: $0 [OPTION]
3927702724Smrg
4027702724SmrgOutput the configuration name of the system \`$me' is run on.
4127702724Smrg
427cea3689SmrgOptions:
4327702724Smrg  -h, --help         print this help, then exit
4427702724Smrg  -t, --time-stamp   print date of last modification, then exit
4527702724Smrg  -v, --version      print version number, then exit
4627702724Smrg
4727702724SmrgReport bugs and patches to <config-patches@gnu.org>."
4827702724Smrg
4927702724Smrgversion="\
5027702724SmrgGNU config.guess ($timestamp)
5127702724Smrg
5227702724SmrgOriginally written by Per Bothner.
537cea3689SmrgCopyright 1992-2018 Free Software Foundation, Inc.
5427702724Smrg
5527702724SmrgThis is free software; see the source for copying conditions.  There is NO
5627702724Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
5727702724Smrg
5827702724Smrghelp="
5927702724SmrgTry \`$me --help' for more information."
6027702724Smrg
6127702724Smrg# Parse command line
6227702724Smrgwhile test $# -gt 0 ; do
6327702724Smrg  case $1 in
6427702724Smrg    --time-stamp | --time* | -t )
6527702724Smrg       echo "$timestamp" ; exit ;;
6627702724Smrg    --version | -v )
6727702724Smrg       echo "$version" ; exit ;;
6827702724Smrg    --help | --h* | -h )
6927702724Smrg       echo "$usage"; exit ;;
7027702724Smrg    -- )     # Stop option processing
7127702724Smrg       shift; break ;;
7227702724Smrg    - )	# Use stdin as input.
7327702724Smrg       break ;;
7427702724Smrg    -* )
7527702724Smrg       echo "$me: invalid option $1$help" >&2
7627702724Smrg       exit 1 ;;
7727702724Smrg    * )
7827702724Smrg       break ;;
7927702724Smrg  esac
8027702724Smrgdone
8127702724Smrg
8227702724Smrgif test $# != 0; then
8327702724Smrg  echo "$me: too many arguments$help" >&2
8427702724Smrg  exit 1
8527702724Smrgfi
8627702724Smrg
8727702724Smrgtrap 'exit 1' 1 2 15
8827702724Smrg
8927702724Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
9027702724Smrg# compiler to aid in system detection is discouraged as it requires
9127702724Smrg# temporary files to be created and, as you can see below, it is a
9227702724Smrg# headache to deal with in a portable fashion.
9327702724Smrg
9427702724Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
9527702724Smrg# use `HOST_CC' if defined, but it is deprecated.
9627702724Smrg
9727702724Smrg# Portable tmp directory creation inspired by the Autoconf team.
9827702724Smrg
9927702724Smrgset_cc_for_build='
10027702724Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
10127702724Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
10227702724Smrg: ${TMPDIR=/tmp} ;
10327702724Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
10427702724Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
10527702724Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
10627702724Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
10727702724Smrgdummy=$tmp/dummy ;
10827702724Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
10927702724Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
1107cea3689Smrg ,,)    echo "int x;" > "$dummy.c" ;
11127702724Smrg	for c in cc gcc c89 c99 ; do
1127cea3689Smrg	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
11327702724Smrg	     CC_FOR_BUILD="$c"; break ;
11427702724Smrg	  fi ;
11527702724Smrg	done ;
11627702724Smrg	if test x"$CC_FOR_BUILD" = x ; then
11727702724Smrg	  CC_FOR_BUILD=no_compiler_found ;
11827702724Smrg	fi
11927702724Smrg	;;
12027702724Smrg ,,*)   CC_FOR_BUILD=$CC ;;
12127702724Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
12227702724Smrgesac ; set_cc_for_build= ;'
12327702724Smrg
12427702724Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
12527702724Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
12627702724Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
12727702724Smrg	PATH=$PATH:/.attbin ; export PATH
12827702724Smrgfi
12927702724Smrg
13027702724SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
13127702724SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
13227702724SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
13327702724SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
13427702724Smrg
1357cea3689Smrgcase "$UNAME_SYSTEM" in
1367cea3689SmrgLinux|GNU|GNU/*)
1377cea3689Smrg	# If the system lacks a compiler, then just pick glibc.
1387cea3689Smrg	# We could probably try harder.
1397cea3689Smrg	LIBC=gnu
1407cea3689Smrg
1417cea3689Smrg	eval "$set_cc_for_build"
1427cea3689Smrg	cat <<-EOF > "$dummy.c"
1437cea3689Smrg	#include <features.h>
1447cea3689Smrg	#if defined(__UCLIBC__)
1457cea3689Smrg	LIBC=uclibc
1467cea3689Smrg	#elif defined(__dietlibc__)
1477cea3689Smrg	LIBC=dietlibc
1487cea3689Smrg	#else
1497cea3689Smrg	LIBC=gnu
1507cea3689Smrg	#endif
1517cea3689Smrg	EOF
1527cea3689Smrg	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
1537cea3689Smrg
1547cea3689Smrg	# If ldd exists, use it to detect musl libc.
1557cea3689Smrg	if command -v ldd >/dev/null && \
1567cea3689Smrg		ldd --version 2>&1 | grep -q ^musl
1577cea3689Smrg	then
1587cea3689Smrg	    LIBC=musl
1597cea3689Smrg	fi
1607cea3689Smrg	;;
1617cea3689Smrgesac
1627cea3689Smrg
16327702724Smrg# Note: order is significant - the case branches are not exclusive.
16427702724Smrg
1657cea3689Smrgcase "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
16627702724Smrg    *:NetBSD:*:*)
16727702724Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
168313a12fdSmrg	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
16927702724Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
17027702724Smrg	# switched to ELF, *-*-netbsd* would select the old
17127702724Smrg	# object file format.  This provides both forward
17227702724Smrg	# compatibility and a consistent mechanism for selecting the
17327702724Smrg	# object file format.
17427702724Smrg	#
17527702724Smrg	# Note: NetBSD doesn't particularly care about the vendor
17627702724Smrg	# portion of the name.  We always set it to "unknown".
17727702724Smrg	sysctl="sysctl -n hw.machine_arch"
1787cea3689Smrg	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
1797cea3689Smrg	    "/sbin/$sysctl" 2>/dev/null || \
1807cea3689Smrg	    "/usr/sbin/$sysctl" 2>/dev/null || \
1817cea3689Smrg	    echo unknown)`
1827cea3689Smrg	case "$UNAME_MACHINE_ARCH" in
18327702724Smrg	    armeb) machine=armeb-unknown ;;
18427702724Smrg	    arm*) machine=arm-unknown ;;
18527702724Smrg	    sh3el) machine=shl-unknown ;;
18627702724Smrg	    sh3eb) machine=sh-unknown ;;
187e19dfac4Smrg	    sh5el) machine=sh5le-unknown ;;
1887cea3689Smrg	    earmv*)
1897cea3689Smrg		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
1907cea3689Smrg		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
1917cea3689Smrg		machine="${arch}${endian}"-unknown
1927cea3689Smrg		;;
1937cea3689Smrg	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
19427702724Smrg	esac
19527702724Smrg	# The Operating System including object format, if it has switched
1967cea3689Smrg	# to ELF recently (or will in the future) and ABI.
1977cea3689Smrg	case "$UNAME_MACHINE_ARCH" in
1987cea3689Smrg	    earm*)
1997cea3689Smrg		os=netbsdelf
2007cea3689Smrg		;;
20127702724Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
2027cea3689Smrg		eval "$set_cc_for_build"
20327702724Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
20400084f2cSmrg			| grep -q __ELF__
20527702724Smrg		then
20627702724Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
20727702724Smrg		    # Return netbsd for either.  FIX?
20827702724Smrg		    os=netbsd
20927702724Smrg		else
21027702724Smrg		    os=netbsdelf
21127702724Smrg		fi
21227702724Smrg		;;
21327702724Smrg	    *)
214313a12fdSmrg		os=netbsd
21527702724Smrg		;;
21627702724Smrg	esac
2177cea3689Smrg	# Determine ABI tags.
2187cea3689Smrg	case "$UNAME_MACHINE_ARCH" in
2197cea3689Smrg	    earm*)
2207cea3689Smrg		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
2217cea3689Smrg		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
2227cea3689Smrg		;;
2237cea3689Smrg	esac
22427702724Smrg	# The OS release
22527702724Smrg	# Debian GNU/NetBSD machines have a different userland, and
22627702724Smrg	# thus, need a distinct triplet. However, they do not need
22727702724Smrg	# kernel version information, so it can be replaced with a
22827702724Smrg	# suitable tag, in the style of linux-gnu.
2297cea3689Smrg	case "$UNAME_VERSION" in
23027702724Smrg	    Debian*)
23127702724Smrg		release='-gnu'
23227702724Smrg		;;
23327702724Smrg	    *)
2347cea3689Smrg		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
23527702724Smrg		;;
23627702724Smrg	esac
23727702724Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
23827702724Smrg	# contains redundant information, the shorter form:
23927702724Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
2407cea3689Smrg	echo "$machine-${os}${release}${abi}"
24127702724Smrg	exit ;;
242313a12fdSmrg    *:Bitrig:*:*)
243313a12fdSmrg	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
2447cea3689Smrg	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
245313a12fdSmrg	exit ;;
24627702724Smrg    *:OpenBSD:*:*)
24727702724Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
2487cea3689Smrg	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
2497cea3689Smrg	exit ;;
2507cea3689Smrg    *:LibertyBSD:*:*)
2517cea3689Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
2527cea3689Smrg	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
2537cea3689Smrg	exit ;;
2547cea3689Smrg    *:MidnightBSD:*:*)
2557cea3689Smrg	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
25627702724Smrg	exit ;;
25727702724Smrg    *:ekkoBSD:*:*)
2587cea3689Smrg	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
25927702724Smrg	exit ;;
26027702724Smrg    *:SolidBSD:*:*)
2617cea3689Smrg	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
26227702724Smrg	exit ;;
26327702724Smrg    macppc:MirBSD:*:*)
2647cea3689Smrg	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
26527702724Smrg	exit ;;
26627702724Smrg    *:MirBSD:*:*)
2677cea3689Smrg	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
2687cea3689Smrg	exit ;;
2697cea3689Smrg    *:Sortix:*:*)
2707cea3689Smrg	echo "$UNAME_MACHINE"-unknown-sortix
27127702724Smrg	exit ;;
2727cea3689Smrg    *:Redox:*:*)
2737cea3689Smrg	echo "$UNAME_MACHINE"-unknown-redox
2747cea3689Smrg	exit ;;
2757cea3689Smrg    mips:OSF1:*.*)
2767cea3689Smrg        echo mips-dec-osf1
2777cea3689Smrg        exit ;;
27827702724Smrg    alpha:OSF1:*:*)
27927702724Smrg	case $UNAME_RELEASE in
28027702724Smrg	*4.0)
28127702724Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
28227702724Smrg		;;
28327702724Smrg	*5.*)
284313a12fdSmrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
28527702724Smrg		;;
28627702724Smrg	esac
28727702724Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
28827702724Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
28927702724Smrg	# covers most systems running today.  This code pipes the CPU
29027702724Smrg	# types through head -n 1, so we only detect the type of CPU 0.
29127702724Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
29227702724Smrg	case "$ALPHA_CPU_TYPE" in
29327702724Smrg	    "EV4 (21064)")
2947cea3689Smrg		UNAME_MACHINE=alpha ;;
29527702724Smrg	    "EV4.5 (21064)")
2967cea3689Smrg		UNAME_MACHINE=alpha ;;
29727702724Smrg	    "LCA4 (21066/21068)")
2987cea3689Smrg		UNAME_MACHINE=alpha ;;
29927702724Smrg	    "EV5 (21164)")
3007cea3689Smrg		UNAME_MACHINE=alphaev5 ;;
30127702724Smrg	    "EV5.6 (21164A)")
3027cea3689Smrg		UNAME_MACHINE=alphaev56 ;;
30327702724Smrg	    "EV5.6 (21164PC)")
3047cea3689Smrg		UNAME_MACHINE=alphapca56 ;;
30527702724Smrg	    "EV5.7 (21164PC)")
3067cea3689Smrg		UNAME_MACHINE=alphapca57 ;;
30727702724Smrg	    "EV6 (21264)")
3087cea3689Smrg		UNAME_MACHINE=alphaev6 ;;
30927702724Smrg	    "EV6.7 (21264A)")
3107cea3689Smrg		UNAME_MACHINE=alphaev67 ;;
31127702724Smrg	    "EV6.8CB (21264C)")
3127cea3689Smrg		UNAME_MACHINE=alphaev68 ;;
31327702724Smrg	    "EV6.8AL (21264B)")
3147cea3689Smrg		UNAME_MACHINE=alphaev68 ;;
31527702724Smrg	    "EV6.8CX (21264D)")
3167cea3689Smrg		UNAME_MACHINE=alphaev68 ;;
31727702724Smrg	    "EV6.9A (21264/EV69A)")
3187cea3689Smrg		UNAME_MACHINE=alphaev69 ;;
31927702724Smrg	    "EV7 (21364)")
3207cea3689Smrg		UNAME_MACHINE=alphaev7 ;;
32127702724Smrg	    "EV7.9 (21364A)")
3227cea3689Smrg		UNAME_MACHINE=alphaev79 ;;
32327702724Smrg	esac
32427702724Smrg	# A Pn.n version is a patched version.
32527702724Smrg	# A Vn.n version is a released version.
32627702724Smrg	# A Tn.n version is a released field test version.
32727702724Smrg	# A Xn.n version is an unreleased experimental baselevel.
32827702724Smrg	# 1.2 uses "1.2" for uname -r.
3297cea3689Smrg	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
330313a12fdSmrg	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
331313a12fdSmrg	exitcode=$?
332313a12fdSmrg	trap '' 0
333313a12fdSmrg	exit $exitcode ;;
33427702724Smrg    Amiga*:UNIX_System_V:4.0:*)
33527702724Smrg	echo m68k-unknown-sysv4
33627702724Smrg	exit ;;
33727702724Smrg    *:[Aa]miga[Oo][Ss]:*:*)
3387cea3689Smrg	echo "$UNAME_MACHINE"-unknown-amigaos
33927702724Smrg	exit ;;
34027702724Smrg    *:[Mm]orph[Oo][Ss]:*:*)
3417cea3689Smrg	echo "$UNAME_MACHINE"-unknown-morphos
34227702724Smrg	exit ;;
34327702724Smrg    *:OS/390:*:*)
34427702724Smrg	echo i370-ibm-openedition
34527702724Smrg	exit ;;
34627702724Smrg    *:z/VM:*:*)
34727702724Smrg	echo s390-ibm-zvmoe
34827702724Smrg	exit ;;
34927702724Smrg    *:OS400:*:*)
350313a12fdSmrg	echo powerpc-ibm-os400
35127702724Smrg	exit ;;
35227702724Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
3537cea3689Smrg	echo arm-acorn-riscix"$UNAME_RELEASE"
35427702724Smrg	exit ;;
355313a12fdSmrg    arm*:riscos:*:*|arm*:RISCOS:*:*)
35627702724Smrg	echo arm-unknown-riscos
35727702724Smrg	exit ;;
35827702724Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
35927702724Smrg	echo hppa1.1-hitachi-hiuxmpp
36027702724Smrg	exit ;;
36127702724Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
36227702724Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
36327702724Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
36427702724Smrg		echo pyramid-pyramid-sysv3
36527702724Smrg	else
36627702724Smrg		echo pyramid-pyramid-bsd
36727702724Smrg	fi
36827702724Smrg	exit ;;
36927702724Smrg    NILE*:*:*:dcosx)
37027702724Smrg	echo pyramid-pyramid-svr4
37127702724Smrg	exit ;;
37227702724Smrg    DRS?6000:unix:4.0:6*)
37327702724Smrg	echo sparc-icl-nx6
37427702724Smrg	exit ;;
37527702724Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
37627702724Smrg	case `/usr/bin/uname -p` in
37727702724Smrg	    sparc) echo sparc-icl-nx7; exit ;;
37827702724Smrg	esac ;;
37900084f2cSmrg    s390x:SunOS:*:*)
3807cea3689Smrg	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
38100084f2cSmrg	exit ;;
38227702724Smrg    sun4H:SunOS:5.*:*)
3837cea3689Smrg	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
38427702724Smrg	exit ;;
38527702724Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
3867cea3689Smrg	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
38727702724Smrg	exit ;;
38800084f2cSmrg    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
3897cea3689Smrg	echo i386-pc-auroraux"$UNAME_RELEASE"
39000084f2cSmrg	exit ;;
391e19dfac4Smrg    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
3927cea3689Smrg	eval "$set_cc_for_build"
3937cea3689Smrg	SUN_ARCH=i386
39400084f2cSmrg	# If there is a compiler, see if it is configured for 64-bit objects.
39500084f2cSmrg	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
39600084f2cSmrg	# This test works for both compilers.
3977cea3689Smrg	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
39800084f2cSmrg	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
3997cea3689Smrg		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
40000084f2cSmrg		grep IS_64BIT_ARCH >/dev/null
40100084f2cSmrg	    then
4027cea3689Smrg		SUN_ARCH=x86_64
40300084f2cSmrg	    fi
40400084f2cSmrg	fi
4057cea3689Smrg	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
40627702724Smrg	exit ;;
40727702724Smrg    sun4*:SunOS:6*:*)
40827702724Smrg	# According to config.sub, this is the proper way to canonicalize
40927702724Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
41027702724Smrg	# it's likely to be more like Solaris than SunOS4.
4117cea3689Smrg	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
41227702724Smrg	exit ;;
41327702724Smrg    sun4*:SunOS:*:*)
41427702724Smrg	case "`/usr/bin/arch -k`" in
41527702724Smrg	    Series*|S4*)
41627702724Smrg		UNAME_RELEASE=`uname -v`
41727702724Smrg		;;
41827702724Smrg	esac
41927702724Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
4207cea3689Smrg	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
42127702724Smrg	exit ;;
42227702724Smrg    sun3*:SunOS:*:*)
4237cea3689Smrg	echo m68k-sun-sunos"$UNAME_RELEASE"
42427702724Smrg	exit ;;
42527702724Smrg    sun*:*:4.2BSD:*)
42627702724Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
4277cea3689Smrg	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
42827702724Smrg	case "`/bin/arch`" in
42927702724Smrg	    sun3)
4307cea3689Smrg		echo m68k-sun-sunos"$UNAME_RELEASE"
43127702724Smrg		;;
43227702724Smrg	    sun4)
4337cea3689Smrg		echo sparc-sun-sunos"$UNAME_RELEASE"
43427702724Smrg		;;
43527702724Smrg	esac
43627702724Smrg	exit ;;
43727702724Smrg    aushp:SunOS:*:*)
4387cea3689Smrg	echo sparc-auspex-sunos"$UNAME_RELEASE"
43927702724Smrg	exit ;;
44027702724Smrg    # The situation for MiNT is a little confusing.  The machine name
44127702724Smrg    # can be virtually everything (everything which is not
44227702724Smrg    # "atarist" or "atariste" at least should have a processor
44327702724Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
44427702724Smrg    # to the lowercase version "mint" (or "freemint").  Finally
44527702724Smrg    # the system name "TOS" denotes a system which is actually not
44627702724Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
44727702724Smrg    # be no problem.
44827702724Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
4497cea3689Smrg	echo m68k-atari-mint"$UNAME_RELEASE"
45027702724Smrg	exit ;;
45127702724Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
4527cea3689Smrg	echo m68k-atari-mint"$UNAME_RELEASE"
453313a12fdSmrg	exit ;;
45427702724Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
4557cea3689Smrg	echo m68k-atari-mint"$UNAME_RELEASE"
45627702724Smrg	exit ;;
45727702724Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
4587cea3689Smrg	echo m68k-milan-mint"$UNAME_RELEASE"
459313a12fdSmrg	exit ;;
46027702724Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
4617cea3689Smrg	echo m68k-hades-mint"$UNAME_RELEASE"
462313a12fdSmrg	exit ;;
46327702724Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
4647cea3689Smrg	echo m68k-unknown-mint"$UNAME_RELEASE"
465313a12fdSmrg	exit ;;
46627702724Smrg    m68k:machten:*:*)
4677cea3689Smrg	echo m68k-apple-machten"$UNAME_RELEASE"
46827702724Smrg	exit ;;
46927702724Smrg    powerpc:machten:*:*)
4707cea3689Smrg	echo powerpc-apple-machten"$UNAME_RELEASE"
47127702724Smrg	exit ;;
47227702724Smrg    RISC*:Mach:*:*)
47327702724Smrg	echo mips-dec-mach_bsd4.3
47427702724Smrg	exit ;;
47527702724Smrg    RISC*:ULTRIX:*:*)
4767cea3689Smrg	echo mips-dec-ultrix"$UNAME_RELEASE"
47727702724Smrg	exit ;;
47827702724Smrg    VAX*:ULTRIX*:*:*)
4797cea3689Smrg	echo vax-dec-ultrix"$UNAME_RELEASE"
48027702724Smrg	exit ;;
48127702724Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
4827cea3689Smrg	echo clipper-intergraph-clix"$UNAME_RELEASE"
48327702724Smrg	exit ;;
48427702724Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
4857cea3689Smrg	eval "$set_cc_for_build"
4867cea3689Smrg	sed 's/^	//' << EOF > "$dummy.c"
48727702724Smrg#ifdef __cplusplus
48827702724Smrg#include <stdio.h>  /* for printf() prototype */
48927702724Smrg	int main (int argc, char *argv[]) {
49027702724Smrg#else
49127702724Smrg	int main (argc, argv) int argc; char *argv[]; {
49227702724Smrg#endif
49327702724Smrg	#if defined (host_mips) && defined (MIPSEB)
49427702724Smrg	#if defined (SYSTYPE_SYSV)
4957cea3689Smrg	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
49627702724Smrg	#endif
49727702724Smrg	#if defined (SYSTYPE_SVR4)
4987cea3689Smrg	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
49927702724Smrg	#endif
50027702724Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
5017cea3689Smrg	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
50227702724Smrg	#endif
50327702724Smrg	#endif
50427702724Smrg	  exit (-1);
50527702724Smrg	}
50627702724SmrgEOF
5077cea3689Smrg	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
5087cea3689Smrg	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
5097cea3689Smrg	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
51027702724Smrg	    { echo "$SYSTEM_NAME"; exit; }
5117cea3689Smrg	echo mips-mips-riscos"$UNAME_RELEASE"
51227702724Smrg	exit ;;
51327702724Smrg    Motorola:PowerMAX_OS:*:*)
51427702724Smrg	echo powerpc-motorola-powermax
51527702724Smrg	exit ;;
51627702724Smrg    Motorola:*:4.3:PL8-*)
51727702724Smrg	echo powerpc-harris-powermax
51827702724Smrg	exit ;;
51927702724Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
52027702724Smrg	echo powerpc-harris-powermax
52127702724Smrg	exit ;;
52227702724Smrg    Night_Hawk:Power_UNIX:*:*)
52327702724Smrg	echo powerpc-harris-powerunix
52427702724Smrg	exit ;;
52527702724Smrg    m88k:CX/UX:7*:*)
52627702724Smrg	echo m88k-harris-cxux7
52727702724Smrg	exit ;;
52827702724Smrg    m88k:*:4*:R4*)
52927702724Smrg	echo m88k-motorola-sysv4
53027702724Smrg	exit ;;
53127702724Smrg    m88k:*:3*:R3*)
53227702724Smrg	echo m88k-motorola-sysv3
53327702724Smrg	exit ;;
53427702724Smrg    AViiON:dgux:*:*)
535313a12fdSmrg	# DG/UX returns AViiON for all architectures
536313a12fdSmrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
5377cea3689Smrg	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
53827702724Smrg	then
5397cea3689Smrg	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
5407cea3689Smrg	       [ "$TARGET_BINARY_INTERFACE"x = x ]
54127702724Smrg	    then
5427cea3689Smrg		echo m88k-dg-dgux"$UNAME_RELEASE"
54327702724Smrg	    else
5447cea3689Smrg		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
54527702724Smrg	    fi
54627702724Smrg	else
5477cea3689Smrg	    echo i586-dg-dgux"$UNAME_RELEASE"
54827702724Smrg	fi
549313a12fdSmrg	exit ;;
55027702724Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
55127702724Smrg	echo m88k-dolphin-sysv3
55227702724Smrg	exit ;;
55327702724Smrg    M88*:*:R3*:*)
55427702724Smrg	# Delta 88k system running SVR3
55527702724Smrg	echo m88k-motorola-sysv3
55627702724Smrg	exit ;;
55727702724Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
55827702724Smrg	echo m88k-tektronix-sysv3
55927702724Smrg	exit ;;
56027702724Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
56127702724Smrg	echo m68k-tektronix-bsd
56227702724Smrg	exit ;;
56327702724Smrg    *:IRIX*:*:*)
5647cea3689Smrg	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
56527702724Smrg	exit ;;
56627702724Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
56727702724Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
56827702724Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
56927702724Smrg    i*86:AIX:*:*)
57027702724Smrg	echo i386-ibm-aix
57127702724Smrg	exit ;;
57227702724Smrg    ia64:AIX:*:*)
57327702724Smrg	if [ -x /usr/bin/oslevel ] ; then
57427702724Smrg		IBM_REV=`/usr/bin/oslevel`
57527702724Smrg	else
5767cea3689Smrg		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
57727702724Smrg	fi
5787cea3689Smrg	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
57927702724Smrg	exit ;;
58027702724Smrg    *:AIX:2:3)
58127702724Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
5827cea3689Smrg		eval "$set_cc_for_build"
5837cea3689Smrg		sed 's/^		//' << EOF > "$dummy.c"
58427702724Smrg		#include <sys/systemcfg.h>
58527702724Smrg
58627702724Smrg		main()
58727702724Smrg			{
58827702724Smrg			if (!__power_pc())
58927702724Smrg				exit(1);
59027702724Smrg			puts("powerpc-ibm-aix3.2.5");
59127702724Smrg			exit(0);
59227702724Smrg			}
59327702724SmrgEOF
5947cea3689Smrg		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
59527702724Smrg		then
59627702724Smrg			echo "$SYSTEM_NAME"
59727702724Smrg		else
59827702724Smrg			echo rs6000-ibm-aix3.2.5
59927702724Smrg		fi
60027702724Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
60127702724Smrg		echo rs6000-ibm-aix3.2.4
60227702724Smrg	else
60327702724Smrg		echo rs6000-ibm-aix3.2
60427702724Smrg	fi
60527702724Smrg	exit ;;
606313a12fdSmrg    *:AIX:*:[4567])
60727702724Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
6087cea3689Smrg	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
60927702724Smrg		IBM_ARCH=rs6000
61027702724Smrg	else
61127702724Smrg		IBM_ARCH=powerpc
61227702724Smrg	fi
6137cea3689Smrg	if [ -x /usr/bin/lslpp ] ; then
6147cea3689Smrg		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
6157cea3689Smrg			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
61627702724Smrg	else
6177cea3689Smrg		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
61827702724Smrg	fi
6197cea3689Smrg	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
62027702724Smrg	exit ;;
62127702724Smrg    *:AIX:*:*)
62227702724Smrg	echo rs6000-ibm-aix
62327702724Smrg	exit ;;
6247cea3689Smrg    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
62527702724Smrg	echo romp-ibm-bsd4.4
62627702724Smrg	exit ;;
62727702724Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
6287cea3689Smrg	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
62927702724Smrg	exit ;;                             # report: romp-ibm BSD 4.3
63027702724Smrg    *:BOSX:*:*)
63127702724Smrg	echo rs6000-bull-bosx
63227702724Smrg	exit ;;
63327702724Smrg    DPX/2?00:B.O.S.:*:*)
63427702724Smrg	echo m68k-bull-sysv3
63527702724Smrg	exit ;;
63627702724Smrg    9000/[34]??:4.3bsd:1.*:*)
63727702724Smrg	echo m68k-hp-bsd
63827702724Smrg	exit ;;
63927702724Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
64027702724Smrg	echo m68k-hp-bsd4.4
64127702724Smrg	exit ;;
64227702724Smrg    9000/[34678]??:HP-UX:*:*)
6437cea3689Smrg	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
6447cea3689Smrg	case "$UNAME_MACHINE" in
6457cea3689Smrg	    9000/31?)            HP_ARCH=m68000 ;;
6467cea3689Smrg	    9000/[34]??)         HP_ARCH=m68k ;;
64727702724Smrg	    9000/[678][0-9][0-9])
64827702724Smrg		if [ -x /usr/bin/getconf ]; then
64927702724Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
650313a12fdSmrg		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
6517cea3689Smrg		    case "$sc_cpu_version" in
6527cea3689Smrg		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
6537cea3689Smrg		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
654313a12fdSmrg		      532)                      # CPU_PA_RISC2_0
6557cea3689Smrg			case "$sc_kernel_bits" in
6567cea3689Smrg			  32) HP_ARCH=hppa2.0n ;;
6577cea3689Smrg			  64) HP_ARCH=hppa2.0w ;;
6587cea3689Smrg			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
659313a12fdSmrg			esac ;;
660313a12fdSmrg		    esac
66127702724Smrg		fi
6627cea3689Smrg		if [ "$HP_ARCH" = "" ]; then
6637cea3689Smrg		    eval "$set_cc_for_build"
6647cea3689Smrg		    sed 's/^		//' << EOF > "$dummy.c"
66527702724Smrg
666313a12fdSmrg		#define _HPUX_SOURCE
667313a12fdSmrg		#include <stdlib.h>
668313a12fdSmrg		#include <unistd.h>
66927702724Smrg
670313a12fdSmrg		int main ()
671313a12fdSmrg		{
672313a12fdSmrg		#if defined(_SC_KERNEL_BITS)
673313a12fdSmrg		    long bits = sysconf(_SC_KERNEL_BITS);
674313a12fdSmrg		#endif
675313a12fdSmrg		    long cpu  = sysconf (_SC_CPU_VERSION);
67627702724Smrg
677313a12fdSmrg		    switch (cpu)
678313a12fdSmrg			{
679313a12fdSmrg			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
680313a12fdSmrg			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
681313a12fdSmrg			case CPU_PA_RISC2_0:
682313a12fdSmrg		#if defined(_SC_KERNEL_BITS)
683313a12fdSmrg			    switch (bits)
684313a12fdSmrg				{
685313a12fdSmrg				case 64: puts ("hppa2.0w"); break;
686313a12fdSmrg				case 32: puts ("hppa2.0n"); break;
687313a12fdSmrg				default: puts ("hppa2.0"); break;
688313a12fdSmrg				} break;
689313a12fdSmrg		#else  /* !defined(_SC_KERNEL_BITS) */
690313a12fdSmrg			    puts ("hppa2.0"); break;
691313a12fdSmrg		#endif
692313a12fdSmrg			default: puts ("hppa1.0"); break;
693313a12fdSmrg			}
694313a12fdSmrg		    exit (0);
695313a12fdSmrg		}
69627702724SmrgEOF
6977cea3689Smrg		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
69827702724Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
69927702724Smrg		fi ;;
70027702724Smrg	esac
7017cea3689Smrg	if [ "$HP_ARCH" = hppa2.0w ]
70227702724Smrg	then
7037cea3689Smrg	    eval "$set_cc_for_build"
70427702724Smrg
70527702724Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
70627702724Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
70727702724Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
70827702724Smrg	    #
70927702724Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
71027702724Smrg	    # => hppa2.0w-hp-hpux11.23
71127702724Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
71227702724Smrg	    # => hppa64-hp-hpux11.23
71327702724Smrg
7147cea3689Smrg	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
71500084f2cSmrg		grep -q __LP64__
71627702724Smrg	    then
7177cea3689Smrg		HP_ARCH=hppa2.0w
71827702724Smrg	    else
7197cea3689Smrg		HP_ARCH=hppa64
72027702724Smrg	    fi
72127702724Smrg	fi
7227cea3689Smrg	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
72327702724Smrg	exit ;;
72427702724Smrg    ia64:HP-UX:*:*)
7257cea3689Smrg	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
7267cea3689Smrg	echo ia64-hp-hpux"$HPUX_REV"
72727702724Smrg	exit ;;
72827702724Smrg    3050*:HI-UX:*:*)
7297cea3689Smrg	eval "$set_cc_for_build"
7307cea3689Smrg	sed 's/^	//' << EOF > "$dummy.c"
73127702724Smrg	#include <unistd.h>
73227702724Smrg	int
73327702724Smrg	main ()
73427702724Smrg	{
73527702724Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
73627702724Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
73727702724Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
73827702724Smrg	     results, however.  */
73927702724Smrg	  if (CPU_IS_PA_RISC (cpu))
74027702724Smrg	    {
74127702724Smrg	      switch (cpu)
74227702724Smrg		{
74327702724Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
74427702724Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
74527702724Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
74627702724Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
74727702724Smrg		}
74827702724Smrg	    }
74927702724Smrg	  else if (CPU_IS_HP_MC68K (cpu))
75027702724Smrg	    puts ("m68k-hitachi-hiuxwe2");
75127702724Smrg	  else puts ("unknown-hitachi-hiuxwe2");
75227702724Smrg	  exit (0);
75327702724Smrg	}
75427702724SmrgEOF
7557cea3689Smrg	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
75627702724Smrg		{ echo "$SYSTEM_NAME"; exit; }
75727702724Smrg	echo unknown-hitachi-hiuxwe2
75827702724Smrg	exit ;;
7597cea3689Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
76027702724Smrg	echo hppa1.1-hp-bsd
76127702724Smrg	exit ;;
76227702724Smrg    9000/8??:4.3bsd:*:*)
76327702724Smrg	echo hppa1.0-hp-bsd
76427702724Smrg	exit ;;
76527702724Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
76627702724Smrg	echo hppa1.0-hp-mpeix
76727702724Smrg	exit ;;
7687cea3689Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
76927702724Smrg	echo hppa1.1-hp-osf
77027702724Smrg	exit ;;
77127702724Smrg    hp8??:OSF1:*:*)
77227702724Smrg	echo hppa1.0-hp-osf
77327702724Smrg	exit ;;
77427702724Smrg    i*86:OSF1:*:*)
77527702724Smrg	if [ -x /usr/sbin/sysversion ] ; then
7767cea3689Smrg	    echo "$UNAME_MACHINE"-unknown-osf1mk
77727702724Smrg	else
7787cea3689Smrg	    echo "$UNAME_MACHINE"-unknown-osf1
77927702724Smrg	fi
78027702724Smrg	exit ;;
78127702724Smrg    parisc*:Lites*:*:*)
78227702724Smrg	echo hppa1.1-hp-lites
78327702724Smrg	exit ;;
78427702724Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
78527702724Smrg	echo c1-convex-bsd
786313a12fdSmrg	exit ;;
78727702724Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
78827702724Smrg	if getsysinfo -f scalar_acc
78927702724Smrg	then echo c32-convex-bsd
79027702724Smrg	else echo c2-convex-bsd
79127702724Smrg	fi
792313a12fdSmrg	exit ;;
79327702724Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
79427702724Smrg	echo c34-convex-bsd
795313a12fdSmrg	exit ;;
79627702724Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
79727702724Smrg	echo c38-convex-bsd
798313a12fdSmrg	exit ;;
79927702724Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
80027702724Smrg	echo c4-convex-bsd
801313a12fdSmrg	exit ;;
80227702724Smrg    CRAY*Y-MP:*:*:*)
8037cea3689Smrg	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
80427702724Smrg	exit ;;
80527702724Smrg    CRAY*[A-Z]90:*:*:*)
8067cea3689Smrg	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
80727702724Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
80827702724Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
80927702724Smrg	      -e 's/\.[^.]*$/.X/'
81027702724Smrg	exit ;;
81127702724Smrg    CRAY*TS:*:*:*)
8127cea3689Smrg	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
81327702724Smrg	exit ;;
81427702724Smrg    CRAY*T3E:*:*:*)
8157cea3689Smrg	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
81627702724Smrg	exit ;;
81727702724Smrg    CRAY*SV1:*:*:*)
8187cea3689Smrg	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
81927702724Smrg	exit ;;
82027702724Smrg    *:UNICOS/mp:*:*)
8217cea3689Smrg	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
82227702724Smrg	exit ;;
82327702724Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
8247cea3689Smrg	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
8257cea3689Smrg	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
8267cea3689Smrg	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
827313a12fdSmrg	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
828313a12fdSmrg	exit ;;
82927702724Smrg    5000:UNIX_System_V:4.*:*)
8307cea3689Smrg	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
8317cea3689Smrg	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
832313a12fdSmrg	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
83327702724Smrg	exit ;;
83427702724Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
8357cea3689Smrg	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
83627702724Smrg	exit ;;
83727702724Smrg    sparc*:BSD/OS:*:*)
8387cea3689Smrg	echo sparc-unknown-bsdi"$UNAME_RELEASE"
83927702724Smrg	exit ;;
84027702724Smrg    *:BSD/OS:*:*)
8417cea3689Smrg	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
84227702724Smrg	exit ;;
84327702724Smrg    *:FreeBSD:*:*)
844313a12fdSmrg	UNAME_PROCESSOR=`/usr/bin/uname -p`
8457cea3689Smrg	case "$UNAME_PROCESSOR" in
846e19dfac4Smrg	    amd64)
8477cea3689Smrg		UNAME_PROCESSOR=x86_64 ;;
8487cea3689Smrg	    i386)
8497cea3689Smrg		UNAME_PROCESSOR=i586 ;;
85027702724Smrg	esac
8517cea3689Smrg	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
85227702724Smrg	exit ;;
85327702724Smrg    i*:CYGWIN*:*)
8547cea3689Smrg	echo "$UNAME_MACHINE"-pc-cygwin
85527702724Smrg	exit ;;
856313a12fdSmrg    *:MINGW64*:*)
8577cea3689Smrg	echo "$UNAME_MACHINE"-pc-mingw64
858313a12fdSmrg	exit ;;
859e19dfac4Smrg    *:MINGW*:*)
8607cea3689Smrg	echo "$UNAME_MACHINE"-pc-mingw32
861313a12fdSmrg	exit ;;
8627cea3689Smrg    *:MSYS*:*)
8637cea3689Smrg	echo "$UNAME_MACHINE"-pc-msys
86427702724Smrg	exit ;;
86527702724Smrg    i*:PW*:*)
8667cea3689Smrg	echo "$UNAME_MACHINE"-pc-pw32
86727702724Smrg	exit ;;
86800084f2cSmrg    *:Interix*:*)
8697cea3689Smrg	case "$UNAME_MACHINE" in
870e19dfac4Smrg	    x86)
8717cea3689Smrg		echo i586-pc-interix"$UNAME_RELEASE"
872e19dfac4Smrg		exit ;;
87300084f2cSmrg	    authenticamd | genuineintel | EM64T)
8747cea3689Smrg		echo x86_64-unknown-interix"$UNAME_RELEASE"
875e19dfac4Smrg		exit ;;
876e19dfac4Smrg	    IA64)
8777cea3689Smrg		echo ia64-unknown-interix"$UNAME_RELEASE"
878e19dfac4Smrg		exit ;;
879e19dfac4Smrg	esac ;;
88027702724Smrg    i*:UWIN*:*)
8817cea3689Smrg	echo "$UNAME_MACHINE"-pc-uwin
88227702724Smrg	exit ;;
88327702724Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
88427702724Smrg	echo x86_64-unknown-cygwin
88527702724Smrg	exit ;;
88627702724Smrg    prep*:SunOS:5.*:*)
8877cea3689Smrg	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
88827702724Smrg	exit ;;
88927702724Smrg    *:GNU:*:*)
89027702724Smrg	# the GNU system
8917cea3689Smrg	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
89227702724Smrg	exit ;;
89327702724Smrg    *:GNU/*:*:*)
89427702724Smrg	# other systems with GNU libc and userland
8957cea3689Smrg	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
89627702724Smrg	exit ;;
89727702724Smrg    i*86:Minix:*:*)
8987cea3689Smrg	echo "$UNAME_MACHINE"-pc-minix
89927702724Smrg	exit ;;
900313a12fdSmrg    aarch64:Linux:*:*)
9017cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
902313a12fdSmrg	exit ;;
903313a12fdSmrg    aarch64_be:Linux:*:*)
904313a12fdSmrg	UNAME_MACHINE=aarch64_be
9057cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
906313a12fdSmrg	exit ;;
90700084f2cSmrg    alpha:Linux:*:*)
90800084f2cSmrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
90900084f2cSmrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
91000084f2cSmrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
91100084f2cSmrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
91200084f2cSmrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
91300084f2cSmrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
91400084f2cSmrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
91500084f2cSmrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
916313a12fdSmrg	esac
91700084f2cSmrg	objdump --private-headers /bin/sh | grep -q ld.so.1
9187cea3689Smrg	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
9197cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
92000084f2cSmrg	exit ;;
921313a12fdSmrg    arc:Linux:*:* | arceb:Linux:*:*)
9227cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
923313a12fdSmrg	exit ;;
92427702724Smrg    arm*:Linux:*:*)
9257cea3689Smrg	eval "$set_cc_for_build"
926e19dfac4Smrg	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
927e19dfac4Smrg	    | grep -q __ARM_EABI__
928e19dfac4Smrg	then
9297cea3689Smrg	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
930e19dfac4Smrg	else
931313a12fdSmrg	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
932313a12fdSmrg		| grep -q __ARM_PCS_VFP
933313a12fdSmrg	    then
9347cea3689Smrg		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
935313a12fdSmrg	    else
9367cea3689Smrg		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
937313a12fdSmrg	    fi
938e19dfac4Smrg	fi
939e19dfac4Smrg	exit ;;
940e19dfac4Smrg    avr32*:Linux:*:*)
9417cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
94227702724Smrg	exit ;;
94327702724Smrg    cris:Linux:*:*)
9447cea3689Smrg	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
94527702724Smrg	exit ;;
94627702724Smrg    crisv32:Linux:*:*)
9477cea3689Smrg	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
9487cea3689Smrg	exit ;;
9497cea3689Smrg    e2k:Linux:*:*)
9507cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
95127702724Smrg	exit ;;
95227702724Smrg    frv:Linux:*:*)
9537cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
954313a12fdSmrg	exit ;;
955313a12fdSmrg    hexagon:Linux:*:*)
9567cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
95727702724Smrg	exit ;;
95800084f2cSmrg    i*86:Linux:*:*)
9597cea3689Smrg	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
96000084f2cSmrg	exit ;;
96127702724Smrg    ia64:Linux:*:*)
9627cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
9637cea3689Smrg	exit ;;
9647cea3689Smrg    k1om:Linux:*:*)
9657cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
96627702724Smrg	exit ;;
96727702724Smrg    m32r*:Linux:*:*)
9687cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
96927702724Smrg	exit ;;
97027702724Smrg    m68*:Linux:*:*)
9717cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
97227702724Smrg	exit ;;
97300084f2cSmrg    mips:Linux:*:* | mips64:Linux:*:*)
9747cea3689Smrg	eval "$set_cc_for_build"
9757cea3689Smrg	sed 's/^	//' << EOF > "$dummy.c"
97627702724Smrg	#undef CPU
97700084f2cSmrg	#undef ${UNAME_MACHINE}
97800084f2cSmrg	#undef ${UNAME_MACHINE}el
97927702724Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
98000084f2cSmrg	CPU=${UNAME_MACHINE}el
98127702724Smrg	#else
98227702724Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
98300084f2cSmrg	CPU=${UNAME_MACHINE}
98427702724Smrg	#else
98527702724Smrg	CPU=
98627702724Smrg	#endif
98727702724Smrg	#endif
98827702724SmrgEOF
9897cea3689Smrg	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
9907cea3689Smrg	test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
99127702724Smrg	;;
9927cea3689Smrg    mips64el:Linux:*:*)
9937cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
9947cea3689Smrg	exit ;;
9957cea3689Smrg    openrisc*:Linux:*:*)
9967cea3689Smrg	echo or1k-unknown-linux-"$LIBC"
997313a12fdSmrg	exit ;;
9987cea3689Smrg    or32:Linux:*:* | or1k*:Linux:*:*)
9997cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
100027702724Smrg	exit ;;
100100084f2cSmrg    padre:Linux:*:*)
10027cea3689Smrg	echo sparc-unknown-linux-"$LIBC"
100327702724Smrg	exit ;;
100400084f2cSmrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
10057cea3689Smrg	echo hppa64-unknown-linux-"$LIBC"
100627702724Smrg	exit ;;
100727702724Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
100827702724Smrg	# Look for CPU level
100927702724Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
10107cea3689Smrg	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
10117cea3689Smrg	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
10127cea3689Smrg	  *)    echo hppa-unknown-linux-"$LIBC" ;;
101327702724Smrg	esac
101427702724Smrg	exit ;;
101500084f2cSmrg    ppc64:Linux:*:*)
10167cea3689Smrg	echo powerpc64-unknown-linux-"$LIBC"
101700084f2cSmrg	exit ;;
101800084f2cSmrg    ppc:Linux:*:*)
10197cea3689Smrg	echo powerpc-unknown-linux-"$LIBC"
10207cea3689Smrg	exit ;;
10217cea3689Smrg    ppc64le:Linux:*:*)
10227cea3689Smrg	echo powerpc64le-unknown-linux-"$LIBC"
10237cea3689Smrg	exit ;;
10247cea3689Smrg    ppcle:Linux:*:*)
10257cea3689Smrg	echo powerpcle-unknown-linux-"$LIBC"
10267cea3689Smrg	exit ;;
10277cea3689Smrg    riscv32:Linux:*:* | riscv64:Linux:*:*)
10287cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
102927702724Smrg	exit ;;
103027702724Smrg    s390:Linux:*:* | s390x:Linux:*:*)
10317cea3689Smrg	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
103227702724Smrg	exit ;;
103327702724Smrg    sh64*:Linux:*:*)
10347cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
103527702724Smrg	exit ;;
103627702724Smrg    sh*:Linux:*:*)
10377cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
103827702724Smrg	exit ;;
103927702724Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
10407cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
104127702724Smrg	exit ;;
1042313a12fdSmrg    tile*:Linux:*:*)
10437cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1044313a12fdSmrg	exit ;;
104527702724Smrg    vax:Linux:*:*)
10467cea3689Smrg	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
104727702724Smrg	exit ;;
104827702724Smrg    x86_64:Linux:*:*)
10497cea3689Smrg	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
105027702724Smrg	exit ;;
1051e19dfac4Smrg    xtensa*:Linux:*:*)
10527cea3689Smrg	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1053e19dfac4Smrg	exit ;;
105427702724Smrg    i*86:DYNIX/ptx:4*:*)
105527702724Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
105627702724Smrg	# earlier versions are messed up and put the nodename in both
105727702724Smrg	# sysname and nodename.
105827702724Smrg	echo i386-sequent-sysv4
105927702724Smrg	exit ;;
106027702724Smrg    i*86:UNIX_SV:4.2MP:2.*)
1061313a12fdSmrg	# Unixware is an offshoot of SVR4, but it has its own version
1062313a12fdSmrg	# number series starting with 2...
1063313a12fdSmrg	# I am not positive that other SVR4 systems won't match this,
106427702724Smrg	# I just have to hope.  -- rms.
1065313a12fdSmrg	# Use sysv4.2uw... so that sysv4* matches it.
10667cea3689Smrg	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
106727702724Smrg	exit ;;
106827702724Smrg    i*86:OS/2:*:*)
106927702724Smrg	# If we were able to find `uname', then EMX Unix compatibility
107027702724Smrg	# is probably installed.
10717cea3689Smrg	echo "$UNAME_MACHINE"-pc-os2-emx
107227702724Smrg	exit ;;
107327702724Smrg    i*86:XTS-300:*:STOP)
10747cea3689Smrg	echo "$UNAME_MACHINE"-unknown-stop
107527702724Smrg	exit ;;
107627702724Smrg    i*86:atheos:*:*)
10777cea3689Smrg	echo "$UNAME_MACHINE"-unknown-atheos
107827702724Smrg	exit ;;
107927702724Smrg    i*86:syllable:*:*)
10807cea3689Smrg	echo "$UNAME_MACHINE"-pc-syllable
108127702724Smrg	exit ;;
108200084f2cSmrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
10837cea3689Smrg	echo i386-unknown-lynxos"$UNAME_RELEASE"
108427702724Smrg	exit ;;
108527702724Smrg    i*86:*DOS:*:*)
10867cea3689Smrg	echo "$UNAME_MACHINE"-pc-msdosdjgpp
108727702724Smrg	exit ;;
10887cea3689Smrg    i*86:*:4.*:*)
10897cea3689Smrg	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
109027702724Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
10917cea3689Smrg		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
109227702724Smrg	else
10937cea3689Smrg		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
109427702724Smrg	fi
109527702724Smrg	exit ;;
109627702724Smrg    i*86:*:5:[678]*)
1097313a12fdSmrg	# UnixWare 7.x, OpenUNIX and OpenServer 6.
109827702724Smrg	case `/bin/uname -X | grep "^Machine"` in
109927702724Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
110027702724Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
110127702724Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
110227702724Smrg	esac
11037cea3689Smrg	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
110427702724Smrg	exit ;;
110527702724Smrg    i*86:*:3.2:*)
110627702724Smrg	if test -f /usr/options/cb.name; then
110727702724Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
11087cea3689Smrg		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
110927702724Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
111027702724Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
111127702724Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
111227702724Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
111327702724Smrg			&& UNAME_MACHINE=i586
111427702724Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
111527702724Smrg			&& UNAME_MACHINE=i686
111627702724Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
111727702724Smrg			&& UNAME_MACHINE=i686
11187cea3689Smrg		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
111927702724Smrg	else
11207cea3689Smrg		echo "$UNAME_MACHINE"-pc-sysv32
112127702724Smrg	fi
112227702724Smrg	exit ;;
112327702724Smrg    pc:*:*:*)
112427702724Smrg	# Left here for compatibility:
1125313a12fdSmrg	# uname -m prints for DJGPP always 'pc', but it prints nothing about
1126313a12fdSmrg	# the processor, so we play safe by assuming i586.
112700084f2cSmrg	# Note: whatever this is, it MUST be the same as what config.sub
11287cea3689Smrg	# prints for the "djgpp" host, or else GDB configure will decide that
112900084f2cSmrg	# this is a cross-build.
113000084f2cSmrg	echo i586-pc-msdosdjgpp
1131313a12fdSmrg	exit ;;
113227702724Smrg    Intel:Mach:3*:*)
113327702724Smrg	echo i386-pc-mach3
113427702724Smrg	exit ;;
113527702724Smrg    paragon:*:*:*)
113627702724Smrg	echo i860-intel-osf1
113727702724Smrg	exit ;;
113827702724Smrg    i860:*:4.*:*) # i860-SVR4
113927702724Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
11407cea3689Smrg	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
114127702724Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
11427cea3689Smrg	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
114327702724Smrg	fi
114427702724Smrg	exit ;;
114527702724Smrg    mini*:CTIX:SYS*5:*)
114627702724Smrg	# "miniframe"
114727702724Smrg	echo m68010-convergent-sysv
114827702724Smrg	exit ;;
114927702724Smrg    mc68k:UNIX:SYSTEM5:3.51m)
115027702724Smrg	echo m68k-convergent-sysv
115127702724Smrg	exit ;;
115227702724Smrg    M680?0:D-NIX:5.3:*)
115327702724Smrg	echo m68k-diab-dnix
115427702724Smrg	exit ;;
115527702724Smrg    M68*:*:R3V[5678]*:*)
115627702724Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
115727702724Smrg    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)
115827702724Smrg	OS_REL=''
115927702724Smrg	test -r /etc/.relid \
116027702724Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
116127702724Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11627cea3689Smrg	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
116327702724Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11647cea3689Smrg	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
116527702724Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1166313a12fdSmrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1167313a12fdSmrg	  && { echo i486-ncr-sysv4; exit; } ;;
116800084f2cSmrg    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
116900084f2cSmrg	OS_REL='.3'
117000084f2cSmrg	test -r /etc/.relid \
117100084f2cSmrg	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
117200084f2cSmrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
11737cea3689Smrg	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
117400084f2cSmrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11757cea3689Smrg	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
117600084f2cSmrg	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
11777cea3689Smrg	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
117827702724Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
11797cea3689Smrg	echo m68k-unknown-lynxos"$UNAME_RELEASE"
118027702724Smrg	exit ;;
118127702724Smrg    mc68030:UNIX_System_V:4.*:*)
118227702724Smrg	echo m68k-atari-sysv4
118327702724Smrg	exit ;;
118427702724Smrg    TSUNAMI:LynxOS:2.*:*)
11857cea3689Smrg	echo sparc-unknown-lynxos"$UNAME_RELEASE"
118627702724Smrg	exit ;;
118727702724Smrg    rs6000:LynxOS:2.*:*)
11887cea3689Smrg	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
118927702724Smrg	exit ;;
119000084f2cSmrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
11917cea3689Smrg	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
119227702724Smrg	exit ;;
119327702724Smrg    SM[BE]S:UNIX_SV:*:*)
11947cea3689Smrg	echo mips-dde-sysv"$UNAME_RELEASE"
119527702724Smrg	exit ;;
119627702724Smrg    RM*:ReliantUNIX-*:*:*)
119727702724Smrg	echo mips-sni-sysv4
119827702724Smrg	exit ;;
119927702724Smrg    RM*:SINIX-*:*:*)
120027702724Smrg	echo mips-sni-sysv4
120127702724Smrg	exit ;;
120227702724Smrg    *:SINIX-*:*:*)
120327702724Smrg	if uname -p 2>/dev/null >/dev/null ; then
120427702724Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
12057cea3689Smrg		echo "$UNAME_MACHINE"-sni-sysv4
120627702724Smrg	else
120727702724Smrg		echo ns32k-sni-sysv
120827702724Smrg	fi
120927702724Smrg	exit ;;
1210313a12fdSmrg    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1211313a12fdSmrg			# says <Richard.M.Bartel@ccMail.Census.GOV>
1212313a12fdSmrg	echo i586-unisys-sysv4
1213313a12fdSmrg	exit ;;
121427702724Smrg    *:UNIX_System_V:4*:FTX*)
121527702724Smrg	# From Gerald Hewes <hewes@openmarket.com>.
121627702724Smrg	# How about differentiating between stratus architectures? -djm
121727702724Smrg	echo hppa1.1-stratus-sysv4
121827702724Smrg	exit ;;
121927702724Smrg    *:*:*:FTX*)
122027702724Smrg	# From seanf@swdc.stratus.com.
122127702724Smrg	echo i860-stratus-sysv4
122227702724Smrg	exit ;;
122327702724Smrg    i*86:VOS:*:*)
122427702724Smrg	# From Paul.Green@stratus.com.
12257cea3689Smrg	echo "$UNAME_MACHINE"-stratus-vos
122627702724Smrg	exit ;;
122727702724Smrg    *:VOS:*:*)
122827702724Smrg	# From Paul.Green@stratus.com.
122927702724Smrg	echo hppa1.1-stratus-vos
123027702724Smrg	exit ;;
123127702724Smrg    mc68*:A/UX:*:*)
12327cea3689Smrg	echo m68k-apple-aux"$UNAME_RELEASE"
123327702724Smrg	exit ;;
123427702724Smrg    news*:NEWS-OS:6*:*)
123527702724Smrg	echo mips-sony-newsos6
123627702724Smrg	exit ;;
123727702724Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
123827702724Smrg	if [ -d /usr/nec ]; then
12397cea3689Smrg		echo mips-nec-sysv"$UNAME_RELEASE"
124027702724Smrg	else
12417cea3689Smrg		echo mips-unknown-sysv"$UNAME_RELEASE"
124227702724Smrg	fi
1243313a12fdSmrg	exit ;;
124427702724Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
124527702724Smrg	echo powerpc-be-beos
124627702724Smrg	exit ;;
124727702724Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
124827702724Smrg	echo powerpc-apple-beos
124927702724Smrg	exit ;;
125027702724Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
125127702724Smrg	echo i586-pc-beos
125227702724Smrg	exit ;;
125300084f2cSmrg    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
125400084f2cSmrg	echo i586-pc-haiku
125500084f2cSmrg	exit ;;
1256313a12fdSmrg    x86_64:Haiku:*:*)
1257313a12fdSmrg	echo x86_64-unknown-haiku
1258313a12fdSmrg	exit ;;
125927702724Smrg    SX-4:SUPER-UX:*:*)
12607cea3689Smrg	echo sx4-nec-superux"$UNAME_RELEASE"
126127702724Smrg	exit ;;
126227702724Smrg    SX-5:SUPER-UX:*:*)
12637cea3689Smrg	echo sx5-nec-superux"$UNAME_RELEASE"
126427702724Smrg	exit ;;
126527702724Smrg    SX-6:SUPER-UX:*:*)
12667cea3689Smrg	echo sx6-nec-superux"$UNAME_RELEASE"
126727702724Smrg	exit ;;
1268e19dfac4Smrg    SX-7:SUPER-UX:*:*)
12697cea3689Smrg	echo sx7-nec-superux"$UNAME_RELEASE"
1270e19dfac4Smrg	exit ;;
1271e19dfac4Smrg    SX-8:SUPER-UX:*:*)
12727cea3689Smrg	echo sx8-nec-superux"$UNAME_RELEASE"
1273e19dfac4Smrg	exit ;;
1274e19dfac4Smrg    SX-8R:SUPER-UX:*:*)
12757cea3689Smrg	echo sx8r-nec-superux"$UNAME_RELEASE"
12767cea3689Smrg	exit ;;
12777cea3689Smrg    SX-ACE:SUPER-UX:*:*)
12787cea3689Smrg	echo sxace-nec-superux"$UNAME_RELEASE"
1279e19dfac4Smrg	exit ;;
128027702724Smrg    Power*:Rhapsody:*:*)
12817cea3689Smrg	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
128227702724Smrg	exit ;;
128327702724Smrg    *:Rhapsody:*:*)
12847cea3689Smrg	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
128527702724Smrg	exit ;;
128627702724Smrg    *:Darwin:*:*)
128727702724Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
12887cea3689Smrg	eval "$set_cc_for_build"
12897cea3689Smrg	if test "$UNAME_PROCESSOR" = unknown ; then
12907cea3689Smrg	    UNAME_PROCESSOR=powerpc
12917cea3689Smrg	fi
12927cea3689Smrg	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
12937cea3689Smrg	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
12947cea3689Smrg		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
12957cea3689Smrg		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
12967cea3689Smrg		       grep IS_64BIT_ARCH >/dev/null
12977cea3689Smrg		then
12987cea3689Smrg		    case $UNAME_PROCESSOR in
12997cea3689Smrg			i386) UNAME_PROCESSOR=x86_64 ;;
13007cea3689Smrg			powerpc) UNAME_PROCESSOR=powerpc64 ;;
13017cea3689Smrg		    esac
13027cea3689Smrg		fi
13037cea3689Smrg		# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
13047cea3689Smrg		if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
13057cea3689Smrg		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
13067cea3689Smrg		       grep IS_PPC >/dev/null
13077cea3689Smrg		then
13087cea3689Smrg		    UNAME_PROCESSOR=powerpc
13097cea3689Smrg		fi
13107cea3689Smrg	    fi
13117cea3689Smrg	elif test "$UNAME_PROCESSOR" = i386 ; then
13127cea3689Smrg	    # Avoid executing cc on OS X 10.9, as it ships with a stub
13137cea3689Smrg	    # that puts up a graphical alert prompting to install
13147cea3689Smrg	    # developer tools.  Any system running Mac OS X 10.7 or
13157cea3689Smrg	    # later (Darwin 11 and later) is required to have a 64-bit
13167cea3689Smrg	    # processor. This is not true of the ARM version of Darwin
13177cea3689Smrg	    # that Apple uses in portable devices.
13187cea3689Smrg	    UNAME_PROCESSOR=x86_64
13197cea3689Smrg	fi
13207cea3689Smrg	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
132127702724Smrg	exit ;;
132227702724Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
132327702724Smrg	UNAME_PROCESSOR=`uname -p`
13247cea3689Smrg	if test "$UNAME_PROCESSOR" = x86; then
132527702724Smrg		UNAME_PROCESSOR=i386
132627702724Smrg		UNAME_MACHINE=pc
132727702724Smrg	fi
13287cea3689Smrg	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
132927702724Smrg	exit ;;
133027702724Smrg    *:QNX:*:4*)
133127702724Smrg	echo i386-pc-qnx
133227702724Smrg	exit ;;
13337cea3689Smrg    NEO-*:NONSTOP_KERNEL:*:*)
13347cea3689Smrg	echo neo-tandem-nsk"$UNAME_RELEASE"
1335313a12fdSmrg	exit ;;
1336313a12fdSmrg    NSE-*:NONSTOP_KERNEL:*:*)
13377cea3689Smrg	echo nse-tandem-nsk"$UNAME_RELEASE"
13387cea3689Smrg	exit ;;
13397cea3689Smrg    NSR-*:NONSTOP_KERNEL:*:*)
13407cea3689Smrg	echo nsr-tandem-nsk"$UNAME_RELEASE"
134127702724Smrg	exit ;;
13427cea3689Smrg    NSV-*:NONSTOP_KERNEL:*:*)
13437cea3689Smrg	echo nsv-tandem-nsk"$UNAME_RELEASE"
13447cea3689Smrg	exit ;;
13457cea3689Smrg    NSX-*:NONSTOP_KERNEL:*:*)
13467cea3689Smrg	echo nsx-tandem-nsk"$UNAME_RELEASE"
134727702724Smrg	exit ;;
134827702724Smrg    *:NonStop-UX:*:*)
134927702724Smrg	echo mips-compaq-nonstopux
135027702724Smrg	exit ;;
135127702724Smrg    BS2000:POSIX*:*:*)
135227702724Smrg	echo bs2000-siemens-sysv
135327702724Smrg	exit ;;
135427702724Smrg    DS/*:UNIX_System_V:*:*)
13557cea3689Smrg	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
135627702724Smrg	exit ;;
135727702724Smrg    *:Plan9:*:*)
135827702724Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
135927702724Smrg	# is converted to i386 for consistency with other x86
136027702724Smrg	# operating systems.
13617cea3689Smrg	if test "$cputype" = 386; then
136227702724Smrg	    UNAME_MACHINE=i386
136327702724Smrg	else
136427702724Smrg	    UNAME_MACHINE="$cputype"
136527702724Smrg	fi
13667cea3689Smrg	echo "$UNAME_MACHINE"-unknown-plan9
136727702724Smrg	exit ;;
136827702724Smrg    *:TOPS-10:*:*)
136927702724Smrg	echo pdp10-unknown-tops10
137027702724Smrg	exit ;;
137127702724Smrg    *:TENEX:*:*)
137227702724Smrg	echo pdp10-unknown-tenex
137327702724Smrg	exit ;;
137427702724Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
137527702724Smrg	echo pdp10-dec-tops20
137627702724Smrg	exit ;;
137727702724Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
137827702724Smrg	echo pdp10-xkl-tops20
137927702724Smrg	exit ;;
138027702724Smrg    *:TOPS-20:*:*)
138127702724Smrg	echo pdp10-unknown-tops20
138227702724Smrg	exit ;;
138327702724Smrg    *:ITS:*:*)
138427702724Smrg	echo pdp10-unknown-its
138527702724Smrg	exit ;;
138627702724Smrg    SEI:*:*:SEIUX)
13877cea3689Smrg	echo mips-sei-seiux"$UNAME_RELEASE"
138827702724Smrg	exit ;;
138927702724Smrg    *:DragonFly:*:*)
13907cea3689Smrg	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
139127702724Smrg	exit ;;
139227702724Smrg    *:*VMS:*:*)
1393313a12fdSmrg	UNAME_MACHINE=`(uname -p) 2>/dev/null`
13947cea3689Smrg	case "$UNAME_MACHINE" in
139527702724Smrg	    A*) echo alpha-dec-vms ; exit ;;
139627702724Smrg	    I*) echo ia64-dec-vms ; exit ;;
139727702724Smrg	    V*) echo vax-dec-vms ; exit ;;
139827702724Smrg	esac ;;
139927702724Smrg    *:XENIX:*:SysV)
140027702724Smrg	echo i386-pc-xenix
140127702724Smrg	exit ;;
140227702724Smrg    i*86:skyos:*:*)
14037cea3689Smrg	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
140427702724Smrg	exit ;;
140527702724Smrg    i*86:rdos:*:*)
14067cea3689Smrg	echo "$UNAME_MACHINE"-pc-rdos
140727702724Smrg	exit ;;
140800084f2cSmrg    i*86:AROS:*:*)
14097cea3689Smrg	echo "$UNAME_MACHINE"-pc-aros
141000084f2cSmrg	exit ;;
1411313a12fdSmrg    x86_64:VMkernel:*:*)
14127cea3689Smrg	echo "$UNAME_MACHINE"-unknown-esx
14137cea3689Smrg	exit ;;
14147cea3689Smrg    amd64:Isilon\ OneFS:*:*)
14157cea3689Smrg	echo x86_64-unknown-onefs
1416313a12fdSmrg	exit ;;
141727702724Smrgesac
141827702724Smrg
14197cea3689Smrgecho "$0: unable to guess system type" >&2
142027702724Smrg
14217cea3689Smrgcase "$UNAME_MACHINE:$UNAME_SYSTEM" in
14227cea3689Smrg    mips:Linux | mips64:Linux)
14237cea3689Smrg	# If we got here on MIPS GNU/Linux, output extra information.
14247cea3689Smrg	cat >&2 <<EOF
142527702724Smrg
14267cea3689SmrgNOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
14277cea3689Smrgthe system type. Please install a C compiler and try again.
142827702724SmrgEOF
14297cea3689Smrg	;;
14307cea3689Smrgesac
143127702724Smrg
143227702724Smrgcat >&2 <<EOF
143327702724Smrg
14347cea3689SmrgThis script (version $timestamp), has failed to recognize the
14357cea3689Smrgoperating system you are using. If your script is old, overwrite *all*
14367cea3689Smrgcopies of config.guess and config.sub with the latest versions from:
143727702724Smrg
14387cea3689Smrg  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
143927702724Smrgand
14407cea3689Smrg  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
144127702724Smrg
14427cea3689SmrgIf $0 has already been updated, send the following data and any
14437cea3689Smrginformation you think might be pertinent to config-patches@gnu.org to
14447cea3689Smrgprovide the necessary information to handle your system.
144527702724Smrg
144627702724Smrgconfig.guess timestamp = $timestamp
144727702724Smrg
144827702724Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
144927702724Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
145027702724Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
145127702724Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
145227702724Smrg
145327702724Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
145427702724Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
145527702724Smrg
145627702724Smrghostinfo               = `(hostinfo) 2>/dev/null`
145727702724Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
145827702724Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
145927702724Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
146027702724Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
146127702724Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
146227702724Smrg
14637cea3689SmrgUNAME_MACHINE = "$UNAME_MACHINE"
14647cea3689SmrgUNAME_RELEASE = "$UNAME_RELEASE"
14657cea3689SmrgUNAME_SYSTEM  = "$UNAME_SYSTEM"
14667cea3689SmrgUNAME_VERSION = "$UNAME_VERSION"
146727702724SmrgEOF
146827702724Smrg
146927702724Smrgexit 1
147027702724Smrg
147127702724Smrg# Local variables:
14727cea3689Smrg# eval: (add-hook 'write-file-functions 'time-stamp)
147327702724Smrg# time-stamp-start: "timestamp='"
147427702724Smrg# time-stamp-format: "%:y-%02m-%02d"
147527702724Smrg# time-stamp-end: "'"
147627702724Smrg# End:
1477