diff options
Diffstat (limited to 'config.guess')
-rwxr-xr-x | config.guess | 286 |
1 files changed, 172 insertions, 114 deletions
diff --git a/config.guess b/config.guess index e8f206123..11271623b 100755 --- a/config.guess +++ b/config.guess | |||
@@ -1,9 +1,9 @@ | |||
1 | #! /bin/sh | 1 | #! /bin/sh |
2 | # Attempt to guess a canonical system name. | 2 | # Attempt to guess a canonical system name. |
3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
4 | # 2000, 2001, 2002 Free Software Foundation, Inc. | 4 | # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
5 | 5 | ||
6 | timestamp='2002-07-23' | 6 | timestamp='2003-10-07' |
7 | 7 | ||
8 | # This file is free software; you can redistribute it and/or modify it | 8 | # This file is free software; you can redistribute it and/or modify it |
9 | # under the terms of the GNU General Public License as published by | 9 | # under the terms of the GNU General Public License as published by |
@@ -98,30 +98,32 @@ trap 'exit 1' 1 2 15 | |||
98 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still | 98 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still |
99 | # use `HOST_CC' if defined, but it is deprecated. | 99 | # use `HOST_CC' if defined, but it is deprecated. |
100 | 100 | ||
101 | # This shell variable is my proudest work .. or something. --bje | 101 | # Portable tmp directory creation inspired by the Autoconf team. |
102 | 102 | ||
103 | set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; | 103 | set_cc_for_build=' |
104 | (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) | 104 | trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; |
105 | || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; | 105 | trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; |
106 | dummy=$tmpdir/dummy ; | 106 | : ${TMPDIR=/tmp} ; |
107 | files="$dummy.c $dummy.o $dummy.rel $dummy" ; | 107 | { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || |
108 | trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; | 108 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || |
109 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | ||
110 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | ||
111 | dummy=$tmp/dummy ; | ||
112 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | ||
109 | case $CC_FOR_BUILD,$HOST_CC,$CC in | 113 | case $CC_FOR_BUILD,$HOST_CC,$CC in |
110 | ,,) echo "int x;" > $dummy.c ; | 114 | ,,) echo "int x;" > $dummy.c ; |
111 | for c in cc gcc c89 c99 ; do | 115 | for c in cc gcc c89 c99 ; do |
112 | if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then | 116 | if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then |
113 | CC_FOR_BUILD="$c"; break ; | 117 | CC_FOR_BUILD="$c"; break ; |
114 | fi ; | 118 | fi ; |
115 | done ; | 119 | done ; |
116 | rm -f $files ; | ||
117 | if test x"$CC_FOR_BUILD" = x ; then | 120 | if test x"$CC_FOR_BUILD" = x ; then |
118 | CC_FOR_BUILD=no_compiler_found ; | 121 | CC_FOR_BUILD=no_compiler_found ; |
119 | fi | 122 | fi |
120 | ;; | 123 | ;; |
121 | ,,*) CC_FOR_BUILD=$CC ;; | 124 | ,,*) CC_FOR_BUILD=$CC ;; |
122 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | 125 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; |
123 | esac ; | 126 | esac ;' |
124 | unset files' | ||
125 | 127 | ||
126 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. | 128 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. |
127 | # (ghazi@noc.rutgers.edu 1994-08-24) | 129 | # (ghazi@noc.rutgers.edu 1994-08-24) |
@@ -178,7 +180,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |||
178 | ;; | 180 | ;; |
179 | esac | 181 | esac |
180 | # The OS release | 182 | # The OS release |
181 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | 183 | # Debian GNU/NetBSD machines have a different userland, and |
184 | # thus, need a distinct triplet. However, they do not need | ||
185 | # kernel version information, so it can be replaced with a | ||
186 | # suitable tag, in the style of linux-gnu. | ||
187 | case "${UNAME_VERSION}" in | ||
188 | Debian*) | ||
189 | release='-gnu' | ||
190 | ;; | ||
191 | *) | ||
192 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | ||
193 | ;; | ||
194 | esac | ||
182 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | 195 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
183 | # contains redundant information, the shorter form: | 196 | # contains redundant information, the shorter form: |
184 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | 197 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. |
@@ -227,68 +240,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |||
227 | if test $UNAME_RELEASE = "V4.0"; then | 240 | if test $UNAME_RELEASE = "V4.0"; then |
228 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | 241 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
229 | fi | 242 | fi |
243 | # According to Compaq, /usr/sbin/psrinfo has been available on | ||
244 | # OSF/1 and Tru64 systems produced since 1995. I hope that | ||
245 | # covers most systems running today. This code pipes the CPU | ||
246 | # types through head -n 1, so we only detect the type of CPU 0. | ||
247 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | ||
248 | case "$ALPHA_CPU_TYPE" in | ||
249 | "EV4 (21064)") | ||
250 | UNAME_MACHINE="alpha" ;; | ||
251 | "EV4.5 (21064)") | ||
252 | UNAME_MACHINE="alpha" ;; | ||
253 | "LCA4 (21066/21068)") | ||
254 | UNAME_MACHINE="alpha" ;; | ||
255 | "EV5 (21164)") | ||
256 | UNAME_MACHINE="alphaev5" ;; | ||
257 | "EV5.6 (21164A)") | ||
258 | UNAME_MACHINE="alphaev56" ;; | ||
259 | "EV5.6 (21164PC)") | ||
260 | UNAME_MACHINE="alphapca56" ;; | ||
261 | "EV5.7 (21164PC)") | ||
262 | UNAME_MACHINE="alphapca57" ;; | ||
263 | "EV6 (21264)") | ||
264 | UNAME_MACHINE="alphaev6" ;; | ||
265 | "EV6.7 (21264A)") | ||
266 | UNAME_MACHINE="alphaev67" ;; | ||
267 | "EV6.8CB (21264C)") | ||
268 | UNAME_MACHINE="alphaev68" ;; | ||
269 | "EV6.8AL (21264B)") | ||
270 | UNAME_MACHINE="alphaev68" ;; | ||
271 | "EV6.8CX (21264D)") | ||
272 | UNAME_MACHINE="alphaev68" ;; | ||
273 | "EV6.9A (21264/EV69A)") | ||
274 | UNAME_MACHINE="alphaev69" ;; | ||
275 | "EV7 (21364)") | ||
276 | UNAME_MACHINE="alphaev7" ;; | ||
277 | "EV7.9 (21364A)") | ||
278 | UNAME_MACHINE="alphaev79" ;; | ||
279 | esac | ||
230 | # A Vn.n version is a released version. | 280 | # A Vn.n version is a released version. |
231 | # A Tn.n version is a released field test version. | 281 | # A Tn.n version is a released field test version. |
232 | # A Xn.n version is an unreleased experimental baselevel. | 282 | # A Xn.n version is an unreleased experimental baselevel. |
233 | # 1.2 uses "1.2" for uname -r. | 283 | # 1.2 uses "1.2" for uname -r. |
234 | eval $set_cc_for_build | ||
235 | cat <<EOF >$dummy.s | ||
236 | .data | ||
237 | \$Lformat: | ||
238 | .byte 37,100,45,37,120,10,0 # "%d-%x\n" | ||
239 | |||
240 | .text | ||
241 | .globl main | ||
242 | .align 4 | ||
243 | .ent main | ||
244 | main: | ||
245 | .frame \$30,16,\$26,0 | ||
246 | ldgp \$29,0(\$27) | ||
247 | .prologue 1 | ||
248 | .long 0x47e03d80 # implver \$0 | ||
249 | lda \$2,-1 | ||
250 | .long 0x47e20c21 # amask \$2,\$1 | ||
251 | lda \$16,\$Lformat | ||
252 | mov \$0,\$17 | ||
253 | not \$1,\$18 | ||
254 | jsr \$26,printf | ||
255 | ldgp \$29,0(\$26) | ||
256 | mov 0,\$16 | ||
257 | jsr \$26,exit | ||
258 | .end main | ||
259 | EOF | ||
260 | $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null | ||
261 | if test "$?" = 0 ; then | ||
262 | case `$dummy` in | ||
263 | 0-0) | ||
264 | UNAME_MACHINE="alpha" | ||
265 | ;; | ||
266 | 1-0) | ||
267 | UNAME_MACHINE="alphaev5" | ||
268 | ;; | ||
269 | 1-1) | ||
270 | UNAME_MACHINE="alphaev56" | ||
271 | ;; | ||
272 | 1-101) | ||
273 | UNAME_MACHINE="alphapca56" | ||
274 | ;; | ||
275 | 2-303) | ||
276 | UNAME_MACHINE="alphaev6" | ||
277 | ;; | ||
278 | 2-307) | ||
279 | UNAME_MACHINE="alphaev67" | ||
280 | ;; | ||
281 | 2-1307) | ||
282 | UNAME_MACHINE="alphaev68" | ||
283 | ;; | ||
284 | 3-1307) | ||
285 | UNAME_MACHINE="alphaev7" | ||
286 | ;; | ||
287 | esac | ||
288 | fi | ||
289 | rm -f $dummy.s $dummy && rmdir $tmpdir | ||
290 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 284 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
291 | exit 0 ;; | 285 | exit 0 ;; |
286 | Alpha*:OpenVMS:*:*) | ||
287 | echo alpha-hp-vms | ||
288 | exit 0 ;; | ||
292 | Alpha\ *:Windows_NT*:*) | 289 | Alpha\ *:Windows_NT*:*) |
293 | # How do we know it's Interix rather than the generic POSIX subsystem? | 290 | # How do we know it's Interix rather than the generic POSIX subsystem? |
294 | # Should we change UNAME_MACHINE based on the output of uname instead | 291 | # Should we change UNAME_MACHINE based on the output of uname instead |
@@ -327,6 +324,9 @@ EOF | |||
327 | NILE*:*:*:dcosx) | 324 | NILE*:*:*:dcosx) |
328 | echo pyramid-pyramid-svr4 | 325 | echo pyramid-pyramid-svr4 |
329 | exit 0 ;; | 326 | exit 0 ;; |
327 | DRS?6000:unix:4.0:6*) | ||
328 | echo sparc-icl-nx6 | ||
329 | exit 0 ;; | ||
330 | DRS?6000:UNIX_SV:4.2*:7*) | 330 | DRS?6000:UNIX_SV:4.2*:7*) |
331 | case `/usr/bin/uname -p` in | 331 | case `/usr/bin/uname -p` in |
332 | sparc) echo sparc-icl-nx7 && exit 0 ;; | 332 | sparc) echo sparc-icl-nx7 && exit 0 ;; |
@@ -437,16 +437,18 @@ EOF | |||
437 | exit (-1); | 437 | exit (-1); |
438 | } | 438 | } |
439 | EOF | 439 | EOF |
440 | $CC_FOR_BUILD $dummy.c -o $dummy \ | 440 | $CC_FOR_BUILD -o $dummy $dummy.c \ |
441 | && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ | 441 | && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ |
442 | && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 | 442 | && exit 0 |
443 | rm -f $dummy.c $dummy && rmdir $tmpdir | ||
444 | echo mips-mips-riscos${UNAME_RELEASE} | 443 | echo mips-mips-riscos${UNAME_RELEASE} |
445 | exit 0 ;; | 444 | exit 0 ;; |
446 | Motorola:PowerMAX_OS:*:*) | 445 | Motorola:PowerMAX_OS:*:*) |
447 | echo powerpc-motorola-powermax | 446 | echo powerpc-motorola-powermax |
448 | exit 0 ;; | 447 | exit 0 ;; |
449 | Night_Hawk:*:*:PowerMAX_OS) | 448 | Motorola:*:4.3:PL8-*) |
449 | echo powerpc-harris-powermax | ||
450 | exit 0 ;; | ||
451 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | ||
450 | echo powerpc-harris-powermax | 452 | echo powerpc-harris-powermax |
451 | exit 0 ;; | 453 | exit 0 ;; |
452 | Night_Hawk:Power_UNIX:*:*) | 454 | Night_Hawk:Power_UNIX:*:*) |
@@ -521,8 +523,7 @@ EOF | |||
521 | exit(0); | 523 | exit(0); |
522 | } | 524 | } |
523 | EOF | 525 | EOF |
524 | $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 | 526 | $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 |
525 | rm -f $dummy.c $dummy && rmdir $tmpdir | ||
526 | echo rs6000-ibm-aix3.2.5 | 527 | echo rs6000-ibm-aix3.2.5 |
527 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | 528 | elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then |
528 | echo rs6000-ibm-aix3.2.4 | 529 | echo rs6000-ibm-aix3.2.4 |
@@ -620,11 +621,21 @@ EOF | |||
620 | exit (0); | 621 | exit (0); |
621 | } | 622 | } |
622 | EOF | 623 | EOF |
623 | (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` | 624 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
624 | if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi | 625 | test -z "$HP_ARCH" && HP_ARCH=hppa |
625 | rm -f $dummy.c $dummy && rmdir $tmpdir | ||
626 | fi ;; | 626 | fi ;; |
627 | esac | 627 | esac |
628 | if [ ${HP_ARCH} = "hppa2.0w" ] | ||
629 | then | ||
630 | # avoid double evaluation of $set_cc_for_build | ||
631 | test -n "$CC_FOR_BUILD" || eval $set_cc_for_build | ||
632 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null | ||
633 | then | ||
634 | HP_ARCH="hppa2.0w" | ||
635 | else | ||
636 | HP_ARCH="hppa64" | ||
637 | fi | ||
638 | fi | ||
628 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} | 639 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} |
629 | exit 0 ;; | 640 | exit 0 ;; |
630 | ia64:HP-UX:*:*) | 641 | ia64:HP-UX:*:*) |
@@ -658,8 +669,7 @@ EOF | |||
658 | exit (0); | 669 | exit (0); |
659 | } | 670 | } |
660 | EOF | 671 | EOF |
661 | $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 | 672 | $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 |
662 | rm -f $dummy.c $dummy && rmdir $tmpdir | ||
663 | echo unknown-hitachi-hiuxwe2 | 673 | echo unknown-hitachi-hiuxwe2 |
664 | exit 0 ;; | 674 | exit 0 ;; |
665 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | 675 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) |
@@ -717,9 +727,6 @@ EOF | |||
717 | CRAY*TS:*:*:*) | 727 | CRAY*TS:*:*:*) |
718 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 728 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
719 | exit 0 ;; | 729 | exit 0 ;; |
720 | CRAY*T3D:*:*:*) | ||
721 | echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
722 | exit 0 ;; | ||
723 | CRAY*T3E:*:*:*) | 730 | CRAY*T3E:*:*:*) |
724 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 731 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
725 | exit 0 ;; | 732 | exit 0 ;; |
@@ -727,7 +734,7 @@ EOF | |||
727 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | 734 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
728 | exit 0 ;; | 735 | exit 0 ;; |
729 | *:UNICOS/mp:*:*) | 736 | *:UNICOS/mp:*:*) |
730 | echo nv1-cray-unicosmp | sed -e 's/\.[^.]*$/.X/' | 737 | echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
731 | exit 0 ;; | 738 | exit 0 ;; |
732 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | 739 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
733 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | 740 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
@@ -756,8 +763,10 @@ EOF | |||
756 | #endif | 763 | #endif |
757 | EOF | 764 | EOF |
758 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` | 765 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` |
759 | rm -f $dummy.c && rmdir $tmpdir | 766 | # GNU/KFreeBSD systems have a "k" prefix to indicate we are using |
760 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} | 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} | ||
761 | exit 0 ;; | 770 | exit 0 ;; |
762 | i*:CYGWIN*:*) | 771 | i*:CYGWIN*:*) |
763 | echo ${UNAME_MACHINE}-pc-cygwin | 772 | echo ${UNAME_MACHINE}-pc-cygwin |
@@ -768,14 +777,17 @@ EOF | |||
768 | i*:PW*:*) | 777 | i*:PW*:*) |
769 | echo ${UNAME_MACHINE}-pc-pw32 | 778 | echo ${UNAME_MACHINE}-pc-pw32 |
770 | exit 0 ;; | 779 | exit 0 ;; |
771 | x86:Interix*:3*) | 780 | x86:Interix*:[34]*) |
772 | echo i386-pc-interix3 | 781 | echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' |
782 | exit 0 ;; | ||
783 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | ||
784 | echo i${UNAME_MACHINE}-pc-mks | ||
773 | exit 0 ;; | 785 | exit 0 ;; |
774 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | 786 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) |
775 | # How do we know it's Interix rather than the generic POSIX subsystem? | 787 | # How do we know it's Interix rather than the generic POSIX subsystem? |
776 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | 788 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we |
777 | # UNAME_MACHINE based on the output of uname instead of i386? | 789 | # UNAME_MACHINE based on the output of uname instead of i386? |
778 | echo i386-pc-interix | 790 | echo i586-pc-interix |
779 | exit 0 ;; | 791 | exit 0 ;; |
780 | i*:UWIN*:*) | 792 | i*:UWIN*:*) |
781 | echo ${UNAME_MACHINE}-pc-uwin | 793 | echo ${UNAME_MACHINE}-pc-uwin |
@@ -787,14 +799,22 @@ EOF | |||
787 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | 799 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
788 | exit 0 ;; | 800 | exit 0 ;; |
789 | *:GNU:*:*) | 801 | *:GNU:*:*) |
802 | # the GNU system | ||
790 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | 803 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` |
791 | exit 0 ;; | 804 | exit 0 ;; |
805 | *:GNU/*:*:*) | ||
806 | # other systems with GNU libc and userland | ||
807 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu | ||
808 | exit 0 ;; | ||
792 | i*86:Minix:*:*) | 809 | i*86:Minix:*:*) |
793 | echo ${UNAME_MACHINE}-pc-minix | 810 | echo ${UNAME_MACHINE}-pc-minix |
794 | exit 0 ;; | 811 | exit 0 ;; |
795 | arm*:Linux:*:*) | 812 | arm*:Linux:*:*) |
796 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 813 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
797 | exit 0 ;; | 814 | exit 0 ;; |
815 | cris:Linux:*:*) | ||
816 | echo cris-axis-linux-gnu | ||
817 | exit 0 ;; | ||
798 | ia64:Linux:*:*) | 818 | ia64:Linux:*:*) |
799 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 819 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
800 | exit 0 ;; | 820 | exit 0 ;; |
@@ -818,8 +838,26 @@ EOF | |||
818 | #endif | 838 | #endif |
819 | EOF | 839 | EOF |
820 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` | 840 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` |
821 | rm -f $dummy.c && rmdir $tmpdir | 841 | test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 |
822 | test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 | 842 | ;; |
843 | mips64:Linux:*:*) | ||
844 | eval $set_cc_for_build | ||
845 | sed 's/^ //' << EOF >$dummy.c | ||
846 | #undef CPU | ||
847 | #undef mips64 | ||
848 | #undef mips64el | ||
849 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
850 | CPU=mips64el | ||
851 | #else | ||
852 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
853 | CPU=mips64 | ||
854 | #else | ||
855 | CPU= | ||
856 | #endif | ||
857 | #endif | ||
858 | EOF | ||
859 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` | ||
860 | test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 | ||
823 | ;; | 861 | ;; |
824 | ppc:Linux:*:*) | 862 | ppc:Linux:*:*) |
825 | echo powerpc-unknown-linux-gnu | 863 | echo powerpc-unknown-linux-gnu |
@@ -855,6 +893,9 @@ EOF | |||
855 | s390:Linux:*:* | s390x:Linux:*:*) | 893 | s390:Linux:*:* | s390x:Linux:*:*) |
856 | echo ${UNAME_MACHINE}-ibm-linux | 894 | echo ${UNAME_MACHINE}-ibm-linux |
857 | exit 0 ;; | 895 | exit 0 ;; |
896 | sh64*:Linux:*:*) | ||
897 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
898 | exit 0 ;; | ||
858 | sh*:Linux:*:*) | 899 | sh*:Linux:*:*) |
859 | echo ${UNAME_MACHINE}-unknown-linux-gnu | 900 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
860 | exit 0 ;; | 901 | exit 0 ;; |
@@ -912,9 +953,11 @@ EOF | |||
912 | LIBC=gnuaout | 953 | LIBC=gnuaout |
913 | #endif | 954 | #endif |
914 | #endif | 955 | #endif |
956 | #ifdef __dietlibc__ | ||
957 | LIBC=dietlibc | ||
958 | #endif | ||
915 | EOF | 959 | EOF |
916 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` | 960 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` |
917 | rm -f $dummy.c && rmdir $tmpdir | ||
918 | test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 | 961 | test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 |
919 | test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 | 962 | test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 |
920 | ;; | 963 | ;; |
@@ -932,6 +975,23 @@ EOF | |||
932 | # Use sysv4.2uw... so that sysv4* matches it. | 975 | # Use sysv4.2uw... so that sysv4* matches it. |
933 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | 976 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
934 | exit 0 ;; | 977 | exit 0 ;; |
978 | i*86:OS/2:*:*) | ||
979 | # If we were able to find `uname', then EMX Unix compatibility | ||
980 | # is probably installed. | ||
981 | echo ${UNAME_MACHINE}-pc-os2-emx | ||
982 | exit 0 ;; | ||
983 | i*86:XTS-300:*:STOP) | ||
984 | echo ${UNAME_MACHINE}-unknown-stop | ||
985 | exit 0 ;; | ||
986 | i*86:atheos:*:*) | ||
987 | echo ${UNAME_MACHINE}-unknown-atheos | ||
988 | exit 0 ;; | ||
989 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) | ||
990 | echo i386-unknown-lynxos${UNAME_RELEASE} | ||
991 | exit 0 ;; | ||
992 | i*86:*DOS:*:*) | ||
993 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | ||
994 | exit 0 ;; | ||
935 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | 995 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) |
936 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | 996 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` |
937 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | 997 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then |
@@ -966,9 +1026,6 @@ EOF | |||
966 | echo ${UNAME_MACHINE}-pc-sysv32 | 1026 | echo ${UNAME_MACHINE}-pc-sysv32 |
967 | fi | 1027 | fi |
968 | exit 0 ;; | 1028 | exit 0 ;; |
969 | i*86:*DOS:*:*) | ||
970 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | ||
971 | exit 0 ;; | ||
972 | pc:*:*:*) | 1029 | pc:*:*:*) |
973 | # Left here for compatibility: | 1030 | # Left here for compatibility: |
974 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | 1031 | # uname -m prints for DJGPP always 'pc', but it prints nothing about |
@@ -992,9 +1049,15 @@ EOF | |||
992 | # "miniframe" | 1049 | # "miniframe" |
993 | echo m68010-convergent-sysv | 1050 | echo m68010-convergent-sysv |
994 | exit 0 ;; | 1051 | exit 0 ;; |
1052 | mc68k:UNIX:SYSTEM5:3.51m) | ||
1053 | echo m68k-convergent-sysv | ||
1054 | exit 0 ;; | ||
1055 | M680?0:D-NIX:5.3:*) | ||
1056 | echo m68k-diab-dnix | ||
1057 | exit 0 ;; | ||
995 | M68*:*:R3V[567]*:*) | 1058 | M68*:*:R3V[567]*:*) |
996 | test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; | 1059 | test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
997 | 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) | 1060 | 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) |
998 | OS_REL='' | 1061 | OS_REL='' |
999 | test -r /etc/.relid \ | 1062 | test -r /etc/.relid \ |
1000 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | 1063 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
@@ -1011,9 +1074,6 @@ EOF | |||
1011 | mc68030:UNIX_System_V:4.*:*) | 1074 | mc68030:UNIX_System_V:4.*:*) |
1012 | echo m68k-atari-sysv4 | 1075 | echo m68k-atari-sysv4 |
1013 | exit 0 ;; | 1076 | exit 0 ;; |
1014 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) | ||
1015 | echo i386-unknown-lynxos${UNAME_RELEASE} | ||
1016 | exit 0 ;; | ||
1017 | TSUNAMI:LynxOS:2.*:*) | 1077 | TSUNAMI:LynxOS:2.*:*) |
1018 | echo sparc-unknown-lynxos${UNAME_RELEASE} | 1078 | echo sparc-unknown-lynxos${UNAME_RELEASE} |
1019 | exit 0 ;; | 1079 | exit 0 ;; |
@@ -1085,6 +1145,9 @@ EOF | |||
1085 | SX-5:SUPER-UX:*:*) | 1145 | SX-5:SUPER-UX:*:*) |
1086 | echo sx5-nec-superux${UNAME_RELEASE} | 1146 | echo sx5-nec-superux${UNAME_RELEASE} |
1087 | exit 0 ;; | 1147 | exit 0 ;; |
1148 | SX-6:SUPER-UX:*:*) | ||
1149 | echo sx6-nec-superux${UNAME_RELEASE} | ||
1150 | exit 0 ;; | ||
1088 | Power*:Rhapsody:*:*) | 1151 | Power*:Rhapsody:*:*) |
1089 | echo powerpc-apple-rhapsody${UNAME_RELEASE} | 1152 | echo powerpc-apple-rhapsody${UNAME_RELEASE} |
1090 | exit 0 ;; | 1153 | exit 0 ;; |
@@ -1092,7 +1155,11 @@ EOF | |||
1092 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | 1155 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
1093 | exit 0 ;; | 1156 | exit 0 ;; |
1094 | *:Darwin:*:*) | 1157 | *:Darwin:*:*) |
1095 | echo `uname -p`-apple-darwin${UNAME_RELEASE} | 1158 | case `uname -p` in |
1159 | *86) UNAME_PROCESSOR=i686 ;; | ||
1160 | powerpc) UNAME_PROCESSOR=powerpc ;; | ||
1161 | esac | ||
1162 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | ||
1096 | exit 0 ;; | 1163 | exit 0 ;; |
1097 | *:procnto*:*:* | *:QNX:[0123456789]*:*) | 1164 | *:procnto*:*:* | *:QNX:[0123456789]*:*) |
1098 | UNAME_PROCESSOR=`uname -p` | 1165 | UNAME_PROCESSOR=`uname -p` |
@@ -1105,7 +1172,7 @@ EOF | |||
1105 | *:QNX:*:4*) | 1172 | *:QNX:*:4*) |
1106 | echo i386-pc-qnx | 1173 | echo i386-pc-qnx |
1107 | exit 0 ;; | 1174 | exit 0 ;; |
1108 | NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) | 1175 | NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) |
1109 | echo nsr-tandem-nsk${UNAME_RELEASE} | 1176 | echo nsr-tandem-nsk${UNAME_RELEASE} |
1110 | exit 0 ;; | 1177 | exit 0 ;; |
1111 | *:NonStop-UX:*:*) | 1178 | *:NonStop-UX:*:*) |
@@ -1128,11 +1195,6 @@ EOF | |||
1128 | fi | 1195 | fi |
1129 | echo ${UNAME_MACHINE}-unknown-plan9 | 1196 | echo ${UNAME_MACHINE}-unknown-plan9 |
1130 | exit 0 ;; | 1197 | exit 0 ;; |
1131 | i*86:OS/2:*:*) | ||
1132 | # If we were able to find `uname', then EMX Unix compatibility | ||
1133 | # is probably installed. | ||
1134 | echo ${UNAME_MACHINE}-pc-os2-emx | ||
1135 | exit 0 ;; | ||
1136 | *:TOPS-10:*:*) | 1198 | *:TOPS-10:*:*) |
1137 | echo pdp10-unknown-tops10 | 1199 | echo pdp10-unknown-tops10 |
1138 | exit 0 ;; | 1200 | exit 0 ;; |
@@ -1151,11 +1213,8 @@ EOF | |||
1151 | *:ITS:*:*) | 1213 | *:ITS:*:*) |
1152 | echo pdp10-unknown-its | 1214 | echo pdp10-unknown-its |
1153 | exit 0 ;; | 1215 | exit 0 ;; |
1154 | i*86:XTS-300:*:STOP) | 1216 | SEI:*:*:SEIUX) |
1155 | echo ${UNAME_MACHINE}-unknown-stop | 1217 | echo mips-sei-seiux${UNAME_RELEASE} |
1156 | exit 0 ;; | ||
1157 | i*86:atheos:*:*) | ||
1158 | echo ${UNAME_MACHINE}-unknown-atheos | ||
1159 | exit 0 ;; | 1218 | exit 0 ;; |
1160 | esac | 1219 | esac |
1161 | 1220 | ||
@@ -1277,8 +1336,7 @@ main () | |||
1277 | } | 1336 | } |
1278 | EOF | 1337 | EOF |
1279 | 1338 | ||
1280 | $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 | 1339 | $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 |
1281 | rm -f $dummy.c $dummy && rmdir $tmpdir | ||
1282 | 1340 | ||
1283 | # Apollos put the system type in the environment. | 1341 | # Apollos put the system type in the environment. |
1284 | 1342 | ||