build-scripts/config.guess
author Ozkan Sezer <sezeroz@gmail.com>
Sat, 24 Mar 2018 23:38:50 +0300
branchSDL-1.2
changeset 11977 6cf3a08b42dc
parent 4282 4909c960832e
child 12303 1e4343dedd37
permissions -rwxr-xr-x
backport bug #3332 (win32 deadkeys) patch:

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