Changeset 503 for trunk/gui/tclconfig/config.guess
- Timestamp:
- Aug 7, 2006, 1:11:38 PM (18 years ago)
- Location:
- trunk/gui/tclconfig
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/tclconfig/config.guess
r158 r503 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 Free Software Foundation, Inc.5 6 timestamp='200 2-09-03'4 # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 5 6 timestamp='2003-02-22' 7 7 8 8 # This file is free software; you can redistribute it and/or modify it … … 99 99 # use `HOST_CC' if defined, but it is deprecated. 100 100 101 # This shell variable is my proudest work .. or something. --bje 102 103 set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; 104 (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) 105 || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; 106 dummy=$tmpdir/dummy ; 107 files="$dummy.c $dummy.o $dummy.rel $dummy" ; 108 trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; 101 # Portable tmp directory creation inspired by the Autoconf team. 102 103 set_cc_for_build=' 104 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 105 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 106 : ${TMPDIR=/tmp} ; 107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 110 dummy=$tmp/dummy ; 111 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109 112 case $CC_FOR_BUILD,$HOST_CC,$CC in 110 113 ,,) echo "int x;" > $dummy.c ; 111 114 for c in cc gcc c89 c99 ; do 112 if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then115 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113 116 CC_FOR_BUILD="$c"; break ; 114 117 fi ; 115 118 done ; 116 rm -f $files ;117 119 if test x"$CC_FOR_BUILD" = x ; then 118 120 CC_FOR_BUILD=no_compiler_found ; … … 121 123 ,,*) CC_FOR_BUILD=$CC ;; 122 124 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 123 esac ; 124 unset files' 125 esac ;' 125 126 126 127 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. … … 179 180 esac 180 181 # The OS release 181 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 182 # Debian GNU/NetBSD machines have a different userland, and 183 # thus, need a distinct triplet. However, they do not need 184 # kernel version information, so it can be replaced with a 185 # suitable tag, in the style of linux-gnu. 186 case "${UNAME_VERSION}" in 187 Debian*) 188 release='-gnu' 189 ;; 190 *) 191 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 192 ;; 193 esac 182 194 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 183 195 # contains redundant information, the shorter form: … … 228 240 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 229 241 fi 242 # According to Compaq, /usr/sbin/psrinfo has been available on 243 # OSF/1 and Tru64 systems produced since 1995. I hope that 244 # covers most systems running today. This code pipes the CPU 245 # types through head -n 1, so we only detect the type of CPU 0. 246 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 247 case "$ALPHA_CPU_TYPE" in 248 "EV4 (21064)") 249 UNAME_MACHINE="alpha" ;; 250 "EV4.5 (21064)") 251 UNAME_MACHINE="alpha" ;; 252 "LCA4 (21066/21068)") 253 UNAME_MACHINE="alpha" ;; 254 "EV5 (21164)") 255 UNAME_MACHINE="alphaev5" ;; 256 "EV5.6 (21164A)") 257 UNAME_MACHINE="alphaev56" ;; 258 "EV5.6 (21164PC)") 259 UNAME_MACHINE="alphapca56" ;; 260 "EV5.7 (21164PC)") 261 UNAME_MACHINE="alphapca57" ;; 262 "EV6 (21264)") 263 UNAME_MACHINE="alphaev6" ;; 264 "EV6.7 (21264A)") 265 UNAME_MACHINE="alphaev67" ;; 266 "EV6.8CB (21264C)") 267 UNAME_MACHINE="alphaev68" ;; 268 "EV6.8AL (21264B)") 269 UNAME_MACHINE="alphaev68" ;; 270 "EV6.8CX (21264D)") 271 UNAME_MACHINE="alphaev68" ;; 272 "EV6.9A (21264/EV69A)") 273 UNAME_MACHINE="alphaev69" ;; 274 "EV7 (21364)") 275 UNAME_MACHINE="alphaev7" ;; 276 "EV7.9 (21364A)") 277 UNAME_MACHINE="alphaev79" ;; 278 esac 230 279 # A Vn.n version is a released version. 231 280 # A Tn.n version is a released field test version. 232 281 # A Xn.n version is an unreleased experimental baselevel. 233 282 # 1.2 uses "1.2" for uname -r. 234 eval $set_cc_for_build235 cat <<EOF >$dummy.s236 .data237 \$Lformat:238 .byte 37,100,45,37,120,10,0 # "%d-%x\n"239 240 .text241 .globl main242 .align 4243 .ent main244 main:245 .frame \$30,16,\$26,0246 ldgp \$29,0(\$27)247 .prologue 1248 .long 0x47e03d80 # implver \$0249 lda \$2,-1250 .long 0x47e20c21 # amask \$2,\$1251 lda \$16,\$Lformat252 mov \$0,\$17253 not \$1,\$18254 jsr \$26,printf255 ldgp \$29,0(\$26)256 mov 0,\$16257 jsr \$26,exit258 .end main259 EOF260 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null261 if test "$?" = 0 ; then262 case `$dummy` in263 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 esac288 fi289 rm -f $dummy.s $dummy && rmdir $tmpdir290 283 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 291 284 exit 0 ;; … … 438 431 } 439 432 EOF 440 $CC_FOR_BUILD $dummy.c -o $dummy\433 $CC_FOR_BUILD -o $dummy $dummy.c \ 441 434 && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 442 && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 443 rm -f $dummy.c $dummy && rmdir $tmpdir 435 && exit 0 444 436 echo mips-mips-riscos${UNAME_RELEASE} 445 437 exit 0 ;; … … 450 442 echo powerpc-harris-powermax 451 443 exit 0 ;; 452 Night_Hawk:*:*:PowerMAX_OS )444 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 453 445 echo powerpc-harris-powermax 454 446 exit 0 ;; … … 525 517 } 526 518 EOF 527 $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 528 rm -f $dummy.c $dummy && rmdir $tmpdir 519 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 529 520 echo rs6000-ibm-aix3.2.5 530 521 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then … … 624 615 } 625 616 EOF 626 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` 627 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 628 rm -f $dummy.c $dummy && rmdir $tmpdir 617 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 618 test -z "$HP_ARCH" && HP_ARCH=hppa 629 619 fi ;; 630 620 esac 621 if [ ${HP_ARCH} = "hppa2.0w" ] 622 then 623 # avoid double evaluation of $set_cc_for_build 624 test -n "$CC_FOR_BUILD" || eval $set_cc_for_build 625 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null 626 then 627 HP_ARCH="hppa2.0w" 628 else 629 HP_ARCH="hppa64" 630 fi 631 fi 631 632 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 632 633 exit 0 ;; … … 662 663 } 663 664 EOF 664 $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 665 rm -f $dummy.c $dummy && rmdir $tmpdir 665 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 666 666 echo unknown-hitachi-hiuxwe2 667 667 exit 0 ;; … … 721 721 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 722 722 exit 0 ;; 723 CRAY*T3D:*:*:*)724 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'725 exit 0 ;;726 723 CRAY*T3E:*:*:*) 727 724 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' … … 729 726 CRAY*SV1:*:*:*) 730 727 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 728 exit 0 ;; 729 *:UNICOS/mp:*:*) 730 echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 731 731 exit 0 ;; 732 732 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) … … 757 757 EOF 758 758 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 759 rm -f $dummy.c && rmdir $tmpdir760 759 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 761 760 exit 0 ;; … … 766 765 echo ${UNAME_MACHINE}-pc-mingw32 767 766 exit 0 ;; 767 i*:MSYS*:*) 768 echo ${UNAME_MACHINE}-pc-msys 769 exit 0 ;; 768 770 i*:PW*:*) 769 771 echo ${UNAME_MACHINE}-pc-pw32 770 772 exit 0 ;; 771 773 x86:Interix*:3*) 772 echo i386-pc-interix3 774 echo i586-pc-interix3 775 exit 0 ;; 776 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 777 echo i${UNAME_MACHINE}-pc-mks 773 778 exit 0 ;; 774 779 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) … … 776 781 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 777 782 # UNAME_MACHINE based on the output of uname instead of i386? 778 echo i 386-pc-interix783 echo i586-pc-interix 779 784 exit 0 ;; 780 785 i*:UWIN*:*) … … 819 824 EOF 820 825 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 821 rm -f $dummy.c && rmdir $tmpdir 822 test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 826 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 827 ;; 828 mips64:Linux:*:*) 829 eval $set_cc_for_build 830 sed 's/^ //' << EOF >$dummy.c 831 #undef CPU 832 #undef mips64 833 #undef mips64el 834 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 835 CPU=mips64el 836 #else 837 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 838 CPU=mips64 839 #else 840 CPU= 841 #endif 842 #endif 843 EOF 844 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 845 test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 823 846 ;; 824 847 ppc:Linux:*:*) … … 915 938 EOF 916 939 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 917 rm -f $dummy.c && rmdir $tmpdir918 940 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 919 941 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 … … 932 954 # Use sysv4.2uw... so that sysv4* matches it. 933 955 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 956 exit 0 ;; 957 i*86:OS/2:*:*) 958 # If we were able to find `uname', then EMX Unix compatibility 959 # is probably installed. 960 echo ${UNAME_MACHINE}-pc-os2-emx 961 exit 0 ;; 962 i*86:XTS-300:*:STOP) 963 echo ${UNAME_MACHINE}-unknown-stop 964 exit 0 ;; 965 i*86:atheos:*:*) 966 echo ${UNAME_MACHINE}-unknown-atheos 967 exit 0 ;; 968 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 969 echo i386-unknown-lynxos${UNAME_RELEASE} 970 exit 0 ;; 971 i*86:*DOS:*:*) 972 echo ${UNAME_MACHINE}-pc-msdosdjgpp 934 973 exit 0 ;; 935 974 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) … … 967 1006 fi 968 1007 exit 0 ;; 969 i*86:*DOS:*:*)970 echo ${UNAME_MACHINE}-pc-msdosdjgpp971 exit 0 ;;972 1008 pc:*:*:*) 973 1009 # Left here for compatibility: … … 996 1032 echo m68k-convergent-sysv 997 1033 exit 0 ;; 1034 M680?0:D-NIX:5.3:*) 1035 echo m68k-diab-dnix 1036 exit 0 ;; 998 1037 M68*:*:R3V[567]*:*) 999 1038 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 1000 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 )1039 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) 1001 1040 OS_REL='' 1002 1041 test -r /etc/.relid \ … … 1015 1054 echo m68k-atari-sysv4 1016 1055 exit 0 ;; 1017 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)1018 echo i386-unknown-lynxos${UNAME_RELEASE}1019 exit 0 ;;1020 1056 TSUNAMI:LynxOS:2.*:*) 1021 1057 echo sparc-unknown-lynxos${UNAME_RELEASE} … … 1099 1135 exit 0 ;; 1100 1136 *:Darwin:*:*) 1101 echo `uname -p`-apple-darwin${UNAME_RELEASE} 1137 case `uname -p` in 1138 *86) UNAME_PROCESSOR=i686 ;; 1139 powerpc) UNAME_PROCESSOR=powerpc ;; 1140 esac 1141 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1102 1142 exit 0 ;; 1103 1143 *:procnto*:*:* | *:QNX:[0123456789]*:*) … … 1135 1175 echo ${UNAME_MACHINE}-unknown-plan9 1136 1176 exit 0 ;; 1137 i*86:OS/2:*:*)1138 # If we were able to find `uname', then EMX Unix compatibility1139 # is probably installed.1140 echo ${UNAME_MACHINE}-pc-os2-emx1141 exit 0 ;;1142 1177 *:TOPS-10:*:*) 1143 1178 echo pdp10-unknown-tops10 … … 1157 1192 *:ITS:*:*) 1158 1193 echo pdp10-unknown-its 1159 exit 0 ;;1160 i*86:XTS-300:*:STOP)1161 echo ${UNAME_MACHINE}-unknown-stop1162 exit 0 ;;1163 i*86:atheos:*:*)1164 echo ${UNAME_MACHINE}-unknown-atheos1165 1194 exit 0 ;; 1166 1195 esac … … 1284 1313 EOF 1285 1314 1286 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 1287 rm -f $dummy.c $dummy && rmdir $tmpdir 1315 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 1288 1316 1289 1317 # Apollos put the system type in the environment.
Note: See TracChangeset
for help on using the changeset viewer.