2
2
# Attempt to guess a canonical system name.
3
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.
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
# 2011, 2012 Free Software Foundation, Inc.
9
9
# This file is free software; you can redistribute it and/or modify it
10
10
# under the terms of the GNU General Public License as published by
17
17
# General Public License for more details.
19
19
# 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
20
# along with this program; if not, see <http://www.gnu.org/licenses/>.
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
56
54
GNU config.guess ($timestamp)
58
56
Originally written by Per Bothner.
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
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
59
Free Software Foundation, Inc.
62
61
This is free software; see the source for copying conditions. There is NO
63
62
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
140
139
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142
141
case "${UNAME_MACHINE}" in
144
test -z "$VENDOR" && VENDOR=pc
147
test -z "$VENDOR" && VENDOR=unknown
143
test -z "$VENDOR" && VENDOR=pc
146
test -z "$VENDOR" && VENDOR=unknown
150
149
test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
154
153
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
156
155
# NetBSD (nbsd) targets should (where applicable) match one or
157
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
156
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
158
157
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
159
158
# switched to ELF, *-*-netbsd* would select the old
160
159
# object file format. This provides both forward
279
278
# A Xn.n version is an unreleased experimental baselevel.
280
279
# 1.2 uses "1.2" for uname -r.
281
280
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
281
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
283
285
Alpha\ *:Windows_NT*:*)
284
286
# How do we know it's Interix rather than the generic POSIX subsystem?
285
287
# Should we change UNAME_MACHINE based on the output of uname instead
404
406
# MiNT. But MiNT is downward compatible to TOS, so this should
406
408
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
407
echo m68k-atari-mint${UNAME_RELEASE}
409
echo m68k-atari-mint${UNAME_RELEASE}
409
411
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
410
412
echo m68k-atari-mint${UNAME_RELEASE}
412
414
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
413
echo m68k-atari-mint${UNAME_RELEASE}
415
echo m68k-atari-mint${UNAME_RELEASE}
415
417
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
416
echo m68k-milan-mint${UNAME_RELEASE}
418
echo m68k-milan-mint${UNAME_RELEASE}
418
420
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
419
echo m68k-hades-mint${UNAME_RELEASE}
421
echo m68k-hades-mint${UNAME_RELEASE}
421
423
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
422
echo m68k-${VENDOR}-mint${UNAME_RELEASE}
424
echo m68k-${VENDOR}-mint${UNAME_RELEASE}
424
426
m68k:machten:*:*)
425
427
echo m68k-apple-machten${UNAME_RELEASE}
490
492
echo m88k-motorola-sysv3
493
# DG/UX returns AViiON for all architectures
494
UNAME_PROCESSOR=`/usr/bin/uname -p`
495
# DG/UX returns AViiON for all architectures
496
UNAME_PROCESSOR=`/usr/bin/uname -p`
495
497
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
497
499
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
604
606
9000/[678][0-9][0-9])
605
607
if [ -x /usr/bin/getconf ]; then
606
608
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
607
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
608
case "${sc_cpu_version}" in
609
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
610
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
611
532) # CPU_PA_RISC2_0
612
case "${sc_kernel_bits}" in
613
32) HP_ARCH="hppa2.0n" ;;
614
64) HP_ARCH="hppa2.0w" ;;
609
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
610
case "${sc_cpu_version}" in
611
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
612
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
613
532) # CPU_PA_RISC2_0
614
case "${sc_kernel_bits}" in
615
32) HP_ARCH="hppa2.0n" ;;
616
64) HP_ARCH="hppa2.0w" ;;
615
617
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
619
621
if [ "${HP_ARCH}" = "" ]; then
620
622
eval $set_cc_for_build
621
sed 's/^ //' << EOF >$dummy.c
629
#if defined(_SC_KERNEL_BITS)
630
long bits = sysconf(_SC_KERNEL_BITS);
632
long cpu = sysconf (_SC_CPU_VERSION);
636
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
637
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
639
#if defined(_SC_KERNEL_BITS)
642
case 64: puts ("hppa2.0w"); break;
643
case 32: puts ("hppa2.0n"); break;
644
default: puts ("hppa2.0"); break;
646
#else /* !defined(_SC_KERNEL_BITS) */
647
puts ("hppa2.0"); break;
649
default: puts ("hppa1.0"); break;
623
sed 's/^ //' << EOF >$dummy.c
631
#if defined(_SC_KERNEL_BITS)
632
long bits = sysconf(_SC_KERNEL_BITS);
634
long cpu = sysconf (_SC_CPU_VERSION);
638
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
639
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
641
#if defined(_SC_KERNEL_BITS)
644
case 64: puts ("hppa2.0w"); break;
645
case 32: puts ("hppa2.0n"); break;
646
default: puts ("hppa2.0"); break;
648
#else /* !defined(_SC_KERNEL_BITS) */
649
puts ("hppa2.0"); break;
651
default: puts ("hppa1.0"); break;
654
656
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
655
657
test -z "$HP_ARCH" && HP_ARCH=hppa
741
743
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
742
744
echo c1-convex-bsd
744
746
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
745
747
if getsysinfo -f scalar_acc
746
748
then echo c32-convex-bsd
747
749
else echo c2-convex-bsd
750
752
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
751
753
echo c34-convex-bsd
753
755
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
754
756
echo c38-convex-bsd
756
758
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
757
759
echo c4-convex-bsd
760
762
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
780
782
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
781
783
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
782
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
783
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
784
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
784
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
785
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
786
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
786
788
5000:UNIX_System_V:4.*:*)
787
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
788
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
789
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
789
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
790
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
791
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
791
793
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
792
794
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
798
800
echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
801
case ${UNAME_MACHINE} in
803
echo i386-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
803
UNAME_PROCESSOR=`/usr/bin/uname -p`
804
case ${UNAME_PROCESSOR} in
805
806
echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
807
echo ${UNAME_MACHINE}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
808
echo ${UNAME_PROCESSOR}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
814
815
echo ${UNAME_MACHINE}-pc-mingw32
818
echo ${UNAME_MACHINE}-pc-msys
817
# uname -m includes "-pc" on this system.
818
echo ${UNAME_MACHINE}-mingw32
821
# uname -m includes "-pc" on this system.
822
echo ${UNAME_MACHINE}-mingw32
821
825
echo ${UNAME_MACHINE}-pc-pw32
824
case ${UNAME_MACHINE} in
828
case ${UNAME_MACHINE} in
826
830
echo i586-pc-interix${UNAME_RELEASE}
876
887
EV6) UNAME_MACHINE=alphaev6 ;;
877
888
EV67) UNAME_MACHINE=alphaev67 ;;
878
889
EV68*) UNAME_MACHINE=alphaev68 ;;
880
891
objdump --private-headers /bin/sh | grep -q ld.so.1
881
892
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
882
893
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
889
900
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
891
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
902
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
903
| grep -q __ARM_PCS_VFP
905
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
907
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabihf
894
911
avr32*:Linux:*:*)
895
912
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
898
echo cris-axis-linux-gnu
915
echo ${UNAME_MACHINE}-axis-linux-gnu
900
917
crisv32:Linux:*:*)
901
echo crisv32-axis-linux-gnu
918
echo ${UNAME_MACHINE}-axis-linux-gnu
904
echo frv-${VENDOR}-linux-gnu
921
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
924
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
977
997
sparc:Linux:*:* | sparc64:Linux:*:*)
978
998
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
1001
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
981
1004
echo ${UNAME_MACHINE}-dec-linux-gnu
983
1006
x86_64:Linux:*:*)
984
echo x86_64-${VENDOR}-linux-gnu
1007
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
986
1009
xtensa*:Linux:*:*)
987
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
1010
echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
989
1012
i*86:DYNIX/ptx:4*:*)
990
1013
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
993
1016
echo i386-sequent-sysv4
995
1018
i*86:UNIX_SV:4.2MP:2.*)
996
# Unixware is an offshoot of SVR4, but it has its own version
997
# number series starting with 2...
998
# I am not positive that other SVR4 systems won't match this,
1019
# Unixware is an offshoot of SVR4, but it has its own version
1020
# number series starting with 2...
1021
# I am not positive that other SVR4 systems won't match this,
999
1022
# I just have to hope. -- rms.
1000
# Use sysv4.2uw... so that sysv4* matches it.
1023
# Use sysv4.2uw... so that sysv4* matches it.
1001
1024
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1031
1054
i*86:*:5:[678]*)
1032
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1055
# UnixWare 7.x, OpenUNIX and OpenServer 6.
1033
1056
case `/bin/uname -X | grep "^Machine"` in
1034
1057
*486*) UNAME_MACHINE=i486 ;;
1035
1058
*Pentium) UNAME_MACHINE=i586 ;;
1059
1082
# Left here for compatibility:
1060
# uname -m prints for DJGPP always 'pc', but it prints nothing about
1061
# the processor, so we play safe by assuming i586.
1083
# uname -m prints for DJGPP always 'pc', but it prints nothing about
1084
# the processor, so we play safe by assuming i586.
1062
1085
# Note: whatever this is, it MUST be the same as what config.sub
1063
1086
# prints for the "djgpp" host, or else GDB configury will decide that
1064
1087
# this is a cross-build.
1065
1088
echo i586-pc-msdosdjgpp
1067
1090
Intel:Mach:3*:*)
1068
1091
echo i386-pc-mach3
1074
1097
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1075
1098
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1076
1099
else # Add other i860-SVR4 vendors below as they are discovered.
1077
echo i860-${VENDOR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1100
echo i860-${VENODR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1080
1103
mini*:CTIX:SYS*5:*)
1098
1121
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1099
1122
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1100
1123
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1101
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1102
&& { echo i486-ncr-sysv4; exit; } ;;
1124
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1125
&& { echo i486-ncr-sysv4; exit; } ;;
1103
1126
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1105
1128
test -r /etc/.relid \
1142
1165
echo ns32k-sni-sysv
1145
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1146
# says <Richard.M.Bartel@ccMail.Census.GOV>
1147
echo i586-unisys-sysv4
1168
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1169
# says <Richard.M.Bartel@ccMail.Census.GOV>
1170
echo i586-unisys-sysv4
1149
1172
*:UNIX_System_V:4*:FTX*)
1150
1173
# From Gerald Hewes <hewes@openmarket.com>.
1151
1174
# How about differentiating between stratus architectures? -djm
1172
1195
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1173
1196
if [ -d /usr/nec ]; then
1174
echo mips-nec-sysv${UNAME_RELEASE}
1197
echo mips-nec-sysv${UNAME_RELEASE}
1176
echo mips-${VENDOR}-sysv${UNAME_RELEASE}
1199
echo mips-${VENDOR}-sysv${UNAME_RELEASE}
1179
1202
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1180
1203
echo powerpc-be-beos
1285
1311
echo pdp10-${VENDOR}-its
1288
echo mips-sei-seiux${UNAME_RELEASE}
1314
echo mips-sei-seiux${UNAME_RELEASE}
1290
1316
*:DragonFly:*:*)
1291
1317
echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1294
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1320
UNAME_MACHINE=`(uname -p) 2>/dev/null`
1295
1321
case "${UNAME_MACHINE}" in
1296
1322
A*) echo alpha-dec-vms ; exit ;;
1297
1323
I*) echo ia64-dec-vms ; exit ;;