2
2
# Attempt to guess a canonical system name.
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
4
# Free Software Foundation, Inc.
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
# 2011, 2012 Free Software Foundation, Inc.
8
9
# This file is free software; you can redistribute it and/or modify it
9
10
# under the terms of the GNU General Public License as published by
16
17
# General Public License for more details.
18
19
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, write to the Free Software
20
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
# along with this program; if not, see <http://www.gnu.org/licenses/>.
22
22
# As a special exception to the GNU General Public License, if you
23
23
# distribute this file as part of a program that contains a
24
24
# configuration script generated by Autoconf, you may include it under
25
25
# the same distribution terms that you use for the rest of that program.
27
# Written by Per Bothner <bothner@cygnus.com>.
28
# Please send patches to <config-patches@gnu.org>.
28
# Originally written by Per Bothner. Please send patches (context
29
# diff format) to <config-patches@gnu.org> and include a ChangeLog
30
32
# This script attempts to guess a canonical system name similar to
31
33
# config.sub. If it succeeds, it prints the system name on stdout, and
32
34
# exits with 0. Otherwise, it exits with 1.
34
# The plan is that this can be called by configure scripts if you
35
# don't specify an explicit build system type.
36
# You can get the latest version of this script from:
37
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
37
39
me=`echo "$0" | sed -e 's,.*/,,'`
52
54
GNU config.guess ($timestamp)
54
56
Originally written by Per Bothner.
55
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
57
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
58
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
56
59
Free Software Foundation, Inc.
58
61
This is free software; see the source for copying conditions. There is NO
92
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
94
# CC_FOR_BUILD -- compiler used by this script.
95
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
96
# compiler to aid in system detection is discouraged as it requires
97
# temporary files to be created and, as you can see below, it is a
98
# headache to deal with in a portable fashion.
95
100
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
96
101
# use `HOST_CC' if defined, but it is deprecated.
98
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
99
,,) echo "int dummy(){}" > $dummy.c ;
100
for c in cc gcc c89 ; do
101
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
102
if test $? = 0 ; then
103
# Portable tmp directory creation inspired by the Autoconf team.
106
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
109
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
114
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
115
case $CC_FOR_BUILD,$HOST_CC,$CC in
116
,,) echo "int x;" > $dummy.c ;
117
for c in cc gcc c89 c99 ; do
118
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
103
119
CC_FOR_BUILD="$c"; break ;
106
rm -f $dummy.c $dummy.o $dummy.rel ;
107
122
if test x"$CC_FOR_BUILD" = x ; then
108
123
CC_FOR_BUILD=no_compiler_found ;
111
126
,,*) CC_FOR_BUILD=$CC ;;
112
127
,*,*) CC_FOR_BUILD=$HOST_CC ;;
128
esac ; set_cc_for_build= ;'
115
130
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
116
131
# (ghazi@noc.rutgers.edu 1994-08-24)
128
143
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
130
# Netbsd (nbsd) targets should (where applicable) match one or
131
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
145
# NetBSD (nbsd) targets should (where applicable) match one or
146
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
132
147
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
133
148
# switched to ELF, *-*-netbsd* would select the old
134
149
# object file format. This provides both forward
135
150
# compatibility and a consistent mechanism for selecting the
136
151
# object file format.
137
# Determine the machine/vendor (is the vendor relevant).
138
case "${UNAME_MACHINE}" in
139
amiga) machine=m68k-unknown ;;
140
arm32) machine=arm-unknown ;;
141
atari*) machine=m68k-atari ;;
142
sun3*) machine=m68k-sun ;;
143
mac68k) machine=m68k-apple ;;
144
macppc) machine=powerpc-apple ;;
145
hp3[0-9][05]) machine=m68k-hp ;;
146
ibmrt|romp-ibm) machine=romp-ibm ;;
147
*) machine=${UNAME_MACHINE}-unknown ;;
153
# Note: NetBSD doesn't particularly care about the vendor
154
# portion of the name. We always set it to "unknown".
155
sysctl="sysctl -n hw.machine_arch"
156
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
157
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
158
case "${UNAME_MACHINE_ARCH}" in
159
armeb) machine=armeb-unknown ;;
160
arm*) machine=arm-unknown ;;
161
sh3el) machine=shl-unknown ;;
162
sh3eb) machine=sh-unknown ;;
163
sh5el) machine=sh5le-unknown ;;
164
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
149
166
# The Operating System including object format, if it has switched
150
167
# to ELF recently, or will in the future.
151
case "${UNAME_MACHINE}" in
152
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
168
case "${UNAME_MACHINE_ARCH}" in
169
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
153
170
eval $set_cc_for_build
154
171
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
155
| grep __ELF__ >/dev/null
157
174
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
158
175
# Return netbsd for either. FIX?
169
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
186
# Debian GNU/NetBSD machines have a different userland, and
187
# thus, need a distinct triplet. However, they do not need
188
# kernel version information, so it can be replaced with a
189
# suitable tag, in the style of linux-gnu.
190
case "${UNAME_VERSION}" in
195
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
170
198
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
171
199
# contains redundant information, the shorter form:
172
200
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
173
201
echo "${machine}-${os}${release}"
204
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
208
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
211
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
214
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
217
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
176
if test $UNAME_RELEASE = "V4.0"; then
220
case $UNAME_RELEASE in
177
222
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
225
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
228
# According to Compaq, /usr/sbin/psrinfo has been available on
229
# OSF/1 and Tru64 systems produced since 1995. I hope that
230
# covers most systems running today. This code pipes the CPU
231
# types through head -n 1, so we only detect the type of CPU 0.
232
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
233
case "$ALPHA_CPU_TYPE" in
235
UNAME_MACHINE="alpha" ;;
237
UNAME_MACHINE="alpha" ;;
238
"LCA4 (21066/21068)")
239
UNAME_MACHINE="alpha" ;;
241
UNAME_MACHINE="alphaev5" ;;
243
UNAME_MACHINE="alphaev56" ;;
245
UNAME_MACHINE="alphapca56" ;;
247
UNAME_MACHINE="alphapca57" ;;
249
UNAME_MACHINE="alphaev6" ;;
251
UNAME_MACHINE="alphaev67" ;;
253
UNAME_MACHINE="alphaev68" ;;
255
UNAME_MACHINE="alphaev68" ;;
257
UNAME_MACHINE="alphaev68" ;;
258
"EV6.9A (21264/EV69A)")
259
UNAME_MACHINE="alphaev69" ;;
261
UNAME_MACHINE="alphaev7" ;;
263
UNAME_MACHINE="alphaev79" ;;
265
# A Pn.n version is a patched version.
179
266
# A Vn.n version is a released version.
180
267
# A Tn.n version is a released field test version.
181
268
# A Xn.n version is an unreleased experimental baselevel.
182
269
# 1.2 uses "1.2" for uname -r.
186
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
193
.frame \$30,16,\$26,0
196
.long 0x47e03d80 # implver \$0
198
.long 0x47e20c21 # amask \$2,\$1
208
eval $set_cc_for_build
209
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
210
if test "$?" = 0 ; then
213
UNAME_MACHINE="alpha"
216
UNAME_MACHINE="alphaev5"
219
UNAME_MACHINE="alphaev56"
222
UNAME_MACHINE="alphapca56"
225
UNAME_MACHINE="alphaev6"
228
UNAME_MACHINE="alphaev67"
231
UNAME_MACHINE="alphaev68"
235
rm -f $dummy.s $dummy
236
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
270
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
271
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
238
275
Alpha\ *:Windows_NT*:*)
239
276
# How do we know it's Interix rather than the generic POSIX subsystem?
240
277
# Should we change UNAME_MACHINE based on the output of uname instead
241
278
# of the specific Alpha model?
242
279
echo alpha-pc-interix
244
281
21064:Windows_NT:50:3)
245
282
echo alpha-dec-winnt3.5
247
284
Amiga*:UNIX_System_V:4.0:*)
248
285
echo m68k-unknown-sysv4
251
echo m68k-unknown-openbsd${UNAME_RELEASE}
253
287
*:[Aa]miga[Oo][Ss]:*:*)
254
288
echo ${UNAME_MACHINE}-unknown-amigaos
257
echo mips64el-unknown-openbsd${UNAME_RELEASE}
260
echo mipsel-unknown-openbsd${UNAME_RELEASE}
263
echo mips-unknown-openbsd${UNAME_RELEASE}
266
echo mipsel-unknown-openbsd${UNAME_RELEASE}
269
echo mips-unknown-openbsd${UNAME_RELEASE}
272
echo mipsel-unknown-openbsd${UNAME_RELEASE}
290
*:[Mm]orph[Oo][Ss]:*:*)
291
echo ${UNAME_MACHINE}-unknown-morphos
275
294
echo i370-ibm-openedition
300
echo powerpc-ibm-os400
277
302
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
278
303
echo arm-acorn-riscix${UNAME_RELEASE}
305
arm:riscos:*:*|arm:RISCOS:*:*)
306
echo arm-unknown-riscos
280
308
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
281
309
echo hppa1.1-hitachi-hiuxmpp
283
311
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
284
312
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
285
313
if test "`(/bin/universe) 2>/dev/null`" = att ; then
288
316
echo pyramid-pyramid-bsd
292
320
echo pyramid-pyramid-svr4
322
DRS?6000:unix:4.0:6*)
325
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
326
case `/usr/bin/uname -p` in
327
sparc) echo sparc-icl-nx7; exit ;;
330
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
294
332
sun4H:SunOS:5.*:*)
295
333
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
297
335
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
298
336
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
301
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
338
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
339
echo i386-pc-auroraux${UNAME_RELEASE}
341
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
342
eval $set_cc_for_build
344
# If there is a compiler, see if it is configured for 64-bit objects.
345
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
346
# This test works for both compilers.
347
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
348
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
349
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
350
grep IS_64BIT_ARCH >/dev/null
355
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
303
357
sun4*:SunOS:6*:*)
304
358
# According to config.sub, this is the proper way to canonicalize
305
359
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
306
360
# it's likely to be more like Solaris than SunOS4.
307
361
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
310
364
case "`/usr/bin/arch -k`" in
348
396
# MiNT. But MiNT is downward compatible to TOS, so this should
350
398
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
351
echo m68k-atari-mint${UNAME_RELEASE}
399
echo m68k-atari-mint${UNAME_RELEASE}
353
401
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
354
402
echo m68k-atari-mint${UNAME_RELEASE}
356
404
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
357
echo m68k-atari-mint${UNAME_RELEASE}
405
echo m68k-atari-mint${UNAME_RELEASE}
359
407
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
360
echo m68k-milan-mint${UNAME_RELEASE}
408
echo m68k-milan-mint${UNAME_RELEASE}
362
410
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
363
echo m68k-hades-mint${UNAME_RELEASE}
411
echo m68k-hades-mint${UNAME_RELEASE}
365
413
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
366
echo m68k-unknown-mint${UNAME_RELEASE}
369
echo m68k-unknown-openbsd${UNAME_RELEASE}
372
echo m68k-unknown-openbsd${UNAME_RELEASE}
375
echo m68k-unknown-openbsd${UNAME_RELEASE}
378
echo m88k-unknown-openbsd${UNAME_RELEASE}
414
echo m68k-unknown-mint${UNAME_RELEASE}
417
echo m68k-apple-machten${UNAME_RELEASE}
380
419
powerpc:machten:*:*)
381
420
echo powerpc-apple-machten${UNAME_RELEASE}
384
423
echo mips-dec-mach_bsd4.3
386
425
RISC*:ULTRIX:*:*)
387
426
echo mips-dec-ultrix${UNAME_RELEASE}
389
428
VAX*:ULTRIX*:*:*)
390
429
echo vax-dec-ultrix${UNAME_RELEASE}
392
431
2020:CLIX:*:* | 2430:CLIX:*:*)
393
432
echo clipper-intergraph-clix${UNAME_RELEASE}
395
434
mips:*:*:UMIPS | mips:*:*:RISCos)
396
435
eval $set_cc_for_build
397
436
sed 's/^ //' << EOF >$dummy.c
418
$CC_FOR_BUILD $dummy.c -o $dummy \
419
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
420
&& rm -f $dummy.c $dummy && exit 0
421
rm -f $dummy.c $dummy
457
$CC_FOR_BUILD -o $dummy $dummy.c &&
458
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
459
SYSTEM_NAME=`$dummy $dummyarg` &&
460
{ echo "$SYSTEM_NAME"; exit; }
422
461
echo mips-mips-riscos${UNAME_RELEASE}
424
463
Motorola:PowerMAX_OS:*:*)
425
464
echo powerpc-motorola-powermax
466
Motorola:*:4.3:PL8-*)
467
echo powerpc-harris-powermax
469
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
470
echo powerpc-harris-powermax
427
472
Night_Hawk:Power_UNIX:*:*)
428
473
echo powerpc-harris-powerunix
431
476
echo m88k-harris-cxux7
434
479
echo m88k-motorola-sysv4
437
482
echo m88k-motorola-sysv3
440
# DG/UX returns AViiON for all architectures
441
UNAME_PROCESSOR=`/usr/bin/uname -p`
485
# DG/UX returns AViiON for all architectures
486
UNAME_PROCESSOR=`/usr/bin/uname -p`
442
487
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
444
489
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
518
566
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
520
568
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
523
571
echo rs6000-ibm-aix
525
573
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
526
574
echo romp-ibm-bsd4.4
528
576
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
529
577
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
530
exit 0 ;; # report: romp-ibm BSD 4.3
578
exit ;; # report: romp-ibm BSD 4.3
532
580
echo rs6000-bull-bosx
534
582
DPX/2?00:B.O.S.:*:*)
535
583
echo m68k-bull-sysv3
537
585
9000/[34]??:4.3bsd:1.*:*)
540
588
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
541
589
echo m68k-hp-bsd4.4
543
591
9000/[34678]??:HP-UX:*:*)
544
592
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
545
593
case "${UNAME_MACHINE}" in
546
594
9000/31? ) HP_ARCH=m68000 ;;
547
595
9000/[34]?? ) HP_ARCH=m68k ;;
548
596
9000/[678][0-9][0-9])
549
case "${HPUX_REV}" in
551
if [ -x /usr/bin/getconf ]; then
552
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
553
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
554
case "${sc_cpu_version}" in
555
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
556
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
557
532) # CPU_PA_RISC2_0
558
case "${sc_kernel_bits}" in
559
32) HP_ARCH="hppa2.0n" ;;
560
64) HP_ARCH="hppa2.0w" ;;
565
if [ "${HP_ARCH}" = "" ]; then
566
eval $set_cc_for_build
567
sed 's/^ //' << EOF >$dummy.c
575
#if defined(_SC_KERNEL_BITS)
576
long bits = sysconf(_SC_KERNEL_BITS);
578
long cpu = sysconf (_SC_CPU_VERSION);
582
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
583
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
585
#if defined(_SC_KERNEL_BITS)
588
case 64: puts ("hppa2.0w"); break;
589
case 32: puts ("hppa2.0n"); break;
590
default: puts ("hppa2.0"); break;
592
#else /* !defined(_SC_KERNEL_BITS) */
593
puts ("hppa2.0"); break;
595
default: puts ("hppa1.0"); break;
597
if [ -x /usr/bin/getconf ]; then
598
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
599
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
600
case "${sc_cpu_version}" in
601
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
602
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
603
532) # CPU_PA_RISC2_0
604
case "${sc_kernel_bits}" in
605
32) HP_ARCH="hppa2.0n" ;;
606
64) HP_ARCH="hppa2.0w" ;;
607
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
611
if [ "${HP_ARCH}" = "" ]; then
612
eval $set_cc_for_build
613
sed 's/^ //' << EOF >$dummy.c
621
#if defined(_SC_KERNEL_BITS)
622
long bits = sysconf(_SC_KERNEL_BITS);
624
long cpu = sysconf (_SC_CPU_VERSION);
628
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
629
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
631
#if defined(_SC_KERNEL_BITS)
634
case 64: puts ("hppa2.0w"); break;
635
case 32: puts ("hppa2.0n"); break;
636
default: puts ("hppa2.0"); break;
638
#else /* !defined(_SC_KERNEL_BITS) */
639
puts ("hppa2.0"); break;
641
default: puts ("hppa1.0"); break;
600
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
601
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
602
rm -f $dummy.c $dummy
646
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
647
test -z "$HP_ARCH" && HP_ARCH=hppa
650
if [ ${HP_ARCH} = "hppa2.0w" ]
652
eval $set_cc_for_build
654
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
655
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
656
# generating 64-bit code. GNU and HP use different nomenclature:
658
# $ CC_FOR_BUILD=cc ./config.guess
659
# => hppa2.0w-hp-hpux11.23
660
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
661
# => hppa64-hp-hpux11.23
663
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
605
671
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
608
674
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
609
675
echo ia64-hp-hpux${HPUX_REV}
612
678
eval $set_cc_for_build
613
679
sed 's/^ //' << EOF >$dummy.c
638
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
639
rm -f $dummy.c $dummy
704
$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
705
{ echo "$SYSTEM_NAME"; exit; }
640
706
echo unknown-hitachi-hiuxwe2
642
708
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
643
709
echo hppa1.1-hp-bsd
645
711
9000/8??:4.3bsd:*:*)
646
712
echo hppa1.0-hp-bsd
648
714
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
649
715
echo hppa1.0-hp-mpeix
651
717
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
652
718
echo hppa1.1-hp-osf
655
721
echo hppa1.0-hp-osf
658
724
if [ -x /usr/sbin/sysversion ] ; then
659
725
echo ${UNAME_MACHINE}-unknown-osf1mk
661
727
echo ${UNAME_MACHINE}-unknown-osf1
664
730
parisc*:Lites*:*:*)
665
731
echo hppa1.1-hp-lites
668
echo hppa-unknown-openbsd
670
733
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
671
734
echo c1-convex-bsd
673
736
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
674
737
if getsysinfo -f scalar_acc
675
738
then echo c32-convex-bsd
676
739
else echo c2-convex-bsd
679
742
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
680
743
echo c34-convex-bsd
682
745
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
683
746
echo c38-convex-bsd
685
748
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
686
749
echo c4-convex-bsd
692
752
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
694
754
CRAY*[A-Z]90:*:*:*)
695
755
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
696
756
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
697
757
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
698
758
-e 's/\.[^.]*$/.X/'
701
761
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
704
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
707
764
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
710
767
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
713
echo cray2-cray-unicos
770
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
715
772
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
716
773
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
717
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
718
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
719
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
722
echo m68k-unknown-openbsd${UNAME_RELEASE}
774
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
775
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
776
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
778
5000:UNIX_System_V:4.*:*)
779
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
780
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
781
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
724
783
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
725
784
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
727
786
sparc*:BSD/OS:*:*)
728
787
echo sparc-unknown-bsdi${UNAME_RELEASE}
731
790
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
734
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
737
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
793
UNAME_PROCESSOR=`/usr/bin/uname -p`
794
case ${UNAME_PROCESSOR} in
796
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
740
802
echo ${UNAME_MACHINE}-pc-cygwin
743
805
echo ${UNAME_MACHINE}-pc-mingw32
808
echo ${UNAME_MACHINE}-pc-msys
811
# uname -m includes "-pc" on this system.
812
echo ${UNAME_MACHINE}-mingw32
746
815
echo ${UNAME_MACHINE}-pc-pw32
818
case ${UNAME_MACHINE} in
820
echo i586-pc-interix${UNAME_RELEASE}
822
authenticamd | genuineintel | EM64T)
823
echo x86_64-unknown-interix${UNAME_RELEASE}
826
echo ia64-unknown-interix${UNAME_RELEASE}
829
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
830
echo i${UNAME_MACHINE}-pc-mks
748
835
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
749
836
# How do we know it's Interix rather than the generic POSIX subsystem?
750
837
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
751
838
# UNAME_MACHINE based on the output of uname instead of i386?
755
842
echo ${UNAME_MACHINE}-pc-uwin
844
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
845
echo x86_64-unknown-cygwin
758
848
echo powerpcle-unknown-cygwin
760
850
prep*:SunOS:5.*:*)
761
851
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
764
855
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
858
# other systems with GNU libc and userland
859
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
767
862
echo ${UNAME_MACHINE}-pc-minix
770
echo ${UNAME_MACHINE}-unknown-linux-gnu
773
echo ${UNAME_MACHINE}-unknown-linux
776
echo ${UNAME_MACHINE}-unknown-linux-gnu
779
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
780
big) echo mips-unknown-linux-gnu && exit 0 ;;
781
little) echo mipsel-unknown-linux-gnu && exit 0 ;;
785
echo powerpc-unknown-linux-gnu
788
echo powerpc64-unknown-linux-gnu
865
echo ${UNAME_MACHINE}-unknown-linux-gnu
867
aarch64_be:Linux:*:*)
868
UNAME_MACHINE=aarch64_be
869
echo ${UNAME_MACHINE}-unknown-linux-gnu
791
872
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
792
873
EV5) UNAME_MACHINE=alphaev5 ;;
796
877
EV6) UNAME_MACHINE=alphaev6 ;;
797
878
EV67) UNAME_MACHINE=alphaev67 ;;
798
879
EV68*) UNAME_MACHINE=alphaev68 ;;
800
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
881
objdump --private-headers /bin/sh | grep -q ld.so.1
801
882
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
802
883
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
886
eval $set_cc_for_build
887
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
888
| grep -q __ARM_EABI__
890
echo ${UNAME_MACHINE}-unknown-linux-gnu
892
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
893
| grep -q __ARM_PCS_VFP
895
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
897
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
902
echo ${UNAME_MACHINE}-unknown-linux-gnu
905
echo ${UNAME_MACHINE}-axis-linux-gnu
908
echo ${UNAME_MACHINE}-axis-linux-gnu
911
echo ${UNAME_MACHINE}-unknown-linux-gnu
914
echo ${UNAME_MACHINE}-unknown-linux-gnu
918
eval $set_cc_for_build
919
sed 's/^ //' << EOF >$dummy.c
924
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
925
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
928
echo ${UNAME_MACHINE}-unknown-linux-gnu
931
echo ${UNAME_MACHINE}-unknown-linux-gnu
934
echo ${UNAME_MACHINE}-unknown-linux-gnu
936
mips:Linux:*:* | mips64:Linux:*:*)
937
eval $set_cc_for_build
938
sed 's/^ //' << EOF >$dummy.c
940
#undef ${UNAME_MACHINE}
941
#undef ${UNAME_MACHINE}el
942
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
943
CPU=${UNAME_MACHINE}el
945
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
952
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
953
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
956
echo ${UNAME_MACHINE}-unknown-linux-gnu
959
echo sparc-unknown-linux-gnu
961
parisc64:Linux:*:* | hppa64:Linux:*:*)
962
echo hppa64-unknown-linux-gnu
804
964
parisc:Linux:*:* | hppa:Linux:*:*)
805
965
# Look for CPU level
806
966
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
808
968
PA8*) echo hppa2.0-unknown-linux-gnu ;;
809
969
*) echo hppa-unknown-linux-gnu ;;
812
parisc64:Linux:*:* | hppa64:Linux:*:*)
813
echo hppa64-unknown-linux-gnu
973
echo powerpc64-unknown-linux-gnu
976
echo powerpc-unknown-linux-gnu
815
978
s390:Linux:*:* | s390x:Linux:*:*)
816
979
echo ${UNAME_MACHINE}-ibm-linux
982
echo ${UNAME_MACHINE}-unknown-linux-gnu
819
985
echo ${UNAME_MACHINE}-unknown-linux-gnu
821
987
sparc:Linux:*:* | sparc64:Linux:*:*)
822
988
echo ${UNAME_MACHINE}-unknown-linux-gnu
991
echo ${UNAME_MACHINE}-unknown-linux-gnu
994
echo ${UNAME_MACHINE}-dec-linux-gnu
824
996
x86_64:Linux:*:*)
825
echo x86_64-unknown-linux-gnu
828
# The BFD linker knows what the default object file format is, so
829
# first see if it will tell us. cd to the root directory to prevent
830
# problems with other programs or directories called `ld' in the path.
831
ld_supported_targets=`cd /; ld --help 2>&1 \
832
| sed -ne '/supported targets:/!d
834
s/.*supported targets: *//
837
case "$ld_supported_targets" in
839
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
842
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
845
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
848
# Either a pre-BFD a.out linker (linux-gnuoldld) or
849
# one that does not give us useful --help.
850
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
853
# Determine whether the default compiler is a.out or elf
854
eval $set_cc_for_build
856
#include <features.h>
858
#include <stdio.h> /* for printf() prototype */
859
int main (int argc, char *argv[]) {
861
int main (argc, argv) int argc; char *argv[]; {
866
printf ("%s-pc-linux-gnu\n", argv[1]);
868
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
871
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
874
printf ("%s-pc-linux-gnuaout\n", argv[1]);
879
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
880
rm -f $dummy.c $dummy
881
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
997
echo ${UNAME_MACHINE}-unknown-linux-gnu
1000
echo ${UNAME_MACHINE}-unknown-linux-gnu
883
1002
i*86:DYNIX/ptx:4*:*)
884
1003
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
885
1004
# earlier versions are messed up and put the nodename in both
886
1005
# sysname and nodename.
887
1006
echo i386-sequent-sysv4
889
1008
i*86:UNIX_SV:4.2MP:2.*)
890
# Unixware is an offshoot of SVR4, but it has its own version
891
# number series starting with 2...
892
# I am not positive that other SVR4 systems won't match this,
1009
# Unixware is an offshoot of SVR4, but it has its own version
1010
# number series starting with 2...
1011
# I am not positive that other SVR4 systems won't match this,
893
1012
# I just have to hope. -- rms.
894
# Use sysv4.2uw... so that sysv4* matches it.
1013
# Use sysv4.2uw... so that sysv4* matches it.
895
1014
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1017
# If we were able to find `uname', then EMX Unix compatibility
1018
# is probably installed.
1019
echo ${UNAME_MACHINE}-pc-os2-emx
1021
i*86:XTS-300:*:STOP)
1022
echo ${UNAME_MACHINE}-unknown-stop
1025
echo ${UNAME_MACHINE}-unknown-atheos
1028
echo ${UNAME_MACHINE}-pc-syllable
1030
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1031
echo i386-unknown-lynxos${UNAME_RELEASE}
1034
echo ${UNAME_MACHINE}-pc-msdosdjgpp
897
1036
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
898
1037
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
899
1038
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
902
1041
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1045
# UnixWare 7.x, OpenUNIX and OpenServer 6.
906
1046
case `/bin/uname -X | grep "^Machine"` in
907
1047
*486*) UNAME_MACHINE=i486 ;;
908
1048
*Pentium) UNAME_MACHINE=i586 ;;
909
1049
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
911
1051
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
914
1054
if test -f /usr/options/cb.name; then
915
1055
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
916
1056
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
917
1057
elif /bin/uname -X 2>/dev/null >/dev/null ; then
918
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
919
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
920
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
1058
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1059
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1060
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
921
1061
&& UNAME_MACHINE=i586
922
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
1062
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
923
1063
&& UNAME_MACHINE=i686
924
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
1064
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
925
1065
&& UNAME_MACHINE=i686
926
1066
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
928
1068
echo ${UNAME_MACHINE}-pc-sysv32
932
echo ${UNAME_MACHINE}-pc-msdosdjgpp
935
1072
# Left here for compatibility:
936
# uname -m prints for DJGPP always 'pc', but it prints nothing about
937
# the processor, so we play safe by assuming i386.
938
echo i386-pc-msdosdjgpp
1073
# uname -m prints for DJGPP always 'pc', but it prints nothing about
1074
# the processor, so we play safe by assuming i586.
1075
# Note: whatever this is, it MUST be the same as what config.sub
1076
# prints for the "djgpp" host, or else GDB configury will decide that
1077
# this is a cross-build.
1078
echo i586-pc-msdosdjgpp
940
1080
Intel:Mach:3*:*)
941
1081
echo i386-pc-mach3
944
1084
echo i860-intel-osf1
946
1086
i860:*:4.*:*) # i860-SVR4
947
1087
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
948
1088
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
949
1089
else # Add other i860-SVR4 vendors below as they are discovered.
950
1090
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
953
1093
mini*:CTIX:SYS*5:*)
955
1095
echo m68010-convergent-sysv
958
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
959
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
1097
mc68k:UNIX:SYSTEM5:3.51m)
1098
echo m68k-convergent-sysv
1103
M68*:*:R3V[5678]*:*)
1104
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1105
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)
961
1107
test -r /etc/.relid \
962
1108
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
963
1109
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
964
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
1110
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
965
1111
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
966
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1112
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
967
1113
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
968
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
969
&& echo i486-ncr-sysv4 && exit 0 ;;
1114
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1115
&& { echo i486-ncr-sysv4; exit; } ;;
1116
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1118
test -r /etc/.relid \
1119
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1120
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1121
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1122
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1123
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1124
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1125
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
970
1126
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
971
1127
echo m68k-unknown-lynxos${UNAME_RELEASE}
973
1129
mc68030:UNIX_System_V:4.*:*)
974
1130
echo m68k-atari-sysv4
976
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
977
echo i386-unknown-lynxos${UNAME_RELEASE}
979
1132
TSUNAMI:LynxOS:2.*:*)
980
1133
echo sparc-unknown-lynxos${UNAME_RELEASE}
982
1135
rs6000:LynxOS:2.*:*)
983
1136
echo rs6000-unknown-lynxos${UNAME_RELEASE}
985
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1138
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
986
1139
echo powerpc-unknown-lynxos${UNAME_RELEASE}
988
1141
SM[BE]S:UNIX_SV:*:*)
989
1142
echo mips-dde-sysv${UNAME_RELEASE}
991
1144
RM*:ReliantUNIX-*:*:*)
992
1145
echo mips-sni-sysv4
994
1147
RM*:SINIX-*:*:*)
995
1148
echo mips-sni-sysv4
998
1151
if uname -p 2>/dev/null >/dev/null ; then
999
1152
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1002
1155
echo ns32k-sni-sysv
1005
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1006
# says <Richard.M.Bartel@ccMail.Census.GOV>
1007
echo i586-unisys-sysv4
1158
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1159
# says <Richard.M.Bartel@ccMail.Census.GOV>
1160
echo i586-unisys-sysv4
1009
1162
*:UNIX_System_V:4*:FTX*)
1010
1163
# From Gerald Hewes <hewes@openmarket.com>.
1011
1164
# How about differentiating between stratus architectures? -djm
1012
1165
echo hppa1.1-stratus-sysv4
1015
1168
# From seanf@swdc.stratus.com.
1016
1169
echo i860-stratus-sysv4
1172
# From Paul.Green@stratus.com.
1173
echo ${UNAME_MACHINE}-stratus-vos
1019
1176
# From Paul.Green@stratus.com.
1020
1177
echo hppa1.1-stratus-vos
1022
1179
mc68*:A/UX:*:*)
1023
1180
echo m68k-apple-aux${UNAME_RELEASE}
1025
1182
news*:NEWS-OS:6*:*)
1026
1183
echo mips-sony-newsos6
1028
1185
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1029
1186
if [ -d /usr/nec ]; then
1030
echo mips-nec-sysv${UNAME_RELEASE}
1187
echo mips-nec-sysv${UNAME_RELEASE}
1032
echo mips-unknown-sysv${UNAME_RELEASE}
1189
echo mips-unknown-sysv${UNAME_RELEASE}
1035
1192
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1036
1193
echo powerpc-be-beos
1038
1195
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1039
1196
echo powerpc-apple-beos
1041
1198
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1042
1199
echo i586-pc-beos
1201
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1044
1204
SX-4:SUPER-UX:*:*)
1045
1205
echo sx4-nec-superux${UNAME_RELEASE}
1047
1207
SX-5:SUPER-UX:*:*)
1048
1208
echo sx5-nec-superux${UNAME_RELEASE}
1211
echo sx6-nec-superux${UNAME_RELEASE}
1214
echo sx7-nec-superux${UNAME_RELEASE}
1217
echo sx8-nec-superux${UNAME_RELEASE}
1220
echo sx8r-nec-superux${UNAME_RELEASE}
1050
1222
Power*:Rhapsody:*:*)
1051
1223
echo powerpc-apple-rhapsody${UNAME_RELEASE}
1053
1225
*:Rhapsody:*:*)
1054
1226
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1057
echo `uname -p`-apple-darwin${UNAME_RELEASE}
1229
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1230
case $UNAME_PROCESSOR in
1232
eval $set_cc_for_build
1233
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1234
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1235
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1236
grep IS_64BIT_ARCH >/dev/null
1238
UNAME_PROCESSOR="x86_64"
1241
unknown) UNAME_PROCESSOR=powerpc ;;
1243
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1059
1245
*:procnto*:*:* | *:QNX:[0123456789]*:*)
1060
if test "${UNAME_MACHINE}" = "x86pc"; then
1246
UNAME_PROCESSOR=`uname -p`
1247
if test "$UNAME_PROCESSOR" = "x86"; then
1248
UNAME_PROCESSOR=i386
1061
1249
UNAME_MACHINE=pc
1063
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
1251
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1066
1254
echo i386-pc-qnx
1068
NSR-[KW]:NONSTOP_KERNEL:*:*)
1256
NEO-?:NONSTOP_KERNEL:*:*)
1257
echo neo-tandem-nsk${UNAME_RELEASE}
1259
NSE-?:NONSTOP_KERNEL:*:*)
1260
echo nse-tandem-nsk${UNAME_RELEASE}
1262
NSR-?:NONSTOP_KERNEL:*:*)
1069
1263
echo nsr-tandem-nsk${UNAME_RELEASE}
1071
1265
*:NonStop-UX:*:*)
1072
1266
echo mips-compaq-nonstopux
1074
1268
BS2000:POSIX*:*:*)
1075
1269
echo bs2000-siemens-sysv
1077
1271
DS/*:UNIX_System_V:*:*)
1078
1272
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1081
1275
# "uname -m" is not consistent, so use $cputype instead. 386
1082
1276
# is converted to i386 for consistency with other x86
1087
1281
UNAME_MACHINE="$cputype"
1089
1283
echo ${UNAME_MACHINE}-unknown-plan9
1092
# If we were able to find `uname', then EMX Unix compatibility
1093
# is probably installed.
1094
echo ${UNAME_MACHINE}-pc-os2-emx
1097
1286
echo pdp10-unknown-tops10
1100
1289
echo pdp10-unknown-tenex
1102
1291
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1103
1292
echo pdp10-dec-tops20
1105
1294
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1106
1295
echo pdp10-xkl-tops20
1109
1298
echo pdp10-unknown-tops20
1112
1301
echo pdp10-unknown-its
1114
i*86:XTS-300:*:STOP)
1115
echo ${UNAME_MACHINE}-unknown-stop
1118
echo ${UNAME_MACHINE}-unknown-atheos
1304
echo mips-sei-seiux${UNAME_RELEASE}
1307
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1310
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1311
case "${UNAME_MACHINE}" in
1312
A*) echo alpha-dec-vms ; exit ;;
1313
I*) echo ia64-dec-vms ; exit ;;
1314
V*) echo vax-dec-vms ; exit ;;
1320
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1323
echo ${UNAME_MACHINE}-pc-rdos
1326
echo ${UNAME_MACHINE}-pc-aros
1328
x86_64:VMkernel:*:*)
1329
echo ${UNAME_MACHINE}-unknown-esx
1122
1333
#echo '(No uname command or uname output not recognized.)' 1>&2