2
2
# Attempt to guess a canonical system name.
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 Free Software Foundation, Inc.
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
4
# Free Software Foundation, Inc.
9
8
# This file is free software; you can redistribute it and/or modify it
10
9
# under the terms of the GNU General Public License as published by
19
18
# You should have received a copy of the GNU General Public License
20
19
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
20
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
22
# As a special exception to the GNU General Public License, if you
25
23
# distribute this file as part of a program that contains a
26
24
# configuration script generated by Autoconf, you may include it under
27
25
# the same distribution terms that you use for the rest of that program.
30
# Originally written by Per Bothner. Please send patches (context
31
# diff format) to <config-patches@gnu.org> and include a ChangeLog
27
# Written by Per Bothner <bothner@cygnus.com>.
28
# Please send patches to <config-patches@gnu.org>.
34
30
# This script attempts to guess a canonical system name similar to
35
31
# config.sub. If it succeeds, it prints the system name on stdout, and
36
32
# exits with 0. Otherwise, it exits with 1.
38
# You can get the latest version of this script from:
39
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
34
# The plan is that this can be called by configure scripts if you
35
# don't specify an explicit build system type.
41
37
me=`echo "$0" | sed -e 's,.*/,,'`
56
52
GNU config.guess ($timestamp)
58
54
Originally written by Per Bothner.
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
60
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
61
Software Foundation, Inc.
55
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
56
Free Software Foundation, Inc.
63
58
This is free software; see the source for copying conditions. There is NO
64
59
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
97
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
98
# compiler to aid in system detection is discouraged as it requires
99
# temporary files to be created and, as you can see below, it is a
100
# headache to deal with in a portable fashion.
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.
102
95
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
103
96
# use `HOST_CC' if defined, but it is deprecated.
105
# Portable tmp directory creation inspired by the Autoconf team.
108
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
109
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
111
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
112
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
113
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
114
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
116
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
117
case $CC_FOR_BUILD,$HOST_CC,$CC in
118
,,) echo "int x;" > $dummy.c ;
119
for c in cc gcc c89 c99 ; do
120
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
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
121
103
CC_FOR_BUILD="$c"; break ;
106
rm -f $dummy.c $dummy.o $dummy.rel ;
124
107
if test x"$CC_FOR_BUILD" = x ; then
125
108
CC_FOR_BUILD=no_compiler_found ;
128
111
,,*) CC_FOR_BUILD=$CC ;;
129
112
,*,*) CC_FOR_BUILD=$HOST_CC ;;
130
esac ; set_cc_for_build= ;'
132
115
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
133
116
# (ghazi@noc.rutgers.edu 1994-08-24)
145
128
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
147
# NetBSD (nbsd) targets should (where applicable) match one or
130
# Netbsd (nbsd) targets should (where applicable) match one or
148
131
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
149
132
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
150
133
# switched to ELF, *-*-netbsd* would select the old
151
134
# object file format. This provides both forward
152
135
# compatibility and a consistent mechanism for selecting the
153
136
# object file format.
155
# Note: NetBSD doesn't particularly care about the vendor
156
# portion of the name. We always set it to "unknown".
157
sysctl="sysctl -n hw.machine_arch"
158
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
159
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
160
case "${UNAME_MACHINE_ARCH}" in
161
armeb) machine=armeb-unknown ;;
162
arm*) machine=arm-unknown ;;
163
sh3el) machine=shl-unknown ;;
164
sh3eb) machine=sh-unknown ;;
165
sh5el) machine=sh5le-unknown ;;
166
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
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 ;;
168
149
# The Operating System including object format, if it has switched
169
150
# to ELF recently, or will in the future.
170
case "${UNAME_MACHINE_ARCH}" in
171
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
151
case "${UNAME_MACHINE}" in
152
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
172
153
eval $set_cc_for_build
173
154
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
155
| grep __ELF__ >/dev/null
176
157
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
177
158
# Return netbsd for either. FIX?
188
# Debian GNU/NetBSD machines have a different userland, and
189
# thus, need a distinct triplet. However, they do not need
190
# kernel version information, so it can be replaced with a
191
# suitable tag, in the style of linux-gnu.
192
case "${UNAME_VERSION}" in
197
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
169
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
200
170
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
201
171
# contains redundant information, the shorter form:
202
172
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203
173
echo "${machine}-${os}${release}"
206
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
207
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
210
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
213
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
216
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
219
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
222
case $UNAME_RELEASE in
176
if test $UNAME_RELEASE = "V4.0"; then
224
177
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
227
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
230
# According to Compaq, /usr/sbin/psrinfo has been available on
231
# OSF/1 and Tru64 systems produced since 1995. I hope that
232
# covers most systems running today. This code pipes the CPU
233
# types through head -n 1, so we only detect the type of CPU 0.
234
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
235
case "$ALPHA_CPU_TYPE" in
237
UNAME_MACHINE="alpha" ;;
239
UNAME_MACHINE="alpha" ;;
240
"LCA4 (21066/21068)")
241
UNAME_MACHINE="alpha" ;;
243
UNAME_MACHINE="alphaev5" ;;
245
UNAME_MACHINE="alphaev56" ;;
247
UNAME_MACHINE="alphapca56" ;;
249
UNAME_MACHINE="alphapca57" ;;
251
UNAME_MACHINE="alphaev6" ;;
253
UNAME_MACHINE="alphaev67" ;;
255
UNAME_MACHINE="alphaev68" ;;
257
UNAME_MACHINE="alphaev68" ;;
259
UNAME_MACHINE="alphaev68" ;;
260
"EV6.9A (21264/EV69A)")
261
UNAME_MACHINE="alphaev69" ;;
263
UNAME_MACHINE="alphaev7" ;;
265
UNAME_MACHINE="alphaev79" ;;
267
# A Pn.n version is a patched version.
268
179
# A Vn.n version is a released version.
269
180
# A Tn.n version is a released field test version.
270
181
# A Xn.n version is an unreleased experimental baselevel.
271
182
# 1.2 uses "1.2" for uname -r.
272
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
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'`
277
238
Alpha\ *:Windows_NT*:*)
278
239
# How do we know it's Interix rather than the generic POSIX subsystem?
279
240
# Should we change UNAME_MACHINE based on the output of uname instead
280
241
# of the specific Alpha model?
281
242
echo alpha-pc-interix
283
244
21064:Windows_NT:50:3)
284
245
echo alpha-dec-winnt3.5
286
247
Amiga*:UNIX_System_V:4.0:*)
287
248
echo m68k-unknown-sysv4
251
echo m68k-unknown-openbsd${UNAME_RELEASE}
289
253
*:[Aa]miga[Oo][Ss]:*:*)
290
254
echo ${UNAME_MACHINE}-unknown-amigaos
292
*:[Mm]orph[Oo][Ss]:*:*)
293
echo ${UNAME_MACHINE}-unknown-morphos
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}
296
275
echo i370-ibm-openedition
302
echo powerpc-ibm-os400
304
277
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
305
278
echo arm-acorn-riscix${UNAME_RELEASE}
307
arm:riscos:*:*|arm:RISCOS:*:*)
308
echo arm-unknown-riscos
310
280
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
311
281
echo hppa1.1-hitachi-hiuxmpp
313
283
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
314
284
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
315
285
if test "`(/bin/universe) 2>/dev/null`" = att ; then
318
288
echo pyramid-pyramid-bsd
322
292
echo pyramid-pyramid-svr4
324
DRS?6000:unix:4.0:6*)
327
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
328
case `/usr/bin/uname -p` in
329
sparc) echo sparc-icl-nx7; exit ;;
332
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334
294
sun4H:SunOS:5.*:*)
335
295
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
337
297
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
338
298
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
340
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
341
echo i386-pc-auroraux${UNAME_RELEASE}
343
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
344
eval $set_cc_for_build
346
# If there is a compiler, see if it is configured for 64-bit objects.
347
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
348
# This test works for both compilers.
349
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
350
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
351
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
352
grep IS_64BIT_ARCH >/dev/null
357
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
301
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
359
303
sun4*:SunOS:6*:*)
360
304
# According to config.sub, this is the proper way to canonicalize
361
305
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
362
306
# it's likely to be more like Solaris than SunOS4.
363
307
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
366
310
case "`/usr/bin/arch -k`" in
398
348
# MiNT. But MiNT is downward compatible to TOS, so this should
400
350
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
401
echo m68k-atari-mint${UNAME_RELEASE}
351
echo m68k-atari-mint${UNAME_RELEASE}
403
353
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
404
354
echo m68k-atari-mint${UNAME_RELEASE}
406
356
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
407
echo m68k-atari-mint${UNAME_RELEASE}
357
echo m68k-atari-mint${UNAME_RELEASE}
409
359
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
410
echo m68k-milan-mint${UNAME_RELEASE}
360
echo m68k-milan-mint${UNAME_RELEASE}
412
362
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
413
echo m68k-hades-mint${UNAME_RELEASE}
363
echo m68k-hades-mint${UNAME_RELEASE}
415
365
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
416
echo m68k-unknown-mint${UNAME_RELEASE}
419
echo m68k-apple-machten${UNAME_RELEASE}
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}
421
380
powerpc:machten:*:*)
422
381
echo powerpc-apple-machten${UNAME_RELEASE}
425
384
echo mips-dec-mach_bsd4.3
427
386
RISC*:ULTRIX:*:*)
428
387
echo mips-dec-ultrix${UNAME_RELEASE}
430
389
VAX*:ULTRIX*:*:*)
431
390
echo vax-dec-ultrix${UNAME_RELEASE}
433
392
2020:CLIX:*:* | 2430:CLIX:*:*)
434
393
echo clipper-intergraph-clix${UNAME_RELEASE}
436
395
mips:*:*:UMIPS | mips:*:*:RISCos)
437
396
eval $set_cc_for_build
438
397
sed 's/^ //' << EOF >$dummy.c
459
$CC_FOR_BUILD -o $dummy $dummy.c &&
460
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
461
SYSTEM_NAME=`$dummy $dummyarg` &&
462
{ echo "$SYSTEM_NAME"; exit; }
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
463
422
echo mips-mips-riscos${UNAME_RELEASE}
465
424
Motorola:PowerMAX_OS:*:*)
466
425
echo powerpc-motorola-powermax
468
Motorola:*:4.3:PL8-*)
469
echo powerpc-harris-powermax
471
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
472
echo powerpc-harris-powermax
474
427
Night_Hawk:Power_UNIX:*:*)
475
428
echo powerpc-harris-powerunix
478
431
echo m88k-harris-cxux7
481
434
echo m88k-motorola-sysv4
484
437
echo m88k-motorola-sysv3
487
# DG/UX returns AViiON for all architectures
488
UNAME_PROCESSOR=`/usr/bin/uname -p`
440
# DG/UX returns AViiON for all architectures
441
UNAME_PROCESSOR=`/usr/bin/uname -p`
489
442
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
491
444
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
568
518
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
570
520
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
573
523
echo rs6000-ibm-aix
575
525
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
576
526
echo romp-ibm-bsd4.4
578
528
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
579
529
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
580
exit ;; # report: romp-ibm BSD 4.3
530
exit 0 ;; # report: romp-ibm BSD 4.3
582
532
echo rs6000-bull-bosx
584
534
DPX/2?00:B.O.S.:*:*)
585
535
echo m68k-bull-sysv3
587
537
9000/[34]??:4.3bsd:1.*:*)
590
540
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
591
541
echo m68k-hp-bsd4.4
593
543
9000/[34678]??:HP-UX:*:*)
594
544
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
595
545
case "${UNAME_MACHINE}" in
596
546
9000/31? ) HP_ARCH=m68000 ;;
597
547
9000/[34]?? ) HP_ARCH=m68k ;;
598
548
9000/[678][0-9][0-9])
599
if [ -x /usr/bin/getconf ]; then
600
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
601
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
602
case "${sc_cpu_version}" in
603
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
604
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
605
532) # CPU_PA_RISC2_0
606
case "${sc_kernel_bits}" in
607
32) HP_ARCH="hppa2.0n" ;;
608
64) HP_ARCH="hppa2.0w" ;;
609
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
613
if [ "${HP_ARCH}" = "" ]; then
614
eval $set_cc_for_build
615
sed 's/^ //' << EOF >$dummy.c
623
#if defined(_SC_KERNEL_BITS)
624
long bits = sysconf(_SC_KERNEL_BITS);
626
long cpu = sysconf (_SC_CPU_VERSION);
630
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
631
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
633
#if defined(_SC_KERNEL_BITS)
636
case 64: puts ("hppa2.0w"); break;
637
case 32: puts ("hppa2.0n"); break;
638
default: puts ("hppa2.0"); break;
640
#else /* !defined(_SC_KERNEL_BITS) */
641
puts ("hppa2.0"); break;
643
default: puts ("hppa1.0"); break;
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;
648
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
649
test -z "$HP_ARCH" && HP_ARCH=hppa
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
652
if [ ${HP_ARCH} = "hppa2.0w" ]
654
eval $set_cc_for_build
656
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
657
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
658
# generating 64-bit code. GNU and HP use different nomenclature:
660
# $ CC_FOR_BUILD=cc ./config.guess
661
# => hppa2.0w-hp-hpux11.23
662
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
663
# => hppa64-hp-hpux11.23
665
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
673
605
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
676
608
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
677
609
echo ia64-hp-hpux${HPUX_REV}
680
612
eval $set_cc_for_build
681
613
sed 's/^ //' << EOF >$dummy.c
706
$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
707
{ echo "$SYSTEM_NAME"; exit; }
638
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
639
rm -f $dummy.c $dummy
708
640
echo unknown-hitachi-hiuxwe2
710
642
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
711
643
echo hppa1.1-hp-bsd
713
645
9000/8??:4.3bsd:*:*)
714
646
echo hppa1.0-hp-bsd
716
648
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
717
649
echo hppa1.0-hp-mpeix
719
651
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
720
652
echo hppa1.1-hp-osf
723
655
echo hppa1.0-hp-osf
726
658
if [ -x /usr/sbin/sysversion ] ; then
727
659
echo ${UNAME_MACHINE}-unknown-osf1mk
729
661
echo ${UNAME_MACHINE}-unknown-osf1
732
664
parisc*:Lites*:*:*)
733
665
echo hppa1.1-hp-lites
668
echo hppa-unknown-openbsd
735
670
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
736
671
echo c1-convex-bsd
738
673
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
739
674
if getsysinfo -f scalar_acc
740
675
then echo c32-convex-bsd
741
676
else echo c2-convex-bsd
744
679
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
745
680
echo c34-convex-bsd
747
682
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
748
683
echo c38-convex-bsd
750
685
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
751
686
echo c4-convex-bsd
754
692
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
756
694
CRAY*[A-Z]90:*:*:*)
757
695
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
758
696
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
759
697
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
760
698
-e 's/\.[^.]*$/.X/'
763
701
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
704
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
766
707
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
769
710
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
772
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
713
echo cray2-cray-unicos
774
715
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
775
716
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
776
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
777
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
778
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
780
5000:UNIX_System_V:4.*:*)
781
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
782
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
783
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
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}
785
724
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
786
725
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
788
727
sparc*:BSD/OS:*:*)
789
728
echo sparc-unknown-bsdi${UNAME_RELEASE}
792
731
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
795
case ${UNAME_MACHINE} in
797
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
801
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
734
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
737
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
805
740
echo ${UNAME_MACHINE}-pc-cygwin
808
743
echo ${UNAME_MACHINE}-pc-mingw32
811
# uname -m includes "-pc" on this system.
812
echo ${UNAME_MACHINE}-mingw32
815
746
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
835
748
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
836
749
# How do we know it's Interix rather than the generic POSIX subsystem?
837
750
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
838
751
# UNAME_MACHINE based on the output of uname instead of i386?
842
755
echo ${UNAME_MACHINE}-pc-uwin
844
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
845
echo x86_64-unknown-cygwin
848
758
echo powerpcle-unknown-cygwin
850
760
prep*:SunOS:5.*:*)
851
761
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
855
764
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
862
767
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
791
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
866
792
EV5) UNAME_MACHINE=alphaev5 ;;
870
796
EV6) UNAME_MACHINE=alphaev6 ;;
871
797
EV67) UNAME_MACHINE=alphaev67 ;;
872
798
EV68*) UNAME_MACHINE=alphaev68 ;;
874
objdump --private-headers /bin/sh | grep -q ld.so.1
800
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
875
801
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
876
802
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
879
eval $set_cc_for_build
880
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
881
| grep -q __ARM_EABI__
883
echo ${UNAME_MACHINE}-unknown-linux-gnu
885
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
886
| grep -q __ARM_PCS_VFP
888
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
890
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
895
echo ${UNAME_MACHINE}-unknown-linux-gnu
898
echo cris-axis-linux-gnu
901
echo crisv32-axis-linux-gnu
904
echo frv-unknown-linux-gnu
908
eval $set_cc_for_build
909
sed 's/^ //' << EOF >$dummy.c
914
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
915
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
918
echo ${UNAME_MACHINE}-unknown-linux-gnu
921
echo ${UNAME_MACHINE}-unknown-linux-gnu
924
echo ${UNAME_MACHINE}-unknown-linux-gnu
926
mips:Linux:*:* | mips64:Linux:*:*)
927
eval $set_cc_for_build
928
sed 's/^ //' << EOF >$dummy.c
930
#undef ${UNAME_MACHINE}
931
#undef ${UNAME_MACHINE}el
932
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
933
CPU=${UNAME_MACHINE}el
935
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
942
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
943
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
946
echo or32-unknown-linux-gnu
949
echo sparc-unknown-linux-gnu
951
parisc64:Linux:*:* | hppa64:Linux:*:*)
952
echo hppa64-unknown-linux-gnu
954
804
parisc:Linux:*:* | hppa:Linux:*:*)
955
805
# Look for CPU level
956
806
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
958
808
PA8*) echo hppa2.0-unknown-linux-gnu ;;
959
809
*) echo hppa-unknown-linux-gnu ;;
963
echo powerpc64-unknown-linux-gnu
966
echo powerpc-unknown-linux-gnu
812
parisc64:Linux:*:* | hppa64:Linux:*:*)
813
echo hppa64-unknown-linux-gnu
968
815
s390:Linux:*:* | s390x:Linux:*:*)
969
816
echo ${UNAME_MACHINE}-ibm-linux
972
echo ${UNAME_MACHINE}-unknown-linux-gnu
975
819
echo ${UNAME_MACHINE}-unknown-linux-gnu
977
821
sparc:Linux:*:* | sparc64:Linux:*:*)
978
822
echo ${UNAME_MACHINE}-unknown-linux-gnu
981
echo ${UNAME_MACHINE}-tilera-linux-gnu
984
echo ${UNAME_MACHINE}-dec-linux-gnu
986
824
x86_64:Linux:*:*)
987
825
echo x86_64-unknown-linux-gnu
990
echo ${UNAME_MACHINE}-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
992
883
i*86:DYNIX/ptx:4*:*)
993
884
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
994
885
# earlier versions are messed up and put the nodename in both
995
886
# sysname and nodename.
996
887
echo i386-sequent-sysv4
998
889
i*86:UNIX_SV:4.2MP:2.*)
999
# Unixware is an offshoot of SVR4, but it has its own version
1000
# number series starting with 2...
1001
# I am not positive that other SVR4 systems won't match this,
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,
1002
893
# I just have to hope. -- rms.
1003
# Use sysv4.2uw... so that sysv4* matches it.
894
# Use sysv4.2uw... so that sysv4* matches it.
1004
895
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1007
# If we were able to find `uname', then EMX Unix compatibility
1008
# is probably installed.
1009
echo ${UNAME_MACHINE}-pc-os2-emx
1011
i*86:XTS-300:*:STOP)
1012
echo ${UNAME_MACHINE}-unknown-stop
1015
echo ${UNAME_MACHINE}-unknown-atheos
1018
echo ${UNAME_MACHINE}-pc-syllable
1020
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1021
echo i386-unknown-lynxos${UNAME_RELEASE}
1024
echo ${UNAME_MACHINE}-pc-msdosdjgpp
1026
897
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1027
898
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1028
899
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1031
902
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1035
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1036
906
case `/bin/uname -X | grep "^Machine"` in
1037
907
*486*) UNAME_MACHINE=i486 ;;
1038
908
*Pentium) UNAME_MACHINE=i586 ;;
1039
909
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1041
911
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1044
914
if test -f /usr/options/cb.name; then
1045
915
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1046
916
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1047
917
elif /bin/uname -X 2>/dev/null >/dev/null ; then
1048
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1049
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1050
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
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) \
1051
921
&& UNAME_MACHINE=i586
1052
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
922
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
1053
923
&& UNAME_MACHINE=i686
1054
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
924
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
1055
925
&& UNAME_MACHINE=i686
1056
926
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1058
928
echo ${UNAME_MACHINE}-pc-sysv32
932
echo ${UNAME_MACHINE}-pc-msdosdjgpp
1062
935
# Left here for compatibility:
1063
# uname -m prints for DJGPP always 'pc', but it prints nothing about
1064
# the processor, so we play safe by assuming i586.
1065
# Note: whatever this is, it MUST be the same as what config.sub
1066
# prints for the "djgpp" host, or else GDB configury will decide that
1067
# this is a cross-build.
1068
echo i586-pc-msdosdjgpp
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
1070
940
Intel:Mach:3*:*)
1071
941
echo i386-pc-mach3
1074
944
echo i860-intel-osf1
1076
946
i860:*:4.*:*) # i860-SVR4
1077
947
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1078
948
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1079
949
else # Add other i860-SVR4 vendors below as they are discovered.
1080
950
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1083
953
mini*:CTIX:SYS*5:*)
1085
955
echo m68010-convergent-sysv
1087
mc68k:UNIX:SYSTEM5:3.51m)
1088
echo m68k-convergent-sysv
1093
M68*:*:R3V[5678]*:*)
1094
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1095
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)
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
961
test -r /etc/.relid \
1098
962
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1099
963
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1100
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
964
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
1101
965
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1102
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
966
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1103
967
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1104
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1105
&& { echo i486-ncr-sysv4; exit; } ;;
1106
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1108
test -r /etc/.relid \
1109
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1110
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1111
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1112
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1113
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1114
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1115
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
968
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
969
&& echo i486-ncr-sysv4 && exit 0 ;;
1116
970
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1117
971
echo m68k-unknown-lynxos${UNAME_RELEASE}
1119
973
mc68030:UNIX_System_V:4.*:*)
1120
974
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}
1122
979
TSUNAMI:LynxOS:2.*:*)
1123
980
echo sparc-unknown-lynxos${UNAME_RELEASE}
1125
982
rs6000:LynxOS:2.*:*)
1126
983
echo rs6000-unknown-lynxos${UNAME_RELEASE}
1128
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
985
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1129
986
echo powerpc-unknown-lynxos${UNAME_RELEASE}
1131
988
SM[BE]S:UNIX_SV:*:*)
1132
989
echo mips-dde-sysv${UNAME_RELEASE}
1134
991
RM*:ReliantUNIX-*:*:*)
1135
992
echo mips-sni-sysv4
1137
994
RM*:SINIX-*:*:*)
1138
995
echo mips-sni-sysv4
1141
998
if uname -p 2>/dev/null >/dev/null ; then
1142
999
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1145
1002
echo ns32k-sni-sysv
1148
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1149
# says <Richard.M.Bartel@ccMail.Census.GOV>
1150
echo i586-unisys-sysv4
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
1152
1009
*:UNIX_System_V:4*:FTX*)
1153
1010
# From Gerald Hewes <hewes@openmarket.com>.
1154
1011
# How about differentiating between stratus architectures? -djm
1155
1012
echo hppa1.1-stratus-sysv4
1158
1015
# From seanf@swdc.stratus.com.
1159
1016
echo i860-stratus-sysv4
1162
# From Paul.Green@stratus.com.
1163
echo ${UNAME_MACHINE}-stratus-vos
1166
1019
# From Paul.Green@stratus.com.
1167
1020
echo hppa1.1-stratus-vos
1169
1022
mc68*:A/UX:*:*)
1170
1023
echo m68k-apple-aux${UNAME_RELEASE}
1172
1025
news*:NEWS-OS:6*:*)
1173
1026
echo mips-sony-newsos6
1175
1028
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1176
1029
if [ -d /usr/nec ]; then
1177
echo mips-nec-sysv${UNAME_RELEASE}
1030
echo mips-nec-sysv${UNAME_RELEASE}
1179
echo mips-unknown-sysv${UNAME_RELEASE}
1032
echo mips-unknown-sysv${UNAME_RELEASE}
1182
1035
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1183
1036
echo powerpc-be-beos
1185
1038
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1186
1039
echo powerpc-apple-beos
1188
1041
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1189
1042
echo i586-pc-beos
1191
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1194
1044
SX-4:SUPER-UX:*:*)
1195
1045
echo sx4-nec-superux${UNAME_RELEASE}
1197
1047
SX-5:SUPER-UX:*:*)
1198
1048
echo sx5-nec-superux${UNAME_RELEASE}
1201
echo sx6-nec-superux${UNAME_RELEASE}
1204
echo sx7-nec-superux${UNAME_RELEASE}
1207
echo sx8-nec-superux${UNAME_RELEASE}
1210
echo sx8r-nec-superux${UNAME_RELEASE}
1212
1050
Power*:Rhapsody:*:*)
1213
1051
echo powerpc-apple-rhapsody${UNAME_RELEASE}
1215
1053
*:Rhapsody:*:*)
1216
1054
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1219
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1220
case $UNAME_PROCESSOR in
1222
eval $set_cc_for_build
1223
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1224
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1225
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1226
grep IS_64BIT_ARCH >/dev/null
1228
UNAME_PROCESSOR="x86_64"
1231
unknown) UNAME_PROCESSOR=powerpc ;;
1233
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1057
echo `uname -p`-apple-darwin${UNAME_RELEASE}
1235
1059
*:procnto*:*:* | *:QNX:[0123456789]*:*)
1236
UNAME_PROCESSOR=`uname -p`
1237
if test "$UNAME_PROCESSOR" = "x86"; then
1238
UNAME_PROCESSOR=i386
1060
if test "${UNAME_MACHINE}" = "x86pc"; then
1239
1061
UNAME_MACHINE=pc
1241
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1063
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
1244
1066
echo i386-pc-qnx
1246
NEO-?:NONSTOP_KERNEL:*:*)
1247
echo neo-tandem-nsk${UNAME_RELEASE}
1249
NSE-?:NONSTOP_KERNEL:*:*)
1250
echo nse-tandem-nsk${UNAME_RELEASE}
1252
NSR-?:NONSTOP_KERNEL:*:*)
1068
NSR-[KW]:NONSTOP_KERNEL:*:*)
1253
1069
echo nsr-tandem-nsk${UNAME_RELEASE}
1255
1071
*:NonStop-UX:*:*)
1256
1072
echo mips-compaq-nonstopux
1258
1074
BS2000:POSIX*:*:*)
1259
1075
echo bs2000-siemens-sysv
1261
1077
DS/*:UNIX_System_V:*:*)
1262
1078
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1265
1081
# "uname -m" is not consistent, so use $cputype instead. 386
1266
1082
# is converted to i386 for consistency with other x86
1271
1087
UNAME_MACHINE="$cputype"
1273
1089
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
1276
1097
echo pdp10-unknown-tops10
1279
1100
echo pdp10-unknown-tenex
1281
1102
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1282
1103
echo pdp10-dec-tops20
1284
1105
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1285
1106
echo pdp10-xkl-tops20
1288
1109
echo pdp10-unknown-tops20
1291
1112
echo pdp10-unknown-its
1294
echo mips-sei-seiux${UNAME_RELEASE}
1297
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1300
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1301
case "${UNAME_MACHINE}" in
1302
A*) echo alpha-dec-vms ; exit ;;
1303
I*) echo ia64-dec-vms ; exit ;;
1304
V*) echo vax-dec-vms ; exit ;;
1310
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1313
echo ${UNAME_MACHINE}-pc-rdos
1316
echo ${UNAME_MACHINE}-pc-aros
1114
i*86:XTS-300:*:STOP)
1115
echo ${UNAME_MACHINE}-unknown-stop
1118
echo ${UNAME_MACHINE}-unknown-atheos
1320
1122
#echo '(No uname command or uname output not recognized.)' 1>&2