Home | History | Annotate | Line # | Download | only in build-aux
config.guess revision 1.1.2.1
      1      1.1     pooka #! /bin/sh
      2      1.1     pooka # Attempt to guess a canonical system name.
      3  1.1.2.1  pgoyette #   Copyright 1992-2017 Free Software Foundation, Inc.
      4      1.1     pooka 
      5  1.1.2.1  pgoyette timestamp='2017-01-01'
      6      1.1     pooka 
      7      1.1     pooka # This file is free software; you can redistribute it and/or modify it
      8      1.1     pooka # under the terms of the GNU General Public License as published by
      9      1.1     pooka # the Free Software Foundation; either version 3 of the License, or
     10      1.1     pooka # (at your option) any later version.
     11      1.1     pooka #
     12      1.1     pooka # This program is distributed in the hope that it will be useful, but
     13      1.1     pooka # WITHOUT ANY WARRANTY; without even the implied warranty of
     14      1.1     pooka # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15      1.1     pooka # General Public License for more details.
     16      1.1     pooka #
     17      1.1     pooka # You should have received a copy of the GNU General Public License
     18      1.1     pooka # along with this program; if not, see <http://www.gnu.org/licenses/>.
     19      1.1     pooka #
     20      1.1     pooka # As a special exception to the GNU General Public License, if you
     21      1.1     pooka # distribute this file as part of a program that contains a
     22      1.1     pooka # configuration script generated by Autoconf, you may include it under
     23      1.1     pooka # the same distribution terms that you use for the rest of that
     24      1.1     pooka # program.  This Exception is an additional permission under section 7
     25      1.1     pooka # of the GNU General Public License, version 3 ("GPLv3").
     26      1.1     pooka #
     27  1.1.2.1  pgoyette # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
     28      1.1     pooka #
     29      1.1     pooka # You can get the latest version of this script from:
     30  1.1.2.1  pgoyette # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
     31      1.1     pooka #
     32  1.1.2.1  pgoyette # Please send patches to <config-patches (at] gnu.org>.
     33      1.1     pooka 
     34      1.1     pooka 
     35      1.1     pooka me=`echo "$0" | sed -e 's,.*/,,'`
     36      1.1     pooka 
     37      1.1     pooka usage="\
     38      1.1     pooka Usage: $0 [OPTION]
     39      1.1     pooka 
     40      1.1     pooka Output the configuration name of the system \`$me' is run on.
     41      1.1     pooka 
     42      1.1     pooka Operation modes:
     43      1.1     pooka   -h, --help         print this help, then exit
     44      1.1     pooka   -t, --time-stamp   print date of last modification, then exit
     45      1.1     pooka   -v, --version      print version number, then exit
     46      1.1     pooka 
     47      1.1     pooka Report bugs and patches to <config-patches (at] gnu.org>."
     48      1.1     pooka 
     49      1.1     pooka version="\
     50      1.1     pooka GNU config.guess ($timestamp)
     51      1.1     pooka 
     52      1.1     pooka Originally written by Per Bothner.
     53  1.1.2.1  pgoyette Copyright 1992-2017 Free Software Foundation, Inc.
     54      1.1     pooka 
     55      1.1     pooka This is free software; see the source for copying conditions.  There is NO
     56      1.1     pooka warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     57      1.1     pooka 
     58      1.1     pooka help="
     59      1.1     pooka Try \`$me --help' for more information."
     60      1.1     pooka 
     61      1.1     pooka # Parse command line
     62      1.1     pooka while test $# -gt 0 ; do
     63      1.1     pooka   case $1 in
     64      1.1     pooka     --time-stamp | --time* | -t )
     65      1.1     pooka        echo "$timestamp" ; exit ;;
     66      1.1     pooka     --version | -v )
     67      1.1     pooka        echo "$version" ; exit ;;
     68      1.1     pooka     --help | --h* | -h )
     69      1.1     pooka        echo "$usage"; exit ;;
     70      1.1     pooka     -- )     # Stop option processing
     71      1.1     pooka        shift; break ;;
     72      1.1     pooka     - )	# Use stdin as input.
     73      1.1     pooka        break ;;
     74      1.1     pooka     -* )
     75      1.1     pooka        echo "$me: invalid option $1$help" >&2
     76      1.1     pooka        exit 1 ;;
     77      1.1     pooka     * )
     78      1.1     pooka        break ;;
     79      1.1     pooka   esac
     80      1.1     pooka done
     81      1.1     pooka 
     82      1.1     pooka if test $# != 0; then
     83      1.1     pooka   echo "$me: too many arguments$help" >&2
     84      1.1     pooka   exit 1
     85      1.1     pooka fi
     86      1.1     pooka 
     87      1.1     pooka trap 'exit 1' 1 2 15
     88      1.1     pooka 
     89      1.1     pooka # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
     90      1.1     pooka # compiler to aid in system detection is discouraged as it requires
     91      1.1     pooka # temporary files to be created and, as you can see below, it is a
     92      1.1     pooka # headache to deal with in a portable fashion.
     93      1.1     pooka 
     94      1.1     pooka # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
     95      1.1     pooka # use `HOST_CC' if defined, but it is deprecated.
     96      1.1     pooka 
     97      1.1     pooka # Portable tmp directory creation inspired by the Autoconf team.
     98      1.1     pooka 
     99      1.1     pooka set_cc_for_build='
    100      1.1     pooka trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
    101      1.1     pooka trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
    102      1.1     pooka : ${TMPDIR=/tmp} ;
    103      1.1     pooka  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
    104      1.1     pooka  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
    105      1.1     pooka  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
    106      1.1     pooka  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
    107      1.1     pooka dummy=$tmp/dummy ;
    108      1.1     pooka tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    109      1.1     pooka case $CC_FOR_BUILD,$HOST_CC,$CC in
    110      1.1     pooka  ,,)    echo "int x;" > $dummy.c ;
    111      1.1     pooka 	for c in cc gcc c89 c99 ; do
    112      1.1     pooka 	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
    113      1.1     pooka 	     CC_FOR_BUILD="$c"; break ;
    114      1.1     pooka 	  fi ;
    115      1.1     pooka 	done ;
    116      1.1     pooka 	if test x"$CC_FOR_BUILD" = x ; then
    117      1.1     pooka 	  CC_FOR_BUILD=no_compiler_found ;
    118      1.1     pooka 	fi
    119      1.1     pooka 	;;
    120      1.1     pooka  ,,*)   CC_FOR_BUILD=$CC ;;
    121      1.1     pooka  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    122      1.1     pooka esac ; set_cc_for_build= ;'
    123      1.1     pooka 
    124      1.1     pooka # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    125      1.1     pooka # (ghazi (at] noc.rutgers.edu 1994-08-24)
    126      1.1     pooka if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
    127      1.1     pooka 	PATH=$PATH:/.attbin ; export PATH
    128      1.1     pooka fi
    129      1.1     pooka 
    130      1.1     pooka UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
    131      1.1     pooka UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
    132      1.1     pooka UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    133      1.1     pooka UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    134      1.1     pooka 
    135      1.1     pooka case "${UNAME_SYSTEM}" in
    136      1.1     pooka Linux|GNU|GNU/*)
    137      1.1     pooka 	# If the system lacks a compiler, then just pick glibc.
    138      1.1     pooka 	# We could probably try harder.
    139      1.1     pooka 	LIBC=gnu
    140      1.1     pooka 
    141      1.1     pooka 	eval $set_cc_for_build
    142      1.1     pooka 	cat <<-EOF > $dummy.c
    143      1.1     pooka 	#include <features.h>
    144      1.1     pooka 	#if defined(__UCLIBC__)
    145      1.1     pooka 	LIBC=uclibc
    146      1.1     pooka 	#elif defined(__dietlibc__)
    147      1.1     pooka 	LIBC=dietlibc
    148      1.1     pooka 	#else
    149      1.1     pooka 	LIBC=gnu
    150      1.1     pooka 	#endif
    151      1.1     pooka 	EOF
    152  1.1.2.1  pgoyette 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
    153      1.1     pooka 	;;
    154      1.1     pooka esac
    155      1.1     pooka 
    156      1.1     pooka # Note: order is significant - the case branches are not exclusive.
    157      1.1     pooka 
    158      1.1     pooka case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    159      1.1     pooka     *:NetBSD:*:*)
    160      1.1     pooka 	# NetBSD (nbsd) targets should (where applicable) match one or
    161      1.1     pooka 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
    162      1.1     pooka 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
    163      1.1     pooka 	# switched to ELF, *-*-netbsd* would select the old
    164      1.1     pooka 	# object file format.  This provides both forward
    165      1.1     pooka 	# compatibility and a consistent mechanism for selecting the
    166      1.1     pooka 	# object file format.
    167      1.1     pooka 	#
    168      1.1     pooka 	# Note: NetBSD doesn't particularly care about the vendor
    169      1.1     pooka 	# portion of the name.  We always set it to "unknown".
    170      1.1     pooka 	sysctl="sysctl -n hw.machine_arch"
    171  1.1.2.1  pgoyette 	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
    172  1.1.2.1  pgoyette 	    /sbin/$sysctl 2>/dev/null || \
    173  1.1.2.1  pgoyette 	    /usr/sbin/$sysctl 2>/dev/null || \
    174  1.1.2.1  pgoyette 	    echo unknown)`
    175      1.1     pooka 	case "${UNAME_MACHINE_ARCH}" in
    176      1.1     pooka 	    armeb) machine=armeb-unknown ;;
    177      1.1     pooka 	    arm*) machine=arm-unknown ;;
    178      1.1     pooka 	    sh3el) machine=shl-unknown ;;
    179      1.1     pooka 	    sh3eb) machine=sh-unknown ;;
    180      1.1     pooka 	    sh5el) machine=sh5le-unknown ;;
    181  1.1.2.1  pgoyette 	    earmv*)
    182  1.1.2.1  pgoyette 		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
    183  1.1.2.1  pgoyette 		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
    184  1.1.2.1  pgoyette 		machine=${arch}${endian}-unknown
    185  1.1.2.1  pgoyette 		;;
    186      1.1     pooka 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
    187      1.1     pooka 	esac
    188      1.1     pooka 	# The Operating System including object format, if it has switched
    189  1.1.2.1  pgoyette 	# to ELF recently (or will in the future) and ABI.
    190      1.1     pooka 	case "${UNAME_MACHINE_ARCH}" in
    191  1.1.2.1  pgoyette 	    earm*)
    192  1.1.2.1  pgoyette 		os=netbsdelf
    193  1.1.2.1  pgoyette 		;;
    194      1.1     pooka 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
    195      1.1     pooka 		eval $set_cc_for_build
    196      1.1     pooka 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
    197      1.1     pooka 			| grep -q __ELF__
    198      1.1     pooka 		then
    199      1.1     pooka 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
    200      1.1     pooka 		    # Return netbsd for either.  FIX?
    201      1.1     pooka 		    os=netbsd
    202      1.1     pooka 		else
    203      1.1     pooka 		    os=netbsdelf
    204      1.1     pooka 		fi
    205      1.1     pooka 		;;
    206      1.1     pooka 	    *)
    207      1.1     pooka 		os=netbsd
    208      1.1     pooka 		;;
    209      1.1     pooka 	esac
    210  1.1.2.1  pgoyette 	# Determine ABI tags.
    211  1.1.2.1  pgoyette 	case "${UNAME_MACHINE_ARCH}" in
    212  1.1.2.1  pgoyette 	    earm*)
    213  1.1.2.1  pgoyette 		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
    214  1.1.2.1  pgoyette 		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
    215  1.1.2.1  pgoyette 		;;
    216  1.1.2.1  pgoyette 	esac
    217      1.1     pooka 	# The OS release
    218      1.1     pooka 	# Debian GNU/NetBSD machines have a different userland, and
    219      1.1     pooka 	# thus, need a distinct triplet. However, they do not need
    220      1.1     pooka 	# kernel version information, so it can be replaced with a
    221      1.1     pooka 	# suitable tag, in the style of linux-gnu.
    222      1.1     pooka 	case "${UNAME_VERSION}" in
    223      1.1     pooka 	    Debian*)
    224      1.1     pooka 		release='-gnu'
    225      1.1     pooka 		;;
    226      1.1     pooka 	    *)
    227  1.1.2.1  pgoyette 		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
    228      1.1     pooka 		;;
    229      1.1     pooka 	esac
    230      1.1     pooka 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
    231      1.1     pooka 	# contains redundant information, the shorter form:
    232      1.1     pooka 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    233  1.1.2.1  pgoyette 	echo "${machine}-${os}${release}${abi}"
    234      1.1     pooka 	exit ;;
    235      1.1     pooka     *:Bitrig:*:*)
    236      1.1     pooka 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
    237      1.1     pooka 	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
    238      1.1     pooka 	exit ;;
    239      1.1     pooka     *:OpenBSD:*:*)
    240      1.1     pooka 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
    241      1.1     pooka 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
    242      1.1     pooka 	exit ;;
    243  1.1.2.1  pgoyette     *:LibertyBSD:*:*)
    244  1.1.2.1  pgoyette 	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
    245  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
    246  1.1.2.1  pgoyette 	exit ;;
    247      1.1     pooka     *:ekkoBSD:*:*)
    248      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
    249      1.1     pooka 	exit ;;
    250      1.1     pooka     *:SolidBSD:*:*)
    251      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
    252      1.1     pooka 	exit ;;
    253      1.1     pooka     macppc:MirBSD:*:*)
    254      1.1     pooka 	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
    255      1.1     pooka 	exit ;;
    256      1.1     pooka     *:MirBSD:*:*)
    257      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
    258      1.1     pooka 	exit ;;
    259  1.1.2.1  pgoyette     *:Sortix:*:*)
    260  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE}-unknown-sortix
    261  1.1.2.1  pgoyette 	exit ;;
    262      1.1     pooka     alpha:OSF1:*:*)
    263      1.1     pooka 	case $UNAME_RELEASE in
    264      1.1     pooka 	*4.0)
    265      1.1     pooka 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    266      1.1     pooka 		;;
    267      1.1     pooka 	*5.*)
    268      1.1     pooka 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
    269      1.1     pooka 		;;
    270      1.1     pooka 	esac
    271      1.1     pooka 	# According to Compaq, /usr/sbin/psrinfo has been available on
    272      1.1     pooka 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
    273      1.1     pooka 	# covers most systems running today.  This code pipes the CPU
    274      1.1     pooka 	# types through head -n 1, so we only detect the type of CPU 0.
    275      1.1     pooka 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
    276      1.1     pooka 	case "$ALPHA_CPU_TYPE" in
    277      1.1     pooka 	    "EV4 (21064)")
    278  1.1.2.1  pgoyette 		UNAME_MACHINE=alpha ;;
    279      1.1     pooka 	    "EV4.5 (21064)")
    280  1.1.2.1  pgoyette 		UNAME_MACHINE=alpha ;;
    281      1.1     pooka 	    "LCA4 (21066/21068)")
    282  1.1.2.1  pgoyette 		UNAME_MACHINE=alpha ;;
    283      1.1     pooka 	    "EV5 (21164)")
    284  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev5 ;;
    285      1.1     pooka 	    "EV5.6 (21164A)")
    286  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev56 ;;
    287      1.1     pooka 	    "EV5.6 (21164PC)")
    288  1.1.2.1  pgoyette 		UNAME_MACHINE=alphapca56 ;;
    289      1.1     pooka 	    "EV5.7 (21164PC)")
    290  1.1.2.1  pgoyette 		UNAME_MACHINE=alphapca57 ;;
    291      1.1     pooka 	    "EV6 (21264)")
    292  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev6 ;;
    293      1.1     pooka 	    "EV6.7 (21264A)")
    294  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev67 ;;
    295      1.1     pooka 	    "EV6.8CB (21264C)")
    296  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev68 ;;
    297      1.1     pooka 	    "EV6.8AL (21264B)")
    298  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev68 ;;
    299      1.1     pooka 	    "EV6.8CX (21264D)")
    300  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev68 ;;
    301      1.1     pooka 	    "EV6.9A (21264/EV69A)")
    302  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev69 ;;
    303      1.1     pooka 	    "EV7 (21364)")
    304  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev7 ;;
    305      1.1     pooka 	    "EV7.9 (21364A)")
    306  1.1.2.1  pgoyette 		UNAME_MACHINE=alphaev79 ;;
    307      1.1     pooka 	esac
    308      1.1     pooka 	# A Pn.n version is a patched version.
    309      1.1     pooka 	# A Vn.n version is a released version.
    310      1.1     pooka 	# A Tn.n version is a released field test version.
    311      1.1     pooka 	# A Xn.n version is an unreleased experimental baselevel.
    312      1.1     pooka 	# 1.2 uses "1.2" for uname -r.
    313  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
    314      1.1     pooka 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
    315      1.1     pooka 	exitcode=$?
    316      1.1     pooka 	trap '' 0
    317      1.1     pooka 	exit $exitcode ;;
    318      1.1     pooka     Alpha\ *:Windows_NT*:*)
    319      1.1     pooka 	# How do we know it's Interix rather than the generic POSIX subsystem?
    320      1.1     pooka 	# Should we change UNAME_MACHINE based on the output of uname instead
    321      1.1     pooka 	# of the specific Alpha model?
    322      1.1     pooka 	echo alpha-pc-interix
    323      1.1     pooka 	exit ;;
    324      1.1     pooka     21064:Windows_NT:50:3)
    325      1.1     pooka 	echo alpha-dec-winnt3.5
    326      1.1     pooka 	exit ;;
    327      1.1     pooka     Amiga*:UNIX_System_V:4.0:*)
    328      1.1     pooka 	echo m68k-unknown-sysv4
    329      1.1     pooka 	exit ;;
    330      1.1     pooka     *:[Aa]miga[Oo][Ss]:*:*)
    331      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-amigaos
    332      1.1     pooka 	exit ;;
    333      1.1     pooka     *:[Mm]orph[Oo][Ss]:*:*)
    334      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-morphos
    335      1.1     pooka 	exit ;;
    336      1.1     pooka     *:OS/390:*:*)
    337      1.1     pooka 	echo i370-ibm-openedition
    338      1.1     pooka 	exit ;;
    339      1.1     pooka     *:z/VM:*:*)
    340      1.1     pooka 	echo s390-ibm-zvmoe
    341      1.1     pooka 	exit ;;
    342      1.1     pooka     *:OS400:*:*)
    343      1.1     pooka 	echo powerpc-ibm-os400
    344      1.1     pooka 	exit ;;
    345      1.1     pooka     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    346      1.1     pooka 	echo arm-acorn-riscix${UNAME_RELEASE}
    347      1.1     pooka 	exit ;;
    348      1.1     pooka     arm*:riscos:*:*|arm*:RISCOS:*:*)
    349      1.1     pooka 	echo arm-unknown-riscos
    350      1.1     pooka 	exit ;;
    351      1.1     pooka     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    352      1.1     pooka 	echo hppa1.1-hitachi-hiuxmpp
    353      1.1     pooka 	exit ;;
    354      1.1     pooka     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    355      1.1     pooka 	# akee (at] wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
    356      1.1     pooka 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
    357      1.1     pooka 		echo pyramid-pyramid-sysv3
    358      1.1     pooka 	else
    359      1.1     pooka 		echo pyramid-pyramid-bsd
    360      1.1     pooka 	fi
    361      1.1     pooka 	exit ;;
    362      1.1     pooka     NILE*:*:*:dcosx)
    363      1.1     pooka 	echo pyramid-pyramid-svr4
    364      1.1     pooka 	exit ;;
    365      1.1     pooka     DRS?6000:unix:4.0:6*)
    366      1.1     pooka 	echo sparc-icl-nx6
    367      1.1     pooka 	exit ;;
    368      1.1     pooka     DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
    369      1.1     pooka 	case `/usr/bin/uname -p` in
    370      1.1     pooka 	    sparc) echo sparc-icl-nx7; exit ;;
    371      1.1     pooka 	esac ;;
    372      1.1     pooka     s390x:SunOS:*:*)
    373      1.1     pooka 	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    374      1.1     pooka 	exit ;;
    375      1.1     pooka     sun4H:SunOS:5.*:*)
    376      1.1     pooka 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    377      1.1     pooka 	exit ;;
    378      1.1     pooka     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    379      1.1     pooka 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    380      1.1     pooka 	exit ;;
    381      1.1     pooka     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
    382      1.1     pooka 	echo i386-pc-auroraux${UNAME_RELEASE}
    383      1.1     pooka 	exit ;;
    384      1.1     pooka     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
    385      1.1     pooka 	eval $set_cc_for_build
    386  1.1.2.1  pgoyette 	SUN_ARCH=i386
    387      1.1     pooka 	# If there is a compiler, see if it is configured for 64-bit objects.
    388      1.1     pooka 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
    389      1.1     pooka 	# This test works for both compilers.
    390  1.1.2.1  pgoyette 	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
    391      1.1     pooka 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
    392  1.1.2.1  pgoyette 		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
    393      1.1     pooka 		grep IS_64BIT_ARCH >/dev/null
    394      1.1     pooka 	    then
    395  1.1.2.1  pgoyette 		SUN_ARCH=x86_64
    396      1.1     pooka 	    fi
    397      1.1     pooka 	fi
    398      1.1     pooka 	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    399      1.1     pooka 	exit ;;
    400      1.1     pooka     sun4*:SunOS:6*:*)
    401      1.1     pooka 	# According to config.sub, this is the proper way to canonicalize
    402      1.1     pooka 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
    403      1.1     pooka 	# it's likely to be more like Solaris than SunOS4.
    404      1.1     pooka 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    405      1.1     pooka 	exit ;;
    406      1.1     pooka     sun4*:SunOS:*:*)
    407      1.1     pooka 	case "`/usr/bin/arch -k`" in
    408      1.1     pooka 	    Series*|S4*)
    409      1.1     pooka 		UNAME_RELEASE=`uname -v`
    410      1.1     pooka 		;;
    411      1.1     pooka 	esac
    412      1.1     pooka 	# Japanese Language versions have a version number like `4.1.3-JL'.
    413      1.1     pooka 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
    414      1.1     pooka 	exit ;;
    415      1.1     pooka     sun3*:SunOS:*:*)
    416      1.1     pooka 	echo m68k-sun-sunos${UNAME_RELEASE}
    417      1.1     pooka 	exit ;;
    418      1.1     pooka     sun*:*:4.2BSD:*)
    419      1.1     pooka 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
    420  1.1.2.1  pgoyette 	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
    421      1.1     pooka 	case "`/bin/arch`" in
    422      1.1     pooka 	    sun3)
    423      1.1     pooka 		echo m68k-sun-sunos${UNAME_RELEASE}
    424      1.1     pooka 		;;
    425      1.1     pooka 	    sun4)
    426      1.1     pooka 		echo sparc-sun-sunos${UNAME_RELEASE}
    427      1.1     pooka 		;;
    428      1.1     pooka 	esac
    429      1.1     pooka 	exit ;;
    430      1.1     pooka     aushp:SunOS:*:*)
    431      1.1     pooka 	echo sparc-auspex-sunos${UNAME_RELEASE}
    432      1.1     pooka 	exit ;;
    433      1.1     pooka     # The situation for MiNT is a little confusing.  The machine name
    434      1.1     pooka     # can be virtually everything (everything which is not
    435      1.1     pooka     # "atarist" or "atariste" at least should have a processor
    436      1.1     pooka     # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
    437      1.1     pooka     # to the lowercase version "mint" (or "freemint").  Finally
    438      1.1     pooka     # the system name "TOS" denotes a system which is actually not
    439      1.1     pooka     # MiNT.  But MiNT is downward compatible to TOS, so this should
    440      1.1     pooka     # be no problem.
    441      1.1     pooka     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    442      1.1     pooka 	echo m68k-atari-mint${UNAME_RELEASE}
    443      1.1     pooka 	exit ;;
    444      1.1     pooka     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    445      1.1     pooka 	echo m68k-atari-mint${UNAME_RELEASE}
    446      1.1     pooka 	exit ;;
    447      1.1     pooka     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    448      1.1     pooka 	echo m68k-atari-mint${UNAME_RELEASE}
    449      1.1     pooka 	exit ;;
    450      1.1     pooka     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    451      1.1     pooka 	echo m68k-milan-mint${UNAME_RELEASE}
    452      1.1     pooka 	exit ;;
    453      1.1     pooka     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    454      1.1     pooka 	echo m68k-hades-mint${UNAME_RELEASE}
    455      1.1     pooka 	exit ;;
    456      1.1     pooka     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    457      1.1     pooka 	echo m68k-unknown-mint${UNAME_RELEASE}
    458      1.1     pooka 	exit ;;
    459      1.1     pooka     m68k:machten:*:*)
    460      1.1     pooka 	echo m68k-apple-machten${UNAME_RELEASE}
    461      1.1     pooka 	exit ;;
    462      1.1     pooka     powerpc:machten:*:*)
    463      1.1     pooka 	echo powerpc-apple-machten${UNAME_RELEASE}
    464      1.1     pooka 	exit ;;
    465      1.1     pooka     RISC*:Mach:*:*)
    466      1.1     pooka 	echo mips-dec-mach_bsd4.3
    467      1.1     pooka 	exit ;;
    468      1.1     pooka     RISC*:ULTRIX:*:*)
    469      1.1     pooka 	echo mips-dec-ultrix${UNAME_RELEASE}
    470      1.1     pooka 	exit ;;
    471      1.1     pooka     VAX*:ULTRIX*:*:*)
    472      1.1     pooka 	echo vax-dec-ultrix${UNAME_RELEASE}
    473      1.1     pooka 	exit ;;
    474      1.1     pooka     2020:CLIX:*:* | 2430:CLIX:*:*)
    475      1.1     pooka 	echo clipper-intergraph-clix${UNAME_RELEASE}
    476      1.1     pooka 	exit ;;
    477      1.1     pooka     mips:*:*:UMIPS | mips:*:*:RISCos)
    478      1.1     pooka 	eval $set_cc_for_build
    479      1.1     pooka 	sed 's/^	//' << EOF >$dummy.c
    480      1.1     pooka #ifdef __cplusplus
    481      1.1     pooka #include <stdio.h>  /* for printf() prototype */
    482      1.1     pooka 	int main (int argc, char *argv[]) {
    483      1.1     pooka #else
    484      1.1     pooka 	int main (argc, argv) int argc; char *argv[]; {
    485      1.1     pooka #endif
    486      1.1     pooka 	#if defined (host_mips) && defined (MIPSEB)
    487      1.1     pooka 	#if defined (SYSTYPE_SYSV)
    488      1.1     pooka 	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
    489      1.1     pooka 	#endif
    490      1.1     pooka 	#if defined (SYSTYPE_SVR4)
    491      1.1     pooka 	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
    492      1.1     pooka 	#endif
    493      1.1     pooka 	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
    494      1.1     pooka 	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
    495      1.1     pooka 	#endif
    496      1.1     pooka 	#endif
    497      1.1     pooka 	  exit (-1);
    498      1.1     pooka 	}
    499      1.1     pooka EOF
    500      1.1     pooka 	$CC_FOR_BUILD -o $dummy $dummy.c &&
    501      1.1     pooka 	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
    502      1.1     pooka 	  SYSTEM_NAME=`$dummy $dummyarg` &&
    503      1.1     pooka 	    { echo "$SYSTEM_NAME"; exit; }
    504      1.1     pooka 	echo mips-mips-riscos${UNAME_RELEASE}
    505      1.1     pooka 	exit ;;
    506      1.1     pooka     Motorola:PowerMAX_OS:*:*)
    507      1.1     pooka 	echo powerpc-motorola-powermax
    508      1.1     pooka 	exit ;;
    509      1.1     pooka     Motorola:*:4.3:PL8-*)
    510      1.1     pooka 	echo powerpc-harris-powermax
    511      1.1     pooka 	exit ;;
    512      1.1     pooka     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    513      1.1     pooka 	echo powerpc-harris-powermax
    514      1.1     pooka 	exit ;;
    515      1.1     pooka     Night_Hawk:Power_UNIX:*:*)
    516      1.1     pooka 	echo powerpc-harris-powerunix
    517      1.1     pooka 	exit ;;
    518      1.1     pooka     m88k:CX/UX:7*:*)
    519      1.1     pooka 	echo m88k-harris-cxux7
    520      1.1     pooka 	exit ;;
    521      1.1     pooka     m88k:*:4*:R4*)
    522      1.1     pooka 	echo m88k-motorola-sysv4
    523      1.1     pooka 	exit ;;
    524      1.1     pooka     m88k:*:3*:R3*)
    525      1.1     pooka 	echo m88k-motorola-sysv3
    526      1.1     pooka 	exit ;;
    527      1.1     pooka     AViiON:dgux:*:*)
    528      1.1     pooka 	# DG/UX returns AViiON for all architectures
    529      1.1     pooka 	UNAME_PROCESSOR=`/usr/bin/uname -p`
    530      1.1     pooka 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
    531      1.1     pooka 	then
    532      1.1     pooka 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
    533      1.1     pooka 	       [ ${TARGET_BINARY_INTERFACE}x = x ]
    534      1.1     pooka 	    then
    535      1.1     pooka 		echo m88k-dg-dgux${UNAME_RELEASE}
    536      1.1     pooka 	    else
    537      1.1     pooka 		echo m88k-dg-dguxbcs${UNAME_RELEASE}
    538      1.1     pooka 	    fi
    539      1.1     pooka 	else
    540      1.1     pooka 	    echo i586-dg-dgux${UNAME_RELEASE}
    541      1.1     pooka 	fi
    542      1.1     pooka 	exit ;;
    543      1.1     pooka     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
    544      1.1     pooka 	echo m88k-dolphin-sysv3
    545      1.1     pooka 	exit ;;
    546      1.1     pooka     M88*:*:R3*:*)
    547      1.1     pooka 	# Delta 88k system running SVR3
    548      1.1     pooka 	echo m88k-motorola-sysv3
    549      1.1     pooka 	exit ;;
    550      1.1     pooka     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
    551      1.1     pooka 	echo m88k-tektronix-sysv3
    552      1.1     pooka 	exit ;;
    553      1.1     pooka     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
    554      1.1     pooka 	echo m68k-tektronix-bsd
    555      1.1     pooka 	exit ;;
    556      1.1     pooka     *:IRIX*:*:*)
    557      1.1     pooka 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
    558      1.1     pooka 	exit ;;
    559      1.1     pooka     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    560      1.1     pooka 	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
    561      1.1     pooka 	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
    562      1.1     pooka     i*86:AIX:*:*)
    563      1.1     pooka 	echo i386-ibm-aix
    564      1.1     pooka 	exit ;;
    565      1.1     pooka     ia64:AIX:*:*)
    566      1.1     pooka 	if [ -x /usr/bin/oslevel ] ; then
    567      1.1     pooka 		IBM_REV=`/usr/bin/oslevel`
    568      1.1     pooka 	else
    569      1.1     pooka 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    570      1.1     pooka 	fi
    571      1.1     pooka 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
    572      1.1     pooka 	exit ;;
    573      1.1     pooka     *:AIX:2:3)
    574      1.1     pooka 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
    575      1.1     pooka 		eval $set_cc_for_build
    576      1.1     pooka 		sed 's/^		//' << EOF >$dummy.c
    577      1.1     pooka 		#include <sys/systemcfg.h>
    578      1.1     pooka 
    579      1.1     pooka 		main()
    580      1.1     pooka 			{
    581      1.1     pooka 			if (!__power_pc())
    582      1.1     pooka 				exit(1);
    583      1.1     pooka 			puts("powerpc-ibm-aix3.2.5");
    584      1.1     pooka 			exit(0);
    585      1.1     pooka 			}
    586      1.1     pooka EOF
    587      1.1     pooka 		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
    588      1.1     pooka 		then
    589      1.1     pooka 			echo "$SYSTEM_NAME"
    590      1.1     pooka 		else
    591      1.1     pooka 			echo rs6000-ibm-aix3.2.5
    592      1.1     pooka 		fi
    593      1.1     pooka 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    594      1.1     pooka 		echo rs6000-ibm-aix3.2.4
    595      1.1     pooka 	else
    596      1.1     pooka 		echo rs6000-ibm-aix3.2
    597      1.1     pooka 	fi
    598      1.1     pooka 	exit ;;
    599      1.1     pooka     *:AIX:*:[4567])
    600      1.1     pooka 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    601      1.1     pooka 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
    602      1.1     pooka 		IBM_ARCH=rs6000
    603      1.1     pooka 	else
    604      1.1     pooka 		IBM_ARCH=powerpc
    605      1.1     pooka 	fi
    606  1.1.2.1  pgoyette 	if [ -x /usr/bin/lslpp ] ; then
    607  1.1.2.1  pgoyette 		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
    608  1.1.2.1  pgoyette 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
    609      1.1     pooka 	else
    610      1.1     pooka 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    611      1.1     pooka 	fi
    612      1.1     pooka 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    613      1.1     pooka 	exit ;;
    614      1.1     pooka     *:AIX:*:*)
    615      1.1     pooka 	echo rs6000-ibm-aix
    616      1.1     pooka 	exit ;;
    617      1.1     pooka     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    618      1.1     pooka 	echo romp-ibm-bsd4.4
    619      1.1     pooka 	exit ;;
    620      1.1     pooka     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    621      1.1     pooka 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    622      1.1     pooka 	exit ;;                             # report: romp-ibm BSD 4.3
    623      1.1     pooka     *:BOSX:*:*)
    624      1.1     pooka 	echo rs6000-bull-bosx
    625      1.1     pooka 	exit ;;
    626      1.1     pooka     DPX/2?00:B.O.S.:*:*)
    627      1.1     pooka 	echo m68k-bull-sysv3
    628      1.1     pooka 	exit ;;
    629      1.1     pooka     9000/[34]??:4.3bsd:1.*:*)
    630      1.1     pooka 	echo m68k-hp-bsd
    631      1.1     pooka 	exit ;;
    632      1.1     pooka     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    633      1.1     pooka 	echo m68k-hp-bsd4.4
    634      1.1     pooka 	exit ;;
    635      1.1     pooka     9000/[34678]??:HP-UX:*:*)
    636      1.1     pooka 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    637      1.1     pooka 	case "${UNAME_MACHINE}" in
    638      1.1     pooka 	    9000/31? )            HP_ARCH=m68000 ;;
    639      1.1     pooka 	    9000/[34]?? )         HP_ARCH=m68k ;;
    640      1.1     pooka 	    9000/[678][0-9][0-9])
    641      1.1     pooka 		if [ -x /usr/bin/getconf ]; then
    642      1.1     pooka 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
    643      1.1     pooka 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
    644      1.1     pooka 		    case "${sc_cpu_version}" in
    645  1.1.2.1  pgoyette 		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
    646  1.1.2.1  pgoyette 		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
    647      1.1     pooka 		      532)                      # CPU_PA_RISC2_0
    648      1.1     pooka 			case "${sc_kernel_bits}" in
    649  1.1.2.1  pgoyette 			  32) HP_ARCH=hppa2.0n ;;
    650  1.1.2.1  pgoyette 			  64) HP_ARCH=hppa2.0w ;;
    651  1.1.2.1  pgoyette 			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
    652      1.1     pooka 			esac ;;
    653      1.1     pooka 		    esac
    654      1.1     pooka 		fi
    655      1.1     pooka 		if [ "${HP_ARCH}" = "" ]; then
    656      1.1     pooka 		    eval $set_cc_for_build
    657      1.1     pooka 		    sed 's/^		//' << EOF >$dummy.c
    658      1.1     pooka 
    659      1.1     pooka 		#define _HPUX_SOURCE
    660      1.1     pooka 		#include <stdlib.h>
    661      1.1     pooka 		#include <unistd.h>
    662      1.1     pooka 
    663      1.1     pooka 		int main ()
    664      1.1     pooka 		{
    665      1.1     pooka 		#if defined(_SC_KERNEL_BITS)
    666      1.1     pooka 		    long bits = sysconf(_SC_KERNEL_BITS);
    667      1.1     pooka 		#endif
    668      1.1     pooka 		    long cpu  = sysconf (_SC_CPU_VERSION);
    669      1.1     pooka 
    670      1.1     pooka 		    switch (cpu)
    671      1.1     pooka 			{
    672      1.1     pooka 			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
    673      1.1     pooka 			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
    674      1.1     pooka 			case CPU_PA_RISC2_0:
    675      1.1     pooka 		#if defined(_SC_KERNEL_BITS)
    676      1.1     pooka 			    switch (bits)
    677      1.1     pooka 				{
    678      1.1     pooka 				case 64: puts ("hppa2.0w"); break;
    679      1.1     pooka 				case 32: puts ("hppa2.0n"); break;
    680      1.1     pooka 				default: puts ("hppa2.0"); break;
    681      1.1     pooka 				} break;
    682      1.1     pooka 		#else  /* !defined(_SC_KERNEL_BITS) */
    683      1.1     pooka 			    puts ("hppa2.0"); break;
    684      1.1     pooka 		#endif
    685      1.1     pooka 			default: puts ("hppa1.0"); break;
    686      1.1     pooka 			}
    687      1.1     pooka 		    exit (0);
    688      1.1     pooka 		}
    689      1.1     pooka EOF
    690  1.1.2.1  pgoyette 		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
    691      1.1     pooka 		    test -z "$HP_ARCH" && HP_ARCH=hppa
    692      1.1     pooka 		fi ;;
    693      1.1     pooka 	esac
    694  1.1.2.1  pgoyette 	if [ ${HP_ARCH} = hppa2.0w ]
    695      1.1     pooka 	then
    696      1.1     pooka 	    eval $set_cc_for_build
    697      1.1     pooka 
    698      1.1     pooka 	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
    699      1.1     pooka 	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
    700      1.1     pooka 	    # generating 64-bit code.  GNU and HP use different nomenclature:
    701      1.1     pooka 	    #
    702      1.1     pooka 	    # $ CC_FOR_BUILD=cc ./config.guess
    703      1.1     pooka 	    # => hppa2.0w-hp-hpux11.23
    704      1.1     pooka 	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
    705      1.1     pooka 	    # => hppa64-hp-hpux11.23
    706      1.1     pooka 
    707  1.1.2.1  pgoyette 	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
    708      1.1     pooka 		grep -q __LP64__
    709      1.1     pooka 	    then
    710  1.1.2.1  pgoyette 		HP_ARCH=hppa2.0w
    711      1.1     pooka 	    else
    712  1.1.2.1  pgoyette 		HP_ARCH=hppa64
    713      1.1     pooka 	    fi
    714      1.1     pooka 	fi
    715      1.1     pooka 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    716      1.1     pooka 	exit ;;
    717      1.1     pooka     ia64:HP-UX:*:*)
    718      1.1     pooka 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    719      1.1     pooka 	echo ia64-hp-hpux${HPUX_REV}
    720      1.1     pooka 	exit ;;
    721      1.1     pooka     3050*:HI-UX:*:*)
    722      1.1     pooka 	eval $set_cc_for_build
    723      1.1     pooka 	sed 's/^	//' << EOF >$dummy.c
    724      1.1     pooka 	#include <unistd.h>
    725      1.1     pooka 	int
    726      1.1     pooka 	main ()
    727      1.1     pooka 	{
    728      1.1     pooka 	  long cpu = sysconf (_SC_CPU_VERSION);
    729      1.1     pooka 	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
    730      1.1     pooka 	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
    731      1.1     pooka 	     results, however.  */
    732      1.1     pooka 	  if (CPU_IS_PA_RISC (cpu))
    733      1.1     pooka 	    {
    734      1.1     pooka 	      switch (cpu)
    735      1.1     pooka 		{
    736      1.1     pooka 		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
    737      1.1     pooka 		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
    738      1.1     pooka 		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
    739      1.1     pooka 		  default: puts ("hppa-hitachi-hiuxwe2"); break;
    740      1.1     pooka 		}
    741      1.1     pooka 	    }
    742      1.1     pooka 	  else if (CPU_IS_HP_MC68K (cpu))
    743      1.1     pooka 	    puts ("m68k-hitachi-hiuxwe2");
    744      1.1     pooka 	  else puts ("unknown-hitachi-hiuxwe2");
    745      1.1     pooka 	  exit (0);
    746      1.1     pooka 	}
    747      1.1     pooka EOF
    748      1.1     pooka 	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
    749      1.1     pooka 		{ echo "$SYSTEM_NAME"; exit; }
    750      1.1     pooka 	echo unknown-hitachi-hiuxwe2
    751      1.1     pooka 	exit ;;
    752      1.1     pooka     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
    753      1.1     pooka 	echo hppa1.1-hp-bsd
    754      1.1     pooka 	exit ;;
    755      1.1     pooka     9000/8??:4.3bsd:*:*)
    756      1.1     pooka 	echo hppa1.0-hp-bsd
    757      1.1     pooka 	exit ;;
    758      1.1     pooka     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    759      1.1     pooka 	echo hppa1.0-hp-mpeix
    760      1.1     pooka 	exit ;;
    761      1.1     pooka     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    762      1.1     pooka 	echo hppa1.1-hp-osf
    763      1.1     pooka 	exit ;;
    764      1.1     pooka     hp8??:OSF1:*:*)
    765      1.1     pooka 	echo hppa1.0-hp-osf
    766      1.1     pooka 	exit ;;
    767      1.1     pooka     i*86:OSF1:*:*)
    768      1.1     pooka 	if [ -x /usr/sbin/sysversion ] ; then
    769      1.1     pooka 	    echo ${UNAME_MACHINE}-unknown-osf1mk
    770      1.1     pooka 	else
    771      1.1     pooka 	    echo ${UNAME_MACHINE}-unknown-osf1
    772      1.1     pooka 	fi
    773      1.1     pooka 	exit ;;
    774      1.1     pooka     parisc*:Lites*:*:*)
    775      1.1     pooka 	echo hppa1.1-hp-lites
    776      1.1     pooka 	exit ;;
    777      1.1     pooka     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    778      1.1     pooka 	echo c1-convex-bsd
    779      1.1     pooka 	exit ;;
    780      1.1     pooka     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    781      1.1     pooka 	if getsysinfo -f scalar_acc
    782      1.1     pooka 	then echo c32-convex-bsd
    783      1.1     pooka 	else echo c2-convex-bsd
    784      1.1     pooka 	fi
    785      1.1     pooka 	exit ;;
    786      1.1     pooka     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    787      1.1     pooka 	echo c34-convex-bsd
    788      1.1     pooka 	exit ;;
    789      1.1     pooka     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    790      1.1     pooka 	echo c38-convex-bsd
    791      1.1     pooka 	exit ;;
    792      1.1     pooka     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    793      1.1     pooka 	echo c4-convex-bsd
    794      1.1     pooka 	exit ;;
    795      1.1     pooka     CRAY*Y-MP:*:*:*)
    796      1.1     pooka 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    797      1.1     pooka 	exit ;;
    798      1.1     pooka     CRAY*[A-Z]90:*:*:*)
    799      1.1     pooka 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
    800      1.1     pooka 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
    801      1.1     pooka 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
    802      1.1     pooka 	      -e 's/\.[^.]*$/.X/'
    803      1.1     pooka 	exit ;;
    804      1.1     pooka     CRAY*TS:*:*:*)
    805      1.1     pooka 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    806      1.1     pooka 	exit ;;
    807      1.1     pooka     CRAY*T3E:*:*:*)
    808      1.1     pooka 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    809      1.1     pooka 	exit ;;
    810      1.1     pooka     CRAY*SV1:*:*:*)
    811      1.1     pooka 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    812      1.1     pooka 	exit ;;
    813      1.1     pooka     *:UNICOS/mp:*:*)
    814      1.1     pooka 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    815      1.1     pooka 	exit ;;
    816      1.1     pooka     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    817  1.1.2.1  pgoyette 	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
    818  1.1.2.1  pgoyette 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
    819      1.1     pooka 	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    820      1.1     pooka 	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    821      1.1     pooka 	exit ;;
    822      1.1     pooka     5000:UNIX_System_V:4.*:*)
    823  1.1.2.1  pgoyette 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
    824  1.1.2.1  pgoyette 	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
    825      1.1     pooka 	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    826      1.1     pooka 	exit ;;
    827      1.1     pooka     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    828      1.1     pooka 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    829      1.1     pooka 	exit ;;
    830      1.1     pooka     sparc*:BSD/OS:*:*)
    831      1.1     pooka 	echo sparc-unknown-bsdi${UNAME_RELEASE}
    832      1.1     pooka 	exit ;;
    833      1.1     pooka     *:BSD/OS:*:*)
    834      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    835      1.1     pooka 	exit ;;
    836      1.1     pooka     *:FreeBSD:*:*)
    837      1.1     pooka 	UNAME_PROCESSOR=`/usr/bin/uname -p`
    838      1.1     pooka 	case ${UNAME_PROCESSOR} in
    839      1.1     pooka 	    amd64)
    840      1.1     pooka 		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    841      1.1     pooka 	    *)
    842      1.1     pooka 		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    843      1.1     pooka 	esac
    844      1.1     pooka 	exit ;;
    845      1.1     pooka     i*:CYGWIN*:*)
    846      1.1     pooka 	echo ${UNAME_MACHINE}-pc-cygwin
    847      1.1     pooka 	exit ;;
    848      1.1     pooka     *:MINGW64*:*)
    849      1.1     pooka 	echo ${UNAME_MACHINE}-pc-mingw64
    850      1.1     pooka 	exit ;;
    851      1.1     pooka     *:MINGW*:*)
    852      1.1     pooka 	echo ${UNAME_MACHINE}-pc-mingw32
    853      1.1     pooka 	exit ;;
    854  1.1.2.1  pgoyette     *:MSYS*:*)
    855      1.1     pooka 	echo ${UNAME_MACHINE}-pc-msys
    856      1.1     pooka 	exit ;;
    857      1.1     pooka     i*:windows32*:*)
    858      1.1     pooka 	# uname -m includes "-pc" on this system.
    859      1.1     pooka 	echo ${UNAME_MACHINE}-mingw32
    860      1.1     pooka 	exit ;;
    861      1.1     pooka     i*:PW*:*)
    862      1.1     pooka 	echo ${UNAME_MACHINE}-pc-pw32
    863      1.1     pooka 	exit ;;
    864      1.1     pooka     *:Interix*:*)
    865      1.1     pooka 	case ${UNAME_MACHINE} in
    866      1.1     pooka 	    x86)
    867      1.1     pooka 		echo i586-pc-interix${UNAME_RELEASE}
    868      1.1     pooka 		exit ;;
    869      1.1     pooka 	    authenticamd | genuineintel | EM64T)
    870      1.1     pooka 		echo x86_64-unknown-interix${UNAME_RELEASE}
    871      1.1     pooka 		exit ;;
    872      1.1     pooka 	    IA64)
    873      1.1     pooka 		echo ia64-unknown-interix${UNAME_RELEASE}
    874      1.1     pooka 		exit ;;
    875      1.1     pooka 	esac ;;
    876      1.1     pooka     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
    877      1.1     pooka 	echo i${UNAME_MACHINE}-pc-mks
    878      1.1     pooka 	exit ;;
    879      1.1     pooka     8664:Windows_NT:*)
    880      1.1     pooka 	echo x86_64-pc-mks
    881      1.1     pooka 	exit ;;
    882      1.1     pooka     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    883      1.1     pooka 	# How do we know it's Interix rather than the generic POSIX subsystem?
    884      1.1     pooka 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    885      1.1     pooka 	# UNAME_MACHINE based on the output of uname instead of i386?
    886      1.1     pooka 	echo i586-pc-interix
    887      1.1     pooka 	exit ;;
    888      1.1     pooka     i*:UWIN*:*)
    889      1.1     pooka 	echo ${UNAME_MACHINE}-pc-uwin
    890      1.1     pooka 	exit ;;
    891      1.1     pooka     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
    892      1.1     pooka 	echo x86_64-unknown-cygwin
    893      1.1     pooka 	exit ;;
    894      1.1     pooka     p*:CYGWIN*:*)
    895      1.1     pooka 	echo powerpcle-unknown-cygwin
    896      1.1     pooka 	exit ;;
    897      1.1     pooka     prep*:SunOS:5.*:*)
    898      1.1     pooka 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    899      1.1     pooka 	exit ;;
    900      1.1     pooka     *:GNU:*:*)
    901      1.1     pooka 	# the GNU system
    902      1.1     pooka 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    903      1.1     pooka 	exit ;;
    904      1.1     pooka     *:GNU/*:*:*)
    905      1.1     pooka 	# other systems with GNU libc and userland
    906  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
    907      1.1     pooka 	exit ;;
    908      1.1     pooka     i*86:Minix:*:*)
    909      1.1     pooka 	echo ${UNAME_MACHINE}-pc-minix
    910      1.1     pooka 	exit ;;
    911      1.1     pooka     aarch64:Linux:*:*)
    912      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    913      1.1     pooka 	exit ;;
    914      1.1     pooka     aarch64_be:Linux:*:*)
    915      1.1     pooka 	UNAME_MACHINE=aarch64_be
    916      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    917      1.1     pooka 	exit ;;
    918      1.1     pooka     alpha:Linux:*:*)
    919      1.1     pooka 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
    920      1.1     pooka 	  EV5)   UNAME_MACHINE=alphaev5 ;;
    921      1.1     pooka 	  EV56)  UNAME_MACHINE=alphaev56 ;;
    922      1.1     pooka 	  PCA56) UNAME_MACHINE=alphapca56 ;;
    923      1.1     pooka 	  PCA57) UNAME_MACHINE=alphapca56 ;;
    924      1.1     pooka 	  EV6)   UNAME_MACHINE=alphaev6 ;;
    925      1.1     pooka 	  EV67)  UNAME_MACHINE=alphaev67 ;;
    926      1.1     pooka 	  EV68*) UNAME_MACHINE=alphaev68 ;;
    927      1.1     pooka 	esac
    928      1.1     pooka 	objdump --private-headers /bin/sh | grep -q ld.so.1
    929  1.1.2.1  pgoyette 	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
    930      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    931      1.1     pooka 	exit ;;
    932      1.1     pooka     arc:Linux:*:* | arceb:Linux:*:*)
    933      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    934      1.1     pooka 	exit ;;
    935      1.1     pooka     arm*:Linux:*:*)
    936      1.1     pooka 	eval $set_cc_for_build
    937      1.1     pooka 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
    938      1.1     pooka 	    | grep -q __ARM_EABI__
    939      1.1     pooka 	then
    940      1.1     pooka 	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    941      1.1     pooka 	else
    942      1.1     pooka 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
    943      1.1     pooka 		| grep -q __ARM_PCS_VFP
    944      1.1     pooka 	    then
    945      1.1     pooka 		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
    946      1.1     pooka 	    else
    947      1.1     pooka 		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
    948      1.1     pooka 	    fi
    949      1.1     pooka 	fi
    950      1.1     pooka 	exit ;;
    951      1.1     pooka     avr32*:Linux:*:*)
    952      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    953      1.1     pooka 	exit ;;
    954      1.1     pooka     cris:Linux:*:*)
    955      1.1     pooka 	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
    956      1.1     pooka 	exit ;;
    957      1.1     pooka     crisv32:Linux:*:*)
    958      1.1     pooka 	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
    959      1.1     pooka 	exit ;;
    960  1.1.2.1  pgoyette     e2k:Linux:*:*)
    961  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    962  1.1.2.1  pgoyette 	exit ;;
    963      1.1     pooka     frv:Linux:*:*)
    964      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    965      1.1     pooka 	exit ;;
    966      1.1     pooka     hexagon:Linux:*:*)
    967      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    968      1.1     pooka 	exit ;;
    969      1.1     pooka     i*86:Linux:*:*)
    970      1.1     pooka 	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
    971      1.1     pooka 	exit ;;
    972      1.1     pooka     ia64:Linux:*:*)
    973      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    974      1.1     pooka 	exit ;;
    975  1.1.2.1  pgoyette     k1om:Linux:*:*)
    976  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    977  1.1.2.1  pgoyette 	exit ;;
    978      1.1     pooka     m32r*:Linux:*:*)
    979      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    980      1.1     pooka 	exit ;;
    981      1.1     pooka     m68*:Linux:*:*)
    982      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
    983      1.1     pooka 	exit ;;
    984      1.1     pooka     mips:Linux:*:* | mips64:Linux:*:*)
    985      1.1     pooka 	eval $set_cc_for_build
    986      1.1     pooka 	sed 's/^	//' << EOF >$dummy.c
    987      1.1     pooka 	#undef CPU
    988      1.1     pooka 	#undef ${UNAME_MACHINE}
    989      1.1     pooka 	#undef ${UNAME_MACHINE}el
    990      1.1     pooka 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
    991      1.1     pooka 	CPU=${UNAME_MACHINE}el
    992      1.1     pooka 	#else
    993      1.1     pooka 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
    994      1.1     pooka 	CPU=${UNAME_MACHINE}
    995      1.1     pooka 	#else
    996      1.1     pooka 	CPU=
    997      1.1     pooka 	#endif
    998      1.1     pooka 	#endif
    999      1.1     pooka EOF
   1000      1.1     pooka 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
   1001      1.1     pooka 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
   1002      1.1     pooka 	;;
   1003  1.1.2.1  pgoyette     mips64el:Linux:*:*)
   1004      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1005      1.1     pooka 	exit ;;
   1006  1.1.2.1  pgoyette     openrisc*:Linux:*:*)
   1007  1.1.2.1  pgoyette 	echo or1k-unknown-linux-${LIBC}
   1008  1.1.2.1  pgoyette 	exit ;;
   1009  1.1.2.1  pgoyette     or32:Linux:*:* | or1k*:Linux:*:*)
   1010      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1011      1.1     pooka 	exit ;;
   1012      1.1     pooka     padre:Linux:*:*)
   1013      1.1     pooka 	echo sparc-unknown-linux-${LIBC}
   1014      1.1     pooka 	exit ;;
   1015      1.1     pooka     parisc64:Linux:*:* | hppa64:Linux:*:*)
   1016      1.1     pooka 	echo hppa64-unknown-linux-${LIBC}
   1017      1.1     pooka 	exit ;;
   1018      1.1     pooka     parisc:Linux:*:* | hppa:Linux:*:*)
   1019      1.1     pooka 	# Look for CPU level
   1020      1.1     pooka 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
   1021      1.1     pooka 	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
   1022      1.1     pooka 	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
   1023      1.1     pooka 	  *)    echo hppa-unknown-linux-${LIBC} ;;
   1024      1.1     pooka 	esac
   1025      1.1     pooka 	exit ;;
   1026      1.1     pooka     ppc64:Linux:*:*)
   1027      1.1     pooka 	echo powerpc64-unknown-linux-${LIBC}
   1028      1.1     pooka 	exit ;;
   1029      1.1     pooka     ppc:Linux:*:*)
   1030      1.1     pooka 	echo powerpc-unknown-linux-${LIBC}
   1031      1.1     pooka 	exit ;;
   1032      1.1     pooka     ppc64le:Linux:*:*)
   1033      1.1     pooka 	echo powerpc64le-unknown-linux-${LIBC}
   1034      1.1     pooka 	exit ;;
   1035      1.1     pooka     ppcle:Linux:*:*)
   1036      1.1     pooka 	echo powerpcle-unknown-linux-${LIBC}
   1037      1.1     pooka 	exit ;;
   1038  1.1.2.1  pgoyette     riscv32:Linux:*:* | riscv64:Linux:*:*)
   1039  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1040  1.1.2.1  pgoyette 	exit ;;
   1041      1.1     pooka     s390:Linux:*:* | s390x:Linux:*:*)
   1042      1.1     pooka 	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
   1043      1.1     pooka 	exit ;;
   1044      1.1     pooka     sh64*:Linux:*:*)
   1045      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1046      1.1     pooka 	exit ;;
   1047      1.1     pooka     sh*:Linux:*:*)
   1048      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1049      1.1     pooka 	exit ;;
   1050      1.1     pooka     sparc:Linux:*:* | sparc64:Linux:*:*)
   1051      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1052      1.1     pooka 	exit ;;
   1053      1.1     pooka     tile*:Linux:*:*)
   1054      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1055      1.1     pooka 	exit ;;
   1056      1.1     pooka     vax:Linux:*:*)
   1057      1.1     pooka 	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
   1058      1.1     pooka 	exit ;;
   1059      1.1     pooka     x86_64:Linux:*:*)
   1060  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
   1061      1.1     pooka 	exit ;;
   1062      1.1     pooka     xtensa*:Linux:*:*)
   1063      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
   1064      1.1     pooka 	exit ;;
   1065      1.1     pooka     i*86:DYNIX/ptx:4*:*)
   1066      1.1     pooka 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
   1067      1.1     pooka 	# earlier versions are messed up and put the nodename in both
   1068      1.1     pooka 	# sysname and nodename.
   1069      1.1     pooka 	echo i386-sequent-sysv4
   1070      1.1     pooka 	exit ;;
   1071      1.1     pooka     i*86:UNIX_SV:4.2MP:2.*)
   1072      1.1     pooka 	# Unixware is an offshoot of SVR4, but it has its own version
   1073      1.1     pooka 	# number series starting with 2...
   1074      1.1     pooka 	# I am not positive that other SVR4 systems won't match this,
   1075      1.1     pooka 	# I just have to hope.  -- rms.
   1076      1.1     pooka 	# Use sysv4.2uw... so that sysv4* matches it.
   1077      1.1     pooka 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
   1078      1.1     pooka 	exit ;;
   1079      1.1     pooka     i*86:OS/2:*:*)
   1080      1.1     pooka 	# If we were able to find `uname', then EMX Unix compatibility
   1081      1.1     pooka 	# is probably installed.
   1082      1.1     pooka 	echo ${UNAME_MACHINE}-pc-os2-emx
   1083      1.1     pooka 	exit ;;
   1084      1.1     pooka     i*86:XTS-300:*:STOP)
   1085      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-stop
   1086      1.1     pooka 	exit ;;
   1087      1.1     pooka     i*86:atheos:*:*)
   1088      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-atheos
   1089      1.1     pooka 	exit ;;
   1090      1.1     pooka     i*86:syllable:*:*)
   1091      1.1     pooka 	echo ${UNAME_MACHINE}-pc-syllable
   1092      1.1     pooka 	exit ;;
   1093      1.1     pooka     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
   1094      1.1     pooka 	echo i386-unknown-lynxos${UNAME_RELEASE}
   1095      1.1     pooka 	exit ;;
   1096      1.1     pooka     i*86:*DOS:*:*)
   1097      1.1     pooka 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
   1098      1.1     pooka 	exit ;;
   1099      1.1     pooka     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
   1100      1.1     pooka 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
   1101      1.1     pooka 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
   1102      1.1     pooka 		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
   1103      1.1     pooka 	else
   1104      1.1     pooka 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
   1105      1.1     pooka 	fi
   1106      1.1     pooka 	exit ;;
   1107      1.1     pooka     i*86:*:5:[678]*)
   1108      1.1     pooka 	# UnixWare 7.x, OpenUNIX and OpenServer 6.
   1109      1.1     pooka 	case `/bin/uname -X | grep "^Machine"` in
   1110      1.1     pooka 	    *486*)	     UNAME_MACHINE=i486 ;;
   1111      1.1     pooka 	    *Pentium)	     UNAME_MACHINE=i586 ;;
   1112      1.1     pooka 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
   1113      1.1     pooka 	esac
   1114      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
   1115      1.1     pooka 	exit ;;
   1116      1.1     pooka     i*86:*:3.2:*)
   1117      1.1     pooka 	if test -f /usr/options/cb.name; then
   1118      1.1     pooka 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
   1119      1.1     pooka 		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
   1120      1.1     pooka 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
   1121      1.1     pooka 		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
   1122      1.1     pooka 		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
   1123      1.1     pooka 		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
   1124      1.1     pooka 			&& UNAME_MACHINE=i586
   1125      1.1     pooka 		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
   1126      1.1     pooka 			&& UNAME_MACHINE=i686
   1127      1.1     pooka 		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
   1128      1.1     pooka 			&& UNAME_MACHINE=i686
   1129      1.1     pooka 		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
   1130      1.1     pooka 	else
   1131      1.1     pooka 		echo ${UNAME_MACHINE}-pc-sysv32
   1132      1.1     pooka 	fi
   1133      1.1     pooka 	exit ;;
   1134      1.1     pooka     pc:*:*:*)
   1135      1.1     pooka 	# Left here for compatibility:
   1136      1.1     pooka 	# uname -m prints for DJGPP always 'pc', but it prints nothing about
   1137      1.1     pooka 	# the processor, so we play safe by assuming i586.
   1138      1.1     pooka 	# Note: whatever this is, it MUST be the same as what config.sub
   1139  1.1.2.1  pgoyette 	# prints for the "djgpp" host, or else GDB configure will decide that
   1140      1.1     pooka 	# this is a cross-build.
   1141      1.1     pooka 	echo i586-pc-msdosdjgpp
   1142      1.1     pooka 	exit ;;
   1143      1.1     pooka     Intel:Mach:3*:*)
   1144      1.1     pooka 	echo i386-pc-mach3
   1145      1.1     pooka 	exit ;;
   1146      1.1     pooka     paragon:*:*:*)
   1147      1.1     pooka 	echo i860-intel-osf1
   1148      1.1     pooka 	exit ;;
   1149      1.1     pooka     i860:*:4.*:*) # i860-SVR4
   1150      1.1     pooka 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
   1151      1.1     pooka 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
   1152      1.1     pooka 	else # Add other i860-SVR4 vendors below as they are discovered.
   1153      1.1     pooka 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
   1154      1.1     pooka 	fi
   1155      1.1     pooka 	exit ;;
   1156      1.1     pooka     mini*:CTIX:SYS*5:*)
   1157      1.1     pooka 	# "miniframe"
   1158      1.1     pooka 	echo m68010-convergent-sysv
   1159      1.1     pooka 	exit ;;
   1160      1.1     pooka     mc68k:UNIX:SYSTEM5:3.51m)
   1161      1.1     pooka 	echo m68k-convergent-sysv
   1162      1.1     pooka 	exit ;;
   1163      1.1     pooka     M680?0:D-NIX:5.3:*)
   1164      1.1     pooka 	echo m68k-diab-dnix
   1165      1.1     pooka 	exit ;;
   1166      1.1     pooka     M68*:*:R3V[5678]*:*)
   1167      1.1     pooka 	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
   1168      1.1     pooka     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)
   1169      1.1     pooka 	OS_REL=''
   1170      1.1     pooka 	test -r /etc/.relid \
   1171      1.1     pooka 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
   1172      1.1     pooka 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
   1173      1.1     pooka 	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
   1174      1.1     pooka 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
   1175      1.1     pooka 	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
   1176      1.1     pooka     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
   1177      1.1     pooka 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
   1178      1.1     pooka 	  && { echo i486-ncr-sysv4; exit; } ;;
   1179      1.1     pooka     NCR*:*:4.2:* | MPRAS*:*:4.2:*)
   1180      1.1     pooka 	OS_REL='.3'
   1181      1.1     pooka 	test -r /etc/.relid \
   1182      1.1     pooka 	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
   1183      1.1     pooka 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
   1184      1.1     pooka 	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
   1185      1.1     pooka 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
   1186      1.1     pooka 	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
   1187      1.1     pooka 	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
   1188      1.1     pooka 	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
   1189      1.1     pooka     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
   1190      1.1     pooka 	echo m68k-unknown-lynxos${UNAME_RELEASE}
   1191      1.1     pooka 	exit ;;
   1192      1.1     pooka     mc68030:UNIX_System_V:4.*:*)
   1193      1.1     pooka 	echo m68k-atari-sysv4
   1194      1.1     pooka 	exit ;;
   1195      1.1     pooka     TSUNAMI:LynxOS:2.*:*)
   1196      1.1     pooka 	echo sparc-unknown-lynxos${UNAME_RELEASE}
   1197      1.1     pooka 	exit ;;
   1198      1.1     pooka     rs6000:LynxOS:2.*:*)
   1199      1.1     pooka 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
   1200      1.1     pooka 	exit ;;
   1201      1.1     pooka     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
   1202      1.1     pooka 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
   1203      1.1     pooka 	exit ;;
   1204      1.1     pooka     SM[BE]S:UNIX_SV:*:*)
   1205      1.1     pooka 	echo mips-dde-sysv${UNAME_RELEASE}
   1206      1.1     pooka 	exit ;;
   1207      1.1     pooka     RM*:ReliantUNIX-*:*:*)
   1208      1.1     pooka 	echo mips-sni-sysv4
   1209      1.1     pooka 	exit ;;
   1210      1.1     pooka     RM*:SINIX-*:*:*)
   1211      1.1     pooka 	echo mips-sni-sysv4
   1212      1.1     pooka 	exit ;;
   1213      1.1     pooka     *:SINIX-*:*:*)
   1214      1.1     pooka 	if uname -p 2>/dev/null >/dev/null ; then
   1215      1.1     pooka 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
   1216      1.1     pooka 		echo ${UNAME_MACHINE}-sni-sysv4
   1217      1.1     pooka 	else
   1218      1.1     pooka 		echo ns32k-sni-sysv
   1219      1.1     pooka 	fi
   1220      1.1     pooka 	exit ;;
   1221      1.1     pooka     PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
   1222      1.1     pooka 			# says <Richard.M.Bartel (at] ccMail.Census.GOV>
   1223      1.1     pooka 	echo i586-unisys-sysv4
   1224      1.1     pooka 	exit ;;
   1225      1.1     pooka     *:UNIX_System_V:4*:FTX*)
   1226      1.1     pooka 	# From Gerald Hewes <hewes (at] openmarket.com>.
   1227      1.1     pooka 	# How about differentiating between stratus architectures? -djm
   1228      1.1     pooka 	echo hppa1.1-stratus-sysv4
   1229      1.1     pooka 	exit ;;
   1230      1.1     pooka     *:*:*:FTX*)
   1231      1.1     pooka 	# From seanf (at] swdc.stratus.com.
   1232      1.1     pooka 	echo i860-stratus-sysv4
   1233      1.1     pooka 	exit ;;
   1234      1.1     pooka     i*86:VOS:*:*)
   1235      1.1     pooka 	# From Paul.Green (at] stratus.com.
   1236      1.1     pooka 	echo ${UNAME_MACHINE}-stratus-vos
   1237      1.1     pooka 	exit ;;
   1238      1.1     pooka     *:VOS:*:*)
   1239      1.1     pooka 	# From Paul.Green (at] stratus.com.
   1240      1.1     pooka 	echo hppa1.1-stratus-vos
   1241      1.1     pooka 	exit ;;
   1242      1.1     pooka     mc68*:A/UX:*:*)
   1243      1.1     pooka 	echo m68k-apple-aux${UNAME_RELEASE}
   1244      1.1     pooka 	exit ;;
   1245      1.1     pooka     news*:NEWS-OS:6*:*)
   1246      1.1     pooka 	echo mips-sony-newsos6
   1247      1.1     pooka 	exit ;;
   1248      1.1     pooka     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
   1249      1.1     pooka 	if [ -d /usr/nec ]; then
   1250      1.1     pooka 		echo mips-nec-sysv${UNAME_RELEASE}
   1251      1.1     pooka 	else
   1252      1.1     pooka 		echo mips-unknown-sysv${UNAME_RELEASE}
   1253      1.1     pooka 	fi
   1254      1.1     pooka 	exit ;;
   1255      1.1     pooka     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
   1256      1.1     pooka 	echo powerpc-be-beos
   1257      1.1     pooka 	exit ;;
   1258      1.1     pooka     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
   1259      1.1     pooka 	echo powerpc-apple-beos
   1260      1.1     pooka 	exit ;;
   1261      1.1     pooka     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
   1262      1.1     pooka 	echo i586-pc-beos
   1263      1.1     pooka 	exit ;;
   1264      1.1     pooka     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
   1265      1.1     pooka 	echo i586-pc-haiku
   1266      1.1     pooka 	exit ;;
   1267      1.1     pooka     x86_64:Haiku:*:*)
   1268      1.1     pooka 	echo x86_64-unknown-haiku
   1269      1.1     pooka 	exit ;;
   1270      1.1     pooka     SX-4:SUPER-UX:*:*)
   1271      1.1     pooka 	echo sx4-nec-superux${UNAME_RELEASE}
   1272      1.1     pooka 	exit ;;
   1273      1.1     pooka     SX-5:SUPER-UX:*:*)
   1274      1.1     pooka 	echo sx5-nec-superux${UNAME_RELEASE}
   1275      1.1     pooka 	exit ;;
   1276      1.1     pooka     SX-6:SUPER-UX:*:*)
   1277      1.1     pooka 	echo sx6-nec-superux${UNAME_RELEASE}
   1278      1.1     pooka 	exit ;;
   1279      1.1     pooka     SX-7:SUPER-UX:*:*)
   1280      1.1     pooka 	echo sx7-nec-superux${UNAME_RELEASE}
   1281      1.1     pooka 	exit ;;
   1282      1.1     pooka     SX-8:SUPER-UX:*:*)
   1283      1.1     pooka 	echo sx8-nec-superux${UNAME_RELEASE}
   1284      1.1     pooka 	exit ;;
   1285      1.1     pooka     SX-8R:SUPER-UX:*:*)
   1286      1.1     pooka 	echo sx8r-nec-superux${UNAME_RELEASE}
   1287      1.1     pooka 	exit ;;
   1288  1.1.2.1  pgoyette     SX-ACE:SUPER-UX:*:*)
   1289  1.1.2.1  pgoyette 	echo sxace-nec-superux${UNAME_RELEASE}
   1290  1.1.2.1  pgoyette 	exit ;;
   1291      1.1     pooka     Power*:Rhapsody:*:*)
   1292      1.1     pooka 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
   1293      1.1     pooka 	exit ;;
   1294      1.1     pooka     *:Rhapsody:*:*)
   1295      1.1     pooka 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
   1296      1.1     pooka 	exit ;;
   1297      1.1     pooka     *:Darwin:*:*)
   1298      1.1     pooka 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
   1299      1.1     pooka 	eval $set_cc_for_build
   1300      1.1     pooka 	if test "$UNAME_PROCESSOR" = unknown ; then
   1301      1.1     pooka 	    UNAME_PROCESSOR=powerpc
   1302      1.1     pooka 	fi
   1303  1.1.2.1  pgoyette 	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
   1304  1.1.2.1  pgoyette 	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
   1305  1.1.2.1  pgoyette 		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
   1306  1.1.2.1  pgoyette 		    (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
   1307  1.1.2.1  pgoyette 		    grep IS_64BIT_ARCH >/dev/null
   1308  1.1.2.1  pgoyette 		then
   1309  1.1.2.1  pgoyette 		    case $UNAME_PROCESSOR in
   1310  1.1.2.1  pgoyette 			i386) UNAME_PROCESSOR=x86_64 ;;
   1311  1.1.2.1  pgoyette 			powerpc) UNAME_PROCESSOR=powerpc64 ;;
   1312  1.1.2.1  pgoyette 		    esac
   1313  1.1.2.1  pgoyette 		fi
   1314      1.1     pooka 	    fi
   1315  1.1.2.1  pgoyette 	elif test "$UNAME_PROCESSOR" = i386 ; then
   1316  1.1.2.1  pgoyette 	    # Avoid executing cc on OS X 10.9, as it ships with a stub
   1317  1.1.2.1  pgoyette 	    # that puts up a graphical alert prompting to install
   1318  1.1.2.1  pgoyette 	    # developer tools.  Any system running Mac OS X 10.7 or
   1319  1.1.2.1  pgoyette 	    # later (Darwin 11 and later) is required to have a 64-bit
   1320  1.1.2.1  pgoyette 	    # processor. This is not true of the ARM version of Darwin
   1321  1.1.2.1  pgoyette 	    # that Apple uses in portable devices.
   1322  1.1.2.1  pgoyette 	    UNAME_PROCESSOR=x86_64
   1323      1.1     pooka 	fi
   1324      1.1     pooka 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
   1325      1.1     pooka 	exit ;;
   1326      1.1     pooka     *:procnto*:*:* | *:QNX:[0123456789]*:*)
   1327      1.1     pooka 	UNAME_PROCESSOR=`uname -p`
   1328  1.1.2.1  pgoyette 	if test "$UNAME_PROCESSOR" = x86; then
   1329      1.1     pooka 		UNAME_PROCESSOR=i386
   1330      1.1     pooka 		UNAME_MACHINE=pc
   1331      1.1     pooka 	fi
   1332      1.1     pooka 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
   1333      1.1     pooka 	exit ;;
   1334      1.1     pooka     *:QNX:*:4*)
   1335      1.1     pooka 	echo i386-pc-qnx
   1336      1.1     pooka 	exit ;;
   1337      1.1     pooka     NEO-?:NONSTOP_KERNEL:*:*)
   1338      1.1     pooka 	echo neo-tandem-nsk${UNAME_RELEASE}
   1339      1.1     pooka 	exit ;;
   1340      1.1     pooka     NSE-*:NONSTOP_KERNEL:*:*)
   1341      1.1     pooka 	echo nse-tandem-nsk${UNAME_RELEASE}
   1342      1.1     pooka 	exit ;;
   1343      1.1     pooka     NSR-?:NONSTOP_KERNEL:*:*)
   1344      1.1     pooka 	echo nsr-tandem-nsk${UNAME_RELEASE}
   1345      1.1     pooka 	exit ;;
   1346      1.1     pooka     *:NonStop-UX:*:*)
   1347      1.1     pooka 	echo mips-compaq-nonstopux
   1348      1.1     pooka 	exit ;;
   1349      1.1     pooka     BS2000:POSIX*:*:*)
   1350      1.1     pooka 	echo bs2000-siemens-sysv
   1351      1.1     pooka 	exit ;;
   1352      1.1     pooka     DS/*:UNIX_System_V:*:*)
   1353      1.1     pooka 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
   1354      1.1     pooka 	exit ;;
   1355      1.1     pooka     *:Plan9:*:*)
   1356      1.1     pooka 	# "uname -m" is not consistent, so use $cputype instead. 386
   1357      1.1     pooka 	# is converted to i386 for consistency with other x86
   1358      1.1     pooka 	# operating systems.
   1359  1.1.2.1  pgoyette 	if test "$cputype" = 386; then
   1360      1.1     pooka 	    UNAME_MACHINE=i386
   1361      1.1     pooka 	else
   1362      1.1     pooka 	    UNAME_MACHINE="$cputype"
   1363      1.1     pooka 	fi
   1364      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-plan9
   1365      1.1     pooka 	exit ;;
   1366      1.1     pooka     *:TOPS-10:*:*)
   1367      1.1     pooka 	echo pdp10-unknown-tops10
   1368      1.1     pooka 	exit ;;
   1369      1.1     pooka     *:TENEX:*:*)
   1370      1.1     pooka 	echo pdp10-unknown-tenex
   1371      1.1     pooka 	exit ;;
   1372      1.1     pooka     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
   1373      1.1     pooka 	echo pdp10-dec-tops20
   1374      1.1     pooka 	exit ;;
   1375      1.1     pooka     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
   1376      1.1     pooka 	echo pdp10-xkl-tops20
   1377      1.1     pooka 	exit ;;
   1378      1.1     pooka     *:TOPS-20:*:*)
   1379      1.1     pooka 	echo pdp10-unknown-tops20
   1380      1.1     pooka 	exit ;;
   1381      1.1     pooka     *:ITS:*:*)
   1382      1.1     pooka 	echo pdp10-unknown-its
   1383      1.1     pooka 	exit ;;
   1384      1.1     pooka     SEI:*:*:SEIUX)
   1385      1.1     pooka 	echo mips-sei-seiux${UNAME_RELEASE}
   1386      1.1     pooka 	exit ;;
   1387      1.1     pooka     *:DragonFly:*:*)
   1388      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
   1389      1.1     pooka 	exit ;;
   1390      1.1     pooka     *:*VMS:*:*)
   1391      1.1     pooka 	UNAME_MACHINE=`(uname -p) 2>/dev/null`
   1392      1.1     pooka 	case "${UNAME_MACHINE}" in
   1393      1.1     pooka 	    A*) echo alpha-dec-vms ; exit ;;
   1394      1.1     pooka 	    I*) echo ia64-dec-vms ; exit ;;
   1395      1.1     pooka 	    V*) echo vax-dec-vms ; exit ;;
   1396      1.1     pooka 	esac ;;
   1397      1.1     pooka     *:XENIX:*:SysV)
   1398      1.1     pooka 	echo i386-pc-xenix
   1399      1.1     pooka 	exit ;;
   1400      1.1     pooka     i*86:skyos:*:*)
   1401  1.1.2.1  pgoyette 	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
   1402      1.1     pooka 	exit ;;
   1403      1.1     pooka     i*86:rdos:*:*)
   1404      1.1     pooka 	echo ${UNAME_MACHINE}-pc-rdos
   1405      1.1     pooka 	exit ;;
   1406      1.1     pooka     i*86:AROS:*:*)
   1407      1.1     pooka 	echo ${UNAME_MACHINE}-pc-aros
   1408      1.1     pooka 	exit ;;
   1409      1.1     pooka     x86_64:VMkernel:*:*)
   1410      1.1     pooka 	echo ${UNAME_MACHINE}-unknown-esx
   1411      1.1     pooka 	exit ;;
   1412  1.1.2.1  pgoyette     amd64:Isilon\ OneFS:*:*)
   1413  1.1.2.1  pgoyette 	echo x86_64-unknown-onefs
   1414      1.1     pooka 	exit ;;
   1415  1.1.2.1  pgoyette esac
   1416      1.1     pooka 
   1417      1.1     pooka cat >&2 <<EOF
   1418      1.1     pooka $0: unable to guess system type
   1419      1.1     pooka 
   1420  1.1.2.1  pgoyette This script (version $timestamp), has failed to recognize the
   1421  1.1.2.1  pgoyette operating system you are using. If your script is old, overwrite
   1422  1.1.2.1  pgoyette config.guess and config.sub with the latest versions from:
   1423      1.1     pooka 
   1424  1.1.2.1  pgoyette   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
   1425      1.1     pooka and
   1426  1.1.2.1  pgoyette   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
   1427      1.1     pooka 
   1428  1.1.2.1  pgoyette If $0 has already been updated, send the following data and any
   1429  1.1.2.1  pgoyette information you think might be pertinent to config-patches@gnu.org to
   1430  1.1.2.1  pgoyette provide the necessary information to handle your system.
   1431      1.1     pooka 
   1432      1.1     pooka config.guess timestamp = $timestamp
   1433      1.1     pooka 
   1434      1.1     pooka uname -m = `(uname -m) 2>/dev/null || echo unknown`
   1435      1.1     pooka uname -r = `(uname -r) 2>/dev/null || echo unknown`
   1436      1.1     pooka uname -s = `(uname -s) 2>/dev/null || echo unknown`
   1437      1.1     pooka uname -v = `(uname -v) 2>/dev/null || echo unknown`
   1438      1.1     pooka 
   1439      1.1     pooka /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
   1440      1.1     pooka /bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
   1441      1.1     pooka 
   1442      1.1     pooka hostinfo               = `(hostinfo) 2>/dev/null`
   1443      1.1     pooka /bin/universe          = `(/bin/universe) 2>/dev/null`
   1444      1.1     pooka /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
   1445      1.1     pooka /bin/arch              = `(/bin/arch) 2>/dev/null`
   1446      1.1     pooka /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
   1447      1.1     pooka /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
   1448      1.1     pooka 
   1449      1.1     pooka UNAME_MACHINE = ${UNAME_MACHINE}
   1450      1.1     pooka UNAME_RELEASE = ${UNAME_RELEASE}
   1451      1.1     pooka UNAME_SYSTEM  = ${UNAME_SYSTEM}
   1452      1.1     pooka UNAME_VERSION = ${UNAME_VERSION}
   1453      1.1     pooka EOF
   1454      1.1     pooka 
   1455      1.1     pooka exit 1
   1456      1.1     pooka 
   1457      1.1     pooka # Local variables:
   1458      1.1     pooka # eval: (add-hook 'write-file-hooks 'time-stamp)
   1459      1.1     pooka # time-stamp-start: "timestamp='"
   1460      1.1     pooka # time-stamp-format: "%:y-%02m-%02d"
   1461      1.1     pooka # time-stamp-end: "'"
   1462      1.1     pooka # End:
   1463