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
5
# Free Software Foundation, Inc.
3
# Copyright 1992-2018 Free Software Foundation, Inc.
9
7
# This file is free software; you can redistribute it and/or modify it
10
8
# under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 2 of the License, or
9
# the Free Software Foundation; either version 3 of the License, or
12
10
# (at your option) any later version.
14
12
# This program is distributed in the hope that it will be useful, but
17
15
# General Public License for more details.
19
17
# You should have received a copy of the GNU General Public License
20
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
18
# along with this program; if not, see <https://www.gnu.org/licenses/>.
24
20
# As a special exception to the GNU General Public License, if you
25
21
# distribute this file as part of a program that contains a
26
22
# configuration script generated by Autoconf, you may include it under
27
# 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
23
# the same distribution terms that you use for the rest of that
24
# program. This Exception is an additional permission under section 7
25
# of the GNU General Public License, version 3 ("GPLv3").
34
# This script attempts to guess a canonical system name similar to
35
# config.sub. If it succeeds, it prints the system name on stdout, and
36
# exits with 0. Otherwise, it exits with 1.
27
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
38
29
# 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
30
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
32
# Please send patches to <config-patches@gnu.org>.
41
35
me=`echo "$0" | sed -e 's,.*/,,'`
139
132
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140
133
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
135
case "$UNAME_SYSTEM" in
137
# If the system lacks a compiler, then just pick glibc.
138
# We could probably try harder.
141
eval "$set_cc_for_build"
142
cat <<-EOF > "$dummy.c"
143
#include <features.h>
144
#if defined(__UCLIBC__)
146
#elif defined(__dietlibc__)
152
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
154
# If ldd exists, use it to detect musl libc.
155
if command -v ldd >/dev/null && \
156
ldd --version 2>&1 | grep -q ^musl
142
163
# Note: order is significant - the case branches are not exclusive.
144
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
165
case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
146
167
# NetBSD (nbsd) targets should (where applicable) match one or
147
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
168
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
148
169
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149
170
# switched to ELF, *-*-netbsd* would select the old
150
171
# object file format. This provides both forward
154
175
# Note: NetBSD doesn't particularly care about the vendor
155
176
# portion of the name. We always set it to "unknown".
156
177
sysctl="sysctl -n hw.machine_arch"
157
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
158
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
159
case "${UNAME_MACHINE_ARCH}" in
178
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
179
"/sbin/$sysctl" 2>/dev/null || \
180
"/usr/sbin/$sysctl" 2>/dev/null || \
182
case "$UNAME_MACHINE_ARCH" in
160
183
armeb) machine=armeb-unknown ;;
161
184
arm*) machine=arm-unknown ;;
162
185
sh3el) machine=shl-unknown ;;
163
186
sh3eb) machine=sh-unknown ;;
164
187
sh5el) machine=sh5le-unknown ;;
165
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
189
arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
190
endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
191
machine="${arch}${endian}"-unknown
193
*) machine="$UNAME_MACHINE_ARCH"-unknown ;;
167
195
# The Operating System including object format, if it has switched
168
# to ELF recently, or will in the future.
169
case "${UNAME_MACHINE_ARCH}" in
196
# to ELF recently (or will in the future) and ABI.
197
case "$UNAME_MACHINE_ARCH" in
170
201
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171
eval $set_cc_for_build
202
eval "$set_cc_for_build"
172
203
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173
204
| grep -q __ELF__
188
226
# thus, need a distinct triplet. However, they do not need
189
227
# kernel version information, so it can be replaced with a
190
228
# suitable tag, in the style of linux-gnu.
191
case "${UNAME_VERSION}" in
229
case "$UNAME_VERSION" in
196
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
234
release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
199
237
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200
238
# contains redundant information, the shorter form:
201
239
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202
echo "${machine}-${os}${release}"
240
echo "$machine-${os}${release}${abi-}"
243
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
244
echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
205
247
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
248
echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
251
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
252
echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
255
echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
209
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
258
echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
212
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
261
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
214
263
macppc:MirBSD:*:*)
215
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
264
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
218
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
267
echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
270
echo "$UNAME_MACHINE"-unknown-sortix
273
echo "$UNAME_MACHINE"-unknown-redox
221
279
case $UNAME_RELEASE in
223
281
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
226
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
284
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
229
287
# According to Compaq, /usr/sbin/psrinfo has been available on
233
291
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234
292
case "$ALPHA_CPU_TYPE" in
236
UNAME_MACHINE="alpha" ;;
294
UNAME_MACHINE=alpha ;;
238
UNAME_MACHINE="alpha" ;;
296
UNAME_MACHINE=alpha ;;
239
297
"LCA4 (21066/21068)")
240
UNAME_MACHINE="alpha" ;;
298
UNAME_MACHINE=alpha ;;
242
UNAME_MACHINE="alphaev5" ;;
300
UNAME_MACHINE=alphaev5 ;;
243
301
"EV5.6 (21164A)")
244
UNAME_MACHINE="alphaev56" ;;
302
UNAME_MACHINE=alphaev56 ;;
245
303
"EV5.6 (21164PC)")
246
UNAME_MACHINE="alphapca56" ;;
304
UNAME_MACHINE=alphapca56 ;;
247
305
"EV5.7 (21164PC)")
248
UNAME_MACHINE="alphapca57" ;;
306
UNAME_MACHINE=alphapca57 ;;
250
UNAME_MACHINE="alphaev6" ;;
308
UNAME_MACHINE=alphaev6 ;;
251
309
"EV6.7 (21264A)")
252
UNAME_MACHINE="alphaev67" ;;
310
UNAME_MACHINE=alphaev67 ;;
253
311
"EV6.8CB (21264C)")
254
UNAME_MACHINE="alphaev68" ;;
312
UNAME_MACHINE=alphaev68 ;;
255
313
"EV6.8AL (21264B)")
256
UNAME_MACHINE="alphaev68" ;;
314
UNAME_MACHINE=alphaev68 ;;
257
315
"EV6.8CX (21264D)")
258
UNAME_MACHINE="alphaev68" ;;
316
UNAME_MACHINE=alphaev68 ;;
259
317
"EV6.9A (21264/EV69A)")
260
UNAME_MACHINE="alphaev69" ;;
318
UNAME_MACHINE=alphaev69 ;;
262
UNAME_MACHINE="alphaev7" ;;
320
UNAME_MACHINE=alphaev7 ;;
263
321
"EV7.9 (21364A)")
264
UNAME_MACHINE="alphaev79" ;;
322
UNAME_MACHINE=alphaev79 ;;
266
324
# A Pn.n version is a patched version.
267
325
# A Vn.n version is a released version.
268
326
# A Tn.n version is a released field test version.
269
327
# A Xn.n version is an unreleased experimental baselevel.
270
328
# 1.2 uses "1.2" for uname -r.
271
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273
Alpha\ *:Windows_NT*:*)
274
# How do we know it's Interix rather than the generic POSIX subsystem?
275
# Should we change UNAME_MACHINE based on the output of uname instead
276
# of the specific Alpha model?
277
echo alpha-pc-interix
279
21064:Windows_NT:50:3)
280
echo alpha-dec-winnt3.5
329
echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
330
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
282
334
Amiga*:UNIX_System_V:4.0:*)
283
335
echo m68k-unknown-sysv4
285
337
*:[Aa]miga[Oo][Ss]:*:*)
286
echo ${UNAME_MACHINE}-unknown-amigaos
338
echo "$UNAME_MACHINE"-unknown-amigaos
288
340
*:[Mm]orph[Oo][Ss]:*:*)
289
echo ${UNAME_MACHINE}-unknown-morphos
341
echo "$UNAME_MACHINE"-unknown-morphos
292
344
echo i370-ibm-openedition
325
377
sparc) echo sparc-icl-nx7; exit ;;
328
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
380
echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
330
382
sun4H:SunOS:5.*:*)
331
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
383
echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
333
385
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
334
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
386
echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
336
388
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
337
echo i386-pc-auroraux${UNAME_RELEASE}
389
echo i386-pc-auroraux"$UNAME_RELEASE"
339
391
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
340
eval $set_cc_for_build
392
eval "$set_cc_for_build"
342
394
# If there is a compiler, see if it is configured for 64-bit objects.
343
395
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
344
396
# This test works for both compilers.
345
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
397
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
346
398
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
347
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
399
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
348
400
grep IS_64BIT_ARCH >/dev/null
353
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
405
echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
355
407
sun4*:SunOS:6*:*)
356
408
# According to config.sub, this is the proper way to canonicalize
357
409
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
358
410
# it's likely to be more like Solaris than SunOS4.
359
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
411
echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
362
414
case "`/usr/bin/arch -k`" in
367
419
# Japanese Language versions have a version number like `4.1.3-JL'.
368
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
420
echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
371
echo m68k-sun-sunos${UNAME_RELEASE}
423
echo m68k-sun-sunos"$UNAME_RELEASE"
374
426
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
375
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
427
test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
376
428
case "`/bin/arch`" in
378
echo m68k-sun-sunos${UNAME_RELEASE}
430
echo m68k-sun-sunos"$UNAME_RELEASE"
381
echo sparc-sun-sunos${UNAME_RELEASE}
433
echo sparc-sun-sunos"$UNAME_RELEASE"
386
echo sparc-auspex-sunos${UNAME_RELEASE}
438
echo sparc-auspex-sunos"$UNAME_RELEASE"
388
440
# The situation for MiNT is a little confusing. The machine name
389
441
# can be virtually everything (everything which is not
394
446
# MiNT. But MiNT is downward compatible to TOS, so this should
396
448
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
397
echo m68k-atari-mint${UNAME_RELEASE}
449
echo m68k-atari-mint"$UNAME_RELEASE"
399
451
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
400
echo m68k-atari-mint${UNAME_RELEASE}
452
echo m68k-atari-mint"$UNAME_RELEASE"
402
454
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
403
echo m68k-atari-mint${UNAME_RELEASE}
455
echo m68k-atari-mint"$UNAME_RELEASE"
405
457
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
406
echo m68k-milan-mint${UNAME_RELEASE}
458
echo m68k-milan-mint"$UNAME_RELEASE"
408
460
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
409
echo m68k-hades-mint${UNAME_RELEASE}
461
echo m68k-hades-mint"$UNAME_RELEASE"
411
463
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
412
echo m68k-unknown-mint${UNAME_RELEASE}
464
echo m68k-unknown-mint"$UNAME_RELEASE"
414
466
m68k:machten:*:*)
415
echo m68k-apple-machten${UNAME_RELEASE}
467
echo m68k-apple-machten"$UNAME_RELEASE"
417
469
powerpc:machten:*:*)
418
echo powerpc-apple-machten${UNAME_RELEASE}
470
echo powerpc-apple-machten"$UNAME_RELEASE"
421
473
echo mips-dec-mach_bsd4.3
423
475
RISC*:ULTRIX:*:*)
424
echo mips-dec-ultrix${UNAME_RELEASE}
476
echo mips-dec-ultrix"$UNAME_RELEASE"
426
478
VAX*:ULTRIX*:*:*)
427
echo vax-dec-ultrix${UNAME_RELEASE}
479
echo vax-dec-ultrix"$UNAME_RELEASE"
429
481
2020:CLIX:*:* | 2430:CLIX:*:*)
430
echo clipper-intergraph-clix${UNAME_RELEASE}
482
echo clipper-intergraph-clix"$UNAME_RELEASE"
432
484
mips:*:*:UMIPS | mips:*:*:RISCos)
433
eval $set_cc_for_build
434
sed 's/^ //' << EOF >$dummy.c
485
eval "$set_cc_for_build"
486
sed 's/^ //' << EOF > "$dummy.c"
435
487
#ifdef __cplusplus
436
488
#include <stdio.h> /* for printf() prototype */
437
489
int main (int argc, char *argv[]) {
441
493
#if defined (host_mips) && defined (MIPSEB)
442
494
#if defined (SYSTYPE_SYSV)
443
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
495
printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
445
497
#if defined (SYSTYPE_SVR4)
446
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
498
printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
448
500
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
449
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
501
printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
455
$CC_FOR_BUILD -o $dummy $dummy.c &&
456
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
457
SYSTEM_NAME=`$dummy $dummyarg` &&
507
$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
508
dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
509
SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
458
510
{ echo "$SYSTEM_NAME"; exit; }
459
echo mips-mips-riscos${UNAME_RELEASE}
511
echo mips-mips-riscos"$UNAME_RELEASE"
461
513
Motorola:PowerMAX_OS:*:*)
462
514
echo powerpc-motorola-powermax
551
603
echo rs6000-ibm-aix3.2
555
607
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
556
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
608
if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
561
if [ -x /usr/bin/oslevel ] ; then
562
IBM_REV=`/usr/bin/oslevel`
613
if [ -x /usr/bin/lslpp ] ; then
614
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
615
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
564
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
617
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
566
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
619
echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
569
622
echo rs6000-ibm-aix
571
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
624
ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
572
625
echo romp-ibm-bsd4.4
574
627
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
575
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
628
echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
576
629
exit ;; # report: romp-ibm BSD 4.3
578
631
echo rs6000-bull-bosx
587
640
echo m68k-hp-bsd4.4
589
642
9000/[34678]??:HP-UX:*:*)
590
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
591
case "${UNAME_MACHINE}" in
592
9000/31? ) HP_ARCH=m68000 ;;
593
9000/[34]?? ) HP_ARCH=m68k ;;
643
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
644
case "$UNAME_MACHINE" in
645
9000/31?) HP_ARCH=m68000 ;;
646
9000/[34]??) HP_ARCH=m68k ;;
594
647
9000/[678][0-9][0-9])
595
648
if [ -x /usr/bin/getconf ]; then
596
649
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
597
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
598
case "${sc_cpu_version}" in
599
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
600
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
601
532) # CPU_PA_RISC2_0
602
case "${sc_kernel_bits}" in
603
32) HP_ARCH="hppa2.0n" ;;
604
64) HP_ARCH="hppa2.0w" ;;
605
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
650
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
651
case "$sc_cpu_version" in
652
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
653
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
654
532) # CPU_PA_RISC2_0
655
case "$sc_kernel_bits" in
656
32) HP_ARCH=hppa2.0n ;;
657
64) HP_ARCH=hppa2.0w ;;
658
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
609
if [ "${HP_ARCH}" = "" ]; then
610
eval $set_cc_for_build
611
sed 's/^ //' << EOF >$dummy.c
619
#if defined(_SC_KERNEL_BITS)
620
long bits = sysconf(_SC_KERNEL_BITS);
622
long cpu = sysconf (_SC_CPU_VERSION);
626
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
627
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629
#if defined(_SC_KERNEL_BITS)
632
case 64: puts ("hppa2.0w"); break;
633
case 32: puts ("hppa2.0n"); break;
634
default: puts ("hppa2.0"); break;
636
#else /* !defined(_SC_KERNEL_BITS) */
637
puts ("hppa2.0"); break;
639
default: puts ("hppa1.0"); break;
662
if [ "$HP_ARCH" = "" ]; then
663
eval "$set_cc_for_build"
664
sed 's/^ //' << EOF > "$dummy.c"
672
#if defined(_SC_KERNEL_BITS)
673
long bits = sysconf(_SC_KERNEL_BITS);
675
long cpu = sysconf (_SC_CPU_VERSION);
679
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
680
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
682
#if defined(_SC_KERNEL_BITS)
685
case 64: puts ("hppa2.0w"); break;
686
case 32: puts ("hppa2.0n"); break;
687
default: puts ("hppa2.0"); break;
689
#else /* !defined(_SC_KERNEL_BITS) */
690
puts ("hppa2.0"); break;
692
default: puts ("hppa1.0"); break;
644
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
697
(CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
645
698
test -z "$HP_ARCH" && HP_ARCH=hppa
648
if [ ${HP_ARCH} = "hppa2.0w" ]
701
if [ "$HP_ARCH" = hppa2.0w ]
650
eval $set_cc_for_build
703
eval "$set_cc_for_build"
652
705
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
653
706
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
731
784
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
732
785
echo c1-convex-bsd
734
787
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
735
788
if getsysinfo -f scalar_acc
736
789
then echo c32-convex-bsd
737
790
else echo c2-convex-bsd
740
793
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
741
794
echo c34-convex-bsd
743
796
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
744
797
echo c38-convex-bsd
746
799
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
747
800
echo c4-convex-bsd
750
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
803
echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
752
805
CRAY*[A-Z]90:*:*:*)
753
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
806
echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
754
807
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
755
808
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
756
809
-e 's/\.[^.]*$/.X/'
759
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
812
echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
762
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
815
echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
765
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
818
echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
768
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
821
echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
770
823
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
771
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
772
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
773
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
774
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
824
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
825
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
826
FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
827
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776
829
5000:UNIX_System_V:4.*:*)
777
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
778
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
779
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
830
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
831
FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
832
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781
834
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
782
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
835
echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
784
837
sparc*:BSD/OS:*:*)
785
echo sparc-unknown-bsdi${UNAME_RELEASE}
838
echo sparc-unknown-bsdi"$UNAME_RELEASE"
788
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
841
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
791
case ${UNAME_MACHINE} in
793
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
844
UNAME_PROCESSOR=`/usr/bin/uname -p`
845
case "$UNAME_PROCESSOR" in
795
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
847
UNAME_PROCESSOR=x86_64 ;;
849
UNAME_PROCESSOR=i586 ;;
851
echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
801
echo ${UNAME_MACHINE}-pc-cygwin
854
echo "$UNAME_MACHINE"-pc-cygwin
857
echo "$UNAME_MACHINE"-pc-mingw64
804
echo ${UNAME_MACHINE}-pc-mingw32
860
echo "$UNAME_MACHINE"-pc-mingw32
807
# uname -m includes "-pc" on this system.
808
echo ${UNAME_MACHINE}-mingw32
863
echo "$UNAME_MACHINE"-pc-msys
811
echo ${UNAME_MACHINE}-pc-pw32
866
echo "$UNAME_MACHINE"-pc-pw32
814
case ${UNAME_MACHINE} in
869
case "$UNAME_MACHINE" in
816
echo i586-pc-interix${UNAME_RELEASE}
871
echo i586-pc-interix"$UNAME_RELEASE"
818
873
authenticamd | genuineintel | EM64T)
819
echo x86_64-unknown-interix${UNAME_RELEASE}
874
echo x86_64-unknown-interix"$UNAME_RELEASE"
822
echo ia64-unknown-interix${UNAME_RELEASE}
877
echo ia64-unknown-interix"$UNAME_RELEASE"
825
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
826
echo i${UNAME_MACHINE}-pc-mks
831
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
832
# How do we know it's Interix rather than the generic POSIX subsystem?
833
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
834
# UNAME_MACHINE based on the output of uname instead of i386?
838
echo ${UNAME_MACHINE}-pc-uwin
881
echo "$UNAME_MACHINE"-pc-uwin
840
883
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
841
884
echo x86_64-unknown-cygwin
844
echo powerpcle-unknown-cygwin
846
886
prep*:SunOS:5.*:*)
847
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
887
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
851
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
891
echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
854
894
# other systems with GNU libc and userland
855
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
895
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
858
echo ${UNAME_MACHINE}-pc-minix
898
echo "$UNAME_MACHINE"-pc-minix
901
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
903
aarch64_be:Linux:*:*)
904
UNAME_MACHINE=aarch64_be
905
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
861
908
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
866
913
EV6) UNAME_MACHINE=alphaev6 ;;
867
914
EV67) UNAME_MACHINE=alphaev67 ;;
868
915
EV68*) UNAME_MACHINE=alphaev68 ;;
870
917
objdump --private-headers /bin/sh | grep -q ld.so.1
871
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
872
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
918
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
919
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
921
arc:Linux:*:* | arceb:Linux:*:*)
922
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
875
eval $set_cc_for_build
925
eval "$set_cc_for_build"
876
926
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
877
927
| grep -q __ARM_EABI__
879
echo ${UNAME_MACHINE}-unknown-linux-gnu
929
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
881
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
931
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
932
| grep -q __ARM_PCS_VFP
934
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
936
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
884
940
avr32*:Linux:*:*)
885
echo ${UNAME_MACHINE}-unknown-linux-gnu
941
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
888
echo cris-axis-linux-gnu
944
echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
890
946
crisv32:Linux:*:*)
891
echo crisv32-axis-linux-gnu
947
echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
950
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
894
echo frv-unknown-linux-gnu
953
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
956
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
898
eval $set_cc_for_build
899
sed 's/^ //' << EOF >$dummy.c
904
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
905
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
959
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
908
echo ${UNAME_MACHINE}-unknown-linux-gnu
962
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
911
echo ${UNAME_MACHINE}-unknown-linux-gnu
968
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
914
echo ${UNAME_MACHINE}-unknown-linux-gnu
971
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
916
973
mips:Linux:*:* | mips64:Linux:*:*)
917
eval $set_cc_for_build
918
sed 's/^ //' << EOF >$dummy.c
974
eval "$set_cc_for_build"
975
sed 's/^ //' << EOF > "$dummy.c"
920
977
#undef ${UNAME_MACHINE}
921
978
#undef ${UNAME_MACHINE}el
932
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
933
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
989
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
990
test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
936
echo or32-unknown-linux-gnu
993
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
996
echo or1k-unknown-linux-"$LIBC"
998
or32:Linux:*:* | or1k*:Linux:*:*)
999
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
938
1001
padre:Linux:*:*)
939
echo sparc-unknown-linux-gnu
1002
echo sparc-unknown-linux-"$LIBC"
941
1004
parisc64:Linux:*:* | hppa64:Linux:*:*)
942
echo hppa64-unknown-linux-gnu
1005
echo hppa64-unknown-linux-"$LIBC"
944
1007
parisc:Linux:*:* | hppa:Linux:*:*)
945
1008
# Look for CPU level
946
1009
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
947
PA7*) echo hppa1.1-unknown-linux-gnu ;;
948
PA8*) echo hppa2.0-unknown-linux-gnu ;;
949
*) echo hppa-unknown-linux-gnu ;;
1010
PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
1011
PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
1012
*) echo hppa-unknown-linux-"$LIBC" ;;
952
1015
ppc64:Linux:*:*)
953
echo powerpc64-unknown-linux-gnu
1016
echo powerpc64-unknown-linux-"$LIBC"
956
echo powerpc-unknown-linux-gnu
1019
echo powerpc-unknown-linux-"$LIBC"
1022
echo powerpc64le-unknown-linux-"$LIBC"
1025
echo powerpcle-unknown-linux-"$LIBC"
1027
riscv32:Linux:*:* | riscv64:Linux:*:*)
1028
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
958
1030
s390:Linux:*:* | s390x:Linux:*:*)
959
echo ${UNAME_MACHINE}-ibm-linux
1031
echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
961
1033
sh64*:Linux:*:*)
962
echo ${UNAME_MACHINE}-unknown-linux-gnu
1034
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
965
echo ${UNAME_MACHINE}-unknown-linux-gnu
1037
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
967
1039
sparc:Linux:*:* | sparc64:Linux:*:*)
968
echo ${UNAME_MACHINE}-unknown-linux-gnu
1040
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
1043
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
971
echo ${UNAME_MACHINE}-dec-linux-gnu
1046
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
973
1048
x86_64:Linux:*:*)
974
echo x86_64-unknown-linux-gnu
1049
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
976
1051
xtensa*:Linux:*:*)
977
echo ${UNAME_MACHINE}-unknown-linux-gnu
1052
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
979
1054
i*86:DYNIX/ptx:4*:*)
980
1055
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
983
1058
echo i386-sequent-sysv4
985
1060
i*86:UNIX_SV:4.2MP:2.*)
986
# Unixware is an offshoot of SVR4, but it has its own version
987
# number series starting with 2...
988
# I am not positive that other SVR4 systems won't match this,
1061
# Unixware is an offshoot of SVR4, but it has its own version
1062
# number series starting with 2...
1063
# I am not positive that other SVR4 systems won't match this,
989
1064
# I just have to hope. -- rms.
990
# Use sysv4.2uw... so that sysv4* matches it.
991
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1065
# Use sysv4.2uw... so that sysv4* matches it.
1066
echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
994
1069
# If we were able to find `uname', then EMX Unix compatibility
995
1070
# is probably installed.
996
echo ${UNAME_MACHINE}-pc-os2-emx
1071
echo "$UNAME_MACHINE"-pc-os2-emx
998
1073
i*86:XTS-300:*:STOP)
999
echo ${UNAME_MACHINE}-unknown-stop
1074
echo "$UNAME_MACHINE"-unknown-stop
1001
1076
i*86:atheos:*:*)
1002
echo ${UNAME_MACHINE}-unknown-atheos
1077
echo "$UNAME_MACHINE"-unknown-atheos
1004
1079
i*86:syllable:*:*)
1005
echo ${UNAME_MACHINE}-pc-syllable
1080
echo "$UNAME_MACHINE"-pc-syllable
1007
1082
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1008
echo i386-unknown-lynxos${UNAME_RELEASE}
1083
echo i386-unknown-lynxos"$UNAME_RELEASE"
1011
echo ${UNAME_MACHINE}-pc-msdosdjgpp
1086
echo "$UNAME_MACHINE"-pc-msdosdjgpp
1013
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1014
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1089
UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
1015
1090
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1016
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1091
echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
1018
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1093
echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
1021
1096
i*86:*:5:[678]*)
1022
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1097
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1023
1098
case `/bin/uname -X | grep "^Machine"` in
1024
1099
*486*) UNAME_MACHINE=i486 ;;
1025
1100
*Pentium) UNAME_MACHINE=i586 ;;
1026
1101
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1028
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1103
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
1031
1106
if test -f /usr/options/cb.name; then
1032
1107
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1033
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1108
echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
1034
1109
elif /bin/uname -X 2>/dev/null >/dev/null ; then
1035
1110
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1036
1111
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1084
1159
test -r /etc/.relid \
1085
1160
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1086
1161
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1087
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1162
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1088
1163
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1089
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1164
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1090
1165
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1091
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1092
&& { echo i486-ncr-sysv4; exit; } ;;
1166
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1167
&& { echo i486-ncr-sysv4; exit; } ;;
1093
1168
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1095
1170
test -r /etc/.relid \
1096
1171
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1097
1172
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1098
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1173
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
1099
1174
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1100
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1175
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
1101
1176
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1102
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1177
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
1103
1178
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1104
echo m68k-unknown-lynxos${UNAME_RELEASE}
1179
echo m68k-unknown-lynxos"$UNAME_RELEASE"
1106
1181
mc68030:UNIX_System_V:4.*:*)
1107
1182
echo m68k-atari-sysv4
1109
1184
TSUNAMI:LynxOS:2.*:*)
1110
echo sparc-unknown-lynxos${UNAME_RELEASE}
1185
echo sparc-unknown-lynxos"$UNAME_RELEASE"
1112
1187
rs6000:LynxOS:2.*:*)
1113
echo rs6000-unknown-lynxos${UNAME_RELEASE}
1188
echo rs6000-unknown-lynxos"$UNAME_RELEASE"
1115
1190
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1116
echo powerpc-unknown-lynxos${UNAME_RELEASE}
1191
echo powerpc-unknown-lynxos"$UNAME_RELEASE"
1118
1193
SM[BE]S:UNIX_SV:*:*)
1119
echo mips-dde-sysv${UNAME_RELEASE}
1194
echo mips-dde-sysv"$UNAME_RELEASE"
1121
1196
RM*:ReliantUNIX-*:*:*)
1122
1197
echo mips-sni-sysv4
1178
1253
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1179
1254
echo i586-pc-haiku
1257
echo x86_64-unknown-haiku
1181
1259
SX-4:SUPER-UX:*:*)
1182
echo sx4-nec-superux${UNAME_RELEASE}
1260
echo sx4-nec-superux"$UNAME_RELEASE"
1184
1262
SX-5:SUPER-UX:*:*)
1185
echo sx5-nec-superux${UNAME_RELEASE}
1263
echo sx5-nec-superux"$UNAME_RELEASE"
1187
1265
SX-6:SUPER-UX:*:*)
1188
echo sx6-nec-superux${UNAME_RELEASE}
1266
echo sx6-nec-superux"$UNAME_RELEASE"
1190
1268
SX-7:SUPER-UX:*:*)
1191
echo sx7-nec-superux${UNAME_RELEASE}
1269
echo sx7-nec-superux"$UNAME_RELEASE"
1193
1271
SX-8:SUPER-UX:*:*)
1194
echo sx8-nec-superux${UNAME_RELEASE}
1272
echo sx8-nec-superux"$UNAME_RELEASE"
1196
1274
SX-8R:SUPER-UX:*:*)
1197
echo sx8r-nec-superux${UNAME_RELEASE}
1275
echo sx8r-nec-superux"$UNAME_RELEASE"
1277
SX-ACE:SUPER-UX:*:*)
1278
echo sxace-nec-superux"$UNAME_RELEASE"
1199
1280
Power*:Rhapsody:*:*)
1200
echo powerpc-apple-rhapsody${UNAME_RELEASE}
1281
echo powerpc-apple-rhapsody"$UNAME_RELEASE"
1202
1283
*:Rhapsody:*:*)
1203
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1284
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1206
1287
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1207
case $UNAME_PROCESSOR in
1209
eval $set_cc_for_build
1210
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1211
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1212
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1213
grep IS_64BIT_ARCH >/dev/null
1215
UNAME_PROCESSOR="x86_64"
1218
unknown) UNAME_PROCESSOR=powerpc ;;
1220
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1288
eval "$set_cc_for_build"
1289
if test "$UNAME_PROCESSOR" = unknown ; then
1290
UNAME_PROCESSOR=powerpc
1292
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1293
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1294
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1295
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1296
grep IS_64BIT_ARCH >/dev/null
1298
case $UNAME_PROCESSOR in
1299
i386) UNAME_PROCESSOR=x86_64 ;;
1300
powerpc) UNAME_PROCESSOR=powerpc64 ;;
1303
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1304
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1305
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1306
grep IS_PPC >/dev/null
1308
UNAME_PROCESSOR=powerpc
1311
elif test "$UNAME_PROCESSOR" = i386 ; then
1312
# Avoid executing cc on OS X 10.9, as it ships with a stub
1313
# that puts up a graphical alert prompting to install
1314
# developer tools. Any system running Mac OS X 10.7 or
1315
# later (Darwin 11 and later) is required to have a 64-bit
1316
# processor. This is not true of the ARM version of Darwin
1317
# that Apple uses in portable devices.
1318
UNAME_PROCESSOR=x86_64
1320
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1222
1322
*:procnto*:*:* | *:QNX:[0123456789]*:*)
1223
1323
UNAME_PROCESSOR=`uname -p`
1224
if test "$UNAME_PROCESSOR" = "x86"; then
1324
if test "$UNAME_PROCESSOR" = x86; then
1225
1325
UNAME_PROCESSOR=i386
1226
1326
UNAME_MACHINE=pc
1228
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1328
echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
1231
1331
echo i386-pc-qnx
1233
NSE-?:NONSTOP_KERNEL:*:*)
1234
echo nse-tandem-nsk${UNAME_RELEASE}
1236
NSR-?:NONSTOP_KERNEL:*:*)
1237
echo nsr-tandem-nsk${UNAME_RELEASE}
1333
NEO-*:NONSTOP_KERNEL:*:*)
1334
echo neo-tandem-nsk"$UNAME_RELEASE"
1336
NSE-*:NONSTOP_KERNEL:*:*)
1337
echo nse-tandem-nsk"$UNAME_RELEASE"
1339
NSR-*:NONSTOP_KERNEL:*:*)
1340
echo nsr-tandem-nsk"$UNAME_RELEASE"
1342
NSV-*:NONSTOP_KERNEL:*:*)
1343
echo nsv-tandem-nsk"$UNAME_RELEASE"
1345
NSX-*:NONSTOP_KERNEL:*:*)
1346
echo nsx-tandem-nsk"$UNAME_RELEASE"
1239
1348
*:NonStop-UX:*:*)
1240
1349
echo mips-compaq-nonstopux
1291
1400
echo i386-pc-xenix
1293
1402
i*86:skyos:*:*)
1294
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1403
echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
1297
echo ${UNAME_MACHINE}-pc-rdos
1406
echo "$UNAME_MACHINE"-pc-rdos
1300
echo ${UNAME_MACHINE}-pc-aros
1409
echo "$UNAME_MACHINE"-pc-aros
1411
x86_64:VMkernel:*:*)
1412
echo "$UNAME_MACHINE"-unknown-esx
1414
amd64:Isilon\ OneFS:*:*)
1415
echo x86_64-unknown-onefs
1304
#echo '(No uname command or uname output not recognized.)' 1>&2
1305
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1307
eval $set_cc_for_build
1310
# include <sys/types.h>
1311
# include <sys/utsname.h>
1316
#if defined (MIPSEB)
1317
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1319
printf ("mips-sony-bsd\n"); exit (0);
1321
#include <sys/param.h>
1322
printf ("m68k-sony-newsos%s\n",
1332
#if defined (__arm) && defined (__acorn) && defined (__unix)
1333
printf ("arm-acorn-riscix\n"); exit (0);
1336
#if defined (hp300) && !defined (hpux)
1337
printf ("m68k-hp-bsd\n"); exit (0);
1341
#if !defined (__ARCHITECTURE__)
1342
#define __ARCHITECTURE__ "m68k"
1345
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1347
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1349
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1353
#if defined (MULTIMAX) || defined (n16)
1355
printf ("ns32k-encore-sysv\n"); exit (0);
1358
printf ("ns32k-encore-mach\n"); exit (0);
1360
printf ("ns32k-encore-bsd\n"); exit (0);
1365
#if defined (__386BSD__)
1366
printf ("i386-pc-bsd\n"); exit (0);
1369
#if defined (sequent)
1371
printf ("i386-sequent-dynix\n"); exit (0);
1373
#if defined (ns32000)
1374
printf ("ns32k-sequent-dynix\n"); exit (0);
1378
#if defined (_SEQUENT_)
1383
if (strncmp(un.version, "V2", 2) == 0) {
1384
printf ("i386-sequent-ptx2\n"); exit (0);
1386
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1387
printf ("i386-sequent-ptx1\n"); exit (0);
1389
printf ("i386-sequent-ptx\n"); exit (0);
1394
# if !defined (ultrix)
1395
# include <sys/param.h>
1398
printf ("vax-dec-bsd4.3\n"); exit (0);
1401
printf ("vax-dec-bsd4.3reno\n"); exit (0);
1403
printf ("vax-dec-bsd\n"); exit (0);
1407
printf ("vax-dec-bsd\n"); exit (0);
1410
printf ("vax-dec-ultrix\n"); exit (0);
1414
#if defined (alliant) && defined (i860)
1415
printf ("i860-alliant-bsd\n"); exit (0);
1419
echo "$0: unable to guess system type" >&2
1421
case "$UNAME_MACHINE:$UNAME_SYSTEM" in
1422
mips:Linux | mips64:Linux)
1423
# If we got here on MIPS GNU/Linux, output extra information.
1426
NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1427
the system type. Please install a C compiler and try again.
1422
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1423
{ echo "$SYSTEM_NAME"; exit; }
1425
# Apollos put the system type in the environment.
1427
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1429
# Convex versions that predate uname can use getsysinfo(1)
1431
if [ -x /usr/convex/getsysinfo ]
1433
case `getsysinfo -f cpu_type` in
1438
if getsysinfo -f scalar_acc
1439
then echo c32-convex-bsd
1440
else echo c2-convex-bsd
1456
$0: unable to guess system type
1458
This script, last modified $timestamp, has failed to recognize
1459
the operating system you are using. It is advised that you
1460
download the most up to date version of the config scripts from
1462
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1434
This script (version $timestamp), has failed to recognize the
1435
operating system you are using. If your script is old, overwrite *all*
1436
copies of config.guess and config.sub with the latest versions from:
1438
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1464
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1440
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1466
If the version you run ($0) is already up to date, please
1467
send the following data and any information you think might be
1468
pertinent to <config-patches@gnu.org> in order to provide the needed
1469
information to handle your system.
1442
If $0 has already been updated, send the following data and any
1443
information you think might be pertinent to config-patches@gnu.org to
1444
provide the necessary information to handle your system.
1471
1446
config.guess timestamp = $timestamp