1
1
#! /bin/sh
2
2
# Attempt to guess a canonical system name.
3
- # Copyright 1992-2017 Free Software Foundation, Inc.
3
+ # Copyright 1992-2018 Free Software Foundation, Inc.
4
4
5
- timestamp=' 2017-03-22 '
5
+ timestamp=' 2018-01-01 '
6
6
7
7
# This file is free software; you can redistribute it and/or modify it
8
8
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2017-03-22'
15
15
# General Public License for more details.
16
16
#
17
17
# You should have received a copy of the GNU General Public License
18
- # along with this program; if not, see <http ://www.gnu.org/licenses/>.
18
+ # along with this program; if not, see <https ://www.gnu.org/licenses/>.
19
19
#
20
20
# As a special exception to the GNU General Public License, if you
21
21
# distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2017-03-22'
27
27
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
28
28
#
29
29
# You can get the latest version of this script from:
30
- # http ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
30
+ # https ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
31
31
#
32
32
# Please send patches to <[email protected] >.
33
33
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
39
39
40
40
Output the configuration name of the system \` $me ' is run on.
41
41
42
- Operation modes :
42
+ Options :
43
43
-h, --help print this help, then exit
44
44
-t, --time-stamp print date of last modification, then exit
45
45
-v, --version print version number, then exit
@@ -50,7 +50,7 @@ version="\
50
50
GNU config.guess ($timestamp )
51
51
52
52
Originally written by Per Bothner.
53
- Copyright 1992-2017 Free Software Foundation, Inc.
53
+ Copyright 1992-2018 Free Software Foundation, Inc.
54
54
55
55
This is free software; see the source for copying conditions. There is NO
56
56
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -244,6 +244,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
244
244
UNAME_MACHINE_ARCH=` arch | sed ' s/^.*BSD\.//' `
245
245
echo ${UNAME_MACHINE_ARCH} -unknown-libertybsd${UNAME_RELEASE}
246
246
exit ;;
247
+ * :MidnightBSD:* :* )
248
+ echo ${UNAME_MACHINE} -unknown-midnightbsd${UNAME_RELEASE}
249
+ exit ;;
247
250
* :ekkoBSD:* :* )
248
251
echo ${UNAME_MACHINE} -unknown-ekkobsd${UNAME_RELEASE}
249
252
exit ;;
@@ -259,6 +262,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
259
262
* :Sortix:* :* )
260
263
echo ${UNAME_MACHINE} -unknown-sortix
261
264
exit ;;
265
+ * :Redox:* :* )
266
+ echo ${UNAME_MACHINE} -unknown-redox
267
+ exit ;;
268
+ mips:OSF1:* .* )
269
+ echo mips-dec-osf1
270
+ exit ;;
262
271
alpha:OSF1:* :* )
263
272
case $UNAME_RELEASE in
264
273
* 4.0)
@@ -315,15 +324,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
315
324
exitcode=$?
316
325
trap ' ' 0
317
326
exit $exitcode ;;
318
- Alpha\ * :Windows_NT* :* )
319
- # How do we know it's Interix rather than the generic POSIX subsystem?
320
- # Should we change UNAME_MACHINE based on the output of uname instead
321
- # of the specific Alpha model?
322
- echo alpha-pc-interix
323
- exit ;;
324
- 21064:Windows_NT:50:3)
325
- echo alpha-dec-winnt3.5
326
- exit ;;
327
327
Amiga* :UNIX_System_V:4.0:* )
328
328
echo m68k-unknown-sysv4
329
329
exit ;;
@@ -485,13 +485,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
485
485
#endif
486
486
#if defined (host_mips) && defined (MIPSEB)
487
487
#if defined (SYSTYPE_SYSV)
488
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
488
+ printf ("mips-mips-riscos%ssysv\\ n", argv[1]); exit (0);
489
489
#endif
490
490
#if defined (SYSTYPE_SVR4)
491
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
491
+ printf ("mips-mips-riscos%ssvr4\\ n", argv[1]); exit (0);
492
492
#endif
493
493
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
494
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
494
+ printf ("mips-mips-riscos%sbsd\\ n", argv[1]); exit (0);
495
495
#endif
496
496
#endif
497
497
exit (-1);
614
614
* :AIX:* :* )
615
615
echo rs6000-ibm-aix
616
616
exit ;;
617
- ibmrt:4.4BSD:* |romp-ibm:BSD :* )
617
+ ibmrt:4.4BSD:* |romp-ibm:4.4BSD :* )
618
618
echo romp-ibm-bsd4.4
619
619
exit ;;
620
620
ibmrt:* BSD:* |romp-ibm:BSD:* ) # covers RT/PC BSD and
635
635
9000/[34678]?? :HP-UX:* :* )
636
636
HPUX_REV=` echo ${UNAME_RELEASE} | sed -e ' s/[^.]*.[0B]*//' `
637
637
case " ${UNAME_MACHINE} " in
638
- 9000/31? ) HP_ARCH=m68000 ;;
639
- 9000/[34]?? ) HP_ARCH=m68k ;;
638
+ 9000/31? ) HP_ARCH=m68000 ;;
639
+ 9000/[34]?? ) HP_ARCH=m68k ;;
640
640
9000/[678][0-9][0-9])
641
641
if [ -x /usr/bin/getconf ]; then
642
642
sc_cpu_version=` /usr/bin/getconf SC_CPU_VERSION 2> /dev/null`
749
749
{ echo " $SYSTEM_NAME " ; exit ; }
750
750
echo unknown-hitachi-hiuxwe2
751
751
exit ;;
752
- 9000/7?? :4.3bsd:* :* | 9000/8? [79]:4.3bsd:* :* )
752
+ 9000/7?? :4.3bsd:* :* | 9000/8? [79]:4.3bsd:* :* )
753
753
echo hppa1.1-hp-bsd
754
754
exit ;;
755
755
9000/8?? :4.3bsd:* :* )
758
758
* 9??* :MPE/iX:* :* | * 3000* :MPE/iX:* :* )
759
759
echo hppa1.0-hp-mpeix
760
760
exit ;;
761
- hp7?? :OSF1:* :* | hp8? [79]:OSF1:* :* )
761
+ hp7?? :OSF1:* :* | hp8? [79]:OSF1:* :* )
762
762
echo hppa1.1-hp-osf
763
763
exit ;;
764
764
hp8?? :OSF1:* :* )
837
837
UNAME_PROCESSOR=` /usr/bin/uname -p`
838
838
case ${UNAME_PROCESSOR} in
839
839
amd64)
840
- UNAME_PROCESSOR=x86_64 ;;
840
+ UNAME_PROCESSOR=x86_64 ;;
841
841
i386)
842
842
UNAME_PROCESSOR=i586 ;;
843
843
esac
855
855
* :MSYS* :* )
856
856
echo ${UNAME_MACHINE} -pc-msys
857
857
exit ;;
858
- i* :windows32* :* )
859
- # uname -m includes "-pc" on this system.
860
- echo ${UNAME_MACHINE} -mingw32
861
- exit ;;
862
858
i* :PW* :* )
863
859
echo ${UNAME_MACHINE} -pc-pw32
864
860
exit ;;
@@ -874,27 +870,12 @@ EOF
874
870
echo ia64-unknown-interix${UNAME_RELEASE}
875
871
exit ;;
876
872
esac ;;
877
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:* )
878
- echo i${UNAME_MACHINE} -pc-mks
879
- exit ;;
880
- 8664:Windows_NT:* )
881
- echo x86_64-pc-mks
882
- exit ;;
883
- i* :Windows_NT* :* | Pentium* :Windows_NT* :* )
884
- # How do we know it's Interix rather than the generic POSIX subsystem?
885
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
886
- # UNAME_MACHINE based on the output of uname instead of i386?
887
- echo i586-pc-interix
888
- exit ;;
889
873
i* :UWIN* :* )
890
874
echo ${UNAME_MACHINE} -pc-uwin
891
875
exit ;;
892
876
amd64:CYGWIN* :* :* | x86_64:CYGWIN* :* :* )
893
877
echo x86_64-unknown-cygwin
894
878
exit ;;
895
- p* :CYGWIN* :* )
896
- echo powerpcle-unknown-cygwin
897
- exit ;;
898
879
prep* :SunOS:5.* :* )
899
880
echo powerpcle-unknown-solaris2` echo ${UNAME_RELEASE} | sed -e ' s/[^.]*//' `
900
881
exit ;;
@@ -1097,7 +1078,7 @@ EOF
1097
1078
i* 86:* DOS:* :* )
1098
1079
echo ${UNAME_MACHINE} -pc-msdosdjgpp
1099
1080
exit ;;
1100
- i* 86:* :4.* :* | i * 86:SYSTEM_V:4. * : * )
1081
+ i* 86:* :4.* :* )
1101
1082
UNAME_REL=` echo ${UNAME_RELEASE} | sed ' s/\/MP$//' `
1102
1083
if grep Novell /usr/include/link.h > /dev/null 2> /dev/null; then
1103
1084
echo ${UNAME_MACHINE} -univel-sysv${UNAME_REL}
@@ -1304,14 +1285,21 @@ EOF
1304
1285
if test ` echo " $UNAME_RELEASE " | sed -e ' s/\..*//' ` -le 10 ; then
1305
1286
if [ " $CC_FOR_BUILD " != no_compiler_found ]; then
1306
1287
if (echo ' #ifdef __LP64__' ; echo IS_64BIT_ARCH; echo ' #endif' ) | \
1307
- (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) | \
1308
- grep IS_64BIT_ARCH > /dev/null
1288
+ (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) | \
1289
+ grep IS_64BIT_ARCH > /dev/null
1309
1290
then
1310
1291
case $UNAME_PROCESSOR in
1311
1292
i386) UNAME_PROCESSOR=x86_64 ;;
1312
1293
powerpc) UNAME_PROCESSOR=powerpc64 ;;
1313
1294
esac
1314
1295
fi
1296
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1297
+ if (echo ' #ifdef __POWERPC__' ; echo IS_PPC; echo ' #endif' ) | \
1298
+ (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) | \
1299
+ grep IS_PPC > /dev/null
1300
+ then
1301
+ UNAME_PROCESSOR=powerpc
1302
+ fi
1315
1303
fi
1316
1304
elif test " $UNAME_PROCESSOR " = i386 ; then
1317
1305
# Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1335,16 +1323,16 @@ EOF
1335
1323
* :QNX:* :4* )
1336
1324
echo i386-pc-qnx
1337
1325
exit ;;
1338
- NEO-? :NONSTOP_KERNEL:* :* )
1326
+ NEO-* :NONSTOP_KERNEL:* :* )
1339
1327
echo neo-tandem-nsk${UNAME_RELEASE}
1340
1328
exit ;;
1341
1329
NSE-* :NONSTOP_KERNEL:* :* )
1342
1330
echo nse-tandem-nsk${UNAME_RELEASE}
1343
1331
exit ;;
1344
- NSR-? :NONSTOP_KERNEL:* :* )
1332
+ NSR-* :NONSTOP_KERNEL:* :* )
1345
1333
echo nsr-tandem-nsk${UNAME_RELEASE}
1346
1334
exit ;;
1347
- NSX-? :NONSTOP_KERNEL:* :* )
1335
+ NSX-* :NONSTOP_KERNEL:* :* )
1348
1336
echo nsx-tandem-nsk${UNAME_RELEASE}
1349
1337
exit ;;
1350
1338
* :NonStop-UX:* :* )
@@ -1418,16 +1406,28 @@ EOF
1418
1406
exit ;;
1419
1407
esac
1420
1408
1409
+ echo " $0 : unable to guess system type" >&2
1410
+
1411
+ case " ${UNAME_MACHINE} :${UNAME_SYSTEM} " in
1412
+ mips:Linux | mips64:Linux)
1413
+ # If we got here on MIPS GNU/Linux, output extra information.
1414
+ cat >&2 << EOF
1415
+
1416
+ NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
1417
+ the system type. Please install a C compiler and try again.
1418
+ EOF
1419
+ ;;
1420
+ esac
1421
+
1421
1422
cat >&2 << EOF
1422
- $0 : unable to guess system type
1423
1423
1424
1424
This script (version $timestamp ), has failed to recognize the
1425
- operating system you are using. If your script is old, overwrite
1426
- config.guess and config.sub with the latest versions from:
1425
+ operating system you are using. If your script is old, overwrite *all*
1426
+ copies of config.guess and config.sub with the latest versions from:
1427
1427
1428
- http ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1428
+ https ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1429
1429
and
1430
- http ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1430
+ https ://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1431
1431
1432
1432
If $0 has already been updated, send the following data and any
1433
1433
information you think might be pertinent to [email protected] to
@@ -1459,7 +1459,7 @@ EOF
1459
1459
exit 1
1460
1460
1461
1461
# Local variables:
1462
- # eval: (add-hook 'write-file-hooks 'time-stamp)
1462
+ # eval: (add-hook 'write-file-functions 'time-stamp)
1463
1463
# time-stamp-start: "timestamp='"
1464
1464
# time-stamp-format: "%:y-%02m-%02d"
1465
1465
# time-stamp-end: "'"
0 commit comments