Ignore:
Timestamp:
Mar 9, 2007 6:12:52 AM (17 years ago)
Author:
nkissebe
Message:

Update tclconfig files to TEA 3.5, with Windows support

Location:
trunk/src/tcl/tclconfig
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tcl/tclconfig/config.guess

    r204 r618  
    22# Attempt to guess a canonical system name.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002 Free Software Foundation, Inc.
    5 
    6 timestamp='2002-09-03'
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-02-22'
    77
    88# This file is free software; you can redistribute it and/or modify it
     
    9999# use `HOST_CC' if defined, but it is deprecated.
    100100
    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
     103set_cc_for_build='
     104trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
     105trap "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 ; } ;
     110dummy=$tmp/dummy ;
     111tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    109112case $CC_FOR_BUILD,$HOST_CC,$CC in
    110113 ,,)    echo "int x;" > $dummy.c ;
    111114        for c in cc gcc c89 c99 ; do
    112           if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
     115          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
    113116             CC_FOR_BUILD="$c"; break ;
    114117          fi ;
    115118        done ;
    116         rm -f $files ;
    117119        if test x"$CC_FOR_BUILD" = x ; then
    118120          CC_FOR_BUILD=no_compiler_found ;
     
    121123 ,,*)   CC_FOR_BUILD=$CC ;;
    122124 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    123 esac ;
    124 unset files'
     125esac ;'
    125126
    126127# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
     
    179180        esac
    180181        # 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
    182194        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
    183195        # contains redundant information, the shorter form:
     
    228240                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    229241        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
    230279        # A Vn.n version is a released version.
    231280        # A Tn.n version is a released field test version.
    232281        # A Xn.n version is an unreleased experimental baselevel.
    233282        # 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
    290283        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    291284        exit 0 ;;
     
    438431        }
    439432EOF
    440         $CC_FOR_BUILD $dummy.c -o $dummy \
     433        $CC_FOR_BUILD -o $dummy $dummy.c \
    441434          && $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
    444436        echo mips-mips-riscos${UNAME_RELEASE}
    445437        exit 0 ;;
     
    450442        echo powerpc-harris-powermax
    451443        exit 0 ;;
    452     Night_Hawk:*:*:PowerMAX_OS)
     444    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    453445        echo powerpc-harris-powermax
    454446        exit 0 ;;
     
    525517                        }
    526518EOF
    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
    529520                echo rs6000-ibm-aix3.2.5
    530521        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
     
    624615              }
    625616EOF
    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
    629619                fi ;;
    630620        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
    631632        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    632633        exit 0 ;;
     
    662663        }
    663664EOF
    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
    666666        echo unknown-hitachi-hiuxwe2
    667667        exit 0 ;;
     
    721721        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    722722        exit 0 ;;
    723     CRAY*T3D:*:*:*)
    724         echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    725         exit 0 ;;
    726723    CRAY*T3E:*:*:*)
    727724        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     
    729726    CRAY*SV1:*:*:*)
    730727        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/'
    731731        exit 0 ;;
    732732    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
     
    757757EOF
    758758        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    759         rm -f $dummy.c && rmdir $tmpdir
    760759        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
    761760        exit 0 ;;
     
    766765        echo ${UNAME_MACHINE}-pc-mingw32
    767766        exit 0 ;;
     767    i*:MSYS*:*)
     768        echo ${UNAME_MACHINE}-pc-msys
     769        exit 0 ;;
    768770    i*:PW*:*)
    769771        echo ${UNAME_MACHINE}-pc-pw32
    770772        exit 0 ;;
    771773    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
    773778        exit 0 ;;
    774779    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
     
    776781        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    777782        # UNAME_MACHINE based on the output of uname instead of i386?
    778         echo i386-pc-interix
     783        echo i586-pc-interix
    779784        exit 0 ;;
    780785    i*:UWIN*:*)
     
    819824EOF
    820825        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
     843EOF
     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
    823846        ;;
    824847    ppc:Linux:*:*)
     
    915938EOF
    916939        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    917         rm -f $dummy.c && rmdir $tmpdir
    918940        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
    919941        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
     
    932954        # Use sysv4.2uw... so that sysv4* matches it.
    933955        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
    934973        exit 0 ;;
    935974    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
     
    9671006        fi
    9681007        exit 0 ;;
    969     i*86:*DOS:*:*)
    970         echo ${UNAME_MACHINE}-pc-msdosdjgpp
    971         exit 0 ;;
    9721008    pc:*:*:*)
    9731009        # Left here for compatibility:
     
    9961032        echo m68k-convergent-sysv
    9971033        exit 0 ;;
     1034    M680?0:D-NIX:5.3:*)
     1035        echo m68k-diab-dnix
     1036        exit 0 ;;
    9981037    M68*:*:R3V[567]*:*)
    9991038        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)
    10011040        OS_REL=''
    10021041        test -r /etc/.relid \
     
    10151054        echo m68k-atari-sysv4
    10161055        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 ;;
    10201056    TSUNAMI:LynxOS:2.*:*)
    10211057        echo sparc-unknown-lynxos${UNAME_RELEASE}
     
    10991135        exit 0 ;;
    11001136    *: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}
    11021142        exit 0 ;;
    11031143    *:procnto*:*:* | *:QNX:[0123456789]*:*)
     
    11351175        echo ${UNAME_MACHINE}-unknown-plan9
    11361176        exit 0 ;;
    1137     i*86:OS/2:*:*)
    1138         # If we were able to find `uname', then EMX Unix compatibility
    1139         # is probably installed.
    1140         echo ${UNAME_MACHINE}-pc-os2-emx
    1141         exit 0 ;;
    11421177    *:TOPS-10:*:*)
    11431178        echo pdp10-unknown-tops10
     
    11571192    *:ITS:*:*)
    11581193        echo pdp10-unknown-its
    1159         exit 0 ;;
    1160     i*86:XTS-300:*:STOP)
    1161         echo ${UNAME_MACHINE}-unknown-stop
    1162         exit 0 ;;
    1163     i*86:atheos:*:*)
    1164         echo ${UNAME_MACHINE}-unknown-atheos
    11651194        exit 0 ;;
    11661195esac
     
    12841313EOF
    12851314
    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
    12881316
    12891317# Apollos put the system type in the environment.
  • trunk/src/tcl/tclconfig/config.sub

    r204 r618  
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002 Free Software Foundation, Inc.
    5 
    6 timestamp='2002-09-05'
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-02-22'
    77
    88# This file is (in principle) common to ALL GNU software.
     
    119119maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    120120case $maybe_os in
    121   nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     121  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    122122    os=-$maybe_os
    123123    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    246246        | mips64vr5000 | mips64vr5000el \
    247247        | mipsisa32 | mipsisa32el \
     248        | mipsisa32r2 | mipsisa32r2el \
    248249        | mipsisa64 | mipsisa64el \
    249250        | mipsisa64sb1 | mipsisa64sb1el \
     
    251252        | mipstx39 | mipstx39el \
    252253        | mn10200 | mn10300 \
     254        | msp430 \
    253255        | ns16k | ns32k \
    254256        | openrisc | or32 \
     
    256258        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    257259        | pyramid \
    258         | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     260        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
    259261        | sh64 | sh64le \
    260262        | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
     
    295297        | avr-* \
    296298        | bs2000-* \
    297         | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
     299        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
    298300        | clipper-* | cydra-* \
    299301        | d10v-* | d30v-* | dlx-* \
     
    316318        | mips64vr5000-* | mips64vr5000el-* \
    317319        | mipsisa32-* | mipsisa32el-* \
     320        | mipsisa32r2-* | mipsisa32r2el-* \
    318321        | mipsisa64-* | mipsisa64el-* \
    319322        | mipsisa64sb1-* | mipsisa64sb1el-* \
    320323        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    321         | mipstx39 | mipstx39el \
    322         | none-* | np1-* | ns16k-* | ns32k-* \
     324        | mipstx39-* | mipstx39el-* \
     325        | msp430-* \
     326        | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
    323327        | orion-* \
    324328        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     
    326330        | pyramid-* \
    327331        | romp-* | rs6000-* \
    328         | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
     332        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
    329333        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    330334        | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
    331335        | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
    332         | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
     336        | tahoe-* | thumb-* \
     337        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     338        | tron-* \
    333339        | v850-* | v850e-* | vax-* \
    334340        | we32k-* \
     
    617623                ;;
    618624        mingw32)
    619                 basic_machine=i386-pc
     625                basic_machine=i686-pc
    620626                os=-mingw32
     627                ;;
     628        msys)
     629                basic_machine=i686-pc
     630                os=-msys
    621631                ;;
    622632        miniframe)
     
    717727                basic_machine=np1-gould
    718728                ;;
     729        nv1)
     730                basic_machine=nv1-cray
     731                os=-unicosmp
     732                ;;
    719733        nsr-tandem)
    720734                basic_machine=nsr-tandem
     
    902916                os=-dynix
    903917                ;;
    904         t3d)
    905                 basic_machine=alpha-cray
    906                 os=-unicos
    907                 ;;
    908918        t3e)
    909919                basic_machine=alphaev5-cray
     
    922932                os=-coff
    923933                ;;
     934        tic55x | c55x*)
     935                basic_machine=tic55x-unknown
     936                os=-coff
     937                ;;
     938        tic6x | c6x*)
     939                basic_machine=tic6x-unknown
     940                os=-coff
     941                ;;
    924942        tx39)
    925943                basic_machine=mipstx39-unknown
     
    977995                basic_machine=hppa1.1-winbond
    978996                os=-proelf
    979                 ;;
    980         windows32)
    981                 basic_machine=i386-pc
    982                 os=-windows32-msvcrt
    983997                ;;
    984998        xps | xps100)
     
    10281042                basic_machine=we32k-att
    10291043                ;;
    1030         sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
     1044        sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
    10311045                basic_machine=sh-unknown
    10321046                ;;
     
    11131127              | -chorusos* | -chorusrdb* \
    11141128              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1115               | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    1116               | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     1129              | -mingw32* | -msys* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
     1130              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    11171131              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    11181132              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
    11191133              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    1120               | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
     1134              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     1135              | -powermax* | -dnix*)
    11211136        # Remember, each alternative MUST END IN *, to match a version number.
    11221137                ;;
     
    11301145                esac
    11311146                ;;
     1147        -nto-qnx*)
     1148                ;;
    11321149        -nto*)
    1133                 os=-nto-qnx
     1150                os=`echo $os | sed -e 's|nto|nto-qnx|'`
    11341151                ;;
    11351152        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
     
    12241241        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    12251242                os=-mint
     1243                ;;
     1244        -aros*)
     1245                os=-aros
     1246                ;;
     1247        -kaos*)
     1248                os=-kaos
    12261249                ;;
    12271250        -none)
  • trunk/src/tcl/tclconfig/install-sh

    r204 r618  
    11#!/bin/sh
    2 #
    32# install - install a program, script, or datafile
    4 # This comes from X11R5 (mit/util/scripts/install.sh).
    5 #
    6 # Copyright 1991 by the Massachusetts Institute of Technology
    7 #
    8 # Permission to use, copy, modify, distribute, and sell this software and its
    9 # documentation for any purpose is hereby granted without fee, provided that
    10 # the above copyright notice appear in all copies and that both that
    11 # copyright notice and this permission notice appear in supporting
    12 # documentation, and that the name of M.I.T. not be used in advertising or
    13 # publicity pertaining to distribution of the software without specific,
    14 # written prior permission.  M.I.T. makes no representations about the
    15 # suitability of this software for any purpose.  It is provided "as is"
    16 # without express or implied warranty.
     3
     4scriptversion=2004-01-12.10
     5
     6# This originates from X11R5 (mit/util/scripts/install.sh), which was
     7# later released in X11R6 (xc/config/util/install.sh) with the
     8# following copyright and license.
     9#
     10# Copyright (C) 1994 X Consortium
     11#
     12# Permission is hereby granted, free of charge, to any person obtaining a copy
     13# of this software and associated documentation files (the "Software"), to
     14# deal in the Software without restriction, including without limitation the
     15# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
     16# sell copies of the Software, and to permit persons to whom the Software is
     17# furnished to do so, subject to the following conditions:
     18#
     19# The above copyright notice and this permission notice shall be included in
     20# all copies or substantial portions of the Software.
     21#
     22# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     23# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     24# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
     25# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
     26# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
     27# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     28#
     29# Except as contained in this notice, the name of the X Consortium shall not
     30# be used in advertising or otherwise to promote the sale, use or other deal-
     31# ings in this Software without prior written authorization from the X Consor-
     32# tium.
     33#
     34#
     35# FSF changes to this file are in the public domain.
    1736#
    1837# Calling this script install-sh is preferred over install.sh, to prevent
     
    2443# shared with many OS's install programs.
    2544
    26 
    2745# set DOITPROG to echo to test this script
    2846
    2947# Don't use :- since 4.3BSD and earlier shells don't like it.
    3048doit="${DOITPROG-}"
    31 
    3249
    3350# put in absolute paths if you don't have them in your path; or use env. vars.
     
    4259mkdirprog="${MKDIRPROG-mkdir}"
    4360
    44 transformbasename=""
    45 transform_arg=""
     61transformbasename=
     62transform_arg=
    4663instcmd="$mvprog"
    4764chmodcmd="$chmodprog 0755"
    48 chowncmd=""
    49 chgrpcmd=""
    50 stripcmd=""
     65chowncmd=
     66chgrpcmd=
     67stripcmd=
    5168rmcmd="$rmprog -f"
    5269mvcmd="$mvprog"
    53 src=""
    54 dst=""
    55 dir_arg=""
    56 
    57 while [ x"$1" != x ]; do
    58     case $1 in
    59         -c) instcmd="$cpprog"
    60             shift
    61             continue;;
    62 
    63         -d) dir_arg=true
    64             shift
    65             continue;;
    66 
    67         -m) chmodcmd="$chmodprog $2"
    68             shift
    69             shift
    70             continue;;
    71 
    72         -o) chowncmd="$chownprog $2"
    73             shift
    74             shift
    75             continue;;
    76 
    77         -g) chgrpcmd="$chgrpprog $2"
    78             shift
    79             shift
    80             continue;;
    81 
    82         -s) stripcmd="$stripprog"
    83             shift
    84             continue;;
    85 
    86         -t=*) transformarg=`echo $1 | sed 's/-t=//'`
    87             shift
    88             continue;;
    89 
    90         -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
    91             shift
    92             continue;;
    93 
    94         *)  if [ x"$src" = x ]
    95             then
    96                 src=$1
    97             else
    98                 # this colon is to work around a 386BSD /bin/sh bug
    99                 :
    100                 dst=$1
    101             fi
    102             shift
    103             continue;;
     70src=
     71dst=
     72dir_arg=
     73
     74usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
     75   or: $0 [OPTION]... SRCFILES... DIRECTORY
     76   or: $0 -d DIRECTORIES...
     77
     78In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
     79In the second, create the directory path DIR.
     80
     81Options:
     82-b=TRANSFORMBASENAME
     83-c         copy source (using $cpprog) instead of moving (using $mvprog).
     84-d         create directories instead of installing files.
     85-g GROUP   $chgrp installed files to GROUP.
     86-m MODE    $chmod installed files to MODE.
     87-o USER    $chown installed files to USER.
     88-s         strip installed files (using $stripprog).
     89-t=TRANSFORM
     90--help     display this help and exit.
     91--version  display version info and exit.
     92
     93Environment variables override the default commands:
     94  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
     95"
     96
     97while test -n "$1"; do
     98  case $1 in
     99    -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
     100        shift
     101        continue;;
     102
     103    -c) instcmd=$cpprog
     104        shift
     105        continue;;
     106
     107    -d) dir_arg=true
     108        shift
     109        continue;;
     110
     111    -g) chgrpcmd="$chgrpprog $2"
     112        shift
     113        shift
     114        continue;;
     115
     116    --help) echo "$usage"; exit 0;;
     117
     118    -m) chmodcmd="$chmodprog $2"
     119        shift
     120        shift
     121        continue;;
     122
     123    -o) chowncmd="$chownprog $2"
     124        shift
     125        shift
     126        continue;;
     127
     128    -s) stripcmd=$stripprog
     129        shift
     130        continue;;
     131
     132    -t=*) transformarg=`echo $1 | sed 's/-t=//'`
     133        shift
     134        continue;;
     135
     136    --version) echo "$0 $scriptversion"; exit 0;;
     137
     138    *)  # When -d is used, all remaining arguments are directories to create.
     139        test -n "$dir_arg" && break
     140        # Otherwise, the last argument is the destination.  Remove it from $@.
     141        for arg
     142        do
     143          if test -n "$dstarg"; then
     144            # $@ is not empty: it contains at least $arg.
     145            set fnord "$@" "$dstarg"
     146            shift # fnord
     147          fi
     148          shift # arg
     149          dstarg=$arg
     150        done
     151        break;;
     152  esac
     153done
     154
     155if test -z "$1"; then
     156  if test -z "$dir_arg"; then
     157    echo "$0: no input file specified." >&2
     158    exit 1
     159  fi
     160  # It's OK to call `install-sh -d' without argument.
     161  # This can happen when creating conditional directories.
     162  exit 0
     163fi
     164
     165for src
     166do
     167  # Protect names starting with `-'.
     168  case $src in
     169    -*) src=./$src ;;
     170  esac
     171
     172  if test -n "$dir_arg"; then
     173    dst=$src
     174    src=
     175
     176    if test -d "$dst"; then
     177      instcmd=:
     178      chmodcmd=
     179    else
     180      instcmd=$mkdirprog
     181    fi
     182  else
     183    # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
     184    # might cause directories to be created, which would be especially bad
     185    # if $src (and thus $dsttmp) contains '*'.
     186    if test ! -f "$src" && test ! -d "$src"; then
     187      echo "$0: $src does not exist." >&2
     188      exit 1
     189    fi
     190
     191    if test -z "$dstarg"; then
     192      echo "$0: no destination specified." >&2
     193      exit 1
     194    fi
     195
     196    dst=$dstarg
     197    # Protect names starting with `-'.
     198    case $dst in
     199      -*) dst=./$dst ;;
    104200    esac
     201
     202    # If destination is a directory, append the input filename; won't work
     203    # if double slashes aren't ignored.
     204    if test -d "$dst"; then
     205      dst=$dst/`basename "$src"`
     206    fi
     207  fi
     208
     209  # This sed command emulates the dirname command.
     210  dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
     211
     212  # Make sure that the destination directory exists.
     213
     214  # Skip lots of stat calls in the usual case.
     215  if test ! -d "$dstdir"; then
     216    defaultIFS='
     217        '
     218    IFS="${IFS-$defaultIFS}"
     219
     220    oIFS=$IFS
     221    # Some sh's can't handle IFS=/ for some reason.
     222    IFS='%'
     223    set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
     224    IFS=$oIFS
     225
     226    pathcomp=
     227
     228    while test $# -ne 0 ; do
     229      pathcomp=$pathcomp$1
     230      shift
     231      test -d "$pathcomp" || $mkdirprog "$pathcomp"
     232      pathcomp=$pathcomp/
     233    done
     234  fi
     235
     236  if test -n "$dir_arg"; then
     237    $doit $instcmd "$dst" \
     238      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
     239      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
     240      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
     241      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
     242
     243  else
     244    # If we're going to rename the final executable, determine the name now.
     245    if test -z "$transformarg"; then
     246      dstfile=`basename "$dst"`
     247    else
     248      dstfile=`basename "$dst" $transformbasename \
     249               | sed $transformarg`$transformbasename
     250    fi
     251
     252    # don't allow the sed command to completely eliminate the filename.
     253    test -z "$dstfile" && dstfile=`basename "$dst"`
     254
     255    # Make a couple of temp file names in the proper directory.
     256    dsttmp=$dstdir/_inst.$$_
     257    rmtmp=$dstdir/_rm.$$_
     258
     259    # Trap to clean up those temp files at exit.
     260    trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
     261    trap '(exit $?); exit' 1 2 13 15
     262
     263    # Move or copy the file name to the temp name
     264    $doit $instcmd "$src" "$dsttmp" &&
     265
     266    # and set any options; do chmod last to preserve setuid bits.
     267    #
     268    # If any of these fail, we abort the whole thing.  If we want to
     269    # ignore errors from any of these, just make sure not to ignore
     270    # errors from the above "$doit $instcmd $src $dsttmp" command.
     271    #
     272    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
     273      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
     274      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
     275      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
     276
     277    # Now remove or move aside any old file at destination location.  We
     278    # try this two ways since rm can't unlink itself on some systems and
     279    # the destination file might be busy for other reasons.  In this case,
     280    # the final cleanup might fail but the new file should still install
     281    # successfully.
     282    {
     283      if test -f "$dstdir/$dstfile"; then
     284        $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
     285        || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
     286        || {
     287          echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
     288          (exit 1); exit
     289        }
     290      else
     291        :
     292      fi
     293    } &&
     294
     295    # Now rename the file to the real destination.
     296    $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
     297  fi || { (exit 1); exit; }
    105298done
    106299
    107 if [ x"$src" = x ]
    108 then
    109         echo "install:  no input file specified"
    110         exit 1
    111 else
    112         true
    113 fi
    114 
    115 if [ x"$dir_arg" != x ]; then
    116         dst=$src
    117         src=""
    118        
    119         if [ -d $dst ]; then
    120                 instcmd=:
    121                 chmodcmd=""
    122         else
    123                 instcmd=mkdir
    124         fi
    125 else
    126 
    127 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
    128 # might cause directories to be created, which would be especially bad
    129 # if $src (and thus $dsttmp) contains '*'.
    130 
    131         if [ -f $src -o -d $src ]
    132         then
    133                 true
    134         else
    135                 echo "install:  $src does not exist"
    136                 exit 1
    137         fi
    138        
    139         if [ x"$dst" = x ]
    140         then
    141                 echo "install:  no destination specified"
    142                 exit 1
    143         else
    144                 true
    145         fi
    146 
    147 # If destination is a directory, append the input filename; if your system
    148 # does not like double slashes in filenames, you may need to add some logic
    149 
    150         if [ -d $dst ]
    151         then
    152                 dst="$dst"/`basename $src`
    153         else
    154                 true
    155         fi
    156 fi
    157 
    158 ## this sed command emulates the dirname command
    159 dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
    160 
    161 # Make sure that the destination directory exists.
    162 #  this part is taken from Noah Friedman's mkinstalldirs script
    163 
    164 # Skip lots of stat calls in the usual case.
    165 if [ ! -d "$dstdir" ]; then
    166 defaultIFS='   
    167 '
    168 IFS="${IFS-${defaultIFS}}"
    169 
    170 oIFS="${IFS}"
    171 # Some sh's can't handle IFS=/ for some reason.
    172 IFS='%'
    173 set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
    174 IFS="${oIFS}"
    175 
    176 pathcomp=''
    177 
    178 while [ $# -ne 0 ] ; do
    179         pathcomp="${pathcomp}${1}"
    180         shift
    181 
    182         if [ ! -d "${pathcomp}" ] ;
    183         then
    184                 $mkdirprog "${pathcomp}"
    185         else
    186                 true
    187         fi
    188 
    189         pathcomp="${pathcomp}/"
    190 done
    191 fi
    192 
    193 if [ x"$dir_arg" != x ]
    194 then
    195         $doit $instcmd $dst &&
    196 
    197         if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
    198         if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
    199         if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
    200         if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
    201 else
    202 
    203 # If we're going to rename the final executable, determine the name now.
    204 
    205         if [ x"$transformarg" = x ]
    206         then
    207                 dstfile=`basename $dst`
    208         else
    209                 dstfile=`basename $dst $transformbasename |
    210                         sed $transformarg`$transformbasename
    211         fi
    212 
    213 # don't allow the sed command to completely eliminate the filename
    214 
    215         if [ x"$dstfile" = x ]
    216         then
    217                 dstfile=`basename $dst`
    218         else
    219                 true
    220         fi
    221 
    222 # Make a temp file name in the proper directory.
    223 
    224         dsttmp=$dstdir/#inst.$$#
    225 
    226 # Move or copy the file name to the temp name
    227 
    228         $doit $instcmd $src $dsttmp &&
    229 
    230         trap "rm -f ${dsttmp}" 0 &&
    231 
    232 # and set any options; do chmod last to preserve setuid bits
    233 
    234 # If any of these fail, we abort the whole thing.  If we want to
    235 # ignore errors from any of these, just make sure not to ignore
    236 # errors from the above "$doit $instcmd $src $dsttmp" command.
    237 
    238         if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
    239         if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
    240         if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
    241         if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
    242 
    243 # Now rename the file to the real destination.
    244 
    245         $doit $rmcmd -f $dstdir/$dstfile &&
    246         $doit $mvcmd $dsttmp $dstdir/$dstfile
    247 
    248 fi &&
    249 
    250 
    251 exit 0
     300# The final little trick to "correctly" pass the exit status to the exit trap.
     301{
     302  (exit 0); exit
     303}
     304
     305# Local variables:
     306# eval: (add-hook 'write-file-hooks 'time-stamp)
     307# time-stamp-start: "scriptversion="
     308# time-stamp-format: "%:y-%02m-%02d.%02H"
     309# time-stamp-end: "$"
     310# End:
  • trunk/src/tcl/tclconfig/tcl.m4

    r527 r618  
    27382738    fi
    27392739    case "`uname -s`" in
    2740         *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
     2740        *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*|*MSYS_NT*)
    27412741            AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
    27422742            EXEEXT=".exe"
Note: See TracChangeset for help on using the changeset viewer.