config.guess revision 7a84e134
17a84e134Smrg#! /bin/sh
27a84e134Smrg# Attempt to guess a canonical system name.
37a84e134Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
47a84e134Smrg#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
57a84e134Smrg
67a84e134Smrgtimestamp='2005-12-13'
77a84e134Smrg
87a84e134Smrg# This file is free software; you can redistribute it and/or modify it
97a84e134Smrg# under the terms of the GNU General Public License as published by
107a84e134Smrg# the Free Software Foundation; either version 2 of the License, or
117a84e134Smrg# (at your option) any later version.
127a84e134Smrg#
137a84e134Smrg# This program is distributed in the hope that it will be useful, but
147a84e134Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
157a84e134Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
167a84e134Smrg# General Public License for more details.
177a84e134Smrg#
187a84e134Smrg# You should have received a copy of the GNU General Public License
197a84e134Smrg# along with this program; if not, write to the Free Software
207a84e134Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
217a84e134Smrg# 02110-1301, USA.
227a84e134Smrg#
237a84e134Smrg# As a special exception to the GNU General Public License, if you
247a84e134Smrg# distribute this file as part of a program that contains a
257a84e134Smrg# configuration script generated by Autoconf, you may include it under
267a84e134Smrg# the same distribution terms that you use for the rest of that program.
277a84e134Smrg
287a84e134Smrg
297a84e134Smrg# Originally written by Per Bothner <per@bothner.com>.
307a84e134Smrg# Please send patches to <config-patches@gnu.org>.  Submit a context
317a84e134Smrg# diff and a properly formatted ChangeLog entry.
327a84e134Smrg#
337a84e134Smrg# This script attempts to guess a canonical system name similar to
347a84e134Smrg# config.sub.  If it succeeds, it prints the system name on stdout, and
357a84e134Smrg# exits with 0.  Otherwise, it exits with 1.
367a84e134Smrg#
377a84e134Smrg# The plan is that this can be called by configure scripts if you
387a84e134Smrg# don't specify an explicit build system type.
397a84e134Smrg
407a84e134Smrgme=`echo "$0" | sed -e 's,.*/,,'`
417a84e134Smrg
427a84e134Smrgusage="\
437a84e134SmrgUsage: $0 [OPTION]
447a84e134Smrg
457a84e134SmrgOutput the configuration name of the system \`$me' is run on.
467a84e134Smrg
477a84e134SmrgOperation modes:
487a84e134Smrg  -h, --help         print this help, then exit
497a84e134Smrg  -t, --time-stamp   print date of last modification, then exit
507a84e134Smrg  -v, --version      print version number, then exit
517a84e134Smrg
527a84e134SmrgReport bugs and patches to <config-patches@gnu.org>."
537a84e134Smrg
547a84e134Smrgversion="\
557a84e134SmrgGNU config.guess ($timestamp)
567a84e134Smrg
577a84e134SmrgOriginally written by Per Bothner.
587a84e134SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
597a84e134SmrgFree Software Foundation, Inc.
607a84e134Smrg
617a84e134SmrgThis is free software; see the source for copying conditions.  There is NO
627a84e134Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
637a84e134Smrg
647a84e134Smrghelp="
657a84e134SmrgTry \`$me --help' for more information."
667a84e134Smrg
677a84e134Smrg# Parse command line
687a84e134Smrgwhile test $# -gt 0 ; do
697a84e134Smrg  case $1 in
707a84e134Smrg    --time-stamp | --time* | -t )
717a84e134Smrg       echo "$timestamp" ; exit ;;
727a84e134Smrg    --version | -v )
737a84e134Smrg       echo "$version" ; exit ;;
747a84e134Smrg    --help | --h* | -h )
757a84e134Smrg       echo "$usage"; exit ;;
767a84e134Smrg    -- )     # Stop option processing
777a84e134Smrg       shift; break ;;
787a84e134Smrg    - )	# Use stdin as input.
797a84e134Smrg       break ;;
807a84e134Smrg    -* )
817a84e134Smrg       echo "$me: invalid option $1$help" >&2
827a84e134Smrg       exit 1 ;;
837a84e134Smrg    * )
847a84e134Smrg       break ;;
857a84e134Smrg  esac
867a84e134Smrgdone
877a84e134Smrg
887a84e134Smrgif test $# != 0; then
897a84e134Smrg  echo "$me: too many arguments$help" >&2
907a84e134Smrg  exit 1
917a84e134Smrgfi
927a84e134Smrg
937a84e134Smrgtrap 'exit 1' 1 2 15
947a84e134Smrg
957a84e134Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
967a84e134Smrg# compiler to aid in system detection is discouraged as it requires
977a84e134Smrg# temporary files to be created and, as you can see below, it is a
987a84e134Smrg# headache to deal with in a portable fashion.
997a84e134Smrg
1007a84e134Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
1017a84e134Smrg# use `HOST_CC' if defined, but it is deprecated.
1027a84e134Smrg
1037a84e134Smrg# Portable tmp directory creation inspired by the Autoconf team.
1047a84e134Smrg
1057a84e134Smrgset_cc_for_build='
1067a84e134Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
1077a84e134Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
1087a84e134Smrg: ${TMPDIR=/tmp} ;
1097a84e134Smrg { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
1107a84e134Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
1117a84e134Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
1127a84e134Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
1137a84e134Smrgdummy=$tmp/dummy ;
1147a84e134Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
1157a84e134Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in
1167a84e134Smrg ,,)    echo "int x;" > $dummy.c ;
1177a84e134Smrg	for c in cc gcc c89 c99 ; do
1187a84e134Smrg	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
1197a84e134Smrg	     CC_FOR_BUILD="$c"; break ;
1207a84e134Smrg	  fi ;
1217a84e134Smrg	done ;
1227a84e134Smrg	if test x"$CC_FOR_BUILD" = x ; then
1237a84e134Smrg	  CC_FOR_BUILD=no_compiler_found ;
1247a84e134Smrg	fi
1257a84e134Smrg	;;
1267a84e134Smrg ,,*)   CC_FOR_BUILD=$CC ;;
1277a84e134Smrg ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
1287a84e134Smrgesac ; set_cc_for_build= ;'
1297a84e134Smrg
1307a84e134Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
1317a84e134Smrg# (ghazi@noc.rutgers.edu 1994-08-24)
1327a84e134Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then
1337a84e134Smrg	PATH=$PATH:/.attbin ; export PATH
1347a84e134Smrgfi
1357a84e134Smrg
1367a84e134SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
1377a84e134SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
1387a84e134SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
1397a84e134SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
1407a84e134Smrg
1417a84e134Smrg# Note: order is significant - the case branches are not exclusive.
1427a84e134Smrg
1437a84e134Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
1447a84e134Smrg    *:NetBSD:*:*)
1457a84e134Smrg	# NetBSD (nbsd) targets should (where applicable) match one or
1467a84e134Smrg	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
1477a84e134Smrg	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
1487a84e134Smrg	# switched to ELF, *-*-netbsd* would select the old
1497a84e134Smrg	# object file format.  This provides both forward
1507a84e134Smrg	# compatibility and a consistent mechanism for selecting the
1517a84e134Smrg	# object file format.
1527a84e134Smrg	#
1537a84e134Smrg	# Note: NetBSD doesn't particularly care about the vendor
1547a84e134Smrg	# portion of the name.  We always set it to "unknown".
1557a84e134Smrg	sysctl="sysctl -n hw.machine_arch"
1567a84e134Smrg	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
1577a84e134Smrg	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
1587a84e134Smrg	case "${UNAME_MACHINE_ARCH}" in
1597a84e134Smrg	    armeb) machine=armeb-unknown ;;
1607a84e134Smrg	    arm*) machine=arm-unknown ;;
1617a84e134Smrg	    sh3el) machine=shl-unknown ;;
1627a84e134Smrg	    sh3eb) machine=sh-unknown ;;
1637a84e134Smrg	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
1647a84e134Smrg	esac
1657a84e134Smrg	# The Operating System including object format, if it has switched
1667a84e134Smrg	# to ELF recently, or will in the future.
1677a84e134Smrg	case "${UNAME_MACHINE_ARCH}" in
1687a84e134Smrg	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
1697a84e134Smrg		eval $set_cc_for_build
1707a84e134Smrg		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
1717a84e134Smrg			| grep __ELF__ >/dev/null
1727a84e134Smrg		then
1737a84e134Smrg		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
1747a84e134Smrg		    # Return netbsd for either.  FIX?
1757a84e134Smrg		    os=netbsd
1767a84e134Smrg		else
1777a84e134Smrg		    os=netbsdelf
1787a84e134Smrg		fi
1797a84e134Smrg		;;
1807a84e134Smrg	    *)
1817a84e134Smrg	        os=netbsd
1827a84e134Smrg		;;
1837a84e134Smrg	esac
1847a84e134Smrg	# The OS release
1857a84e134Smrg	# Debian GNU/NetBSD machines have a different userland, and
1867a84e134Smrg	# thus, need a distinct triplet. However, they do not need
1877a84e134Smrg	# kernel version information, so it can be replaced with a
1887a84e134Smrg	# suitable tag, in the style of linux-gnu.
1897a84e134Smrg	case "${UNAME_VERSION}" in
1907a84e134Smrg	    Debian*)
1917a84e134Smrg		release='-gnu'
1927a84e134Smrg		;;
1937a84e134Smrg	    *)
1947a84e134Smrg		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
1957a84e134Smrg		;;
1967a84e134Smrg	esac
1977a84e134Smrg	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
1987a84e134Smrg	# contains redundant information, the shorter form:
1997a84e134Smrg	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
2007a84e134Smrg	echo "${machine}-${os}${release}"
2017a84e134Smrg	exit ;;
2027a84e134Smrg    *:OpenBSD:*:*)
2037a84e134Smrg	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
2047a84e134Smrg	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
2057a84e134Smrg	exit ;;
2067a84e134Smrg    *:ekkoBSD:*:*)
2077a84e134Smrg	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
2087a84e134Smrg	exit ;;
2097a84e134Smrg    macppc:MirBSD:*:*)
2107a84e134Smrg	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
2117a84e134Smrg	exit ;;
2127a84e134Smrg    *:MirBSD:*:*)
2137a84e134Smrg	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
2147a84e134Smrg	exit ;;
2157a84e134Smrg    alpha:OSF1:*:*)
2167a84e134Smrg	case $UNAME_RELEASE in
2177a84e134Smrg	*4.0)
2187a84e134Smrg		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
2197a84e134Smrg		;;
2207a84e134Smrg	*5.*)
2217a84e134Smrg	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
2227a84e134Smrg		;;
2237a84e134Smrg	esac
2247a84e134Smrg	# According to Compaq, /usr/sbin/psrinfo has been available on
2257a84e134Smrg	# OSF/1 and Tru64 systems produced since 1995.  I hope that
2267a84e134Smrg	# covers most systems running today.  This code pipes the CPU
2277a84e134Smrg	# types through head -n 1, so we only detect the type of CPU 0.
2287a84e134Smrg	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
2297a84e134Smrg	case "$ALPHA_CPU_TYPE" in
2307a84e134Smrg	    "EV4 (21064)")
2317a84e134Smrg		UNAME_MACHINE="alpha" ;;
2327a84e134Smrg	    "EV4.5 (21064)")
2337a84e134Smrg		UNAME_MACHINE="alpha" ;;
2347a84e134Smrg	    "LCA4 (21066/21068)")
2357a84e134Smrg		UNAME_MACHINE="alpha" ;;
2367a84e134Smrg	    "EV5 (21164)")
2377a84e134Smrg		UNAME_MACHINE="alphaev5" ;;
2387a84e134Smrg	    "EV5.6 (21164A)")
2397a84e134Smrg		UNAME_MACHINE="alphaev56" ;;
2407a84e134Smrg	    "EV5.6 (21164PC)")
2417a84e134Smrg		UNAME_MACHINE="alphapca56" ;;
2427a84e134Smrg	    "EV5.7 (21164PC)")
2437a84e134Smrg		UNAME_MACHINE="alphapca57" ;;
2447a84e134Smrg	    "EV6 (21264)")
2457a84e134Smrg		UNAME_MACHINE="alphaev6" ;;
2467a84e134Smrg	    "EV6.7 (21264A)")
2477a84e134Smrg		UNAME_MACHINE="alphaev67" ;;
2487a84e134Smrg	    "EV6.8CB (21264C)")
2497a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2507a84e134Smrg	    "EV6.8AL (21264B)")
2517a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2527a84e134Smrg	    "EV6.8CX (21264D)")
2537a84e134Smrg		UNAME_MACHINE="alphaev68" ;;
2547a84e134Smrg	    "EV6.9A (21264/EV69A)")
2557a84e134Smrg		UNAME_MACHINE="alphaev69" ;;
2567a84e134Smrg	    "EV7 (21364)")
2577a84e134Smrg		UNAME_MACHINE="alphaev7" ;;
2587a84e134Smrg	    "EV7.9 (21364A)")
2597a84e134Smrg		UNAME_MACHINE="alphaev79" ;;
2607a84e134Smrg	esac
2617a84e134Smrg	# A Pn.n version is a patched version.
2627a84e134Smrg	# A Vn.n version is a released version.
2637a84e134Smrg	# A Tn.n version is a released field test version.
2647a84e134Smrg	# A Xn.n version is an unreleased experimental baselevel.
2657a84e134Smrg	# 1.2 uses "1.2" for uname -r.
2667a84e134Smrg	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
2677a84e134Smrg	exit ;;
2687a84e134Smrg    Alpha\ *:Windows_NT*:*)
2697a84e134Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
2707a84e134Smrg	# Should we change UNAME_MACHINE based on the output of uname instead
2717a84e134Smrg	# of the specific Alpha model?
2727a84e134Smrg	echo alpha-pc-interix
2737a84e134Smrg	exit ;;
2747a84e134Smrg    21064:Windows_NT:50:3)
2757a84e134Smrg	echo alpha-dec-winnt3.5
2767a84e134Smrg	exit ;;
2777a84e134Smrg    Amiga*:UNIX_System_V:4.0:*)
2787a84e134Smrg	echo m68k-unknown-sysv4
2797a84e134Smrg	exit ;;
2807a84e134Smrg    *:[Aa]miga[Oo][Ss]:*:*)
2817a84e134Smrg	echo ${UNAME_MACHINE}-unknown-amigaos
2827a84e134Smrg	exit ;;
2837a84e134Smrg    *:[Mm]orph[Oo][Ss]:*:*)
2847a84e134Smrg	echo ${UNAME_MACHINE}-unknown-morphos
2857a84e134Smrg	exit ;;
2867a84e134Smrg    *:OS/390:*:*)
2877a84e134Smrg	echo i370-ibm-openedition
2887a84e134Smrg	exit ;;
2897a84e134Smrg    *:z/VM:*:*)
2907a84e134Smrg	echo s390-ibm-zvmoe
2917a84e134Smrg	exit ;;
2927a84e134Smrg    *:OS400:*:*)
2937a84e134Smrg        echo powerpc-ibm-os400
2947a84e134Smrg	exit ;;
2957a84e134Smrg    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
2967a84e134Smrg	echo arm-acorn-riscix${UNAME_RELEASE}
2977a84e134Smrg	exit ;;
2987a84e134Smrg    arm:riscos:*:*|arm:RISCOS:*:*)
2997a84e134Smrg	echo arm-unknown-riscos
3007a84e134Smrg	exit ;;
3017a84e134Smrg    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
3027a84e134Smrg	echo hppa1.1-hitachi-hiuxmpp
3037a84e134Smrg	exit ;;
3047a84e134Smrg    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
3057a84e134Smrg	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
3067a84e134Smrg	if test "`(/bin/universe) 2>/dev/null`" = att ; then
3077a84e134Smrg		echo pyramid-pyramid-sysv3
3087a84e134Smrg	else
3097a84e134Smrg		echo pyramid-pyramid-bsd
3107a84e134Smrg	fi
3117a84e134Smrg	exit ;;
3127a84e134Smrg    NILE*:*:*:dcosx)
3137a84e134Smrg	echo pyramid-pyramid-svr4
3147a84e134Smrg	exit ;;
3157a84e134Smrg    DRS?6000:unix:4.0:6*)
3167a84e134Smrg	echo sparc-icl-nx6
3177a84e134Smrg	exit ;;
3187a84e134Smrg    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
3197a84e134Smrg	case `/usr/bin/uname -p` in
3207a84e134Smrg	    sparc) echo sparc-icl-nx7; exit ;;
3217a84e134Smrg	esac ;;
3227a84e134Smrg    sun4H:SunOS:5.*:*)
3237a84e134Smrg	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3247a84e134Smrg	exit ;;
3257a84e134Smrg    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
3267a84e134Smrg	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3277a84e134Smrg	exit ;;
3287a84e134Smrg    i86pc:SunOS:5.*:*)
3297a84e134Smrg	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3307a84e134Smrg	exit ;;
3317a84e134Smrg    sun4*:SunOS:6*:*)
3327a84e134Smrg	# According to config.sub, this is the proper way to canonicalize
3337a84e134Smrg	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
3347a84e134Smrg	# it's likely to be more like Solaris than SunOS4.
3357a84e134Smrg	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
3367a84e134Smrg	exit ;;
3377a84e134Smrg    sun4*:SunOS:*:*)
3387a84e134Smrg	case "`/usr/bin/arch -k`" in
3397a84e134Smrg	    Series*|S4*)
3407a84e134Smrg		UNAME_RELEASE=`uname -v`
3417a84e134Smrg		;;
3427a84e134Smrg	esac
3437a84e134Smrg	# Japanese Language versions have a version number like `4.1.3-JL'.
3447a84e134Smrg	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
3457a84e134Smrg	exit ;;
3467a84e134Smrg    sun3*:SunOS:*:*)
3477a84e134Smrg	echo m68k-sun-sunos${UNAME_RELEASE}
3487a84e134Smrg	exit ;;
3497a84e134Smrg    sun*:*:4.2BSD:*)
3507a84e134Smrg	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
3517a84e134Smrg	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
3527a84e134Smrg	case "`/bin/arch`" in
3537a84e134Smrg	    sun3)
3547a84e134Smrg		echo m68k-sun-sunos${UNAME_RELEASE}
3557a84e134Smrg		;;
3567a84e134Smrg	    sun4)
3577a84e134Smrg		echo sparc-sun-sunos${UNAME_RELEASE}
3587a84e134Smrg		;;
3597a84e134Smrg	esac
3607a84e134Smrg	exit ;;
3617a84e134Smrg    aushp:SunOS:*:*)
3627a84e134Smrg	echo sparc-auspex-sunos${UNAME_RELEASE}
3637a84e134Smrg	exit ;;
3647a84e134Smrg    # The situation for MiNT is a little confusing.  The machine name
3657a84e134Smrg    # can be virtually everything (everything which is not
3667a84e134Smrg    # "atarist" or "atariste" at least should have a processor
3677a84e134Smrg    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
3687a84e134Smrg    # to the lowercase version "mint" (or "freemint").  Finally
3697a84e134Smrg    # the system name "TOS" denotes a system which is actually not
3707a84e134Smrg    # MiNT.  But MiNT is downward compatible to TOS, so this should
3717a84e134Smrg    # be no problem.
3727a84e134Smrg    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
3737a84e134Smrg        echo m68k-atari-mint${UNAME_RELEASE}
3747a84e134Smrg	exit ;;
3757a84e134Smrg    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
3767a84e134Smrg	echo m68k-atari-mint${UNAME_RELEASE}
3777a84e134Smrg        exit ;;
3787a84e134Smrg    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
3797a84e134Smrg        echo m68k-atari-mint${UNAME_RELEASE}
3807a84e134Smrg	exit ;;
3817a84e134Smrg    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
3827a84e134Smrg        echo m68k-milan-mint${UNAME_RELEASE}
3837a84e134Smrg        exit ;;
3847a84e134Smrg    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
3857a84e134Smrg        echo m68k-hades-mint${UNAME_RELEASE}
3867a84e134Smrg        exit ;;
3877a84e134Smrg    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
3887a84e134Smrg        echo m68k-unknown-mint${UNAME_RELEASE}
3897a84e134Smrg        exit ;;
3907a84e134Smrg    m68k:machten:*:*)
3917a84e134Smrg	echo m68k-apple-machten${UNAME_RELEASE}
3927a84e134Smrg	exit ;;
3937a84e134Smrg    powerpc:machten:*:*)
3947a84e134Smrg	echo powerpc-apple-machten${UNAME_RELEASE}
3957a84e134Smrg	exit ;;
3967a84e134Smrg    RISC*:Mach:*:*)
3977a84e134Smrg	echo mips-dec-mach_bsd4.3
3987a84e134Smrg	exit ;;
3997a84e134Smrg    RISC*:ULTRIX:*:*)
4007a84e134Smrg	echo mips-dec-ultrix${UNAME_RELEASE}
4017a84e134Smrg	exit ;;
4027a84e134Smrg    VAX*:ULTRIX*:*:*)
4037a84e134Smrg	echo vax-dec-ultrix${UNAME_RELEASE}
4047a84e134Smrg	exit ;;
4057a84e134Smrg    2020:CLIX:*:* | 2430:CLIX:*:*)
4067a84e134Smrg	echo clipper-intergraph-clix${UNAME_RELEASE}
4077a84e134Smrg	exit ;;
4087a84e134Smrg    mips:*:*:UMIPS | mips:*:*:RISCos)
4097a84e134Smrg	eval $set_cc_for_build
4107a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
4117a84e134Smrg#ifdef __cplusplus
4127a84e134Smrg#include <stdio.h>  /* for printf() prototype */
4137a84e134Smrg	int main (int argc, char *argv[]) {
4147a84e134Smrg#else
4157a84e134Smrg	int main (argc, argv) int argc; char *argv[]; {
4167a84e134Smrg#endif
4177a84e134Smrg	#if defined (host_mips) && defined (MIPSEB)
4187a84e134Smrg	#if defined (SYSTYPE_SYSV)
4197a84e134Smrg	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
4207a84e134Smrg	#endif
4217a84e134Smrg	#if defined (SYSTYPE_SVR4)
4227a84e134Smrg	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
4237a84e134Smrg	#endif
4247a84e134Smrg	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
4257a84e134Smrg	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
4267a84e134Smrg	#endif
4277a84e134Smrg	#endif
4287a84e134Smrg	  exit (-1);
4297a84e134Smrg	}
4307a84e134SmrgEOF
4317a84e134Smrg	$CC_FOR_BUILD -o $dummy $dummy.c &&
4327a84e134Smrg	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
4337a84e134Smrg	  SYSTEM_NAME=`$dummy $dummyarg` &&
4347a84e134Smrg	    { echo "$SYSTEM_NAME"; exit; }
4357a84e134Smrg	echo mips-mips-riscos${UNAME_RELEASE}
4367a84e134Smrg	exit ;;
4377a84e134Smrg    Motorola:PowerMAX_OS:*:*)
4387a84e134Smrg	echo powerpc-motorola-powermax
4397a84e134Smrg	exit ;;
4407a84e134Smrg    Motorola:*:4.3:PL8-*)
4417a84e134Smrg	echo powerpc-harris-powermax
4427a84e134Smrg	exit ;;
4437a84e134Smrg    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
4447a84e134Smrg	echo powerpc-harris-powermax
4457a84e134Smrg	exit ;;
4467a84e134Smrg    Night_Hawk:Power_UNIX:*:*)
4477a84e134Smrg	echo powerpc-harris-powerunix
4487a84e134Smrg	exit ;;
4497a84e134Smrg    m88k:CX/UX:7*:*)
4507a84e134Smrg	echo m88k-harris-cxux7
4517a84e134Smrg	exit ;;
4527a84e134Smrg    m88k:*:4*:R4*)
4537a84e134Smrg	echo m88k-motorola-sysv4
4547a84e134Smrg	exit ;;
4557a84e134Smrg    m88k:*:3*:R3*)
4567a84e134Smrg	echo m88k-motorola-sysv3
4577a84e134Smrg	exit ;;
4587a84e134Smrg    AViiON:dgux:*:*)
4597a84e134Smrg        # DG/UX returns AViiON for all architectures
4607a84e134Smrg        UNAME_PROCESSOR=`/usr/bin/uname -p`
4617a84e134Smrg	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
4627a84e134Smrg	then
4637a84e134Smrg	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
4647a84e134Smrg	       [ ${TARGET_BINARY_INTERFACE}x = x ]
4657a84e134Smrg	    then
4667a84e134Smrg		echo m88k-dg-dgux${UNAME_RELEASE}
4677a84e134Smrg	    else
4687a84e134Smrg		echo m88k-dg-dguxbcs${UNAME_RELEASE}
4697a84e134Smrg	    fi
4707a84e134Smrg	else
4717a84e134Smrg	    echo i586-dg-dgux${UNAME_RELEASE}
4727a84e134Smrg	fi
4737a84e134Smrg 	exit ;;
4747a84e134Smrg    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
4757a84e134Smrg	echo m88k-dolphin-sysv3
4767a84e134Smrg	exit ;;
4777a84e134Smrg    M88*:*:R3*:*)
4787a84e134Smrg	# Delta 88k system running SVR3
4797a84e134Smrg	echo m88k-motorola-sysv3
4807a84e134Smrg	exit ;;
4817a84e134Smrg    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
4827a84e134Smrg	echo m88k-tektronix-sysv3
4837a84e134Smrg	exit ;;
4847a84e134Smrg    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
4857a84e134Smrg	echo m68k-tektronix-bsd
4867a84e134Smrg	exit ;;
4877a84e134Smrg    *:IRIX*:*:*)
4887a84e134Smrg	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
4897a84e134Smrg	exit ;;
4907a84e134Smrg    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
4917a84e134Smrg	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
4927a84e134Smrg	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
4937a84e134Smrg    i*86:AIX:*:*)
4947a84e134Smrg	echo i386-ibm-aix
4957a84e134Smrg	exit ;;
4967a84e134Smrg    ia64:AIX:*:*)
4977a84e134Smrg	if [ -x /usr/bin/oslevel ] ; then
4987a84e134Smrg		IBM_REV=`/usr/bin/oslevel`
4997a84e134Smrg	else
5007a84e134Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
5017a84e134Smrg	fi
5027a84e134Smrg	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
5037a84e134Smrg	exit ;;
5047a84e134Smrg    *:AIX:2:3)
5057a84e134Smrg	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
5067a84e134Smrg		eval $set_cc_for_build
5077a84e134Smrg		sed 's/^		//' << EOF >$dummy.c
5087a84e134Smrg		#include <sys/systemcfg.h>
5097a84e134Smrg
5107a84e134Smrg		main()
5117a84e134Smrg			{
5127a84e134Smrg			if (!__power_pc())
5137a84e134Smrg				exit(1);
5147a84e134Smrg			puts("powerpc-ibm-aix3.2.5");
5157a84e134Smrg			exit(0);
5167a84e134Smrg			}
5177a84e134SmrgEOF
5187a84e134Smrg		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
5197a84e134Smrg		then
5207a84e134Smrg			echo "$SYSTEM_NAME"
5217a84e134Smrg		else
5227a84e134Smrg			echo rs6000-ibm-aix3.2.5
5237a84e134Smrg		fi
5247a84e134Smrg	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
5257a84e134Smrg		echo rs6000-ibm-aix3.2.4
5267a84e134Smrg	else
5277a84e134Smrg		echo rs6000-ibm-aix3.2
5287a84e134Smrg	fi
5297a84e134Smrg	exit ;;
5307a84e134Smrg    *:AIX:*:[45])
5317a84e134Smrg	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
5327a84e134Smrg	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
5337a84e134Smrg		IBM_ARCH=rs6000
5347a84e134Smrg	else
5357a84e134Smrg		IBM_ARCH=powerpc
5367a84e134Smrg	fi
5377a84e134Smrg	if [ -x /usr/bin/oslevel ] ; then
5387a84e134Smrg		IBM_REV=`/usr/bin/oslevel`
5397a84e134Smrg	else
5407a84e134Smrg		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
5417a84e134Smrg	fi
5427a84e134Smrg	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
5437a84e134Smrg	exit ;;
5447a84e134Smrg    *:AIX:*:*)
5457a84e134Smrg	echo rs6000-ibm-aix
5467a84e134Smrg	exit ;;
5477a84e134Smrg    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
5487a84e134Smrg	echo romp-ibm-bsd4.4
5497a84e134Smrg	exit ;;
5507a84e134Smrg    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
5517a84e134Smrg	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
5527a84e134Smrg	exit ;;                             # report: romp-ibm BSD 4.3
5537a84e134Smrg    *:BOSX:*:*)
5547a84e134Smrg	echo rs6000-bull-bosx
5557a84e134Smrg	exit ;;
5567a84e134Smrg    DPX/2?00:B.O.S.:*:*)
5577a84e134Smrg	echo m68k-bull-sysv3
5587a84e134Smrg	exit ;;
5597a84e134Smrg    9000/[34]??:4.3bsd:1.*:*)
5607a84e134Smrg	echo m68k-hp-bsd
5617a84e134Smrg	exit ;;
5627a84e134Smrg    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
5637a84e134Smrg	echo m68k-hp-bsd4.4
5647a84e134Smrg	exit ;;
5657a84e134Smrg    9000/[34678]??:HP-UX:*:*)
5667a84e134Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
5677a84e134Smrg	case "${UNAME_MACHINE}" in
5687a84e134Smrg	    9000/31? )            HP_ARCH=m68000 ;;
5697a84e134Smrg	    9000/[34]?? )         HP_ARCH=m68k ;;
5707a84e134Smrg	    9000/[678][0-9][0-9])
5717a84e134Smrg		if [ -x /usr/bin/getconf ]; then
5727a84e134Smrg		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
5737a84e134Smrg                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
5747a84e134Smrg                    case "${sc_cpu_version}" in
5757a84e134Smrg                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
5767a84e134Smrg                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
5777a84e134Smrg                      532)                      # CPU_PA_RISC2_0
5787a84e134Smrg                        case "${sc_kernel_bits}" in
5797a84e134Smrg                          32) HP_ARCH="hppa2.0n" ;;
5807a84e134Smrg                          64) HP_ARCH="hppa2.0w" ;;
5817a84e134Smrg			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
5827a84e134Smrg                        esac ;;
5837a84e134Smrg                    esac
5847a84e134Smrg		fi
5857a84e134Smrg		if [ "${HP_ARCH}" = "" ]; then
5867a84e134Smrg		    eval $set_cc_for_build
5877a84e134Smrg		    sed 's/^              //' << EOF >$dummy.c
5887a84e134Smrg
5897a84e134Smrg              #define _HPUX_SOURCE
5907a84e134Smrg              #include <stdlib.h>
5917a84e134Smrg              #include <unistd.h>
5927a84e134Smrg
5937a84e134Smrg              int main ()
5947a84e134Smrg              {
5957a84e134Smrg              #if defined(_SC_KERNEL_BITS)
5967a84e134Smrg                  long bits = sysconf(_SC_KERNEL_BITS);
5977a84e134Smrg              #endif
5987a84e134Smrg                  long cpu  = sysconf (_SC_CPU_VERSION);
5997a84e134Smrg
6007a84e134Smrg                  switch (cpu)
6017a84e134Smrg              	{
6027a84e134Smrg              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
6037a84e134Smrg              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
6047a84e134Smrg              	case CPU_PA_RISC2_0:
6057a84e134Smrg              #if defined(_SC_KERNEL_BITS)
6067a84e134Smrg              	    switch (bits)
6077a84e134Smrg              		{
6087a84e134Smrg              		case 64: puts ("hppa2.0w"); break;
6097a84e134Smrg              		case 32: puts ("hppa2.0n"); break;
6107a84e134Smrg              		default: puts ("hppa2.0"); break;
6117a84e134Smrg              		} break;
6127a84e134Smrg              #else  /* !defined(_SC_KERNEL_BITS) */
6137a84e134Smrg              	    puts ("hppa2.0"); break;
6147a84e134Smrg              #endif
6157a84e134Smrg              	default: puts ("hppa1.0"); break;
6167a84e134Smrg              	}
6177a84e134Smrg                  exit (0);
6187a84e134Smrg              }
6197a84e134SmrgEOF
6207a84e134Smrg		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
6217a84e134Smrg		    test -z "$HP_ARCH" && HP_ARCH=hppa
6227a84e134Smrg		fi ;;
6237a84e134Smrg	esac
6247a84e134Smrg	if [ ${HP_ARCH} = "hppa2.0w" ]
6257a84e134Smrg	then
6267a84e134Smrg	    eval $set_cc_for_build
6277a84e134Smrg
6287a84e134Smrg	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
6297a84e134Smrg	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
6307a84e134Smrg	    # generating 64-bit code.  GNU and HP use different nomenclature:
6317a84e134Smrg	    #
6327a84e134Smrg	    # $ CC_FOR_BUILD=cc ./config.guess
6337a84e134Smrg	    # => hppa2.0w-hp-hpux11.23
6347a84e134Smrg	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
6357a84e134Smrg	    # => hppa64-hp-hpux11.23
6367a84e134Smrg
6377a84e134Smrg	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
6387a84e134Smrg		grep __LP64__ >/dev/null
6397a84e134Smrg	    then
6407a84e134Smrg		HP_ARCH="hppa2.0w"
6417a84e134Smrg	    else
6427a84e134Smrg		HP_ARCH="hppa64"
6437a84e134Smrg	    fi
6447a84e134Smrg	fi
6457a84e134Smrg	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
6467a84e134Smrg	exit ;;
6477a84e134Smrg    ia64:HP-UX:*:*)
6487a84e134Smrg	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
6497a84e134Smrg	echo ia64-hp-hpux${HPUX_REV}
6507a84e134Smrg	exit ;;
6517a84e134Smrg    3050*:HI-UX:*:*)
6527a84e134Smrg	eval $set_cc_for_build
6537a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
6547a84e134Smrg	#include <unistd.h>
6557a84e134Smrg	int
6567a84e134Smrg	main ()
6577a84e134Smrg	{
6587a84e134Smrg	  long cpu = sysconf (_SC_CPU_VERSION);
6597a84e134Smrg	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
6607a84e134Smrg	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
6617a84e134Smrg	     results, however.  */
6627a84e134Smrg	  if (CPU_IS_PA_RISC (cpu))
6637a84e134Smrg	    {
6647a84e134Smrg	      switch (cpu)
6657a84e134Smrg		{
6667a84e134Smrg		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
6677a84e134Smrg		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
6687a84e134Smrg		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
6697a84e134Smrg		  default: puts ("hppa-hitachi-hiuxwe2"); break;
6707a84e134Smrg		}
6717a84e134Smrg	    }
6727a84e134Smrg	  else if (CPU_IS_HP_MC68K (cpu))
6737a84e134Smrg	    puts ("m68k-hitachi-hiuxwe2");
6747a84e134Smrg	  else puts ("unknown-hitachi-hiuxwe2");
6757a84e134Smrg	  exit (0);
6767a84e134Smrg	}
6777a84e134SmrgEOF
6787a84e134Smrg	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
6797a84e134Smrg		{ echo "$SYSTEM_NAME"; exit; }
6807a84e134Smrg	echo unknown-hitachi-hiuxwe2
6817a84e134Smrg	exit ;;
6827a84e134Smrg    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
6837a84e134Smrg	echo hppa1.1-hp-bsd
6847a84e134Smrg	exit ;;
6857a84e134Smrg    9000/8??:4.3bsd:*:*)
6867a84e134Smrg	echo hppa1.0-hp-bsd
6877a84e134Smrg	exit ;;
6887a84e134Smrg    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
6897a84e134Smrg	echo hppa1.0-hp-mpeix
6907a84e134Smrg	exit ;;
6917a84e134Smrg    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
6927a84e134Smrg	echo hppa1.1-hp-osf
6937a84e134Smrg	exit ;;
6947a84e134Smrg    hp8??:OSF1:*:*)
6957a84e134Smrg	echo hppa1.0-hp-osf
6967a84e134Smrg	exit ;;
6977a84e134Smrg    i*86:OSF1:*:*)
6987a84e134Smrg	if [ -x /usr/sbin/sysversion ] ; then
6997a84e134Smrg	    echo ${UNAME_MACHINE}-unknown-osf1mk
7007a84e134Smrg	else
7017a84e134Smrg	    echo ${UNAME_MACHINE}-unknown-osf1
7027a84e134Smrg	fi
7037a84e134Smrg	exit ;;
7047a84e134Smrg    parisc*:Lites*:*:*)
7057a84e134Smrg	echo hppa1.1-hp-lites
7067a84e134Smrg	exit ;;
7077a84e134Smrg    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
7087a84e134Smrg	echo c1-convex-bsd
7097a84e134Smrg        exit ;;
7107a84e134Smrg    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
7117a84e134Smrg	if getsysinfo -f scalar_acc
7127a84e134Smrg	then echo c32-convex-bsd
7137a84e134Smrg	else echo c2-convex-bsd
7147a84e134Smrg	fi
7157a84e134Smrg        exit ;;
7167a84e134Smrg    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
7177a84e134Smrg	echo c34-convex-bsd
7187a84e134Smrg        exit ;;
7197a84e134Smrg    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
7207a84e134Smrg	echo c38-convex-bsd
7217a84e134Smrg        exit ;;
7227a84e134Smrg    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
7237a84e134Smrg	echo c4-convex-bsd
7247a84e134Smrg        exit ;;
7257a84e134Smrg    CRAY*Y-MP:*:*:*)
7267a84e134Smrg	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7277a84e134Smrg	exit ;;
7287a84e134Smrg    CRAY*[A-Z]90:*:*:*)
7297a84e134Smrg	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
7307a84e134Smrg	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
7317a84e134Smrg	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
7327a84e134Smrg	      -e 's/\.[^.]*$/.X/'
7337a84e134Smrg	exit ;;
7347a84e134Smrg    CRAY*TS:*:*:*)
7357a84e134Smrg	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7367a84e134Smrg	exit ;;
7377a84e134Smrg    CRAY*T3E:*:*:*)
7387a84e134Smrg	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7397a84e134Smrg	exit ;;
7407a84e134Smrg    CRAY*SV1:*:*:*)
7417a84e134Smrg	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7427a84e134Smrg	exit ;;
7437a84e134Smrg    *:UNICOS/mp:*:*)
7447a84e134Smrg	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
7457a84e134Smrg	exit ;;
7467a84e134Smrg    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
7477a84e134Smrg	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7487a84e134Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
7497a84e134Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
7507a84e134Smrg        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
7517a84e134Smrg        exit ;;
7527a84e134Smrg    5000:UNIX_System_V:4.*:*)
7537a84e134Smrg        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
7547a84e134Smrg        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
7557a84e134Smrg        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
7567a84e134Smrg	exit ;;
7577a84e134Smrg    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
7587a84e134Smrg	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
7597a84e134Smrg	exit ;;
7607a84e134Smrg    sparc*:BSD/OS:*:*)
7617a84e134Smrg	echo sparc-unknown-bsdi${UNAME_RELEASE}
7627a84e134Smrg	exit ;;
7637a84e134Smrg    *:BSD/OS:*:*)
7647a84e134Smrg	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
7657a84e134Smrg	exit ;;
7667a84e134Smrg    *:FreeBSD:*:*)
7677a84e134Smrg	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
7687a84e134Smrg	exit ;;
7697a84e134Smrg    i*:CYGWIN*:*)
7707a84e134Smrg	echo ${UNAME_MACHINE}-pc-cygwin
7717a84e134Smrg	exit ;;
7727a84e134Smrg    i*:MINGW*:*)
7737a84e134Smrg	echo ${UNAME_MACHINE}-pc-mingw32
7747a84e134Smrg	exit ;;
7757a84e134Smrg    i*:windows32*:*)
7767a84e134Smrg    	# uname -m includes "-pc" on this system.
7777a84e134Smrg    	echo ${UNAME_MACHINE}-mingw32
7787a84e134Smrg	exit ;;
7797a84e134Smrg    i*:PW*:*)
7807a84e134Smrg	echo ${UNAME_MACHINE}-pc-pw32
7817a84e134Smrg	exit ;;
7827a84e134Smrg    x86:Interix*:[345]*)
7837a84e134Smrg	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
7847a84e134Smrg	exit ;;
7857a84e134Smrg    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
7867a84e134Smrg	echo i${UNAME_MACHINE}-pc-mks
7877a84e134Smrg	exit ;;
7887a84e134Smrg    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
7897a84e134Smrg	# How do we know it's Interix rather than the generic POSIX subsystem?
7907a84e134Smrg	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
7917a84e134Smrg	# UNAME_MACHINE based on the output of uname instead of i386?
7927a84e134Smrg	echo i586-pc-interix
7937a84e134Smrg	exit ;;
7947a84e134Smrg    i*:UWIN*:*)
7957a84e134Smrg	echo ${UNAME_MACHINE}-pc-uwin
7967a84e134Smrg	exit ;;
7977a84e134Smrg    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
7987a84e134Smrg	echo x86_64-unknown-cygwin
7997a84e134Smrg	exit ;;
8007a84e134Smrg    p*:CYGWIN*:*)
8017a84e134Smrg	echo powerpcle-unknown-cygwin
8027a84e134Smrg	exit ;;
8037a84e134Smrg    prep*:SunOS:5.*:*)
8047a84e134Smrg	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
8057a84e134Smrg	exit ;;
8067a84e134Smrg    *:GNU:*:*)
8077a84e134Smrg	# the GNU system
8087a84e134Smrg	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
8097a84e134Smrg	exit ;;
8107a84e134Smrg    *:GNU/*:*:*)
8117a84e134Smrg	# other systems with GNU libc and userland
8127a84e134Smrg	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
8137a84e134Smrg	exit ;;
8147a84e134Smrg    i*86:Minix:*:*)
8157a84e134Smrg	echo ${UNAME_MACHINE}-pc-minix
8167a84e134Smrg	exit ;;
8177a84e134Smrg    arm*:Linux:*:*)
8187a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8197a84e134Smrg	exit ;;
8207a84e134Smrg    cris:Linux:*:*)
8217a84e134Smrg	echo cris-axis-linux-gnu
8227a84e134Smrg	exit ;;
8237a84e134Smrg    crisv32:Linux:*:*)
8247a84e134Smrg	echo crisv32-axis-linux-gnu
8257a84e134Smrg	exit ;;
8267a84e134Smrg    frv:Linux:*:*)
8277a84e134Smrg    	echo frv-unknown-linux-gnu
8287a84e134Smrg	exit ;;
8297a84e134Smrg    ia64:Linux:*:*)
8307a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8317a84e134Smrg	exit ;;
8327a84e134Smrg    m32r*:Linux:*:*)
8337a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8347a84e134Smrg	exit ;;
8357a84e134Smrg    m68*:Linux:*:*)
8367a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
8377a84e134Smrg	exit ;;
8387a84e134Smrg    mips:Linux:*:*)
8397a84e134Smrg	eval $set_cc_for_build
8407a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
8417a84e134Smrg	#undef CPU
8427a84e134Smrg	#undef mips
8437a84e134Smrg	#undef mipsel
8447a84e134Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
8457a84e134Smrg	CPU=mipsel
8467a84e134Smrg	#else
8477a84e134Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
8487a84e134Smrg	CPU=mips
8497a84e134Smrg	#else
8507a84e134Smrg	CPU=
8517a84e134Smrg	#endif
8527a84e134Smrg	#endif
8537a84e134SmrgEOF
8547a84e134Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
8557a84e134Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
8567a84e134Smrg	;;
8577a84e134Smrg    mips64:Linux:*:*)
8587a84e134Smrg	eval $set_cc_for_build
8597a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
8607a84e134Smrg	#undef CPU
8617a84e134Smrg	#undef mips64
8627a84e134Smrg	#undef mips64el
8637a84e134Smrg	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
8647a84e134Smrg	CPU=mips64el
8657a84e134Smrg	#else
8667a84e134Smrg	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
8677a84e134Smrg	CPU=mips64
8687a84e134Smrg	#else
8697a84e134Smrg	CPU=
8707a84e134Smrg	#endif
8717a84e134Smrg	#endif
8727a84e134SmrgEOF
8737a84e134Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
8747a84e134Smrg	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
8757a84e134Smrg	;;
8767a84e134Smrg    or32:Linux:*:*)
8777a84e134Smrg	echo or32-unknown-linux-gnu
8787a84e134Smrg	exit ;;
8797a84e134Smrg    ppc:Linux:*:*)
8807a84e134Smrg	echo powerpc-unknown-linux-gnu
8817a84e134Smrg	exit ;;
8827a84e134Smrg    ppc64:Linux:*:*)
8837a84e134Smrg	echo powerpc64-unknown-linux-gnu
8847a84e134Smrg	exit ;;
8857a84e134Smrg    alpha:Linux:*:*)
8867a84e134Smrg	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
8877a84e134Smrg	  EV5)   UNAME_MACHINE=alphaev5 ;;
8887a84e134Smrg	  EV56)  UNAME_MACHINE=alphaev56 ;;
8897a84e134Smrg	  PCA56) UNAME_MACHINE=alphapca56 ;;
8907a84e134Smrg	  PCA57) UNAME_MACHINE=alphapca56 ;;
8917a84e134Smrg	  EV6)   UNAME_MACHINE=alphaev6 ;;
8927a84e134Smrg	  EV67)  UNAME_MACHINE=alphaev67 ;;
8937a84e134Smrg	  EV68*) UNAME_MACHINE=alphaev68 ;;
8947a84e134Smrg        esac
8957a84e134Smrg	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
8967a84e134Smrg	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
8977a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
8987a84e134Smrg	exit ;;
8997a84e134Smrg    parisc:Linux:*:* | hppa:Linux:*:*)
9007a84e134Smrg	# Look for CPU level
9017a84e134Smrg	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
9027a84e134Smrg	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
9037a84e134Smrg	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
9047a84e134Smrg	  *)    echo hppa-unknown-linux-gnu ;;
9057a84e134Smrg	esac
9067a84e134Smrg	exit ;;
9077a84e134Smrg    parisc64:Linux:*:* | hppa64:Linux:*:*)
9087a84e134Smrg	echo hppa64-unknown-linux-gnu
9097a84e134Smrg	exit ;;
9107a84e134Smrg    s390:Linux:*:* | s390x:Linux:*:*)
9117a84e134Smrg	echo ${UNAME_MACHINE}-ibm-linux
9127a84e134Smrg	exit ;;
9137a84e134Smrg    sh64*:Linux:*:*)
9147a84e134Smrg    	echo ${UNAME_MACHINE}-unknown-linux-gnu
9157a84e134Smrg	exit ;;
9167a84e134Smrg    sh*:Linux:*:*)
9177a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9187a84e134Smrg	exit ;;
9197a84e134Smrg    sparc:Linux:*:* | sparc64:Linux:*:*)
9207a84e134Smrg	echo ${UNAME_MACHINE}-unknown-linux-gnu
9217a84e134Smrg	exit ;;
9227a84e134Smrg    vax:Linux:*:*)
9237a84e134Smrg	echo ${UNAME_MACHINE}-dec-linux-gnu
9247a84e134Smrg	exit ;;
9257a84e134Smrg    x86_64:Linux:*:*)
9267a84e134Smrg	echo x86_64-unknown-linux-gnu
9277a84e134Smrg	exit ;;
9287a84e134Smrg    i*86:Linux:*:*)
9297a84e134Smrg	# The BFD linker knows what the default object file format is, so
9307a84e134Smrg	# first see if it will tell us. cd to the root directory to prevent
9317a84e134Smrg	# problems with other programs or directories called `ld' in the path.
9327a84e134Smrg	# Set LC_ALL=C to ensure ld outputs messages in English.
9337a84e134Smrg	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
9347a84e134Smrg			 | sed -ne '/supported targets:/!d
9357a84e134Smrg				    s/[ 	][ 	]*/ /g
9367a84e134Smrg				    s/.*supported targets: *//
9377a84e134Smrg				    s/ .*//
9387a84e134Smrg				    p'`
9397a84e134Smrg        case "$ld_supported_targets" in
9407a84e134Smrg	  elf32-i386)
9417a84e134Smrg		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
9427a84e134Smrg		;;
9437a84e134Smrg	  a.out-i386-linux)
9447a84e134Smrg		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
9457a84e134Smrg		exit ;;
9467a84e134Smrg	  coff-i386)
9477a84e134Smrg		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
9487a84e134Smrg		exit ;;
9497a84e134Smrg	  "")
9507a84e134Smrg		# Either a pre-BFD a.out linker (linux-gnuoldld) or
9517a84e134Smrg		# one that does not give us useful --help.
9527a84e134Smrg		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
9537a84e134Smrg		exit ;;
9547a84e134Smrg	esac
9557a84e134Smrg	# Determine whether the default compiler is a.out or elf
9567a84e134Smrg	eval $set_cc_for_build
9577a84e134Smrg	sed 's/^	//' << EOF >$dummy.c
9587a84e134Smrg	#include <features.h>
9597a84e134Smrg	#ifdef __ELF__
9607a84e134Smrg	# ifdef __GLIBC__
9617a84e134Smrg	#  if __GLIBC__ >= 2
9627a84e134Smrg	LIBC=gnu
9637a84e134Smrg	#  else
9647a84e134Smrg	LIBC=gnulibc1
9657a84e134Smrg	#  endif
9667a84e134Smrg	# else
9677a84e134Smrg	LIBC=gnulibc1
9687a84e134Smrg	# endif
9697a84e134Smrg	#else
9707a84e134Smrg	#if defined(__INTEL_COMPILER) || defined(__PGI)
9717a84e134Smrg	LIBC=gnu
9727a84e134Smrg	#else
9737a84e134Smrg	LIBC=gnuaout
9747a84e134Smrg	#endif
9757a84e134Smrg	#endif
9767a84e134Smrg	#ifdef __dietlibc__
9777a84e134Smrg	LIBC=dietlibc
9787a84e134Smrg	#endif
9797a84e134SmrgEOF
9807a84e134Smrg	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
9817a84e134Smrg	test x"${LIBC}" != x && {
9827a84e134Smrg		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
9837a84e134Smrg		exit
9847a84e134Smrg	}
9857a84e134Smrg	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
9867a84e134Smrg	;;
9877a84e134Smrg    i*86:DYNIX/ptx:4*:*)
9887a84e134Smrg	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
9897a84e134Smrg	# earlier versions are messed up and put the nodename in both
9907a84e134Smrg	# sysname and nodename.
9917a84e134Smrg	echo i386-sequent-sysv4
9927a84e134Smrg	exit ;;
9937a84e134Smrg    i*86:UNIX_SV:4.2MP:2.*)
9947a84e134Smrg        # Unixware is an offshoot of SVR4, but it has its own version
9957a84e134Smrg        # number series starting with 2...
9967a84e134Smrg        # I am not positive that other SVR4 systems won't match this,
9977a84e134Smrg	# I just have to hope.  -- rms.
9987a84e134Smrg        # Use sysv4.2uw... so that sysv4* matches it.
9997a84e134Smrg	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
10007a84e134Smrg	exit ;;
10017a84e134Smrg    i*86:OS/2:*:*)
10027a84e134Smrg	# If we were able to find `uname', then EMX Unix compatibility
10037a84e134Smrg	# is probably installed.
10047a84e134Smrg	echo ${UNAME_MACHINE}-pc-os2-emx
10057a84e134Smrg	exit ;;
10067a84e134Smrg    i*86:XTS-300:*:STOP)
10077a84e134Smrg	echo ${UNAME_MACHINE}-unknown-stop
10087a84e134Smrg	exit ;;
10097a84e134Smrg    i*86:atheos:*:*)
10107a84e134Smrg	echo ${UNAME_MACHINE}-unknown-atheos
10117a84e134Smrg	exit ;;
10127a84e134Smrg    i*86:syllable:*:*)
10137a84e134Smrg	echo ${UNAME_MACHINE}-pc-syllable
10147a84e134Smrg	exit ;;
10157a84e134Smrg    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
10167a84e134Smrg	echo i386-unknown-lynxos${UNAME_RELEASE}
10177a84e134Smrg	exit ;;
10187a84e134Smrg    i*86:*DOS:*:*)
10197a84e134Smrg	echo ${UNAME_MACHINE}-pc-msdosdjgpp
10207a84e134Smrg	exit ;;
10217a84e134Smrg    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
10227a84e134Smrg	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
10237a84e134Smrg	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
10247a84e134Smrg		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
10257a84e134Smrg	else
10267a84e134Smrg		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
10277a84e134Smrg	fi
10287a84e134Smrg	exit ;;
10297a84e134Smrg    i*86:*:5:[678]*)
10307a84e134Smrg    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
10317a84e134Smrg	case `/bin/uname -X | grep "^Machine"` in
10327a84e134Smrg	    *486*)	     UNAME_MACHINE=i486 ;;
10337a84e134Smrg	    *Pentium)	     UNAME_MACHINE=i586 ;;
10347a84e134Smrg	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
10357a84e134Smrg	esac
10367a84e134Smrg	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
10377a84e134Smrg	exit ;;
10387a84e134Smrg    i*86:*:3.2:*)
10397a84e134Smrg	if test -f /usr/options/cb.name; then
10407a84e134Smrg		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
10417a84e134Smrg		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
10427a84e134Smrg	elif /bin/uname -X 2>/dev/null >/dev/null ; then
10437a84e134Smrg		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
10447a84e134Smrg		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
10457a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
10467a84e134Smrg			&& UNAME_MACHINE=i586
10477a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
10487a84e134Smrg			&& UNAME_MACHINE=i686
10497a84e134Smrg		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
10507a84e134Smrg			&& UNAME_MACHINE=i686
10517a84e134Smrg		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
10527a84e134Smrg	else
10537a84e134Smrg		echo ${UNAME_MACHINE}-pc-sysv32
10547a84e134Smrg	fi
10557a84e134Smrg	exit ;;
10567a84e134Smrg    pc:*:*:*)
10577a84e134Smrg	# Left here for compatibility:
10587a84e134Smrg        # uname -m prints for DJGPP always 'pc', but it prints nothing about
10597a84e134Smrg        # the processor, so we play safe by assuming i386.
10607a84e134Smrg	echo i386-pc-msdosdjgpp
10617a84e134Smrg        exit ;;
10627a84e134Smrg    Intel:Mach:3*:*)
10637a84e134Smrg	echo i386-pc-mach3
10647a84e134Smrg	exit ;;
10657a84e134Smrg    paragon:*:*:*)
10667a84e134Smrg	echo i860-intel-osf1
10677a84e134Smrg	exit ;;
10687a84e134Smrg    i860:*:4.*:*) # i860-SVR4
10697a84e134Smrg	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
10707a84e134Smrg	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
10717a84e134Smrg	else # Add other i860-SVR4 vendors below as they are discovered.
10727a84e134Smrg	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
10737a84e134Smrg	fi
10747a84e134Smrg	exit ;;
10757a84e134Smrg    mini*:CTIX:SYS*5:*)
10767a84e134Smrg	# "miniframe"
10777a84e134Smrg	echo m68010-convergent-sysv
10787a84e134Smrg	exit ;;
10797a84e134Smrg    mc68k:UNIX:SYSTEM5:3.51m)
10807a84e134Smrg	echo m68k-convergent-sysv
10817a84e134Smrg	exit ;;
10827a84e134Smrg    M680?0:D-NIX:5.3:*)
10837a84e134Smrg	echo m68k-diab-dnix
10847a84e134Smrg	exit ;;
10857a84e134Smrg    M68*:*:R3V[5678]*:*)
10867a84e134Smrg	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
10877a84e134Smrg    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)
10887a84e134Smrg	OS_REL=''
10897a84e134Smrg	test -r /etc/.relid \
10907a84e134Smrg	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
10917a84e134Smrg	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
10927a84e134Smrg	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
10937a84e134Smrg	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
10947a84e134Smrg	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
10957a84e134Smrg    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
10967a84e134Smrg        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
10977a84e134Smrg          && { echo i486-ncr-sysv4; exit; } ;;
10987a84e134Smrg    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
10997a84e134Smrg	echo m68k-unknown-lynxos${UNAME_RELEASE}
11007a84e134Smrg	exit ;;
11017a84e134Smrg    mc68030:UNIX_System_V:4.*:*)
11027a84e134Smrg	echo m68k-atari-sysv4
11037a84e134Smrg	exit ;;
11047a84e134Smrg    TSUNAMI:LynxOS:2.*:*)
11057a84e134Smrg	echo sparc-unknown-lynxos${UNAME_RELEASE}
11067a84e134Smrg	exit ;;
11077a84e134Smrg    rs6000:LynxOS:2.*:*)
11087a84e134Smrg	echo rs6000-unknown-lynxos${UNAME_RELEASE}
11097a84e134Smrg	exit ;;
11107a84e134Smrg    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
11117a84e134Smrg	echo powerpc-unknown-lynxos${UNAME_RELEASE}
11127a84e134Smrg	exit ;;
11137a84e134Smrg    SM[BE]S:UNIX_SV:*:*)
11147a84e134Smrg	echo mips-dde-sysv${UNAME_RELEASE}
11157a84e134Smrg	exit ;;
11167a84e134Smrg    RM*:ReliantUNIX-*:*:*)
11177a84e134Smrg	echo mips-sni-sysv4
11187a84e134Smrg	exit ;;
11197a84e134Smrg    RM*:SINIX-*:*:*)
11207a84e134Smrg	echo mips-sni-sysv4
11217a84e134Smrg	exit ;;
11227a84e134Smrg    *:SINIX-*:*:*)
11237a84e134Smrg	if uname -p 2>/dev/null >/dev/null ; then
11247a84e134Smrg		UNAME_MACHINE=`(uname -p) 2>/dev/null`
11257a84e134Smrg		echo ${UNAME_MACHINE}-sni-sysv4
11267a84e134Smrg	else
11277a84e134Smrg		echo ns32k-sni-sysv
11287a84e134Smrg	fi
11297a84e134Smrg	exit ;;
11307a84e134Smrg    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
11317a84e134Smrg                      # says <Richard.M.Bartel@ccMail.Census.GOV>
11327a84e134Smrg        echo i586-unisys-sysv4
11337a84e134Smrg        exit ;;
11347a84e134Smrg    *:UNIX_System_V:4*:FTX*)
11357a84e134Smrg	# From Gerald Hewes <hewes@openmarket.com>.
11367a84e134Smrg	# How about differentiating between stratus architectures? -djm
11377a84e134Smrg	echo hppa1.1-stratus-sysv4
11387a84e134Smrg	exit ;;
11397a84e134Smrg    *:*:*:FTX*)
11407a84e134Smrg	# From seanf@swdc.stratus.com.
11417a84e134Smrg	echo i860-stratus-sysv4
11427a84e134Smrg	exit ;;
11437a84e134Smrg    i*86:VOS:*:*)
11447a84e134Smrg	# From Paul.Green@stratus.com.
11457a84e134Smrg	echo ${UNAME_MACHINE}-stratus-vos
11467a84e134Smrg	exit ;;
11477a84e134Smrg    *:VOS:*:*)
11487a84e134Smrg	# From Paul.Green@stratus.com.
11497a84e134Smrg	echo hppa1.1-stratus-vos
11507a84e134Smrg	exit ;;
11517a84e134Smrg    mc68*:A/UX:*:*)
11527a84e134Smrg	echo m68k-apple-aux${UNAME_RELEASE}
11537a84e134Smrg	exit ;;
11547a84e134Smrg    news*:NEWS-OS:6*:*)
11557a84e134Smrg	echo mips-sony-newsos6
11567a84e134Smrg	exit ;;
11577a84e134Smrg    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
11587a84e134Smrg	if [ -d /usr/nec ]; then
11597a84e134Smrg	        echo mips-nec-sysv${UNAME_RELEASE}
11607a84e134Smrg	else
11617a84e134Smrg	        echo mips-unknown-sysv${UNAME_RELEASE}
11627a84e134Smrg	fi
11637a84e134Smrg        exit ;;
11647a84e134Smrg    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
11657a84e134Smrg	echo powerpc-be-beos
11667a84e134Smrg	exit ;;
11677a84e134Smrg    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
11687a84e134Smrg	echo powerpc-apple-beos
11697a84e134Smrg	exit ;;
11707a84e134Smrg    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
11717a84e134Smrg	echo i586-pc-beos
11727a84e134Smrg	exit ;;
11737a84e134Smrg    SX-4:SUPER-UX:*:*)
11747a84e134Smrg	echo sx4-nec-superux${UNAME_RELEASE}
11757a84e134Smrg	exit ;;
11767a84e134Smrg    SX-5:SUPER-UX:*:*)
11777a84e134Smrg	echo sx5-nec-superux${UNAME_RELEASE}
11787a84e134Smrg	exit ;;
11797a84e134Smrg    SX-6:SUPER-UX:*:*)
11807a84e134Smrg	echo sx6-nec-superux${UNAME_RELEASE}
11817a84e134Smrg	exit ;;
11827a84e134Smrg    Power*:Rhapsody:*:*)
11837a84e134Smrg	echo powerpc-apple-rhapsody${UNAME_RELEASE}
11847a84e134Smrg	exit ;;
11857a84e134Smrg    *:Rhapsody:*:*)
11867a84e134Smrg	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
11877a84e134Smrg	exit ;;
11887a84e134Smrg    *:Darwin:*:*)
11897a84e134Smrg	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
11907a84e134Smrg	case $UNAME_PROCESSOR in
11917a84e134Smrg	    unknown) UNAME_PROCESSOR=powerpc ;;
11927a84e134Smrg	esac
11937a84e134Smrg	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
11947a84e134Smrg	exit ;;
11957a84e134Smrg    *:procnto*:*:* | *:QNX:[0123456789]*:*)
11967a84e134Smrg	UNAME_PROCESSOR=`uname -p`
11977a84e134Smrg	if test "$UNAME_PROCESSOR" = "x86"; then
11987a84e134Smrg		UNAME_PROCESSOR=i386
11997a84e134Smrg		UNAME_MACHINE=pc
12007a84e134Smrg	fi
12017a84e134Smrg	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
12027a84e134Smrg	exit ;;
12037a84e134Smrg    *:QNX:*:4*)
12047a84e134Smrg	echo i386-pc-qnx
12057a84e134Smrg	exit ;;
12067a84e134Smrg    NSE-?:NONSTOP_KERNEL:*:*)
12077a84e134Smrg	echo nse-tandem-nsk${UNAME_RELEASE}
12087a84e134Smrg	exit ;;
12097a84e134Smrg    NSR-?:NONSTOP_KERNEL:*:*)
12107a84e134Smrg	echo nsr-tandem-nsk${UNAME_RELEASE}
12117a84e134Smrg	exit ;;
12127a84e134Smrg    *:NonStop-UX:*:*)
12137a84e134Smrg	echo mips-compaq-nonstopux
12147a84e134Smrg	exit ;;
12157a84e134Smrg    BS2000:POSIX*:*:*)
12167a84e134Smrg	echo bs2000-siemens-sysv
12177a84e134Smrg	exit ;;
12187a84e134Smrg    DS/*:UNIX_System_V:*:*)
12197a84e134Smrg	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
12207a84e134Smrg	exit ;;
12217a84e134Smrg    *:Plan9:*:*)
12227a84e134Smrg	# "uname -m" is not consistent, so use $cputype instead. 386
12237a84e134Smrg	# is converted to i386 for consistency with other x86
12247a84e134Smrg	# operating systems.
12257a84e134Smrg	if test "$cputype" = "386"; then
12267a84e134Smrg	    UNAME_MACHINE=i386
12277a84e134Smrg	else
12287a84e134Smrg	    UNAME_MACHINE="$cputype"
12297a84e134Smrg	fi
12307a84e134Smrg	echo ${UNAME_MACHINE}-unknown-plan9
12317a84e134Smrg	exit ;;
12327a84e134Smrg    *:TOPS-10:*:*)
12337a84e134Smrg	echo pdp10-unknown-tops10
12347a84e134Smrg	exit ;;
12357a84e134Smrg    *:TENEX:*:*)
12367a84e134Smrg	echo pdp10-unknown-tenex
12377a84e134Smrg	exit ;;
12387a84e134Smrg    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
12397a84e134Smrg	echo pdp10-dec-tops20
12407a84e134Smrg	exit ;;
12417a84e134Smrg    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
12427a84e134Smrg	echo pdp10-xkl-tops20
12437a84e134Smrg	exit ;;
12447a84e134Smrg    *:TOPS-20:*:*)
12457a84e134Smrg	echo pdp10-unknown-tops20
12467a84e134Smrg	exit ;;
12477a84e134Smrg    *:ITS:*:*)
12487a84e134Smrg	echo pdp10-unknown-its
12497a84e134Smrg	exit ;;
12507a84e134Smrg    SEI:*:*:SEIUX)
12517a84e134Smrg        echo mips-sei-seiux${UNAME_RELEASE}
12527a84e134Smrg	exit ;;
12537a84e134Smrg    *:DragonFly:*:*)
12547a84e134Smrg	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
12557a84e134Smrg	exit ;;
12567a84e134Smrg    *:*VMS:*:*)
12577a84e134Smrg    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
12587a84e134Smrg	case "${UNAME_MACHINE}" in
12597a84e134Smrg	    A*) echo alpha-dec-vms ; exit ;;
12607a84e134Smrg	    I*) echo ia64-dec-vms ; exit ;;
12617a84e134Smrg	    V*) echo vax-dec-vms ; exit ;;
12627a84e134Smrg	esac ;;
12637a84e134Smrg    *:XENIX:*:SysV)
12647a84e134Smrg	echo i386-pc-xenix
12657a84e134Smrg	exit ;;
12667a84e134Smrg    i*86:skyos:*:*)
12677a84e134Smrg	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
12687a84e134Smrg	exit ;;
12697a84e134Smrg    i*86:rdos:*:*)
12707a84e134Smrg	echo ${UNAME_MACHINE}-pc-rdos
12717a84e134Smrg	exit ;;
12727a84e134Smrgesac
12737a84e134Smrg
12747a84e134Smrg#echo '(No uname command or uname output not recognized.)' 1>&2
12757a84e134Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
12767a84e134Smrg
12777a84e134Smrgeval $set_cc_for_build
12787a84e134Smrgcat >$dummy.c <<EOF
12797a84e134Smrg#ifdef _SEQUENT_
12807a84e134Smrg# include <sys/types.h>
12817a84e134Smrg# include <sys/utsname.h>
12827a84e134Smrg#endif
12837a84e134Smrgmain ()
12847a84e134Smrg{
12857a84e134Smrg#if defined (sony)
12867a84e134Smrg#if defined (MIPSEB)
12877a84e134Smrg  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
12887a84e134Smrg     I don't know....  */
12897a84e134Smrg  printf ("mips-sony-bsd\n"); exit (0);
12907a84e134Smrg#else
12917a84e134Smrg#include <sys/param.h>
12927a84e134Smrg  printf ("m68k-sony-newsos%s\n",
12937a84e134Smrg#ifdef NEWSOS4
12947a84e134Smrg          "4"
12957a84e134Smrg#else
12967a84e134Smrg	  ""
12977a84e134Smrg#endif
12987a84e134Smrg         ); exit (0);
12997a84e134Smrg#endif
13007a84e134Smrg#endif
13017a84e134Smrg
13027a84e134Smrg#if defined (__arm) && defined (__acorn) && defined (__unix)
13037a84e134Smrg  printf ("arm-acorn-riscix\n"); exit (0);
13047a84e134Smrg#endif
13057a84e134Smrg
13067a84e134Smrg#if defined (hp300) && !defined (hpux)
13077a84e134Smrg  printf ("m68k-hp-bsd\n"); exit (0);
13087a84e134Smrg#endif
13097a84e134Smrg
13107a84e134Smrg#if defined (NeXT)
13117a84e134Smrg#if !defined (__ARCHITECTURE__)
13127a84e134Smrg#define __ARCHITECTURE__ "m68k"
13137a84e134Smrg#endif
13147a84e134Smrg  int version;
13157a84e134Smrg  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
13167a84e134Smrg  if (version < 4)
13177a84e134Smrg    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
13187a84e134Smrg  else
13197a84e134Smrg    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
13207a84e134Smrg  exit (0);
13217a84e134Smrg#endif
13227a84e134Smrg
13237a84e134Smrg#if defined (MULTIMAX) || defined (n16)
13247a84e134Smrg#if defined (UMAXV)
13257a84e134Smrg  printf ("ns32k-encore-sysv\n"); exit (0);
13267a84e134Smrg#else
13277a84e134Smrg#if defined (CMU)
13287a84e134Smrg  printf ("ns32k-encore-mach\n"); exit (0);
13297a84e134Smrg#else
13307a84e134Smrg  printf ("ns32k-encore-bsd\n"); exit (0);
13317a84e134Smrg#endif
13327a84e134Smrg#endif
13337a84e134Smrg#endif
13347a84e134Smrg
13357a84e134Smrg#if defined (__386BSD__)
13367a84e134Smrg  printf ("i386-pc-bsd\n"); exit (0);
13377a84e134Smrg#endif
13387a84e134Smrg
13397a84e134Smrg#if defined (sequent)
13407a84e134Smrg#if defined (i386)
13417a84e134Smrg  printf ("i386-sequent-dynix\n"); exit (0);
13427a84e134Smrg#endif
13437a84e134Smrg#if defined (ns32000)
13447a84e134Smrg  printf ("ns32k-sequent-dynix\n"); exit (0);
13457a84e134Smrg#endif
13467a84e134Smrg#endif
13477a84e134Smrg
13487a84e134Smrg#if defined (_SEQUENT_)
13497a84e134Smrg    struct utsname un;
13507a84e134Smrg
13517a84e134Smrg    uname(&un);
13527a84e134Smrg
13537a84e134Smrg    if (strncmp(un.version, "V2", 2) == 0) {
13547a84e134Smrg	printf ("i386-sequent-ptx2\n"); exit (0);
13557a84e134Smrg    }
13567a84e134Smrg    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
13577a84e134Smrg	printf ("i386-sequent-ptx1\n"); exit (0);
13587a84e134Smrg    }
13597a84e134Smrg    printf ("i386-sequent-ptx\n"); exit (0);
13607a84e134Smrg
13617a84e134Smrg#endif
13627a84e134Smrg
13637a84e134Smrg#if defined (vax)
13647a84e134Smrg# if !defined (ultrix)
13657a84e134Smrg#  include <sys/param.h>
13667a84e134Smrg#  if defined (BSD)
13677a84e134Smrg#   if BSD == 43
13687a84e134Smrg      printf ("vax-dec-bsd4.3\n"); exit (0);
13697a84e134Smrg#   else
13707a84e134Smrg#    if BSD == 199006
13717a84e134Smrg      printf ("vax-dec-bsd4.3reno\n"); exit (0);
13727a84e134Smrg#    else
13737a84e134Smrg      printf ("vax-dec-bsd\n"); exit (0);
13747a84e134Smrg#    endif
13757a84e134Smrg#   endif
13767a84e134Smrg#  else
13777a84e134Smrg    printf ("vax-dec-bsd\n"); exit (0);
13787a84e134Smrg#  endif
13797a84e134Smrg# else
13807a84e134Smrg    printf ("vax-dec-ultrix\n"); exit (0);
13817a84e134Smrg# endif
13827a84e134Smrg#endif
13837a84e134Smrg
13847a84e134Smrg#if defined (alliant) && defined (i860)
13857a84e134Smrg  printf ("i860-alliant-bsd\n"); exit (0);
13867a84e134Smrg#endif
13877a84e134Smrg
13887a84e134Smrg  exit (1);
13897a84e134Smrg}
13907a84e134SmrgEOF
13917a84e134Smrg
13927a84e134Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
13937a84e134Smrg	{ echo "$SYSTEM_NAME"; exit; }
13947a84e134Smrg
13957a84e134Smrg# Apollos put the system type in the environment.
13967a84e134Smrg
13977a84e134Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
13987a84e134Smrg
13997a84e134Smrg# Convex versions that predate uname can use getsysinfo(1)
14007a84e134Smrg
14017a84e134Smrgif [ -x /usr/convex/getsysinfo ]
14027a84e134Smrgthen
14037a84e134Smrg    case `getsysinfo -f cpu_type` in
14047a84e134Smrg    c1*)
14057a84e134Smrg	echo c1-convex-bsd
14067a84e134Smrg	exit ;;
14077a84e134Smrg    c2*)
14087a84e134Smrg	if getsysinfo -f scalar_acc
14097a84e134Smrg	then echo c32-convex-bsd
14107a84e134Smrg	else echo c2-convex-bsd
14117a84e134Smrg	fi
14127a84e134Smrg	exit ;;
14137a84e134Smrg    c34*)
14147a84e134Smrg	echo c34-convex-bsd
14157a84e134Smrg	exit ;;
14167a84e134Smrg    c38*)
14177a84e134Smrg	echo c38-convex-bsd
14187a84e134Smrg	exit ;;
14197a84e134Smrg    c4*)
14207a84e134Smrg	echo c4-convex-bsd
14217a84e134Smrg	exit ;;
14227a84e134Smrg    esac
14237a84e134Smrgfi
14247a84e134Smrg
14257a84e134Smrgcat >&2 <<EOF
14267a84e134Smrg$0: unable to guess system type
14277a84e134Smrg
14287a84e134SmrgThis script, last modified $timestamp, has failed to recognize
14297a84e134Smrgthe operating system you are using. It is advised that you
14307a84e134Smrgdownload the most up to date version of the config scripts from
14317a84e134Smrg
14327a84e134Smrg  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
14337a84e134Smrgand
14347a84e134Smrg  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
14357a84e134Smrg
14367a84e134SmrgIf the version you run ($0) is already up to date, please
14377a84e134Smrgsend the following data and any information you think might be
14387a84e134Smrgpertinent to <config-patches@gnu.org> in order to provide the needed
14397a84e134Smrginformation to handle your system.
14407a84e134Smrg
14417a84e134Smrgconfig.guess timestamp = $timestamp
14427a84e134Smrg
14437a84e134Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
14447a84e134Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
14457a84e134Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
14467a84e134Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
14477a84e134Smrg
14487a84e134Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
14497a84e134Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
14507a84e134Smrg
14517a84e134Smrghostinfo               = `(hostinfo) 2>/dev/null`
14527a84e134Smrg/bin/universe          = `(/bin/universe) 2>/dev/null`
14537a84e134Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
14547a84e134Smrg/bin/arch              = `(/bin/arch) 2>/dev/null`
14557a84e134Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
14567a84e134Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
14577a84e134Smrg
14587a84e134SmrgUNAME_MACHINE = ${UNAME_MACHINE}
14597a84e134SmrgUNAME_RELEASE = ${UNAME_RELEASE}
14607a84e134SmrgUNAME_SYSTEM  = ${UNAME_SYSTEM}
14617a84e134SmrgUNAME_VERSION = ${UNAME_VERSION}
14627a84e134SmrgEOF
14637a84e134Smrg
14647a84e134Smrgexit 1
14657a84e134Smrg
14667a84e134Smrg# Local variables:
14677a84e134Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
14687a84e134Smrg# time-stamp-start: "timestamp='"
14697a84e134Smrg# time-stamp-format: "%:y-%02m-%02d"
14707a84e134Smrg# time-stamp-end: "'"
14717a84e134Smrg# End:
1472