build-scripts/config.guess
author Ryan C. Gordon <icculus@icculus.org>
Sun, 21 Oct 2018 22:40:17 -0400
changeset 12345 50e1cca28b39
parent 11477 6987f7cb0a22
permissions -rwxr-xr-x
wasapi/win32: Sort initial device lists by device GUID.

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