build-scripts/config.guess
author Holmes Futrell <hfutrell@umail.ucsb.edu>
Fri, 18 Jul 2008 20:46:02 +0000
branchgsoc2008_iphone
changeset 2378 d76ecec0c3f7
parent 2294 386ebf50dd91
child 3086 0102ed19c21a
child 4282 4909c960832e
permissions -rwxr-xr-x
iPhone SDL 1.3 demos go here. All these demos are written using pure SDL 1.3 code. No compatibility calls! Perhaps if they are any good they could be use as tests for the SDL 1.3 release.
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@2294
     4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
slouken@2294
     5
#   Inc.
slouken@1361
     6
slouken@2294
     7
timestamp='2007-12-12'
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@1361
    30
# Originally written by Per Bothner <per@bothner.com>.
slouken@1361
    31
# Please send patches to <config-patches@gnu.org>.  Submit a context
slouken@1361
    32
# diff and a properly formatted ChangeLog 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@1361
    38
# The plan is that this can be called by configure scripts if you
slouken@1361
    39
# don't specify an explicit build system type.
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@1361
    59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
slouken@1361
    60
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@2294
   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@2294
   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@1361
   173
			| grep __ELF__ >/dev/null
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@2294
   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@1361
   327
    sun4H:SunOS:5.*:*)
slouken@1361
   328
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
slouken@1361
   329
	exit ;;
slouken@1361
   330
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
slouken@1361
   331
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
slouken@1361
   332
	exit ;;
slouken@2294
   333
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
slouken@1361
   334
	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
slouken@1361
   335
	exit ;;
slouken@1361
   336
    sun4*:SunOS:6*:*)
slouken@1361
   337
	# According to config.sub, this is the proper way to canonicalize
slouken@1361
   338
	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
slouken@1361
   339
	# it's likely to be more like Solaris than SunOS4.
slouken@1361
   340
	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
slouken@1361
   341
	exit ;;
slouken@1361
   342
    sun4*:SunOS:*:*)
slouken@1361
   343
	case "`/usr/bin/arch -k`" in
slouken@1361
   344
	    Series*|S4*)
slouken@1361
   345
		UNAME_RELEASE=`uname -v`
slouken@1361
   346
		;;
slouken@1361
   347
	esac
slouken@1361
   348
	# Japanese Language versions have a version number like `4.1.3-JL'.
slouken@1361
   349
	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
slouken@1361
   350
	exit ;;
slouken@1361
   351
    sun3*:SunOS:*:*)
slouken@1361
   352
	echo m68k-sun-sunos${UNAME_RELEASE}
slouken@1361
   353
	exit ;;
slouken@1361
   354
    sun*:*:4.2BSD:*)
slouken@1361
   355
	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
slouken@1361
   356
	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
slouken@1361
   357
	case "`/bin/arch`" in
slouken@1361
   358
	    sun3)
slouken@1361
   359
		echo m68k-sun-sunos${UNAME_RELEASE}
slouken@1361
   360
		;;
slouken@1361
   361
	    sun4)
slouken@1361
   362
		echo sparc-sun-sunos${UNAME_RELEASE}
slouken@1361
   363
		;;
slouken@1361
   364
	esac
slouken@1361
   365
	exit ;;
slouken@1361
   366
    aushp:SunOS:*:*)
slouken@1361
   367
	echo sparc-auspex-sunos${UNAME_RELEASE}
slouken@1361
   368
	exit ;;
slouken@1361
   369
    # The situation for MiNT is a little confusing.  The machine name
slouken@1361
   370
    # can be virtually everything (everything which is not
slouken@1361
   371
    # "atarist" or "atariste" at least should have a processor
slouken@1361
   372
    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
slouken@1361
   373
    # to the lowercase version "mint" (or "freemint").  Finally
slouken@1361
   374
    # the system name "TOS" denotes a system which is actually not
slouken@1361
   375
    # MiNT.  But MiNT is downward compatible to TOS, so this should
slouken@1361
   376
    # be no problem.
slouken@1361
   377
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
slouken@1361
   378
        echo m68k-atari-mint${UNAME_RELEASE}
slouken@1361
   379
	exit ;;
slouken@1361
   380
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
slouken@1361
   381
	echo m68k-atari-mint${UNAME_RELEASE}
slouken@1361
   382
        exit ;;
slouken@1361
   383
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
slouken@1361
   384
        echo m68k-atari-mint${UNAME_RELEASE}
slouken@1361
   385
	exit ;;
slouken@1361
   386
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
slouken@1361
   387
        echo m68k-milan-mint${UNAME_RELEASE}
slouken@1361
   388
        exit ;;
slouken@1361
   389
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
slouken@1361
   390
        echo m68k-hades-mint${UNAME_RELEASE}
slouken@1361
   391
        exit ;;
slouken@1361
   392
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
slouken@1361
   393
        echo m68k-unknown-mint${UNAME_RELEASE}
slouken@1361
   394
        exit ;;
slouken@1361
   395
    m68k:machten:*:*)
slouken@1361
   396
	echo m68k-apple-machten${UNAME_RELEASE}
slouken@1361
   397
	exit ;;
slouken@1361
   398
    powerpc:machten:*:*)
slouken@1361
   399
	echo powerpc-apple-machten${UNAME_RELEASE}
slouken@1361
   400
	exit ;;
slouken@1361
   401
    RISC*:Mach:*:*)
slouken@1361
   402
	echo mips-dec-mach_bsd4.3
slouken@1361
   403
	exit ;;
slouken@1361
   404
    RISC*:ULTRIX:*:*)
slouken@1361
   405
	echo mips-dec-ultrix${UNAME_RELEASE}
slouken@1361
   406
	exit ;;
slouken@1361
   407
    VAX*:ULTRIX*:*:*)
slouken@1361
   408
	echo vax-dec-ultrix${UNAME_RELEASE}
slouken@1361
   409
	exit ;;
slouken@1361
   410
    2020:CLIX:*:* | 2430:CLIX:*:*)
slouken@1361
   411
	echo clipper-intergraph-clix${UNAME_RELEASE}
slouken@1361
   412
	exit ;;
slouken@1361
   413
    mips:*:*:UMIPS | mips:*:*:RISCos)
slouken@1361
   414
	eval $set_cc_for_build
slouken@1361
   415
	sed 's/^	//' << EOF >$dummy.c
slouken@1361
   416
#ifdef __cplusplus
slouken@1361
   417
#include <stdio.h>  /* for printf() prototype */
slouken@1361
   418
	int main (int argc, char *argv[]) {
slouken@1361
   419
#else
slouken@1361
   420
	int main (argc, argv) int argc; char *argv[]; {
slouken@1361
   421
#endif
slouken@1361
   422
	#if defined (host_mips) && defined (MIPSEB)
slouken@1361
   423
	#if defined (SYSTYPE_SYSV)
slouken@1361
   424
	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
slouken@1361
   425
	#endif
slouken@1361
   426
	#if defined (SYSTYPE_SVR4)
slouken@1361
   427
	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
slouken@1361
   428
	#endif
slouken@1361
   429
	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
slouken@1361
   430
	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
slouken@1361
   431
	#endif
slouken@1361
   432
	#endif
slouken@1361
   433
	  exit (-1);
slouken@1361
   434
	}
slouken@1361
   435
EOF
slouken@1361
   436
	$CC_FOR_BUILD -o $dummy $dummy.c &&
slouken@1361
   437
	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
slouken@1361
   438
	  SYSTEM_NAME=`$dummy $dummyarg` &&
slouken@1361
   439
	    { echo "$SYSTEM_NAME"; exit; }
slouken@1361
   440
	echo mips-mips-riscos${UNAME_RELEASE}
slouken@1361
   441
	exit ;;
slouken@1361
   442
    Motorola:PowerMAX_OS:*:*)
slouken@1361
   443
	echo powerpc-motorola-powermax
slouken@1361
   444
	exit ;;
slouken@1361
   445
    Motorola:*:4.3:PL8-*)
slouken@1361
   446
	echo powerpc-harris-powermax
slouken@1361
   447
	exit ;;
slouken@1361
   448
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
slouken@1361
   449
	echo powerpc-harris-powermax
slouken@1361
   450
	exit ;;
slouken@1361
   451
    Night_Hawk:Power_UNIX:*:*)
slouken@1361
   452
	echo powerpc-harris-powerunix
slouken@1361
   453
	exit ;;
slouken@1361
   454
    m88k:CX/UX:7*:*)
slouken@1361
   455
	echo m88k-harris-cxux7
slouken@1361
   456
	exit ;;
slouken@1361
   457
    m88k:*:4*:R4*)
slouken@1361
   458
	echo m88k-motorola-sysv4
slouken@1361
   459
	exit ;;
slouken@1361
   460
    m88k:*:3*:R3*)
slouken@1361
   461
	echo m88k-motorola-sysv3
slouken@1361
   462
	exit ;;
slouken@1361
   463
    AViiON:dgux:*:*)
slouken@1361
   464
        # DG/UX returns AViiON for all architectures
slouken@1361
   465
        UNAME_PROCESSOR=`/usr/bin/uname -p`
slouken@1361
   466
	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
slouken@1361
   467
	then
slouken@1361
   468
	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
slouken@1361
   469
	       [ ${TARGET_BINARY_INTERFACE}x = x ]
slouken@1361
   470
	    then
slouken@1361
   471
		echo m88k-dg-dgux${UNAME_RELEASE}
slouken@1361
   472
	    else
slouken@1361
   473
		echo m88k-dg-dguxbcs${UNAME_RELEASE}
slouken@1361
   474
	    fi
slouken@1361
   475
	else
slouken@1361
   476
	    echo i586-dg-dgux${UNAME_RELEASE}
slouken@1361
   477
	fi
slouken@1361
   478
 	exit ;;
slouken@1361
   479
    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
slouken@1361
   480
	echo m88k-dolphin-sysv3
slouken@1361
   481
	exit ;;
slouken@1361
   482
    M88*:*:R3*:*)
slouken@1361
   483
	# Delta 88k system running SVR3
slouken@1361
   484
	echo m88k-motorola-sysv3
slouken@1361
   485
	exit ;;
slouken@1361
   486
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
slouken@1361
   487
	echo m88k-tektronix-sysv3
slouken@1361
   488
	exit ;;
slouken@1361
   489
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
slouken@1361
   490
	echo m68k-tektronix-bsd
slouken@1361
   491
	exit ;;
slouken@1361
   492
    *:IRIX*:*:*)
slouken@1361
   493
	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
slouken@1361
   494
	exit ;;
slouken@1361
   495
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
slouken@1361
   496
	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
slouken@1361
   497
	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
slouken@1361
   498
    i*86:AIX:*:*)
slouken@1361
   499
	echo i386-ibm-aix
slouken@1361
   500
	exit ;;
slouken@1361
   501
    ia64:AIX:*:*)
slouken@1361
   502
	if [ -x /usr/bin/oslevel ] ; then
slouken@1361
   503
		IBM_REV=`/usr/bin/oslevel`
slouken@1361
   504
	else
slouken@1361
   505
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
slouken@1361
   506
	fi
slouken@1361
   507
	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
slouken@1361
   508
	exit ;;
slouken@1361
   509
    *:AIX:2:3)
slouken@1361
   510
	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
slouken@1361
   511
		eval $set_cc_for_build
slouken@1361
   512
		sed 's/^		//' << EOF >$dummy.c
slouken@1361
   513
		#include <sys/systemcfg.h>
slouken@1361
   514
slouken@1361
   515
		main()
slouken@1361
   516
			{
slouken@1361
   517
			if (!__power_pc())
slouken@1361
   518
				exit(1);
slouken@1361
   519
			puts("powerpc-ibm-aix3.2.5");
slouken@1361
   520
			exit(0);
slouken@1361
   521
			}
slouken@1361
   522
EOF
slouken@1361
   523
		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
slouken@1361
   524
		then
slouken@1361
   525
			echo "$SYSTEM_NAME"
slouken@1361
   526
		else
slouken@1361
   527
			echo rs6000-ibm-aix3.2.5
slouken@1361
   528
		fi
slouken@1361
   529
	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
slouken@1361
   530
		echo rs6000-ibm-aix3.2.4
slouken@1361
   531
	else
slouken@1361
   532
		echo rs6000-ibm-aix3.2
slouken@1361
   533
	fi
slouken@1361
   534
	exit ;;
slouken@1361
   535
    *:AIX:*:[45])
slouken@1361
   536
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
slouken@1361
   537
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
slouken@1361
   538
		IBM_ARCH=rs6000
slouken@1361
   539
	else
slouken@1361
   540
		IBM_ARCH=powerpc
slouken@1361
   541
	fi
slouken@1361
   542
	if [ -x /usr/bin/oslevel ] ; then
slouken@1361
   543
		IBM_REV=`/usr/bin/oslevel`
slouken@1361
   544
	else
slouken@1361
   545
		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
slouken@1361
   546
	fi
slouken@1361
   547
	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
slouken@1361
   548
	exit ;;
slouken@1361
   549
    *:AIX:*:*)
slouken@1361
   550
	echo rs6000-ibm-aix
slouken@1361
   551
	exit ;;
slouken@1361
   552
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
slouken@1361
   553
	echo romp-ibm-bsd4.4
slouken@1361
   554
	exit ;;
slouken@1361
   555
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
slouken@1361
   556
	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
slouken@1361
   557
	exit ;;                             # report: romp-ibm BSD 4.3
slouken@1361
   558
    *:BOSX:*:*)
slouken@1361
   559
	echo rs6000-bull-bosx
slouken@1361
   560
	exit ;;
slouken@1361
   561
    DPX/2?00:B.O.S.:*:*)
slouken@1361
   562
	echo m68k-bull-sysv3
slouken@1361
   563
	exit ;;
slouken@1361
   564
    9000/[34]??:4.3bsd:1.*:*)
slouken@1361
   565
	echo m68k-hp-bsd
slouken@1361
   566
	exit ;;
slouken@1361
   567
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
slouken@1361
   568
	echo m68k-hp-bsd4.4
slouken@1361
   569
	exit ;;
slouken@1361
   570
    9000/[34678]??:HP-UX:*:*)
slouken@1361
   571
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
slouken@1361
   572
	case "${UNAME_MACHINE}" in
slouken@1361
   573
	    9000/31? )            HP_ARCH=m68000 ;;
slouken@1361
   574
	    9000/[34]?? )         HP_ARCH=m68k ;;
slouken@1361
   575
	    9000/[678][0-9][0-9])
slouken@1361
   576
		if [ -x /usr/bin/getconf ]; then
slouken@1361
   577
		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
slouken@1361
   578
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
slouken@1361
   579
                    case "${sc_cpu_version}" in
slouken@1361
   580
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
slouken@1361
   581
                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
slouken@1361
   582
                      532)                      # CPU_PA_RISC2_0
slouken@1361
   583
                        case "${sc_kernel_bits}" in
slouken@1361
   584
                          32) HP_ARCH="hppa2.0n" ;;
slouken@1361
   585
                          64) HP_ARCH="hppa2.0w" ;;
slouken@1361
   586
			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
slouken@1361
   587
                        esac ;;
slouken@1361
   588
                    esac
slouken@1361
   589
		fi
slouken@1361
   590
		if [ "${HP_ARCH}" = "" ]; then
slouken@1361
   591
		    eval $set_cc_for_build
slouken@1361
   592
		    sed 's/^              //' << EOF >$dummy.c
slouken@1361
   593
slouken@1361
   594
              #define _HPUX_SOURCE
slouken@1361
   595
              #include <stdlib.h>
slouken@1361
   596
              #include <unistd.h>
slouken@1361
   597
slouken@1361
   598
              int main ()
slouken@1361
   599
              {
slouken@1361
   600
              #if defined(_SC_KERNEL_BITS)
slouken@1361
   601
                  long bits = sysconf(_SC_KERNEL_BITS);
slouken@1361
   602
              #endif
slouken@1361
   603
                  long cpu  = sysconf (_SC_CPU_VERSION);
slouken@1361
   604
slouken@1361
   605
                  switch (cpu)
slouken@1361
   606
              	{
slouken@1361
   607
              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
slouken@1361
   608
              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
slouken@1361
   609
              	case CPU_PA_RISC2_0:
slouken@1361
   610
              #if defined(_SC_KERNEL_BITS)
slouken@1361
   611
              	    switch (bits)
slouken@1361
   612
              		{
slouken@1361
   613
              		case 64: puts ("hppa2.0w"); break;
slouken@1361
   614
              		case 32: puts ("hppa2.0n"); break;
slouken@1361
   615
              		default: puts ("hppa2.0"); break;
slouken@1361
   616
              		} break;
slouken@1361
   617
              #else  /* !defined(_SC_KERNEL_BITS) */
slouken@1361
   618
              	    puts ("hppa2.0"); break;
slouken@1361
   619
              #endif
slouken@1361
   620
              	default: puts ("hppa1.0"); break;
slouken@1361
   621
              	}
slouken@1361
   622
                  exit (0);
slouken@1361
   623
              }
slouken@1361
   624
EOF
slouken@1361
   625
		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
slouken@1361
   626
		    test -z "$HP_ARCH" && HP_ARCH=hppa
slouken@1361
   627
		fi ;;
slouken@1361
   628
	esac
slouken@1361
   629
	if [ ${HP_ARCH} = "hppa2.0w" ]
slouken@1361
   630
	then
slouken@1361
   631
	    eval $set_cc_for_build
slouken@1361
   632
slouken@1361
   633
	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
slouken@1361
   634
	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
slouken@1361
   635
	    # generating 64-bit code.  GNU and HP use different nomenclature:
slouken@1361
   636
	    #
slouken@1361
   637
	    # $ CC_FOR_BUILD=cc ./config.guess
slouken@1361
   638
	    # => hppa2.0w-hp-hpux11.23
slouken@1361
   639
	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
slouken@1361
   640
	    # => hppa64-hp-hpux11.23
slouken@1361
   641
slouken@1361
   642
	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
slouken@1361
   643
		grep __LP64__ >/dev/null
slouken@1361
   644
	    then
slouken@1361
   645
		HP_ARCH="hppa2.0w"
slouken@1361
   646
	    else
slouken@1361
   647
		HP_ARCH="hppa64"
slouken@1361
   648
	    fi
slouken@1361
   649
	fi
slouken@1361
   650
	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
slouken@1361
   651
	exit ;;
slouken@1361
   652
    ia64:HP-UX:*:*)
slouken@1361
   653
	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
slouken@1361
   654
	echo ia64-hp-hpux${HPUX_REV}
slouken@1361
   655
	exit ;;
slouken@1361
   656
    3050*:HI-UX:*:*)
slouken@1361
   657
	eval $set_cc_for_build
slouken@1361
   658
	sed 's/^	//' << EOF >$dummy.c
slouken@1361
   659
	#include <unistd.h>
slouken@1361
   660
	int
slouken@1361
   661
	main ()
slouken@1361
   662
	{
slouken@1361
   663
	  long cpu = sysconf (_SC_CPU_VERSION);
slouken@1361
   664
	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
slouken@1361
   665
	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
slouken@1361
   666
	     results, however.  */
slouken@1361
   667
	  if (CPU_IS_PA_RISC (cpu))
slouken@1361
   668
	    {
slouken@1361
   669
	      switch (cpu)
slouken@1361
   670
		{
slouken@1361
   671
		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
slouken@1361
   672
		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
slouken@1361
   673
		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
slouken@1361
   674
		  default: puts ("hppa-hitachi-hiuxwe2"); break;
slouken@1361
   675
		}
slouken@1361
   676
	    }
slouken@1361
   677
	  else if (CPU_IS_HP_MC68K (cpu))
slouken@1361
   678
	    puts ("m68k-hitachi-hiuxwe2");
slouken@1361
   679
	  else puts ("unknown-hitachi-hiuxwe2");
slouken@1361
   680
	  exit (0);
slouken@1361
   681
	}
slouken@1361
   682
EOF
slouken@1361
   683
	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
slouken@1361
   684
		{ echo "$SYSTEM_NAME"; exit; }
slouken@1361
   685
	echo unknown-hitachi-hiuxwe2
slouken@1361
   686
	exit ;;
slouken@1361
   687
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
slouken@1361
   688
	echo hppa1.1-hp-bsd
slouken@1361
   689
	exit ;;
slouken@1361
   690
    9000/8??:4.3bsd:*:*)
slouken@1361
   691
	echo hppa1.0-hp-bsd
slouken@1361
   692
	exit ;;
slouken@1361
   693
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
slouken@1361
   694
	echo hppa1.0-hp-mpeix
slouken@1361
   695
	exit ;;
slouken@1361
   696
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
slouken@1361
   697
	echo hppa1.1-hp-osf
slouken@1361
   698
	exit ;;
slouken@1361
   699
    hp8??:OSF1:*:*)
slouken@1361
   700
	echo hppa1.0-hp-osf
slouken@1361
   701
	exit ;;
slouken@1361
   702
    i*86:OSF1:*:*)
slouken@1361
   703
	if [ -x /usr/sbin/sysversion ] ; then
slouken@1361
   704
	    echo ${UNAME_MACHINE}-unknown-osf1mk
slouken@1361
   705
	else
slouken@1361
   706
	    echo ${UNAME_MACHINE}-unknown-osf1
slouken@1361
   707
	fi
slouken@1361
   708
	exit ;;
slouken@1361
   709
    parisc*:Lites*:*:*)
slouken@1361
   710
	echo hppa1.1-hp-lites
slouken@1361
   711
	exit ;;
slouken@1361
   712
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
slouken@1361
   713
	echo c1-convex-bsd
slouken@1361
   714
        exit ;;
slouken@1361
   715
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
slouken@1361
   716
	if getsysinfo -f scalar_acc
slouken@1361
   717
	then echo c32-convex-bsd
slouken@1361
   718
	else echo c2-convex-bsd
slouken@1361
   719
	fi
slouken@1361
   720
        exit ;;
slouken@1361
   721
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
slouken@1361
   722
	echo c34-convex-bsd
slouken@1361
   723
        exit ;;
slouken@1361
   724
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
slouken@1361
   725
	echo c38-convex-bsd
slouken@1361
   726
        exit ;;
slouken@1361
   727
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
slouken@1361
   728
	echo c4-convex-bsd
slouken@1361
   729
        exit ;;
slouken@1361
   730
    CRAY*Y-MP:*:*:*)
slouken@1361
   731
	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
slouken@1361
   732
	exit ;;
slouken@1361
   733
    CRAY*[A-Z]90:*:*:*)
slouken@1361
   734
	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
slouken@1361
   735
	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
slouken@1361
   736
	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
slouken@1361
   737
	      -e 's/\.[^.]*$/.X/'
slouken@1361
   738
	exit ;;
slouken@1361
   739
    CRAY*TS:*:*:*)
slouken@1361
   740
	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
slouken@1361
   741
	exit ;;
slouken@1361
   742
    CRAY*T3E:*:*:*)
slouken@1361
   743
	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
slouken@1361
   744
	exit ;;
slouken@1361
   745
    CRAY*SV1:*:*:*)
slouken@1361
   746
	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
slouken@1361
   747
	exit ;;
slouken@1361
   748
    *:UNICOS/mp:*:*)
slouken@1361
   749
	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
slouken@1361
   750
	exit ;;
slouken@1361
   751
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
slouken@1361
   752
	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
slouken@1361
   753
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
slouken@1361
   754
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
slouken@1361
   755
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
slouken@1361
   756
        exit ;;
slouken@1361
   757
    5000:UNIX_System_V:4.*:*)
slouken@1361
   758
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
slouken@1361
   759
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
slouken@1361
   760
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
slouken@1361
   761
	exit ;;
slouken@1361
   762
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
slouken@1361
   763
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
slouken@1361
   764
	exit ;;
slouken@1361
   765
    sparc*:BSD/OS:*:*)
slouken@1361
   766
	echo sparc-unknown-bsdi${UNAME_RELEASE}
slouken@1361
   767
	exit ;;
slouken@1361
   768
    *:BSD/OS:*:*)
slouken@1361
   769
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
slouken@1361
   770
	exit ;;
slouken@1361
   771
    *:FreeBSD:*:*)
slouken@1361
   772
	case ${UNAME_MACHINE} in
slouken@1361
   773
	    pc98)
slouken@1361
   774
		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
slouken@2294
   775
	    amd64)
slouken@2294
   776
		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
slouken@1361
   777
	    *)
slouken@1361
   778
		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
slouken@1361
   779
	esac
slouken@1361
   780
	exit ;;
slouken@1361
   781
    i*:CYGWIN*:*)
slouken@1361
   782
	echo ${UNAME_MACHINE}-pc-cygwin
slouken@1361
   783
	exit ;;
slouken@2294
   784
    *:MINGW*:*)
slouken@1361
   785
	echo ${UNAME_MACHINE}-pc-mingw32
slouken@1361
   786
	exit ;;
slouken@1361
   787
    i*:windows32*:*)
slouken@1361
   788
    	# uname -m includes "-pc" on this system.
slouken@1361
   789
    	echo ${UNAME_MACHINE}-mingw32
slouken@1361
   790
	exit ;;
slouken@1361
   791
    i*:PW*:*)
slouken@1361
   792
	echo ${UNAME_MACHINE}-pc-pw32
slouken@1361
   793
	exit ;;
slouken@2294
   794
    *:Interix*:[3456]*)
slouken@2294
   795
    	case ${UNAME_MACHINE} in
slouken@2294
   796
	    x86)
slouken@2294
   797
		echo i586-pc-interix${UNAME_RELEASE}
slouken@2294
   798
		exit ;;
slouken@2294
   799
	    EM64T | authenticamd)
slouken@2294
   800
		echo x86_64-unknown-interix${UNAME_RELEASE}
slouken@2294
   801
		exit ;;
slouken@2294
   802
	    IA64)
slouken@2294
   803
		echo ia64-unknown-interix${UNAME_RELEASE}
slouken@2294
   804
		exit ;;
slouken@2294
   805
	esac ;;
slouken@1361
   806
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
slouken@1361
   807
	echo i${UNAME_MACHINE}-pc-mks
slouken@1361
   808
	exit ;;
slouken@1361
   809
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
slouken@1361
   810
	# How do we know it's Interix rather than the generic POSIX subsystem?
slouken@1361
   811
	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
slouken@1361
   812
	# UNAME_MACHINE based on the output of uname instead of i386?
slouken@1361
   813
	echo i586-pc-interix
slouken@1361
   814
	exit ;;
slouken@1361
   815
    i*:UWIN*:*)
slouken@1361
   816
	echo ${UNAME_MACHINE}-pc-uwin
slouken@1361
   817
	exit ;;
slouken@1361
   818
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
slouken@1361
   819
	echo x86_64-unknown-cygwin
slouken@1361
   820
	exit ;;
slouken@1361
   821
    p*:CYGWIN*:*)
slouken@1361
   822
	echo powerpcle-unknown-cygwin
slouken@1361
   823
	exit ;;
slouken@1361
   824
    prep*:SunOS:5.*:*)
slouken@1361
   825
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
slouken@1361
   826
	exit ;;
slouken@1361
   827
    *:GNU:*:*)
slouken@1361
   828
	# the GNU system
slouken@1361
   829
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
slouken@1361
   830
	exit ;;
slouken@1361
   831
    *:GNU/*:*:*)
slouken@1361
   832
	# other systems with GNU libc and userland
slouken@1361
   833
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
slouken@1361
   834
	exit ;;
slouken@1361
   835
    i*86:Minix:*:*)
slouken@1361
   836
	echo ${UNAME_MACHINE}-pc-minix
slouken@1361
   837
	exit ;;
slouken@1361
   838
    arm*:Linux:*:*)
slouken@2294
   839
	eval $set_cc_for_build
slouken@2294
   840
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
slouken@2294
   841
	    | grep -q __ARM_EABI__
slouken@2294
   842
	then
slouken@2294
   843
	    echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@2294
   844
	else
slouken@2294
   845
	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
slouken@2294
   846
	fi
slouken@2294
   847
	exit ;;
slouken@2294
   848
    avr32*:Linux:*:*)
slouken@1361
   849
	echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@1361
   850
	exit ;;
slouken@1361
   851
    cris:Linux:*:*)
slouken@1361
   852
	echo cris-axis-linux-gnu
slouken@1361
   853
	exit ;;
slouken@1361
   854
    crisv32:Linux:*:*)
slouken@1361
   855
	echo crisv32-axis-linux-gnu
slouken@1361
   856
	exit ;;
slouken@1361
   857
    frv:Linux:*:*)
slouken@1361
   858
    	echo frv-unknown-linux-gnu
slouken@1361
   859
	exit ;;
slouken@1361
   860
    ia64:Linux:*:*)
slouken@1361
   861
	echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@1361
   862
	exit ;;
slouken@1361
   863
    m32r*:Linux:*:*)
slouken@1361
   864
	echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@1361
   865
	exit ;;
slouken@1361
   866
    m68*:Linux:*:*)
slouken@1361
   867
	echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@1361
   868
	exit ;;
slouken@1361
   869
    mips:Linux:*:*)
slouken@1361
   870
	eval $set_cc_for_build
slouken@1361
   871
	sed 's/^	//' << EOF >$dummy.c
slouken@1361
   872
	#undef CPU
slouken@1361
   873
	#undef mips
slouken@1361
   874
	#undef mipsel
slouken@1361
   875
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
slouken@1361
   876
	CPU=mipsel
slouken@1361
   877
	#else
slouken@1361
   878
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
slouken@1361
   879
	CPU=mips
slouken@1361
   880
	#else
slouken@1361
   881
	CPU=
slouken@1361
   882
	#endif
slouken@1361
   883
	#endif
slouken@1361
   884
EOF
slouken@2294
   885
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
slouken@2294
   886
	    /^CPU/{
slouken@2294
   887
		s: ::g
slouken@2294
   888
		p
slouken@2294
   889
	    }'`"
slouken@1361
   890
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
slouken@1361
   891
	;;
slouken@1361
   892
    mips64:Linux:*:*)
slouken@1361
   893
	eval $set_cc_for_build
slouken@1361
   894
	sed 's/^	//' << EOF >$dummy.c
slouken@1361
   895
	#undef CPU
slouken@1361
   896
	#undef mips64
slouken@1361
   897
	#undef mips64el
slouken@1361
   898
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
slouken@1361
   899
	CPU=mips64el
slouken@1361
   900
	#else
slouken@1361
   901
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
slouken@1361
   902
	CPU=mips64
slouken@1361
   903
	#else
slouken@1361
   904
	CPU=
slouken@1361
   905
	#endif
slouken@1361
   906
	#endif
slouken@1361
   907
EOF
slouken@2294
   908
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
slouken@2294
   909
	    /^CPU/{
slouken@2294
   910
		s: ::g
slouken@2294
   911
		p
slouken@2294
   912
	    }'`"
slouken@1361
   913
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
slouken@1361
   914
	;;
slouken@1361
   915
    or32:Linux:*:*)
slouken@1361
   916
	echo or32-unknown-linux-gnu
slouken@1361
   917
	exit ;;
slouken@1361
   918
    ppc:Linux:*:*)
slouken@1361
   919
	echo powerpc-unknown-linux-gnu
slouken@1361
   920
	exit ;;
slouken@1361
   921
    ppc64:Linux:*:*)
slouken@1361
   922
	echo powerpc64-unknown-linux-gnu
slouken@1361
   923
	exit ;;
slouken@1361
   924
    alpha:Linux:*:*)
slouken@1361
   925
	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
slouken@1361
   926
	  EV5)   UNAME_MACHINE=alphaev5 ;;
slouken@1361
   927
	  EV56)  UNAME_MACHINE=alphaev56 ;;
slouken@1361
   928
	  PCA56) UNAME_MACHINE=alphapca56 ;;
slouken@1361
   929
	  PCA57) UNAME_MACHINE=alphapca56 ;;
slouken@1361
   930
	  EV6)   UNAME_MACHINE=alphaev6 ;;
slouken@1361
   931
	  EV67)  UNAME_MACHINE=alphaev67 ;;
slouken@1361
   932
	  EV68*) UNAME_MACHINE=alphaev68 ;;
slouken@1361
   933
        esac
slouken@1361
   934
	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
slouken@1361
   935
	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
slouken@1361
   936
	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
slouken@1361
   937
	exit ;;
slouken@1361
   938
    parisc:Linux:*:* | hppa:Linux:*:*)
slouken@1361
   939
	# Look for CPU level
slouken@1361
   940
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
slouken@1361
   941
	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
slouken@1361
   942
	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
slouken@1361
   943
	  *)    echo hppa-unknown-linux-gnu ;;
slouken@1361
   944
	esac
slouken@1361
   945
	exit ;;
slouken@1361
   946
    parisc64:Linux:*:* | hppa64:Linux:*:*)
slouken@1361
   947
	echo hppa64-unknown-linux-gnu
slouken@1361
   948
	exit ;;
slouken@1361
   949
    s390:Linux:*:* | s390x:Linux:*:*)
slouken@1361
   950
	echo ${UNAME_MACHINE}-ibm-linux
slouken@1361
   951
	exit ;;
slouken@1361
   952
    sh64*:Linux:*:*)
slouken@1361
   953
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@1361
   954
	exit ;;
slouken@1361
   955
    sh*:Linux:*:*)
slouken@1361
   956
	echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@1361
   957
	exit ;;
slouken@1361
   958
    sparc:Linux:*:* | sparc64:Linux:*:*)
slouken@1361
   959
	echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@1361
   960
	exit ;;
slouken@1361
   961
    vax:Linux:*:*)
slouken@1361
   962
	echo ${UNAME_MACHINE}-dec-linux-gnu
slouken@1361
   963
	exit ;;
slouken@1361
   964
    x86_64:Linux:*:*)
slouken@1361
   965
	echo x86_64-unknown-linux-gnu
slouken@1361
   966
	exit ;;
slouken@2294
   967
    xtensa*:Linux:*:*)
slouken@2294
   968
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
slouken@2294
   969
	exit ;;
slouken@1361
   970
    i*86:Linux:*:*)
slouken@1361
   971
	# The BFD linker knows what the default object file format is, so
slouken@1361
   972
	# first see if it will tell us. cd to the root directory to prevent
slouken@1361
   973
	# problems with other programs or directories called `ld' in the path.
slouken@1361
   974
	# Set LC_ALL=C to ensure ld outputs messages in English.
slouken@1361
   975
	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
slouken@1361
   976
			 | sed -ne '/supported targets:/!d
slouken@1361
   977
				    s/[ 	][ 	]*/ /g
slouken@1361
   978
				    s/.*supported targets: *//
slouken@1361
   979
				    s/ .*//
slouken@1361
   980
				    p'`
slouken@1361
   981
        case "$ld_supported_targets" in
slouken@1361
   982
	  elf32-i386)
slouken@1361
   983
		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
slouken@1361
   984
		;;
slouken@1361
   985
	  a.out-i386-linux)
slouken@1361
   986
		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
slouken@1361
   987
		exit ;;
slouken@1361
   988
	  coff-i386)
slouken@1361
   989
		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
slouken@1361
   990
		exit ;;
slouken@1361
   991
	  "")
slouken@1361
   992
		# Either a pre-BFD a.out linker (linux-gnuoldld) or
slouken@1361
   993
		# one that does not give us useful --help.
slouken@1361
   994
		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
slouken@1361
   995
		exit ;;
slouken@1361
   996
	esac
slouken@1361
   997
	# Determine whether the default compiler is a.out or elf
slouken@1361
   998
	eval $set_cc_for_build
slouken@1361
   999
	sed 's/^	//' << EOF >$dummy.c
slouken@1361
  1000
	#include <features.h>
slouken@1361
  1001
	#ifdef __ELF__
slouken@1361
  1002
	# ifdef __GLIBC__
slouken@1361
  1003
	#  if __GLIBC__ >= 2
slouken@1361
  1004
	LIBC=gnu
slouken@1361
  1005
	#  else
slouken@1361
  1006
	LIBC=gnulibc1
slouken@1361
  1007
	#  endif
slouken@1361
  1008
	# else
slouken@1361
  1009
	LIBC=gnulibc1
slouken@1361
  1010
	# endif
slouken@1361
  1011
	#else
slouken@2294
  1012
	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
slouken@1361
  1013
	LIBC=gnu
slouken@1361
  1014
	#else
slouken@1361
  1015
	LIBC=gnuaout
slouken@1361
  1016
	#endif
slouken@1361
  1017
	#endif
slouken@1361
  1018
	#ifdef __dietlibc__
slouken@1361
  1019
	LIBC=dietlibc
slouken@1361
  1020
	#endif
slouken@1361
  1021
EOF
slouken@2294
  1022
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
slouken@2294
  1023
	    /^LIBC/{
slouken@2294
  1024
		s: ::g
slouken@2294
  1025
		p
slouken@2294
  1026
	    }'`"
slouken@1361
  1027
	test x"${LIBC}" != x && {
slouken@1361
  1028
		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
slouken@1361
  1029
		exit
slouken@1361
  1030
	}
slouken@1361
  1031
	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
slouken@1361
  1032
	;;
slouken@1361
  1033
    i*86:DYNIX/ptx:4*:*)
slouken@1361
  1034
	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
slouken@1361
  1035
	# earlier versions are messed up and put the nodename in both
slouken@1361
  1036
	# sysname and nodename.
slouken@1361
  1037
	echo i386-sequent-sysv4
slouken@1361
  1038
	exit ;;
slouken@1361
  1039
    i*86:UNIX_SV:4.2MP:2.*)
slouken@1361
  1040
        # Unixware is an offshoot of SVR4, but it has its own version
slouken@1361
  1041
        # number series starting with 2...
slouken@1361
  1042
        # I am not positive that other SVR4 systems won't match this,
slouken@1361
  1043
	# I just have to hope.  -- rms.
slouken@1361
  1044
        # Use sysv4.2uw... so that sysv4* matches it.
slouken@1361
  1045
	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
slouken@1361
  1046
	exit ;;
slouken@1361
  1047
    i*86:OS/2:*:*)
slouken@1361
  1048
	# If we were able to find `uname', then EMX Unix compatibility
slouken@1361
  1049
	# is probably installed.
slouken@1361
  1050
	echo ${UNAME_MACHINE}-pc-os2-emx
slouken@1361
  1051
	exit ;;
slouken@1361
  1052
    i*86:XTS-300:*:STOP)
slouken@1361
  1053
	echo ${UNAME_MACHINE}-unknown-stop
slouken@1361
  1054
	exit ;;
slouken@1361
  1055
    i*86:atheos:*:*)
slouken@1361
  1056
	echo ${UNAME_MACHINE}-unknown-atheos
slouken@1361
  1057
	exit ;;
slouken@1361
  1058
    i*86:syllable:*:*)
slouken@1361
  1059
	echo ${UNAME_MACHINE}-pc-syllable
slouken@1361
  1060
	exit ;;
slouken@1361
  1061
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
slouken@1361
  1062
	echo i386-unknown-lynxos${UNAME_RELEASE}
slouken@1361
  1063
	exit ;;
slouken@1361
  1064
    i*86:*DOS:*:*)
slouken@1361
  1065
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
slouken@1361
  1066
	exit ;;
slouken@1361
  1067
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
slouken@1361
  1068
	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
slouken@1361
  1069
	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
slouken@1361
  1070
		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
slouken@1361
  1071
	else
slouken@1361
  1072
		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
slouken@1361
  1073
	fi
slouken@1361
  1074
	exit ;;
slouken@1361
  1075
    i*86:*:5:[678]*)
slouken@1361
  1076
    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
slouken@1361
  1077
	case `/bin/uname -X | grep "^Machine"` in
slouken@1361
  1078
	    *486*)	     UNAME_MACHINE=i486 ;;
slouken@1361
  1079
	    *Pentium)	     UNAME_MACHINE=i586 ;;
slouken@1361
  1080
	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
slouken@1361
  1081
	esac
slouken@1361
  1082
	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
slouken@1361
  1083
	exit ;;
slouken@1361
  1084
    i*86:*:3.2:*)
slouken@1361
  1085
	if test -f /usr/options/cb.name; then
slouken@1361
  1086
		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
slouken@1361
  1087
		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
slouken@1361
  1088
	elif /bin/uname -X 2>/dev/null >/dev/null ; then
slouken@1361
  1089
		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
slouken@1361
  1090
		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
slouken@1361
  1091
		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
slouken@1361
  1092
			&& UNAME_MACHINE=i586
slouken@1361
  1093
		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
slouken@1361
  1094
			&& UNAME_MACHINE=i686
slouken@1361
  1095
		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
slouken@1361
  1096
			&& UNAME_MACHINE=i686
slouken@1361
  1097
		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
slouken@1361
  1098
	else
slouken@1361
  1099
		echo ${UNAME_MACHINE}-pc-sysv32
slouken@1361
  1100
	fi
slouken@1361
  1101
	exit ;;
slouken@1361
  1102
    pc:*:*:*)
slouken@1361
  1103
	# Left here for compatibility:
slouken@1361
  1104
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
slouken@1361
  1105
        # the processor, so we play safe by assuming i386.
slouken@1361
  1106
	echo i386-pc-msdosdjgpp
slouken@1361
  1107
        exit ;;
slouken@1361
  1108
    Intel:Mach:3*:*)
slouken@1361
  1109
	echo i386-pc-mach3
slouken@1361
  1110
	exit ;;
slouken@1361
  1111
    paragon:*:*:*)
slouken@1361
  1112
	echo i860-intel-osf1
slouken@1361
  1113
	exit ;;
slouken@1361
  1114
    i860:*:4.*:*) # i860-SVR4
slouken@1361
  1115
	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
slouken@1361
  1116
	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
slouken@1361
  1117
	else # Add other i860-SVR4 vendors below as they are discovered.
slouken@1361
  1118
	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
slouken@1361
  1119
	fi
slouken@1361
  1120
	exit ;;
slouken@1361
  1121
    mini*:CTIX:SYS*5:*)
slouken@1361
  1122
	# "miniframe"
slouken@1361
  1123
	echo m68010-convergent-sysv
slouken@1361
  1124
	exit ;;
slouken@1361
  1125
    mc68k:UNIX:SYSTEM5:3.51m)
slouken@1361
  1126
	echo m68k-convergent-sysv
slouken@1361
  1127
	exit ;;
slouken@1361
  1128
    M680?0:D-NIX:5.3:*)
slouken@1361
  1129
	echo m68k-diab-dnix
slouken@1361
  1130
	exit ;;
slouken@1361
  1131
    M68*:*:R3V[5678]*:*)
slouken@1361
  1132
	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
slouken@1361
  1133
    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
  1134
	OS_REL=''
slouken@1361
  1135
	test -r /etc/.relid \
slouken@1361
  1136
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
slouken@1361
  1137
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
slouken@1361
  1138
	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
slouken@1361
  1139
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
slouken@1361
  1140
	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
slouken@1361
  1141
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
slouken@1361
  1142
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
slouken@1361
  1143
          && { echo i486-ncr-sysv4; exit; } ;;
slouken@1361
  1144
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
slouken@1361
  1145
	echo m68k-unknown-lynxos${UNAME_RELEASE}
slouken@1361
  1146
	exit ;;
slouken@1361
  1147
    mc68030:UNIX_System_V:4.*:*)
slouken@1361
  1148
	echo m68k-atari-sysv4
slouken@1361
  1149
	exit ;;
slouken@1361
  1150
    TSUNAMI:LynxOS:2.*:*)
slouken@1361
  1151
	echo sparc-unknown-lynxos${UNAME_RELEASE}
slouken@1361
  1152
	exit ;;
slouken@1361
  1153
    rs6000:LynxOS:2.*:*)
slouken@1361
  1154
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
slouken@1361
  1155
	exit ;;
slouken@1361
  1156
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
slouken@1361
  1157
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
slouken@1361
  1158
	exit ;;
slouken@1361
  1159
    SM[BE]S:UNIX_SV:*:*)
slouken@1361
  1160
	echo mips-dde-sysv${UNAME_RELEASE}
slouken@1361
  1161
	exit ;;
slouken@1361
  1162
    RM*:ReliantUNIX-*:*:*)
slouken@1361
  1163
	echo mips-sni-sysv4
slouken@1361
  1164
	exit ;;
slouken@1361
  1165
    RM*:SINIX-*:*:*)
slouken@1361
  1166
	echo mips-sni-sysv4
slouken@1361
  1167
	exit ;;
slouken@1361
  1168
    *:SINIX-*:*:*)
slouken@1361
  1169
	if uname -p 2>/dev/null >/dev/null ; then
slouken@1361
  1170
		UNAME_MACHINE=`(uname -p) 2>/dev/null`
slouken@1361
  1171
		echo ${UNAME_MACHINE}-sni-sysv4
slouken@1361
  1172
	else
slouken@1361
  1173
		echo ns32k-sni-sysv
slouken@1361
  1174
	fi
slouken@1361
  1175
	exit ;;
slouken@1361
  1176
    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
slouken@1361
  1177
                      # says <Richard.M.Bartel@ccMail.Census.GOV>
slouken@1361
  1178
        echo i586-unisys-sysv4
slouken@1361
  1179
        exit ;;
slouken@1361
  1180
    *:UNIX_System_V:4*:FTX*)
slouken@1361
  1181
	# From Gerald Hewes <hewes@openmarket.com>.
slouken@1361
  1182
	# How about differentiating between stratus architectures? -djm
slouken@1361
  1183
	echo hppa1.1-stratus-sysv4
slouken@1361
  1184
	exit ;;
slouken@1361
  1185
    *:*:*:FTX*)
slouken@1361
  1186
	# From seanf@swdc.stratus.com.
slouken@1361
  1187
	echo i860-stratus-sysv4
slouken@1361
  1188
	exit ;;
slouken@1361
  1189
    i*86:VOS:*:*)
slouken@1361
  1190
	# From Paul.Green@stratus.com.
slouken@1361
  1191
	echo ${UNAME_MACHINE}-stratus-vos
slouken@1361
  1192
	exit ;;
slouken@1361
  1193
    *:VOS:*:*)
slouken@1361
  1194
	# From Paul.Green@stratus.com.
slouken@1361
  1195
	echo hppa1.1-stratus-vos
slouken@1361
  1196
	exit ;;
slouken@1361
  1197
    mc68*:A/UX:*:*)
slouken@1361
  1198
	echo m68k-apple-aux${UNAME_RELEASE}
slouken@1361
  1199
	exit ;;
slouken@1361
  1200
    news*:NEWS-OS:6*:*)
slouken@1361
  1201
	echo mips-sony-newsos6
slouken@1361
  1202
	exit ;;
slouken@1361
  1203
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
slouken@1361
  1204
	if [ -d /usr/nec ]; then
slouken@1361
  1205
	        echo mips-nec-sysv${UNAME_RELEASE}
slouken@1361
  1206
	else
slouken@1361
  1207
	        echo mips-unknown-sysv${UNAME_RELEASE}
slouken@1361
  1208
	fi
slouken@1361
  1209
        exit ;;
slouken@1361
  1210
    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
slouken@1361
  1211
	echo powerpc-be-beos
slouken@1361
  1212
	exit ;;
slouken@1361
  1213
    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
slouken@1361
  1214
	echo powerpc-apple-beos
slouken@1361
  1215
	exit ;;
slouken@1361
  1216
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
slouken@1361
  1217
	echo i586-pc-beos
slouken@1361
  1218
	exit ;;
slouken@1361
  1219
    SX-4:SUPER-UX:*:*)
slouken@1361
  1220
	echo sx4-nec-superux${UNAME_RELEASE}
slouken@1361
  1221
	exit ;;
slouken@1361
  1222
    SX-5:SUPER-UX:*:*)
slouken@1361
  1223
	echo sx5-nec-superux${UNAME_RELEASE}
slouken@1361
  1224
	exit ;;
slouken@1361
  1225
    SX-6:SUPER-UX:*:*)
slouken@1361
  1226
	echo sx6-nec-superux${UNAME_RELEASE}
slouken@1361
  1227
	exit ;;
slouken@2294
  1228
    SX-7:SUPER-UX:*:*)
slouken@2294
  1229
	echo sx7-nec-superux${UNAME_RELEASE}
slouken@2294
  1230
	exit ;;
slouken@2294
  1231
    SX-8:SUPER-UX:*:*)
slouken@2294
  1232
	echo sx8-nec-superux${UNAME_RELEASE}
slouken@2294
  1233
	exit ;;
slouken@2294
  1234
    SX-8R:SUPER-UX:*:*)
slouken@2294
  1235
	echo sx8r-nec-superux${UNAME_RELEASE}
slouken@2294
  1236
	exit ;;
slouken@1361
  1237
    Power*:Rhapsody:*:*)
slouken@1361
  1238
	echo powerpc-apple-rhapsody${UNAME_RELEASE}
slouken@1361
  1239
	exit ;;
slouken@1361
  1240
    *:Rhapsody:*:*)
slouken@1361
  1241
	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
slouken@1361
  1242
	exit ;;
slouken@1361
  1243
    *:Darwin:*:*)
slouken@1361
  1244
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
slouken@1361
  1245
	case $UNAME_PROCESSOR in
slouken@1361
  1246
	    unknown) UNAME_PROCESSOR=powerpc ;;
slouken@1361
  1247
	esac
slouken@1361
  1248
	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
slouken@1361
  1249
	exit ;;
slouken@1361
  1250
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
slouken@1361
  1251
	UNAME_PROCESSOR=`uname -p`
slouken@1361
  1252
	if test "$UNAME_PROCESSOR" = "x86"; then
slouken@1361
  1253
		UNAME_PROCESSOR=i386
slouken@1361
  1254
		UNAME_MACHINE=pc
slouken@1361
  1255
	fi
slouken@1361
  1256
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
slouken@1361
  1257
	exit ;;
slouken@1361
  1258
    *:QNX:*:4*)
slouken@1361
  1259
	echo i386-pc-qnx
slouken@1361
  1260
	exit ;;
slouken@1361
  1261
    NSE-?:NONSTOP_KERNEL:*:*)
slouken@1361
  1262
	echo nse-tandem-nsk${UNAME_RELEASE}
slouken@1361
  1263
	exit ;;
slouken@1361
  1264
    NSR-?:NONSTOP_KERNEL:*:*)
slouken@1361
  1265
	echo nsr-tandem-nsk${UNAME_RELEASE}
slouken@1361
  1266
	exit ;;
slouken@1361
  1267
    *:NonStop-UX:*:*)
slouken@1361
  1268
	echo mips-compaq-nonstopux
slouken@1361
  1269
	exit ;;
slouken@1361
  1270
    BS2000:POSIX*:*:*)
slouken@1361
  1271
	echo bs2000-siemens-sysv
slouken@1361
  1272
	exit ;;
slouken@1361
  1273
    DS/*:UNIX_System_V:*:*)
slouken@1361
  1274
	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
slouken@1361
  1275
	exit ;;
slouken@1361
  1276
    *:Plan9:*:*)
slouken@1361
  1277
	# "uname -m" is not consistent, so use $cputype instead. 386
slouken@1361
  1278
	# is converted to i386 for consistency with other x86
slouken@1361
  1279
	# operating systems.
slouken@1361
  1280
	if test "$cputype" = "386"; then
slouken@1361
  1281
	    UNAME_MACHINE=i386
slouken@1361
  1282
	else
slouken@1361
  1283
	    UNAME_MACHINE="$cputype"
slouken@1361
  1284
	fi
slouken@1361
  1285
	echo ${UNAME_MACHINE}-unknown-plan9
slouken@1361
  1286
	exit ;;
slouken@1361
  1287
    *:TOPS-10:*:*)
slouken@1361
  1288
	echo pdp10-unknown-tops10
slouken@1361
  1289
	exit ;;
slouken@1361
  1290
    *:TENEX:*:*)
slouken@1361
  1291
	echo pdp10-unknown-tenex
slouken@1361
  1292
	exit ;;
slouken@1361
  1293
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
slouken@1361
  1294
	echo pdp10-dec-tops20
slouken@1361
  1295
	exit ;;
slouken@1361
  1296
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
slouken@1361
  1297
	echo pdp10-xkl-tops20
slouken@1361
  1298
	exit ;;
slouken@1361
  1299
    *:TOPS-20:*:*)
slouken@1361
  1300
	echo pdp10-unknown-tops20
slouken@1361
  1301
	exit ;;
slouken@1361
  1302
    *:ITS:*:*)
slouken@1361
  1303
	echo pdp10-unknown-its
slouken@1361
  1304
	exit ;;
slouken@1361
  1305
    SEI:*:*:SEIUX)
slouken@1361
  1306
        echo mips-sei-seiux${UNAME_RELEASE}
slouken@1361
  1307
	exit ;;
slouken@1361
  1308
    *:DragonFly:*:*)
slouken@1361
  1309
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
slouken@1361
  1310
	exit ;;
slouken@1361
  1311
    *:*VMS:*:*)
slouken@1361
  1312
    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
slouken@1361
  1313
	case "${UNAME_MACHINE}" in
slouken@1361
  1314
	    A*) echo alpha-dec-vms ; exit ;;
slouken@1361
  1315
	    I*) echo ia64-dec-vms ; exit ;;
slouken@1361
  1316
	    V*) echo vax-dec-vms ; exit ;;
slouken@1361
  1317
	esac ;;
slouken@1361
  1318
    *:XENIX:*:SysV)
slouken@1361
  1319
	echo i386-pc-xenix
slouken@1361
  1320
	exit ;;
slouken@1361
  1321
    i*86:skyos:*:*)
slouken@1361
  1322
	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
slouken@1361
  1323
	exit ;;
slouken@1361
  1324
    i*86:rdos:*:*)
slouken@1361
  1325
	echo ${UNAME_MACHINE}-pc-rdos
slouken@1361
  1326
	exit ;;
slouken@1361
  1327
esac
slouken@1361
  1328
slouken@1361
  1329
#echo '(No uname command or uname output not recognized.)' 1>&2
slouken@1361
  1330
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
slouken@1361
  1331
slouken@1361
  1332
eval $set_cc_for_build
slouken@1361
  1333
cat >$dummy.c <<EOF
slouken@1361
  1334
#ifdef _SEQUENT_
slouken@1361
  1335
# include <sys/types.h>
slouken@1361
  1336
# include <sys/utsname.h>
slouken@1361
  1337
#endif
slouken@1361
  1338
main ()
slouken@1361
  1339
{
slouken@1361
  1340
#if defined (sony)
slouken@1361
  1341
#if defined (MIPSEB)
slouken@1361
  1342
  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
slouken@1361
  1343
     I don't know....  */
slouken@1361
  1344
  printf ("mips-sony-bsd\n"); exit (0);
slouken@1361
  1345
#else
slouken@1361
  1346
#include <sys/param.h>
slouken@1361
  1347
  printf ("m68k-sony-newsos%s\n",
slouken@1361
  1348
#ifdef NEWSOS4
slouken@1361
  1349
          "4"
slouken@1361
  1350
#else
slouken@1361
  1351
	  ""
slouken@1361
  1352
#endif
slouken@1361
  1353
         ); exit (0);
slouken@1361
  1354
#endif
slouken@1361
  1355
#endif
slouken@1361
  1356
slouken@1361
  1357
#if defined (__arm) && defined (__acorn) && defined (__unix)
slouken@1361
  1358
  printf ("arm-acorn-riscix\n"); exit (0);
slouken@1361
  1359
#endif
slouken@1361
  1360
slouken@1361
  1361
#if defined (hp300) && !defined (hpux)
slouken@1361
  1362
  printf ("m68k-hp-bsd\n"); exit (0);
slouken@1361
  1363
#endif
slouken@1361
  1364
slouken@1361
  1365
#if defined (NeXT)
slouken@1361
  1366
#if !defined (__ARCHITECTURE__)
slouken@1361
  1367
#define __ARCHITECTURE__ "m68k"
slouken@1361
  1368
#endif
slouken@1361
  1369
  int version;
slouken@1361
  1370
  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
slouken@1361
  1371
  if (version < 4)
slouken@1361
  1372
    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
slouken@1361
  1373
  else
slouken@1361
  1374
    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
slouken@1361
  1375
  exit (0);
slouken@1361
  1376
#endif
slouken@1361
  1377
slouken@1361
  1378
#if defined (MULTIMAX) || defined (n16)
slouken@1361
  1379
#if defined (UMAXV)
slouken@1361
  1380
  printf ("ns32k-encore-sysv\n"); exit (0);
slouken@1361
  1381
#else
slouken@1361
  1382
#if defined (CMU)
slouken@1361
  1383
  printf ("ns32k-encore-mach\n"); exit (0);
slouken@1361
  1384
#else
slouken@1361
  1385
  printf ("ns32k-encore-bsd\n"); exit (0);
slouken@1361
  1386
#endif
slouken@1361
  1387
#endif
slouken@1361
  1388
#endif
slouken@1361
  1389
slouken@1361
  1390
#if defined (__386BSD__)
slouken@1361
  1391
  printf ("i386-pc-bsd\n"); exit (0);
slouken@1361
  1392
#endif
slouken@1361
  1393
slouken@1361
  1394
#if defined (sequent)
slouken@1361
  1395
#if defined (i386)
slouken@1361
  1396
  printf ("i386-sequent-dynix\n"); exit (0);
slouken@1361
  1397
#endif
slouken@1361
  1398
#if defined (ns32000)
slouken@1361
  1399
  printf ("ns32k-sequent-dynix\n"); exit (0);
slouken@1361
  1400
#endif
slouken@1361
  1401
#endif
slouken@1361
  1402
slouken@1361
  1403
#if defined (_SEQUENT_)
slouken@1361
  1404
    struct utsname un;
slouken@1361
  1405
slouken@1361
  1406
    uname(&un);
slouken@1361
  1407
slouken@1361
  1408
    if (strncmp(un.version, "V2", 2) == 0) {
slouken@1361
  1409
	printf ("i386-sequent-ptx2\n"); exit (0);
slouken@1361
  1410
    }
slouken@1361
  1411
    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
slouken@1361
  1412
	printf ("i386-sequent-ptx1\n"); exit (0);
slouken@1361
  1413
    }
slouken@1361
  1414
    printf ("i386-sequent-ptx\n"); exit (0);
slouken@1361
  1415
slouken@1361
  1416
#endif
slouken@1361
  1417
slouken@1361
  1418
#if defined (vax)
slouken@1361
  1419
# if !defined (ultrix)
slouken@1361
  1420
#  include <sys/param.h>
slouken@1361
  1421
#  if defined (BSD)
slouken@1361
  1422
#   if BSD == 43
slouken@1361
  1423
      printf ("vax-dec-bsd4.3\n"); exit (0);
slouken@1361
  1424
#   else
slouken@1361
  1425
#    if BSD == 199006
slouken@1361
  1426
      printf ("vax-dec-bsd4.3reno\n"); exit (0);
slouken@1361
  1427
#    else
slouken@1361
  1428
      printf ("vax-dec-bsd\n"); exit (0);
slouken@1361
  1429
#    endif
slouken@1361
  1430
#   endif
slouken@1361
  1431
#  else
slouken@1361
  1432
    printf ("vax-dec-bsd\n"); exit (0);
slouken@1361
  1433
#  endif
slouken@1361
  1434
# else
slouken@1361
  1435
    printf ("vax-dec-ultrix\n"); exit (0);
slouken@1361
  1436
# endif
slouken@1361
  1437
#endif
slouken@1361
  1438
slouken@1361
  1439
#if defined (alliant) && defined (i860)
slouken@1361
  1440
  printf ("i860-alliant-bsd\n"); exit (0);
slouken@1361
  1441
#endif
slouken@1361
  1442
slouken@1361
  1443
  exit (1);
slouken@1361
  1444
}
slouken@1361
  1445
EOF
slouken@1361
  1446
slouken@1361
  1447
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
slouken@1361
  1448
	{ echo "$SYSTEM_NAME"; exit; }
slouken@1361
  1449
slouken@1361
  1450
# Apollos put the system type in the environment.
slouken@1361
  1451
slouken@1361
  1452
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
slouken@1361
  1453
slouken@1361
  1454
# Convex versions that predate uname can use getsysinfo(1)
slouken@1361
  1455
slouken@1361
  1456
if [ -x /usr/convex/getsysinfo ]
slouken@1361
  1457
then
slouken@1361
  1458
    case `getsysinfo -f cpu_type` in
slouken@1361
  1459
    c1*)
slouken@1361
  1460
	echo c1-convex-bsd
slouken@1361
  1461
	exit ;;
slouken@1361
  1462
    c2*)
slouken@1361
  1463
	if getsysinfo -f scalar_acc
slouken@1361
  1464
	then echo c32-convex-bsd
slouken@1361
  1465
	else echo c2-convex-bsd
slouken@1361
  1466
	fi
slouken@1361
  1467
	exit ;;
slouken@1361
  1468
    c34*)
slouken@1361
  1469
	echo c34-convex-bsd
slouken@1361
  1470
	exit ;;
slouken@1361
  1471
    c38*)
slouken@1361
  1472
	echo c38-convex-bsd
slouken@1361
  1473
	exit ;;
slouken@1361
  1474
    c4*)
slouken@1361
  1475
	echo c4-convex-bsd
slouken@1361
  1476
	exit ;;
slouken@1361
  1477
    esac
slouken@1361
  1478
fi
slouken@1361
  1479
slouken@1361
  1480
cat >&2 <<EOF
slouken@1361
  1481
$0: unable to guess system type
slouken@1361
  1482
slouken@1361
  1483
This script, last modified $timestamp, has failed to recognize
slouken@1361
  1484
the operating system you are using. It is advised that you
slouken@1361
  1485
download the most up to date version of the config scripts from
slouken@1361
  1486
slouken@1361
  1487
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
slouken@1361
  1488
and
slouken@1361
  1489
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
slouken@1361
  1490
slouken@1361
  1491
If the version you run ($0) is already up to date, please
slouken@1361
  1492
send the following data and any information you think might be
slouken@1361
  1493
pertinent to <config-patches@gnu.org> in order to provide the needed
slouken@1361
  1494
information to handle your system.
slouken@1361
  1495
slouken@1361
  1496
config.guess timestamp = $timestamp
slouken@1361
  1497
slouken@1361
  1498
uname -m = `(uname -m) 2>/dev/null || echo unknown`
slouken@1361
  1499
uname -r = `(uname -r) 2>/dev/null || echo unknown`
slouken@1361
  1500
uname -s = `(uname -s) 2>/dev/null || echo unknown`
slouken@1361
  1501
uname -v = `(uname -v) 2>/dev/null || echo unknown`
slouken@1361
  1502
slouken@1361
  1503
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
slouken@1361
  1504
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
slouken@1361
  1505
slouken@1361
  1506
hostinfo               = `(hostinfo) 2>/dev/null`
slouken@1361
  1507
/bin/universe          = `(/bin/universe) 2>/dev/null`
slouken@1361
  1508
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
slouken@1361
  1509
/bin/arch              = `(/bin/arch) 2>/dev/null`
slouken@1361
  1510
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
slouken@1361
  1511
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
slouken@1361
  1512
slouken@1361
  1513
UNAME_MACHINE = ${UNAME_MACHINE}
slouken@1361
  1514
UNAME_RELEASE = ${UNAME_RELEASE}
slouken@1361
  1515
UNAME_SYSTEM  = ${UNAME_SYSTEM}
slouken@1361
  1516
UNAME_VERSION = ${UNAME_VERSION}
slouken@1361
  1517
EOF
slouken@1361
  1518
slouken@1361
  1519
exit 1
slouken@1361
  1520
slouken@1361
  1521
# Local variables:
slouken@1361
  1522
# eval: (add-hook 'write-file-hooks 'time-stamp)
slouken@1361
  1523
# time-stamp-start: "timestamp='"
slouken@1361
  1524
# time-stamp-format: "%:y-%02m-%02d"
slouken@1361
  1525
# time-stamp-end: "'"
slouken@1361
  1526
# End: