Ignore:
Timestamp:
Aug 7, 2006, 1:11:38 PM (18 years ago)
Author:
nkissebe
Message:

Converted to Tcl Extension Architecture (TEA) v3.5 for base Windows support. Added Windows ports of getrlimit, getrusage, gettimeofday, setrlimit functions.

Location:
trunk/gui/tclconfig
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/gui/tclconfig/config.guess

    r158 r503  
    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.
Note: See TracChangeset for help on using the changeset viewer.