1
1
#! /bin/sh
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 Free Software Foundation, Inc.
4
+ # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5
5
6
- timestamp=' 2003-07-02 '
6
+ timestamp=' 2004-09-07 '
7
7
8
8
# This file is free software; you can redistribute it and/or modify it
9
9
# under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ version="\
53
53
GNU config.guess ($timestamp )
54
54
55
55
Originally written by Per Bothner.
56
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
56
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
57
57
Free Software Foundation, Inc.
58
58
59
59
This is free software; see the source for copying conditions. There is NO
@@ -197,15 +197,21 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
197
197
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
198
198
echo " ${machine} -${os}${release} "
199
199
exit 0 ;;
200
+ amd64:OpenBSD:* :* )
201
+ echo x86_64-unknown-openbsd${UNAME_RELEASE}
202
+ exit 0 ;;
200
203
amiga:OpenBSD:* :* )
201
204
echo m68k-unknown-openbsd${UNAME_RELEASE}
202
205
exit 0 ;;
203
- arc :OpenBSD:* :* )
204
- echo mipsel -unknown-openbsd${UNAME_RELEASE}
206
+ cats :OpenBSD:* :* )
207
+ echo arm -unknown-openbsd${UNAME_RELEASE}
205
208
exit 0 ;;
206
209
hp300:OpenBSD:* :* )
207
210
echo m68k-unknown-openbsd${UNAME_RELEASE}
208
211
exit 0 ;;
212
+ luna88k:OpenBSD:* :* )
213
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
214
+ exit 0 ;;
209
215
mac68k:OpenBSD:* :* )
210
216
echo m68k-unknown-openbsd${UNAME_RELEASE}
211
217
exit 0 ;;
@@ -221,25 +227,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
221
227
mvmeppc:OpenBSD:* :* )
222
228
echo powerpc-unknown-openbsd${UNAME_RELEASE}
223
229
exit 0 ;;
224
- pmax:OpenBSD:* :* )
225
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
226
- exit 0 ;;
227
230
sgi:OpenBSD:* :* )
228
- echo mipseb -unknown-openbsd${UNAME_RELEASE}
231
+ echo mips64 -unknown-openbsd${UNAME_RELEASE}
229
232
exit 0 ;;
230
233
sun3:OpenBSD:* :* )
231
234
echo m68k-unknown-openbsd${UNAME_RELEASE}
232
235
exit 0 ;;
233
- wgrisc:OpenBSD:* :* )
234
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
235
- exit 0 ;;
236
236
* :OpenBSD:* :* )
237
237
echo ${UNAME_MACHINE} -unknown-openbsd${UNAME_RELEASE}
238
238
exit 0 ;;
239
+ * :ekkoBSD:* :* )
240
+ echo ${UNAME_MACHINE} -unknown-ekkobsd${UNAME_RELEASE}
241
+ exit 0 ;;
242
+ macppc:MirBSD:* :* )
243
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
244
+ exit 0 ;;
245
+ * :MirBSD:* :* )
246
+ echo ${UNAME_MACHINE} -unknown-mirbsd${UNAME_RELEASE}
247
+ exit 0 ;;
239
248
alpha:OSF1:* :* )
240
- if test $UNAME_RELEASE = " V4.0" ; then
249
+ case $UNAME_RELEASE in
250
+ * 4.0)
241
251
UNAME_RELEASE=` /usr/sbin/sizer -v | awk ' {print $3}' `
242
- fi
252
+ ;;
253
+ * 5.* )
254
+ UNAME_RELEASE=` /usr/sbin/sizer -v | awk ' {print $4}' `
255
+ ;;
256
+ esac
243
257
# According to Compaq, /usr/sbin/psrinfo has been available on
244
258
# OSF/1 and Tru64 systems produced since 1995. I hope that
245
259
# covers most systems running today. This code pipes the CPU
@@ -277,14 +291,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
277
291
" EV7.9 (21364A)" )
278
292
UNAME_MACHINE=" alphaev79" ;;
279
293
esac
294
+ # A Pn.n version is a patched version.
280
295
# A Vn.n version is a released version.
281
296
# A Tn.n version is a released field test version.
282
297
# A Xn.n version is an unreleased experimental baselevel.
283
298
# 1.2 uses "1.2" for uname -r.
284
- echo ${UNAME_MACHINE} -dec-osf` echo ${UNAME_RELEASE} | sed -e ' s/^[VTX]//' | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' `
285
- exit 0 ;;
286
- Alpha* :OpenVMS:* :* )
287
- echo alpha-hp-vms
299
+ echo ${UNAME_MACHINE} -dec-osf` echo ${UNAME_RELEASE} | sed -e ' s/^[PVTX]//' | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' `
288
300
exit 0 ;;
289
301
Alpha\ * :Windows_NT* :* )
290
302
# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -307,6 +319,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
307
319
* :OS/390:* :* )
308
320
echo i370-ibm-openedition
309
321
exit 0 ;;
322
+ * :OS400:* :* )
323
+ echo powerpc-ibm-os400
324
+ exit 0 ;;
310
325
arm:RISC* :1.[012]* :* |arm:riscix:1.[012]* :* )
311
326
echo arm-acorn-riscix${UNAME_RELEASE}
312
327
exit 0;;
@@ -399,6 +414,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
399
414
* :* MiNT:* :* | * :* mint:* :* | * :* TOS:* :* )
400
415
echo m68k-unknown-mint${UNAME_RELEASE}
401
416
exit 0 ;;
417
+ m68k:machten:* :* )
418
+ echo m68k-apple-machten${UNAME_RELEASE}
419
+ exit 0 ;;
402
420
powerpc:machten:* :* )
403
421
echo powerpc-apple-machten${UNAME_RELEASE}
404
422
exit 0 ;;
@@ -734,14 +752,19 @@ EOF
734
752
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e ' s/\.[^.]*$/.X/'
735
753
exit 0 ;;
736
754
* :UNICOS/mp:* :* )
737
- echo nv1 -cray-unicosmp${UNAME_RELEASE} | sed -e ' s/\.[^.]*$/.X/'
755
+ echo craynv -cray-unicosmp${UNAME_RELEASE} | sed -e ' s/\.[^.]*$/.X/'
738
756
exit 0 ;;
739
757
F30[01]:UNIX_System_V:* :* | F700:UNIX_System_V:* :* )
740
758
FUJITSU_PROC=` uname -m | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' `
741
759
FUJITSU_SYS=` uname -p | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' | sed -e ' s/\///' `
742
760
FUJITSU_REL=` echo ${UNAME_RELEASE} | sed -e ' s/ /_/' `
743
761
echo " ${FUJITSU_PROC} -fujitsu-${FUJITSU_SYS}${FUJITSU_REL} "
744
762
exit 0 ;;
763
+ 5000:UNIX_System_V:4.* :* )
764
+ FUJITSU_SYS=` uname -p | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' | sed -e ' s/\///' `
765
+ FUJITSU_REL=` echo ${UNAME_RELEASE} | tr ' ABCDEFGHIJKLMNOPQRSTUVWXYZ' ' abcdefghijklmnopqrstuvwxyz' | sed -e ' s/ /_/' `
766
+ echo " sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} "
767
+ exit 0 ;;
745
768
i* 86:BSD/386:* :* | i* 86:BSD/OS:* :* | * :Ascend\ Embedded/OS:* :* )
746
769
echo ${UNAME_MACHINE} -pc-bsdi${UNAME_RELEASE}
747
770
exit 0 ;;
751
774
* :BSD/OS:* :* )
752
775
echo ${UNAME_MACHINE} -unknown-bsdi${UNAME_RELEASE}
753
776
exit 0 ;;
754
- * :FreeBSD:* :* |* :GNU/FreeBSD:* :* )
755
- # Determine whether the default compiler uses glibc.
756
- eval $set_cc_for_build
757
- sed ' s/^ //' << EOF >$dummy .c
758
- #include <features.h>
759
- #if __GLIBC__ >= 2
760
- LIBC=gnu
761
- #else
762
- LIBC=
763
- #endif
764
- EOF
765
- eval ` $CC_FOR_BUILD -E $dummy .c 2> /dev/null | grep ^LIBC=`
766
- # GNU/FreeBSD systems have a "k" prefix to indicate we are using
767
- # FreeBSD's kernel, but not the complete OS.
768
- case ${LIBC} in gnu) kernel_only=' k' ;; esac
769
- echo ${UNAME_MACHINE} -unknown-${kernel_only} freebsd` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*//' ` ${LIBC: +-$LIBC }
777
+ * :FreeBSD:* :* )
778
+ echo ${UNAME_MACHINE} -unknown-freebsd` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*//' `
770
779
exit 0 ;;
771
780
i* :CYGWIN* :* )
772
781
echo ${UNAME_MACHINE} -pc-cygwin
799
808
echo powerpcle-unknown-solaris2` echo ${UNAME_RELEASE} | sed -e ' s/[^.]*//' `
800
809
exit 0 ;;
801
810
* :GNU:* :* )
811
+ # the GNU system
802
812
echo ` echo ${UNAME_MACHINE} | sed -e ' s,[-/].*$,,' ` -unknown-gnu` echo ${UNAME_RELEASE} | sed -e ' s,/.*$,,' `
803
813
exit 0 ;;
814
+ * :GNU/* :* :* )
815
+ # other systems with GNU libc and userland
816
+ echo ${UNAME_MACHINE} -unknown-` echo ${UNAME_SYSTEM} | sed ' s,^[^/]*/,,' | tr ' [A-Z]' ' [a-z]' ` ` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*//' ` -gnu
817
+ exit 0 ;;
804
818
i* 86:Minix:* :* )
805
819
echo ${UNAME_MACHINE} -pc-minix
806
820
exit 0 ;;
810
824
cris:Linux:* :* )
811
825
echo cris-axis-linux-gnu
812
826
exit 0 ;;
827
+ crisv32:Linux:* :* )
828
+ echo crisv32-axis-linux-gnu
829
+ exit 0 ;;
830
+ frv:Linux:* :* )
831
+ echo frv-unknown-linux-gnu
832
+ exit 0 ;;
813
833
ia64:Linux:* :* )
814
834
echo ${UNAME_MACHINE} -unknown-linux-gnu
815
835
exit 0 ;;
836
+ m32r* :Linux:* :* )
837
+ echo ${UNAME_MACHINE} -unknown-linux-gnu
838
+ exit 0 ;;
816
839
m68* :Linux:* :* )
817
840
echo ${UNAME_MACHINE} -unknown-linux-gnu
818
841
exit 0 ;;
948
971
LIBC=gnuaout
949
972
#endif
950
973
#endif
974
+ #ifdef __dietlibc__
975
+ LIBC=dietlibc
976
+ #endif
951
977
EOF
952
978
eval ` $CC_FOR_BUILD -E $dummy .c 2> /dev/null | grep ^LIBC=`
953
979
test x" ${LIBC} " ! = x && echo " ${UNAME_MACHINE} -pc-linux-${LIBC} " && exit 0
978
1004
i* 86:atheos:* :* )
979
1005
echo ${UNAME_MACHINE} -unknown-atheos
980
1006
exit 0 ;;
1007
+ i* 86:syllable:* :* )
1008
+ echo ${UNAME_MACHINE} -pc-syllable
1009
+ exit 0 ;;
981
1010
i* 86:LynxOS:2.* :* | i* 86:LynxOS:3.[01]* :* | i* 86:LynxOS:4.0* :* )
982
1011
echo i386-unknown-lynxos${UNAME_RELEASE}
983
1012
exit 0 ;;
@@ -1047,9 +1076,9 @@ EOF
1047
1076
M680? 0:D-NIX:5.3:* )
1048
1077
echo m68k-diab-dnix
1049
1078
exit 0 ;;
1050
- M68* :* :R3V[567 ]* :* )
1079
+ M68* :* :R3V[5678 ]* :* )
1051
1080
test -r /sysV68 && echo ' m68k-motorola-sysv' && exit 0 ;;
1052
- 3[34 ]?? :* :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)
1081
+ 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)
1053
1082
OS_REL=' '
1054
1083
test -r /etc/.relid \
1055
1084
&& OS_REL=.` sed -n ' s/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1147,9 +1176,10 @@ EOF
1147
1176
echo ${UNAME_MACHINE} -apple-rhapsody${UNAME_RELEASE}
1148
1177
exit 0 ;;
1149
1178
* :Darwin:* :* )
1150
- case ` uname -p` in
1179
+ UNAME_PROCESSOR=` uname -p` || UNAME_PROCESSOR=unknown
1180
+ case $UNAME_PROCESSOR in
1151
1181
* 86) UNAME_PROCESSOR=i686 ;;
1152
- powerpc ) UNAME_PROCESSOR=powerpc ;;
1182
+ unknown ) UNAME_PROCESSOR=powerpc ;;
1153
1183
esac
1154
1184
echo ${UNAME_PROCESSOR} -apple-darwin${UNAME_RELEASE}
1155
1185
exit 0 ;;
@@ -1164,7 +1194,7 @@ EOF
1164
1194
* :QNX:* :4* )
1165
1195
echo i386-pc-qnx
1166
1196
exit 0 ;;
1167
- NSR-[DGKLNPTVW] :NONSTOP_KERNEL:* :* )
1197
+ NSR-? :NONSTOP_KERNEL:* :* )
1168
1198
echo nsr-tandem-nsk${UNAME_RELEASE}
1169
1199
exit 0 ;;
1170
1200
* :NonStop-UX:* :* )
@@ -1208,6 +1238,16 @@ EOF
1208
1238
SEI:* :* :SEIUX)
1209
1239
echo mips-sei-seiux${UNAME_RELEASE}
1210
1240
exit 0 ;;
1241
+ * :DragonFly:* :* )
1242
+ echo ${UNAME_MACHINE} -unknown-dragonfly` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*//' `
1243
+ exit 0 ;;
1244
+ * :* VMS:* :* )
1245
+ UNAME_MACHINE=` (uname -p) 2> /dev/null`
1246
+ case " ${UNAME_MACHINE} " in
1247
+ A* ) echo alpha-dec-vms && exit 0 ;;
1248
+ I* ) echo ia64-dec-vms && exit 0 ;;
1249
+ V* ) echo vax-dec-vms && exit 0 ;;
1250
+ esac
1211
1251
esac
1212
1252
1213
1253
# echo '(No uname command or uname output not recognized.)' 1>&2
0 commit comments