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