Changeset 2690


Ignore:
Timestamp:
Nov 17, 2011 8:40:07 AM (13 years ago)
Author:
gah
Message:
 
Location:
branches/blt4/gui
Files:
5 added
2 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/gui/aclocal.m4

    r2170 r2690  
    1 builtin(include,./tclconfig/tcl.m4)
     1builtin(include,./cf/tcl.m4)
  • branches/blt4/gui/apps/Makefile.in

    r2536 r2690  
    3434                rappture.use \
    3535                rerun \
     36                rpdiff \
    3637                simsim  \
    3738                xmldiff \
     
    5556
    5657distclean: clean
    57         $(RM) encodedata rappture.env rappture rappture.use rerun simsim xmldiff
     58        $(RM) encodedata rappture.env rappture rappture.use rerun rpdiff simsim xmldiff
    5859        $(RM) Makefile *~
    5960
  • branches/blt4/gui/apps/simsim.in

    r2536 r2690  
    620620    for {set i 0} {$i < $argc} {incr i} {
    621621        set opt [lindex $argv $i]
    622         if {("-t" == $opt) || ("-tool" == $opt) || ("--tool" == $opt)} {
     622        if { ("-t" == $opt)    ||
     623             ("-tool" == $opt) ||
     624             ("--tool" == $opt)   } {
    623625            if {[expr {$i + 1}] < $argc} {
    624626                incr i
    625627                set params(--tool) [lindex $argv $i]
    626628                # need to check to see if file exists, if not raise error
     629            } else {
     630                printHelp
     631            }
     632        } elseif {  ("-tooldir" == $opt) ||
     633                    ("--tooldir" == $opt)    } {
     634            if {[expr {$i + 1}] < $argc} {
     635                incr i
     636                set params(--tooldir) [lindex $argv $i]
     637                # need to check to see if directory exists, if not raise error
    627638            } else {
    628639                printHelp
     
    688699}
    689700
     701proc storeoutput {data} {
     702    global _d
     703    append _d $data
     704}
     705
    690706proc main {argv} {
    691707    # set default values
     
    700716        --runfile ""
    701717        --tool "./tool.xml"
     718        --tooldir ""
    702719        oParams {}
    703720    }
    704721
    705722    parseOptions argv params
     723
     724    # keep the wish window from popping up
     725    catch {wm withdraw .}
    706726
    707727    # parse out path=val combinations from the list of orphaned parameters
     
    723743
    724744    set xmlobj [Rappture::library $params(--tool)]
    725     set installdir [file dirname $params(--tool)]
     745    if {$params(--tooldir) == ""} {
     746        set installdir [file dirname $params(--tool)]
     747    } else {
     748        set installdir $params(--tooldir)
     749    }
    726750
    727751    # need a better way to do this,
     
    759783    set result ""
    760784    # execute the job
    761     foreach {status result} [eval $tool run] break
    762 
    763     if {[string compare "" $params(--runfile)] != 0} {
    764         set runfilename [$tool getRunFile]
    765         set err [catch {file rename $runfilename $params(--runfile)} out]
    766         if {$err} {
    767             puts stderr $out
    768         }
    769     }
     785    foreach {status result} [eval $tool run -output storeoutput] break
    770786
    771787    # if run was successful, check to see if we should compare
    772788    if {$status == 0 && $result != "ABORT"} {
    773         if {[Rappture::library isvalid $result]} {
     789        global _d
     790        if {[regexp {=RAPPTURE-RUN=>([^\n]+)} $_d match result]} {
     791            if {[string compare "" $params(--runfile)] != 0} {
     792                if {[catch {file rename -force -- $result $params(--runfile)} out]} {
     793                    puts stderr "while moving $result to $params(--runfile): $out"
     794                }
     795            }
    774796            # do comparison if user chose to compare with other results
    775797            if {"" != $params(--compare)} {
  • branches/blt4/gui/cf/config.guess

    r1885 r2690  
    22# Attempt to guess a canonical system name.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    5 #   Free Software Foundation, Inc.
    6 
    7 timestamp='2008-04-14'
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-02-22'
    87
    98# This file is free software; you can redistribute it and/or modify it
     
    1918# You should have received a copy of the GNU General Public License
    2019# along with this program; if not, write to the Free Software
    21 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    22 # 02110-1301, USA.
     20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    2321#
    2422# As a special exception to the GNU General Public License, if you
     
    2624# configuration script generated by Autoconf, you may include it under
    2725# the same distribution terms that you use for the rest of that program.
    28 
    2926
    3027# Originally written by Per Bothner <per@bothner.com>.
     
    5754
    5855Originally written by Per Bothner.
    59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    60 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     57Free Software Foundation, Inc.
    6158
    6259This is free software; see the source for copying conditions.  There is NO
     
    7067  case $1 in
    7168    --time-stamp | --time* | -t )
    72        echo "$timestamp" ; exit ;;
     69       echo "$timestamp" ; exit 0 ;;
    7370    --version | -v )
    74        echo "$version" ; exit ;;
     71       echo "$version" ; exit 0 ;;
    7572    --help | --h* | -h )
    76        echo "$usage"; exit ;;
     73       echo "$usage"; exit 0 ;;
    7774    -- )     # Stop option processing
    7875       shift; break ;;
     
    108105trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
    109106: ${TMPDIR=/tmp} ;
    110  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
    111108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
    112  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
    113109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
    114110dummy=$tmp/dummy ;
     
    127123 ,,*)   CC_FOR_BUILD=$CC ;;
    128124 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    129 esac ; set_cc_for_build= ;'
     125esac ;'
    130126
    131127# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
     
    162158            sh3el) machine=shl-unknown ;;
    163159            sh3eb) machine=sh-unknown ;;
    164             sh5el) machine=sh5le-unknown ;;
    165160            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
    166161        esac
     
    201196        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    202197        echo "${machine}-${os}${release}"
    203         exit ;;
     198        exit 0 ;;
     199    amiga:OpenBSD:*:*)
     200        echo m68k-unknown-openbsd${UNAME_RELEASE}
     201        exit 0 ;;
     202    arc:OpenBSD:*:*)
     203        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     204        exit 0 ;;
     205    hp300:OpenBSD:*:*)
     206        echo m68k-unknown-openbsd${UNAME_RELEASE}
     207        exit 0 ;;
     208    mac68k:OpenBSD:*:*)
     209        echo m68k-unknown-openbsd${UNAME_RELEASE}
     210        exit 0 ;;
     211    macppc:OpenBSD:*:*)
     212        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     213        exit 0 ;;
     214    mvme68k:OpenBSD:*:*)
     215        echo m68k-unknown-openbsd${UNAME_RELEASE}
     216        exit 0 ;;
     217    mvme88k:OpenBSD:*:*)
     218        echo m88k-unknown-openbsd${UNAME_RELEASE}
     219        exit 0 ;;
     220    mvmeppc:OpenBSD:*:*)
     221        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     222        exit 0 ;;
     223    pmax:OpenBSD:*:*)
     224        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     225        exit 0 ;;
     226    sgi:OpenBSD:*:*)
     227        echo mipseb-unknown-openbsd${UNAME_RELEASE}
     228        exit 0 ;;
     229    sun3:OpenBSD:*:*)
     230        echo m68k-unknown-openbsd${UNAME_RELEASE}
     231        exit 0 ;;
     232    wgrisc:OpenBSD:*:*)
     233        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     234        exit 0 ;;
    204235    *:OpenBSD:*:*)
    205         UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
    206         echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
    207         exit ;;
    208     *:ekkoBSD:*:*)
    209         echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
    210         exit ;;
    211     *:SolidBSD:*:*)
    212         echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
    213         exit ;;
    214     macppc:MirBSD:*:*)
    215         echo powerpc-unknown-mirbsd${UNAME_RELEASE}
    216         exit ;;
    217     *:MirBSD:*:*)
    218         echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
    219         exit ;;
     236        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
     237        exit 0 ;;
    220238    alpha:OSF1:*:*)
    221         case $UNAME_RELEASE in
    222         *4.0)
     239        if test $UNAME_RELEASE = "V4.0"; then
    223240                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    224                 ;;
    225         *5.*)
    226                 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
    227                 ;;
    228         esac
     241        fi
    229242        # According to Compaq, /usr/sbin/psrinfo has been available on
    230243        # OSF/1 and Tru64 systems produced since 1995.  I hope that
     
    264277                UNAME_MACHINE="alphaev79" ;;
    265278        esac
    266         # A Pn.n version is a patched version.
    267279        # A Vn.n version is a released version.
    268280        # A Tn.n version is a released field test version.
    269281        # A Xn.n version is an unreleased experimental baselevel.
    270282        # 1.2 uses "1.2" for uname -r.
    271         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    272         exit ;;
     283        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     284        exit 0 ;;
    273285    Alpha\ *:Windows_NT*:*)
    274286        # How do we know it's Interix rather than the generic POSIX subsystem?
     
    276288        # of the specific Alpha model?
    277289        echo alpha-pc-interix
    278         exit ;;
     290        exit 0 ;;
    279291    21064:Windows_NT:50:3)
    280292        echo alpha-dec-winnt3.5
    281         exit ;;
     293        exit 0 ;;
    282294    Amiga*:UNIX_System_V:4.0:*)
    283295        echo m68k-unknown-sysv4
    284         exit ;;
     296        exit 0;;
    285297    *:[Aa]miga[Oo][Ss]:*:*)
    286298        echo ${UNAME_MACHINE}-unknown-amigaos
    287         exit ;;
     299        exit 0 ;;
    288300    *:[Mm]orph[Oo][Ss]:*:*)
    289301        echo ${UNAME_MACHINE}-unknown-morphos
    290         exit ;;
     302        exit 0 ;;
    291303    *:OS/390:*:*)
    292304        echo i370-ibm-openedition
    293         exit ;;
    294     *:z/VM:*:*)
    295         echo s390-ibm-zvmoe
    296         exit ;;
    297     *:OS400:*:*)
    298         echo powerpc-ibm-os400
    299         exit ;;
     305        exit 0 ;;
    300306    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    301307        echo arm-acorn-riscix${UNAME_RELEASE}
    302         exit ;;
    303     arm:riscos:*:*|arm:RISCOS:*:*)
    304         echo arm-unknown-riscos
    305         exit ;;
     308        exit 0;;
    306309    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    307310        echo hppa1.1-hitachi-hiuxmpp
    308         exit ;;
     311        exit 0;;
    309312    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    310313        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
     
    314317                echo pyramid-pyramid-bsd
    315318        fi
    316         exit ;;
     319        exit 0 ;;
    317320    NILE*:*:*:dcosx)
    318321        echo pyramid-pyramid-svr4
    319         exit ;;
    320     DRS?6000:unix:4.0:6*)
    321         echo sparc-icl-nx6
    322         exit ;;
    323     DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
     322        exit 0 ;;
     323    DRS?6000:UNIX_SV:4.2*:7*)
    324324        case `/usr/bin/uname -p` in
    325             sparc) echo sparc-icl-nx7; exit ;;
     325            sparc) echo sparc-icl-nx7 && exit 0 ;;
    326326        esac ;;
    327327    sun4H:SunOS:5.*:*)
    328328        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    329         exit ;;
     329        exit 0 ;;
    330330    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    331331        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    332         exit ;;
    333     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
     332        exit 0 ;;
     333    i86pc:SunOS:5.*:*)
    334334        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    335         exit ;;
     335        exit 0 ;;
    336336    sun4*:SunOS:6*:*)
    337337        # According to config.sub, this is the proper way to canonicalize
     
    339339        # it's likely to be more like Solaris than SunOS4.
    340340        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    341         exit ;;
     341        exit 0 ;;
    342342    sun4*:SunOS:*:*)
    343343        case "`/usr/bin/arch -k`" in
     
    348348        # Japanese Language versions have a version number like `4.1.3-JL'.
    349349        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
    350         exit ;;
     350        exit 0 ;;
    351351    sun3*:SunOS:*:*)
    352352        echo m68k-sun-sunos${UNAME_RELEASE}
    353         exit ;;
     353        exit 0 ;;
    354354    sun*:*:4.2BSD:*)
    355355        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
     
    363363                ;;
    364364        esac
    365         exit ;;
     365        exit 0 ;;
    366366    aushp:SunOS:*:*)
    367367        echo sparc-auspex-sunos${UNAME_RELEASE}
    368         exit ;;
     368        exit 0 ;;
    369369    # The situation for MiNT is a little confusing.  The machine name
    370370    # can be virtually everything (everything which is not
     
    377377    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    378378        echo m68k-atari-mint${UNAME_RELEASE}
    379         exit ;;
     379        exit 0 ;;
    380380    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    381381        echo m68k-atari-mint${UNAME_RELEASE}
    382         exit ;;
     382        exit 0 ;;
    383383    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    384384        echo m68k-atari-mint${UNAME_RELEASE}
    385         exit ;;
     385        exit 0 ;;
    386386    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    387387        echo m68k-milan-mint${UNAME_RELEASE}
    388         exit ;;
     388        exit 0 ;;
    389389    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    390390        echo m68k-hades-mint${UNAME_RELEASE}
    391         exit ;;
     391        exit 0 ;;
    392392    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    393393        echo m68k-unknown-mint${UNAME_RELEASE}
    394         exit ;;
    395     m68k:machten:*:*)
    396         echo m68k-apple-machten${UNAME_RELEASE}
    397         exit ;;
     394        exit 0 ;;
    398395    powerpc:machten:*:*)
    399396        echo powerpc-apple-machten${UNAME_RELEASE}
    400         exit ;;
     397        exit 0 ;;
    401398    RISC*:Mach:*:*)
    402399        echo mips-dec-mach_bsd4.3
    403         exit ;;
     400        exit 0 ;;
    404401    RISC*:ULTRIX:*:*)
    405402        echo mips-dec-ultrix${UNAME_RELEASE}
    406         exit ;;
     403        exit 0 ;;
    407404    VAX*:ULTRIX*:*:*)
    408405        echo vax-dec-ultrix${UNAME_RELEASE}
    409         exit ;;
     406        exit 0 ;;
    410407    2020:CLIX:*:* | 2430:CLIX:*:*)
    411408        echo clipper-intergraph-clix${UNAME_RELEASE}
    412         exit ;;
     409        exit 0 ;;
    413410    mips:*:*:UMIPS | mips:*:*:RISCos)
    414411        eval $set_cc_for_build
     
    434431        }
    435432EOF
    436         $CC_FOR_BUILD -o $dummy $dummy.c &&
    437           dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
    438           SYSTEM_NAME=`$dummy $dummyarg` &&
    439             { echo "$SYSTEM_NAME"; exit; }
     433        $CC_FOR_BUILD -o $dummy $dummy.c \
     434          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
     435          && exit 0
    440436        echo mips-mips-riscos${UNAME_RELEASE}
    441         exit ;;
     437        exit 0 ;;
    442438    Motorola:PowerMAX_OS:*:*)
    443439        echo powerpc-motorola-powermax
    444         exit ;;
     440        exit 0 ;;
    445441    Motorola:*:4.3:PL8-*)
    446442        echo powerpc-harris-powermax
    447         exit ;;
     443        exit 0 ;;
    448444    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    449445        echo powerpc-harris-powermax
    450         exit ;;
     446        exit 0 ;;
    451447    Night_Hawk:Power_UNIX:*:*)
    452448        echo powerpc-harris-powerunix
    453         exit ;;
     449        exit 0 ;;
    454450    m88k:CX/UX:7*:*)
    455451        echo m88k-harris-cxux7
    456         exit ;;
     452        exit 0 ;;
    457453    m88k:*:4*:R4*)
    458454        echo m88k-motorola-sysv4
    459         exit ;;
     455        exit 0 ;;
    460456    m88k:*:3*:R3*)
    461457        echo m88k-motorola-sysv3
    462         exit ;;
     458        exit 0 ;;
    463459    AViiON:dgux:*:*)
    464460        # DG/UX returns AViiON for all architectures
     
    476472            echo i586-dg-dgux${UNAME_RELEASE}
    477473        fi
    478         exit ;;
     474        exit 0 ;;
    479475    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    480476        echo m88k-dolphin-sysv3
    481         exit ;;
     477        exit 0 ;;
    482478    M88*:*:R3*:*)
    483479        # Delta 88k system running SVR3
    484480        echo m88k-motorola-sysv3
    485         exit ;;
     481        exit 0 ;;
    486482    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
    487483        echo m88k-tektronix-sysv3
    488         exit ;;
     484        exit 0 ;;
    489485    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
    490486        echo m68k-tektronix-bsd
    491         exit ;;
     487        exit 0 ;;
    492488    *:IRIX*:*:*)
    493489        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
    494         exit ;;
     490        exit 0 ;;
    495491    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    496         echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
    497         exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     492        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
     493        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
    498494    i*86:AIX:*:*)
    499495        echo i386-ibm-aix
    500         exit ;;
     496        exit 0 ;;
    501497    ia64:AIX:*:*)
    502498        if [ -x /usr/bin/oslevel ] ; then
     
    506502        fi
    507503        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
    508         exit ;;
     504        exit 0 ;;
    509505    *:AIX:2:3)
    510506        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
     
    521517                        }
    522518EOF
    523                 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
    524                 then
    525                         echo "$SYSTEM_NAME"
    526                 else
    527                         echo rs6000-ibm-aix3.2.5
    528                 fi
     519                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
     520                echo rs6000-ibm-aix3.2.5
    529521        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    530522                echo rs6000-ibm-aix3.2.4
     
    532524                echo rs6000-ibm-aix3.2
    533525        fi
    534         exit ;;
    535     *:AIX:*:[456])
     526        exit 0 ;;
     527    *:AIX:*:[45])
    536528        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    537529        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
     
    546538        fi
    547539        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    548         exit ;;
     540        exit 0 ;;
    549541    *:AIX:*:*)
    550542        echo rs6000-ibm-aix
    551         exit ;;
     543        exit 0 ;;
    552544    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    553545        echo romp-ibm-bsd4.4
    554         exit ;;
     546        exit 0 ;;
    555547    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    556548        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    557         exit ;;                             # report: romp-ibm BSD 4.3
     549        exit 0 ;;                           # report: romp-ibm BSD 4.3
    558550    *:BOSX:*:*)
    559551        echo rs6000-bull-bosx
    560         exit ;;
     552        exit 0 ;;
    561553    DPX/2?00:B.O.S.:*:*)
    562554        echo m68k-bull-sysv3
    563         exit ;;
     555        exit 0 ;;
    564556    9000/[34]??:4.3bsd:1.*:*)
    565557        echo m68k-hp-bsd
    566         exit ;;
     558        exit 0 ;;
    567559    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    568560        echo m68k-hp-bsd4.4
    569         exit ;;
     561        exit 0 ;;
    570562    9000/[34678]??:HP-UX:*:*)
    571563        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
     
    629621        if [ ${HP_ARCH} = "hppa2.0w" ]
    630622        then
    631             eval $set_cc_for_build
    632 
    633             # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
    634             # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
    635             # generating 64-bit code.  GNU and HP use different nomenclature:
    636             #
    637             # $ CC_FOR_BUILD=cc ./config.guess
    638             # => hppa2.0w-hp-hpux11.23
    639             # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
    640             # => hppa64-hp-hpux11.23
    641 
    642             if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
    643                 grep __LP64__ >/dev/null
     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
    644626            then
    645627                HP_ARCH="hppa2.0w"
     
    649631        fi
    650632        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    651         exit ;;
     633        exit 0 ;;
    652634    ia64:HP-UX:*:*)
    653635        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    654636        echo ia64-hp-hpux${HPUX_REV}
    655         exit ;;
     637        exit 0 ;;
    656638    3050*:HI-UX:*:*)
    657639        eval $set_cc_for_build
     
    681663        }
    682664EOF
    683         $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
    684                 { echo "$SYSTEM_NAME"; exit; }
     665        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    685666        echo unknown-hitachi-hiuxwe2
    686         exit ;;
     667        exit 0 ;;
    687668    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
    688669        echo hppa1.1-hp-bsd
    689         exit ;;
     670        exit 0 ;;
    690671    9000/8??:4.3bsd:*:*)
    691672        echo hppa1.0-hp-bsd
    692         exit ;;
     673        exit 0 ;;
    693674    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    694675        echo hppa1.0-hp-mpeix
    695         exit ;;
     676        exit 0 ;;
    696677    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    697678        echo hppa1.1-hp-osf
    698         exit ;;
     679        exit 0 ;;
    699680    hp8??:OSF1:*:*)
    700681        echo hppa1.0-hp-osf
    701         exit ;;
     682        exit 0 ;;
    702683    i*86:OSF1:*:*)
    703684        if [ -x /usr/sbin/sysversion ] ; then
     
    706687            echo ${UNAME_MACHINE}-unknown-osf1
    707688        fi
    708         exit ;;
     689        exit 0 ;;
    709690    parisc*:Lites*:*:*)
    710691        echo hppa1.1-hp-lites
    711         exit ;;
     692        exit 0 ;;
    712693    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    713694        echo c1-convex-bsd
    714         exit ;;
     695        exit 0 ;;
    715696    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    716697        if getsysinfo -f scalar_acc
     
    718699        else echo c2-convex-bsd
    719700        fi
    720         exit ;;
     701        exit 0 ;;
    721702    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    722703        echo c34-convex-bsd
    723         exit ;;
     704        exit 0 ;;
    724705    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    725706        echo c38-convex-bsd
    726         exit ;;
     707        exit 0 ;;
    727708    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    728709        echo c4-convex-bsd
    729         exit ;;
     710        exit 0 ;;
    730711    CRAY*Y-MP:*:*:*)
    731712        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    732         exit ;;
     713        exit 0 ;;
    733714    CRAY*[A-Z]90:*:*:*)
    734715        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
     
    736717              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
    737718              -e 's/\.[^.]*$/.X/'
    738         exit ;;
     719        exit 0 ;;
    739720    CRAY*TS:*:*:*)
    740721        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    741         exit ;;
     722        exit 0 ;;
    742723    CRAY*T3E:*:*:*)
    743724        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    744         exit ;;
     725        exit 0 ;;
    745726    CRAY*SV1:*:*:*)
    746727        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    747         exit ;;
     728        exit 0 ;;
    748729    *:UNICOS/mp:*:*)
    749         echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    750         exit ;;
     730        echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     731        exit 0 ;;
    751732    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    752733        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     
    754735        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    755736        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    756         exit ;;
    757     5000:UNIX_System_V:4.*:*)
    758         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    759         FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
    760         echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    761         exit ;;
     737        exit 0 ;;
    762738    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    763739        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    764         exit ;;
     740        exit 0 ;;
    765741    sparc*:BSD/OS:*:*)
    766742        echo sparc-unknown-bsdi${UNAME_RELEASE}
    767         exit ;;
     743        exit 0 ;;
    768744    *:BSD/OS:*:*)
    769745        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    770         exit ;;
     746        exit 0 ;;
    771747    *:FreeBSD:*:*)
    772         case ${UNAME_MACHINE} in
    773             pc98)
    774                 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    775             amd64)
    776                 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    777             *)
    778                 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
    779         esac
    780         exit ;;
     748        # Determine whether the default compiler uses glibc.
     749        eval $set_cc_for_build
     750        sed 's/^        //' << EOF >$dummy.c
     751        #include <features.h>
     752        #if __GLIBC__ >= 2
     753        LIBC=gnu
     754        #else
     755        LIBC=
     756        #endif
     757EOF
     758        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     759        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
     760        exit 0 ;;
    781761    i*:CYGWIN*:*)
    782762        echo ${UNAME_MACHINE}-pc-cygwin
    783         exit ;;
    784     *:MINGW*:*)
     763        exit 0 ;;
     764    i*:MINGW*:*)
    785765        echo ${UNAME_MACHINE}-pc-mingw32
    786         exit ;;
    787     i*:windows32*:*)
    788         # uname -m includes "-pc" on this system.
    789         echo ${UNAME_MACHINE}-mingw32
    790         exit ;;
     766        exit 0 ;;
     767    i*:MSYS*:*)
     768        echo ${UNAME_MACHINE}-pc-msys
     769        exit 0 ;;
    791770    i*:PW*:*)
    792771        echo ${UNAME_MACHINE}-pc-pw32
    793         exit ;;
    794     *:Interix*:[3456]*)
    795         case ${UNAME_MACHINE} in
    796             x86)
    797                 echo i586-pc-interix${UNAME_RELEASE}
    798                 exit ;;
    799             EM64T | authenticamd)
    800                 echo x86_64-unknown-interix${UNAME_RELEASE}
    801                 exit ;;
    802             IA64)
    803                 echo ia64-unknown-interix${UNAME_RELEASE}
    804                 exit ;;
    805         esac ;;
     772        exit 0 ;;
     773    x86:Interix*:3*)
     774        echo i586-pc-interix3
     775        exit 0 ;;
    806776    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
    807777        echo i${UNAME_MACHINE}-pc-mks
    808         exit ;;
     778        exit 0 ;;
    809779    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    810780        # How do we know it's Interix rather than the generic POSIX subsystem?
     
    812782        # UNAME_MACHINE based on the output of uname instead of i386?
    813783        echo i586-pc-interix
    814         exit ;;
     784        exit 0 ;;
    815785    i*:UWIN*:*)
    816786        echo ${UNAME_MACHINE}-pc-uwin
    817         exit ;;
    818     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
    819         echo x86_64-unknown-cygwin
    820         exit ;;
     787        exit 0 ;;
    821788    p*:CYGWIN*:*)
    822789        echo powerpcle-unknown-cygwin
    823         exit ;;
     790        exit 0 ;;
    824791    prep*:SunOS:5.*:*)
    825792        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    826         exit ;;
     793        exit 0 ;;
    827794    *:GNU:*:*)
    828         # the GNU system
    829795        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    830         exit ;;
    831     *:GNU/*:*:*)
    832         # other systems with GNU libc and userland
    833         echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
    834         exit ;;
     796        exit 0 ;;
    835797    i*86:Minix:*:*)
    836798        echo ${UNAME_MACHINE}-pc-minix
    837         exit ;;
     799        exit 0 ;;
    838800    arm*:Linux:*:*)
    839         eval $set_cc_for_build
    840         if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
    841             | grep -q __ARM_EABI__
    842         then
    843             echo ${UNAME_MACHINE}-unknown-linux-gnu
    844         else
    845             echo ${UNAME_MACHINE}-unknown-linux-gnueabi
    846         fi
    847         exit ;;
    848     avr32*:Linux:*:*)
    849801        echo ${UNAME_MACHINE}-unknown-linux-gnu
    850         exit ;;
    851     cris:Linux:*:*)
    852         echo cris-axis-linux-gnu
    853         exit ;;
    854     crisv32:Linux:*:*)
    855         echo crisv32-axis-linux-gnu
    856         exit ;;
    857     frv:Linux:*:*)
    858         echo frv-unknown-linux-gnu
    859         exit ;;
     802        exit 0 ;;
    860803    ia64:Linux:*:*)
    861804        echo ${UNAME_MACHINE}-unknown-linux-gnu
    862         exit ;;
    863     m32r*:Linux:*:*)
    864         echo ${UNAME_MACHINE}-unknown-linux-gnu
    865         exit ;;
     805        exit 0 ;;
    866806    m68*:Linux:*:*)
    867807        echo ${UNAME_MACHINE}-unknown-linux-gnu
    868         exit ;;
     808        exit 0 ;;
    869809    mips:Linux:*:*)
    870810        eval $set_cc_for_build
     
    883823        #endif
    884824EOF
    885         eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
    886             /^CPU/{
    887                 s: ::g
    888                 p
    889             }'`"
    890         test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
     825        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     826        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
    891827        ;;
    892828    mips64:Linux:*:*)
     
    906842        #endif
    907843EOF
    908         eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
    909             /^CPU/{
    910                 s: ::g
    911                 p
    912             }'`"
    913         test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
     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
    914846        ;;
    915     or32:Linux:*:*)
    916         echo or32-unknown-linux-gnu
    917         exit ;;
    918847    ppc:Linux:*:*)
    919848        echo powerpc-unknown-linux-gnu
    920         exit ;;
     849        exit 0 ;;
    921850    ppc64:Linux:*:*)
    922851        echo powerpc64-unknown-linux-gnu
    923         exit ;;
     852        exit 0 ;;
    924853    alpha:Linux:*:*)
    925854        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     
    935864        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    936865        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
    937         exit ;;
     866        exit 0 ;;
    938867    parisc:Linux:*:* | hppa:Linux:*:*)
    939868        # Look for CPU level
     
    943872          *)    echo hppa-unknown-linux-gnu ;;
    944873        esac
    945         exit ;;
     874        exit 0 ;;
    946875    parisc64:Linux:*:* | hppa64:Linux:*:*)
    947876        echo hppa64-unknown-linux-gnu
    948         exit ;;
     877        exit 0 ;;
    949878    s390:Linux:*:* | s390x:Linux:*:*)
    950879        echo ${UNAME_MACHINE}-ibm-linux
    951         exit ;;
    952     sh64*:Linux:*:*)
    953         echo ${UNAME_MACHINE}-unknown-linux-gnu
    954         exit ;;
     880        exit 0 ;;
    955881    sh*:Linux:*:*)
    956882        echo ${UNAME_MACHINE}-unknown-linux-gnu
    957         exit ;;
     883        exit 0 ;;
    958884    sparc:Linux:*:* | sparc64:Linux:*:*)
    959885        echo ${UNAME_MACHINE}-unknown-linux-gnu
    960         exit ;;
    961     vax:Linux:*:*)
    962         echo ${UNAME_MACHINE}-dec-linux-gnu
    963         exit ;;
     886        exit 0 ;;
    964887    x86_64:Linux:*:*)
    965888        echo x86_64-unknown-linux-gnu
    966         exit ;;
    967     xtensa*:Linux:*:*)
    968         echo ${UNAME_MACHINE}-unknown-linux-gnu
    969         exit ;;
     889        exit 0 ;;
    970890    i*86:Linux:*:*)
    971891        # The BFD linker knows what the default object file format is, so
     
    985905          a.out-i386-linux)
    986906                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
    987                 exit ;;
     907                exit 0 ;;
     908          coff-i386)
     909                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
     910                exit 0 ;;
    988911          "")
    989912                # Either a pre-BFD a.out linker (linux-gnuoldld) or
    990913                # one that does not give us useful --help.
    991914                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
    992                 exit ;;
     915                exit 0 ;;
    993916        esac
    994917        # Determine whether the default compiler is a.out or elf
     
    1007930        # endif
    1008931        #else
    1009         #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
     932        #ifdef __INTEL_COMPILER
    1010933        LIBC=gnu
    1011934        #else
     
    1013936        #endif
    1014937        #endif
    1015         #ifdef __dietlibc__
    1016         LIBC=dietlibc
    1017         #endif
    1018938EOF
    1019         eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
    1020             /^LIBC/{
    1021                 s: ::g
    1022                 p
    1023             }'`"
    1024         test x"${LIBC}" != x && {
    1025                 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
    1026                 exit
    1027         }
    1028         test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
     939        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     940        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
     941        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
    1029942        ;;
    1030943    i*86:DYNIX/ptx:4*:*)
     
    1033946        # sysname and nodename.
    1034947        echo i386-sequent-sysv4
    1035         exit ;;
     948        exit 0 ;;
    1036949    i*86:UNIX_SV:4.2MP:2.*)
    1037950        # Unixware is an offshoot of SVR4, but it has its own version
     
    1041954        # Use sysv4.2uw... so that sysv4* matches it.
    1042955        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    1043         exit ;;
     956        exit 0 ;;
    1044957    i*86:OS/2:*:*)
    1045958        # If we were able to find `uname', then EMX Unix compatibility
    1046959        # is probably installed.
    1047960        echo ${UNAME_MACHINE}-pc-os2-emx
    1048         exit ;;
     961        exit 0 ;;
    1049962    i*86:XTS-300:*:STOP)
    1050963        echo ${UNAME_MACHINE}-unknown-stop
    1051         exit ;;
     964        exit 0 ;;
    1052965    i*86:atheos:*:*)
    1053966        echo ${UNAME_MACHINE}-unknown-atheos
    1054         exit ;;
    1055     i*86:syllable:*:*)
    1056         echo ${UNAME_MACHINE}-pc-syllable
    1057         exit ;;
     967        exit 0 ;;
    1058968    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
    1059969        echo i386-unknown-lynxos${UNAME_RELEASE}
    1060         exit ;;
     970        exit 0 ;;
    1061971    i*86:*DOS:*:*)
    1062972        echo ${UNAME_MACHINE}-pc-msdosdjgpp
    1063         exit ;;
     973        exit 0 ;;
    1064974    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    1065975        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
     
    1069979                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
    1070980        fi
    1071         exit ;;
    1072     i*86:*:5:[678]*)
    1073         # UnixWare 7.x, OpenUNIX and OpenServer 6.
     981        exit 0 ;;
     982    i*86:*:5:[78]*)
    1074983        case `/bin/uname -X | grep "^Machine"` in
    1075984            *486*)           UNAME_MACHINE=i486 ;;
     
    1078987        esac
    1079988        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
    1080         exit ;;
     989        exit 0 ;;
    1081990    i*86:*:3.2:*)
    1082991        if test -f /usr/options/cb.name; then
     
    10961005                echo ${UNAME_MACHINE}-pc-sysv32
    10971006        fi
    1098         exit ;;
     1007        exit 0 ;;
    10991008    pc:*:*:*)
    11001009        # Left here for compatibility:
     
    11021011        # the processor, so we play safe by assuming i386.
    11031012        echo i386-pc-msdosdjgpp
    1104         exit ;;
     1013        exit 0 ;;
    11051014    Intel:Mach:3*:*)
    11061015        echo i386-pc-mach3
    1107         exit ;;
     1016        exit 0 ;;
    11081017    paragon:*:*:*)
    11091018        echo i860-intel-osf1
    1110         exit ;;
     1019        exit 0 ;;
    11111020    i860:*:4.*:*) # i860-SVR4
    11121021        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
     
    11151024          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
    11161025        fi
    1117         exit ;;
     1026        exit 0 ;;
    11181027    mini*:CTIX:SYS*5:*)
    11191028        # "miniframe"
    11201029        echo m68010-convergent-sysv
    1121         exit ;;
     1030        exit 0 ;;
    11221031    mc68k:UNIX:SYSTEM5:3.51m)
    11231032        echo m68k-convergent-sysv
    1124         exit ;;
     1033        exit 0 ;;
    11251034    M680?0:D-NIX:5.3:*)
    11261035        echo m68k-diab-dnix
    1127         exit ;;
    1128     M68*:*:R3V[5678]*:*)
    1129         test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
    1130     3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
     1036        exit 0 ;;
     1037    M68*:*:R3V[567]*:*)
     1038        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 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)
    11311040        OS_REL=''
    11321041        test -r /etc/.relid \
    11331042        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
    11341043        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1135           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
     1044          && echo i486-ncr-sysv4.3${OS_REL} && exit 0
    11361045        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
    1137           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     1046          && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
    11381047    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    11391048        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1140           && { echo i486-ncr-sysv4; exit; } ;;
     1049          && echo i486-ncr-sysv4 && exit 0 ;;
    11411050    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    11421051        echo m68k-unknown-lynxos${UNAME_RELEASE}
    1143         exit ;;
     1052        exit 0 ;;
    11441053    mc68030:UNIX_System_V:4.*:*)
    11451054        echo m68k-atari-sysv4
    1146         exit ;;
     1055        exit 0 ;;
    11471056    TSUNAMI:LynxOS:2.*:*)
    11481057        echo sparc-unknown-lynxos${UNAME_RELEASE}
    1149         exit ;;
     1058        exit 0 ;;
    11501059    rs6000:LynxOS:2.*:*)
    11511060        echo rs6000-unknown-lynxos${UNAME_RELEASE}
    1152         exit ;;
     1061        exit 0 ;;
    11531062    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
    11541063        echo powerpc-unknown-lynxos${UNAME_RELEASE}
    1155         exit ;;
     1064        exit 0 ;;
    11561065    SM[BE]S:UNIX_SV:*:*)
    11571066        echo mips-dde-sysv${UNAME_RELEASE}
    1158         exit ;;
     1067        exit 0 ;;
    11591068    RM*:ReliantUNIX-*:*:*)
    11601069        echo mips-sni-sysv4
    1161         exit ;;
     1070        exit 0 ;;
    11621071    RM*:SINIX-*:*:*)
    11631072        echo mips-sni-sysv4
    1164         exit ;;
     1073        exit 0 ;;
    11651074    *:SINIX-*:*:*)
    11661075        if uname -p 2>/dev/null >/dev/null ; then
     
    11701079                echo ns32k-sni-sysv
    11711080        fi
    1172         exit ;;
     1081        exit 0 ;;
    11731082    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    11741083                      # says <Richard.M.Bartel@ccMail.Census.GOV>
    11751084        echo i586-unisys-sysv4
    1176         exit ;;
     1085        exit 0 ;;
    11771086    *:UNIX_System_V:4*:FTX*)
    11781087        # From Gerald Hewes <hewes@openmarket.com>.
    11791088        # How about differentiating between stratus architectures? -djm
    11801089        echo hppa1.1-stratus-sysv4
    1181         exit ;;
     1090        exit 0 ;;
    11821091    *:*:*:FTX*)
    11831092        # From seanf@swdc.stratus.com.
    11841093        echo i860-stratus-sysv4
    1185         exit ;;
    1186     i*86:VOS:*:*)
    1187         # From Paul.Green@stratus.com.
    1188         echo ${UNAME_MACHINE}-stratus-vos
    1189         exit ;;
     1094        exit 0 ;;
    11901095    *:VOS:*:*)
    11911096        # From Paul.Green@stratus.com.
    11921097        echo hppa1.1-stratus-vos
    1193         exit ;;
     1098        exit 0 ;;
    11941099    mc68*:A/UX:*:*)
    11951100        echo m68k-apple-aux${UNAME_RELEASE}
    1196         exit ;;
     1101        exit 0 ;;
    11971102    news*:NEWS-OS:6*:*)
    11981103        echo mips-sony-newsos6
    1199         exit ;;
     1104        exit 0 ;;
    12001105    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    12011106        if [ -d /usr/nec ]; then
     
    12041109                echo mips-unknown-sysv${UNAME_RELEASE}
    12051110        fi
    1206         exit ;;
     1111        exit 0 ;;
    12071112    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
    12081113        echo powerpc-be-beos
    1209         exit ;;
     1114        exit 0 ;;
    12101115    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only.
    12111116        echo powerpc-apple-beos
    1212         exit ;;
     1117        exit 0 ;;
    12131118    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
    12141119        echo i586-pc-beos
    1215         exit ;;
    1216     BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.
    1217         echo i586-pc-haiku
    1218         exit ;;
     1120        exit 0 ;;
    12191121    SX-4:SUPER-UX:*:*)
    12201122        echo sx4-nec-superux${UNAME_RELEASE}
    1221         exit ;;
     1123        exit 0 ;;
    12221124    SX-5:SUPER-UX:*:*)
    12231125        echo sx5-nec-superux${UNAME_RELEASE}
    1224         exit ;;
     1126        exit 0 ;;
    12251127    SX-6:SUPER-UX:*:*)
    12261128        echo sx6-nec-superux${UNAME_RELEASE}
    1227         exit ;;
    1228     SX-7:SUPER-UX:*:*)
    1229         echo sx7-nec-superux${UNAME_RELEASE}
    1230         exit ;;
    1231     SX-8:SUPER-UX:*:*)
    1232         echo sx8-nec-superux${UNAME_RELEASE}
    1233         exit ;;
    1234     SX-8R:SUPER-UX:*:*)
    1235         echo sx8r-nec-superux${UNAME_RELEASE}
    1236         exit ;;
     1129        exit 0 ;;
    12371130    Power*:Rhapsody:*:*)
    12381131        echo powerpc-apple-rhapsody${UNAME_RELEASE}
    1239         exit ;;
     1132        exit 0 ;;
    12401133    *:Rhapsody:*:*)
    12411134        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
    1242         exit ;;
     1135        exit 0 ;;
    12431136    *:Darwin:*:*)
    1244         UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
    1245         case $UNAME_PROCESSOR in
    1246             unknown) UNAME_PROCESSOR=powerpc ;;
     1137        case `uname -p` in
     1138            *86) UNAME_PROCESSOR=i686 ;;
     1139            powerpc) UNAME_PROCESSOR=powerpc ;;
    12471140        esac
    12481141        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
    1249         exit ;;
     1142        exit 0 ;;
    12501143    *:procnto*:*:* | *:QNX:[0123456789]*:*)
    12511144        UNAME_PROCESSOR=`uname -p`
     
    12551148        fi
    12561149        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
    1257         exit ;;
     1150        exit 0 ;;
    12581151    *:QNX:*:4*)
    12591152        echo i386-pc-qnx
    1260         exit ;;
    1261     NSE-?:NONSTOP_KERNEL:*:*)
    1262         echo nse-tandem-nsk${UNAME_RELEASE}
    1263         exit ;;
    1264     NSR-?:NONSTOP_KERNEL:*:*)
     1153        exit 0 ;;
     1154    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
    12651155        echo nsr-tandem-nsk${UNAME_RELEASE}
    1266         exit ;;
     1156        exit 0 ;;
    12671157    *:NonStop-UX:*:*)
    12681158        echo mips-compaq-nonstopux
    1269         exit ;;
     1159        exit 0 ;;
    12701160    BS2000:POSIX*:*:*)
    12711161        echo bs2000-siemens-sysv
    1272         exit ;;
     1162        exit 0 ;;
    12731163    DS/*:UNIX_System_V:*:*)
    12741164        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
    1275         exit ;;
     1165        exit 0 ;;
    12761166    *:Plan9:*:*)
    12771167        # "uname -m" is not consistent, so use $cputype instead. 386
     
    12841174        fi
    12851175        echo ${UNAME_MACHINE}-unknown-plan9
    1286         exit ;;
     1176        exit 0 ;;
    12871177    *:TOPS-10:*:*)
    12881178        echo pdp10-unknown-tops10
    1289         exit ;;
     1179        exit 0 ;;
    12901180    *:TENEX:*:*)
    12911181        echo pdp10-unknown-tenex
    1292         exit ;;
     1182        exit 0 ;;
    12931183    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
    12941184        echo pdp10-dec-tops20
    1295         exit ;;
     1185        exit 0 ;;
    12961186    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
    12971187        echo pdp10-xkl-tops20
    1298         exit ;;
     1188        exit 0 ;;
    12991189    *:TOPS-20:*:*)
    13001190        echo pdp10-unknown-tops20
    1301         exit ;;
     1191        exit 0 ;;
    13021192    *:ITS:*:*)
    13031193        echo pdp10-unknown-its
    1304         exit ;;
    1305     SEI:*:*:SEIUX)
    1306         echo mips-sei-seiux${UNAME_RELEASE}
    1307         exit ;;
    1308     *:DragonFly:*:*)
    1309         echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    1310         exit ;;
    1311     *:*VMS:*:*)
    1312         UNAME_MACHINE=`(uname -p) 2>/dev/null`
    1313         case "${UNAME_MACHINE}" in
    1314             A*) echo alpha-dec-vms ; exit ;;
    1315             I*) echo ia64-dec-vms ; exit ;;
    1316             V*) echo vax-dec-vms ; exit ;;
    1317         esac ;;
    1318     *:XENIX:*:SysV)
    1319         echo i386-pc-xenix
    1320         exit ;;
    1321     i*86:skyos:*:*)
    1322         echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
    1323         exit ;;
    1324     i*86:rdos:*:*)
    1325         echo ${UNAME_MACHINE}-pc-rdos
    1326         exit ;;
     1194        exit 0 ;;
    13271195esac
    13281196
     
    13561224
    13571225#if defined (__arm) && defined (__acorn) && defined (__unix)
    1358   printf ("arm-acorn-riscix\n"); exit (0);
     1226  printf ("arm-acorn-riscix"); exit (0);
    13591227#endif
    13601228
     
    14451313EOF
    14461314
    1447 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
    1448         { echo "$SYSTEM_NAME"; exit; }
     1315$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
    14491316
    14501317# Apollos put the system type in the environment.
    14511318
    1452 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
     1319test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
    14531320
    14541321# Convex versions that predate uname can use getsysinfo(1)
     
    14591326    c1*)
    14601327        echo c1-convex-bsd
    1461         exit ;;
     1328        exit 0 ;;
    14621329    c2*)
    14631330        if getsysinfo -f scalar_acc
     
    14651332        else echo c2-convex-bsd
    14661333        fi
    1467         exit ;;
     1334        exit 0 ;;
    14681335    c34*)
    14691336        echo c34-convex-bsd
    1470         exit ;;
     1337        exit 0 ;;
    14711338    c38*)
    14721339        echo c38-convex-bsd
    1473         exit ;;
     1340        exit 0 ;;
    14741341    c4*)
    14751342        echo c4-convex-bsd
    1476         exit ;;
     1343        exit 0 ;;
    14771344    esac
    14781345fi
     
    14851352download the most up to date version of the config scripts from
    14861353
    1487   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
    1488 and
    1489   http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
     1354    ftp://ftp.gnu.org/pub/gnu/config/
    14901355
    14911356If the version you run ($0) is already up to date, please
  • branches/blt4/gui/cf/config.sub

    r1885 r2690  
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    5 #   Free Software Foundation, Inc.
    6 
    7 timestamp='2008-04-14'
     4#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     5
     6timestamp='2003-02-22'
    87
    98# This file is (in principle) common to ALL GNU software.
     
    2322# You should have received a copy of the GNU General Public License
    2423# along with this program; if not, write to the Free Software
    25 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    26 # 02110-1301, USA.
    27 #
     24# Foundation, Inc., 59 Temple Place - Suite 330,
     25# Boston, MA 02111-1307, USA.
     26
    2827# As a special exception to the GNU General Public License, if you
    2928# distribute this file as part of a program that contains a
    3029# configuration script generated by Autoconf, you may include it under
    3130# the same distribution terms that you use for the rest of that program.
    32 
    3331
    3432# Please send patches to <config-patches@gnu.org>.  Submit a context
     
    7371GNU config.sub ($timestamp)
    7472
    75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    76 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     73Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     74Free Software Foundation, Inc.
    7775
    7876This is free software; see the source for copying conditions.  There is NO
     
    8684  case $1 in
    8785    --time-stamp | --time* | -t )
    88        echo "$timestamp" ; exit ;;
     86       echo "$timestamp" ; exit 0 ;;
    8987    --version | -v )
    90        echo "$version" ; exit ;;
     88       echo "$version" ; exit 0 ;;
    9189    --help | --h* | -h )
    92        echo "$usage"; exit ;;
     90       echo "$usage"; exit 0 ;;
    9391    -- )     # Stop option processing
    9492       shift; break ;;
     
    102100       # First pass through any local machine types.
    103101       echo $1
    104        exit ;;
     102       exit 0;;
    105103
    106104    * )
     
    121119maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    122120case $maybe_os in
    123   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
    124   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
    125   storm-chaos* | os2-emx* | rtmk-nova*)
     121  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    126122    os=-$maybe_os
    127123    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    149145        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    150146        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    151         -apple | -axis | -knuth | -cray)
     147        -apple | -axis)
    152148                os=
    153149                basic_machine=$1
     
    174170                os=-hiuxwe2
    175171                ;;
    176         -sco6)
    177                 os=-sco5v6
    178                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    179                 ;;
    180172        -sco5)
    181173                os=-sco3.2v5
     
    191183                ;;
    192184        -sco3.2v[4-9]*)
    193                 # Don't forget version if it is 3.2v4 or newer.
    194                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    195                 ;;
    196         -sco5v6*)
    197185                # Don't forget version if it is 3.2v4 or newer.
    198186                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     
    241229        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    242230        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    243         | am33_2.0 \
    244         | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
    245         | bfin \
    246         | c4x | clipper \
     231        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
     232        | clipper \
    247233        | d10v | d30v | dlx | dsp16xx \
    248         | fido | fr30 | frv \
     234        | fr30 | frv \
    249235        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    250236        | i370 | i860 | i960 | ia64 \
    251         | ip2k | iq2000 \
    252         | m32c | m32r | m32rle | m68000 | m68k | m88k \
    253         | maxq | mb | microblaze | mcore | mep | metag \
     237        | ip2k \
     238        | m32r | m68000 | m68k | m88k | mcore \
    254239        | mips | mipsbe | mipseb | mipsel | mipsle \
    255240        | mips16 \
    256241        | mips64 | mips64el \
    257         | mips64octeon | mips64octeonel \
     242        | mips64vr | mips64vrel \
    258243        | mips64orion | mips64orionel \
    259         | mips64r5900 | mips64r5900el \
    260         | mips64vr | mips64vrel \
    261244        | mips64vr4100 | mips64vr4100el \
    262245        | mips64vr4300 | mips64vr4300el \
    263246        | mips64vr5000 | mips64vr5000el \
    264         | mips64vr5900 | mips64vr5900el \
    265247        | mipsisa32 | mipsisa32el \
    266248        | mipsisa32r2 | mipsisa32r2el \
    267249        | mipsisa64 | mipsisa64el \
    268         | mipsisa64r2 | mipsisa64r2el \
    269250        | mipsisa64sb1 | mipsisa64sb1el \
    270251        | mipsisa64sr71k | mipsisa64sr71kel \
    271252        | mipstx39 | mipstx39el \
    272253        | mn10200 | mn10300 \
    273         | mt \
    274254        | msp430 \
    275         | nios | nios2 \
    276255        | ns16k | ns32k \
    277         | or32 \
     256        | openrisc | or32 \
    278257        | pdp10 | pdp11 | pj | pjl \
    279258        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    280259        | pyramid \
    281         | score \
    282         | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
     260        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
    283261        | sh64 | sh64le \
    284         | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
    285         | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
    286         | spu | strongarm \
    287         | tahoe | thumb | tic4x | tic80 | tron \
     262        | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
     263        | strongarm \
     264        | tahoe | thumb | tic80 | tron \
    288265        | v850 | v850e \
    289266        | we32k \
    290         | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
     267        | x86 | xscale | xstormy16 | xtensa \
    291268        | z8k)
    292269                basic_machine=$basic_machine-unknown
     
    298275                ;;
    299276        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
    300                 ;;
    301         ms1)
    302                 basic_machine=mt-unknown
    303277                ;;
    304278
     
    321295        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
    322296        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    323         | avr-* | avr32-* \
    324         | bfin-* | bs2000-* \
     297        | avr-* \
     298        | bs2000-* \
    325299        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
    326         | clipper-* | craynv-* | cydra-* \
     300        | clipper-* | cydra-* \
    327301        | d10v-* | d30v-* | dlx-* \
    328302        | elxsi-* \
    329         | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
     303        | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
    330304        | h8300-* | h8500-* \
    331305        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    332306        | i*86-* | i860-* | i960-* | ia64-* \
    333         | ip2k-* | iq2000-* \
    334         | m32c-* | m32r-* | m32rle-* \
     307        | ip2k-* \
     308        | m32r-* \
    335309        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    336         | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
     310        | m88110-* | m88k-* | mcore-* \
    337311        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
    338312        | mips16-* \
    339313        | mips64-* | mips64el-* \
    340         | mips64octeon-* | mips64octeonel-* \
     314        | mips64vr-* | mips64vrel-* \
    341315        | mips64orion-* | mips64orionel-* \
    342         | mips64r5900-* | mips64r5900el-* \
    343         | mips64vr-* | mips64vrel-* \
    344316        | mips64vr4100-* | mips64vr4100el-* \
    345317        | mips64vr4300-* | mips64vr4300el-* \
    346318        | mips64vr5000-* | mips64vr5000el-* \
    347         | mips64vr5900-* | mips64vr5900el-* \
    348319        | mipsisa32-* | mipsisa32el-* \
    349320        | mipsisa32r2-* | mipsisa32r2el-* \
    350321        | mipsisa64-* | mipsisa64el-* \
    351         | mipsisa64r2-* | mipsisa64r2el-* \
    352322        | mipsisa64sb1-* | mipsisa64sb1el-* \
    353323        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    354324        | mipstx39-* | mipstx39el-* \
    355         | mmix-* \
    356         | mt-* \
    357325        | msp430-* \
    358         | nios-* | nios2-* \
    359         | none-* | np1-* | ns16k-* | ns32k-* \
     326        | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
    360327        | orion-* \
    361328        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     
    363330        | pyramid-* \
    364331        | romp-* | rs6000-* \
    365         | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
     332        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
    366333        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    367         | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
    368         | sparclite-* \
    369         | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
     334        | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
     335        | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
    370336        | tahoe-* | thumb-* \
    371         | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
     337        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
    372338        | tron-* \
    373339        | v850-* | v850e-* | vax-* \
    374340        | we32k-* \
    375         | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
    376         | xstormy16-* | xtensa*-* \
     341        | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
     342        | xtensa-* \
    377343        | ymp-* \
    378344        | z8k-*)
    379                 ;;
    380         # Recognize the basic CPU types without company name, with glob match.
    381         xtensa*)
    382                 basic_machine=$basic_machine-unknown
    383345                ;;
    384346        # Recognize the various machine names and aliases which stand
     
    398360                os=-udi
    399361                ;;
    400         abacus)
    401                 basic_machine=abacus-unknown
    402                 ;;
    403362        adobe68k)
    404363                basic_machine=m68010-adobe
     
    415374                os=-bsd
    416375                ;;
    417         amd64)
    418                 basic_machine=x86_64-pc
    419                 ;;
    420         amd64-*)
    421                 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
    422                 ;;
    423376        amdahl)
    424377                basic_machine=580-amdahl
     
    452405                os=-dynix
    453406                ;;
    454         blackfin)
    455                 basic_machine=bfin-unknown
    456                 os=-linux
    457                 ;;
    458         blackfin-*)
    459                 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
    460                 os=-linux
    461                 ;;
    462407        c90)
    463408                basic_machine=c90-cray
     
    488433                os=-unicos
    489434                ;;
    490         craynv)
    491                 basic_machine=craynv-cray
    492                 os=-unicosmp
    493                 ;;
    494         cr16)
    495                 basic_machine=cr16-unknown
    496                 os=-elf
    497                 ;;
    498435        crds | unos)
    499436                basic_machine=m68k-crds
    500437                ;;
    501         crisv32 | crisv32-* | etraxfs*)
    502                 basic_machine=crisv32-axis
    503                 ;;
    504438        cris | cris-* | etrax*)
    505439                basic_machine=cris-axis
    506                 ;;
    507         crx)
    508                 basic_machine=crx-unknown
    509                 os=-elf
    510440                ;;
    511441        da30 | da30-*)
     
    530460                basic_machine=m88k-motorola
    531461                os=-sysv3
    532                 ;;
    533         dicos)
    534                 basic_machine=i686-pc
    535                 os=-dicos
    536                 ;;
    537         djgpp)
    538                 basic_machine=i586-pc
    539                 os=-msdosdjgpp
    540462                ;;
    541463        dpx20 | dpx20-*)
     
    689611                os=-sysv
    690612                ;;
    691         m68knommu)
    692                 basic_machine=m68k-unknown
    693                 os=-linux
    694                 ;;
    695         m68knommu-*)
    696                 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
    697                 os=-linux
    698                 ;;
    699613        m88k-omron*)
    700614                basic_machine=m88k-omron
     
    709623                ;;
    710624        mingw32)
    711                 basic_machine=i386-pc
     625                basic_machine=i686-pc
    712626                os=-mingw32
    713627                ;;
    714         mingw32ce)
    715                 basic_machine=arm-unknown
    716                 os=-mingw32ce
     628        msys)
     629                basic_machine=i686-pc
     630                os=-msys
    717631                ;;
    718632        miniframe)
     
    729643                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    730644                ;;
     645        mmix*)
     646                basic_machine=mmix-knuth
     647                os=-mmixware
     648                ;;
    731649        monitor)
    732650                basic_machine=m68k-rom68k
     
    740658                basic_machine=i386-pc
    741659                os=-msdos
    742                 ;;
    743         ms1-*)
    744                 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
    745660                ;;
    746661        mvs)
     
    812727                basic_machine=np1-gould
    813728                ;;
     729        nv1)
     730                basic_machine=nv1-cray
     731                os=-unicosmp
     732                ;;
    814733        nsr-tandem)
    815734                basic_machine=nsr-tandem
     
    819738                os=-proelf
    820739                ;;
    821         openrisc | openrisc-*)
     740        or32 | or32-*)
    822741                basic_machine=or32-unknown
    823                 ;;
    824         os400)
    825                 basic_machine=powerpc-ibm
    826                 os=-os400
     742                os=-coff
    827743                ;;
    828744        OSE68000 | ose68000)
     
    842758                os=-osf
    843759                ;;
    844         parisc)
    845                 basic_machine=hppa-unknown
    846                 os=-linux
    847                 ;;
    848         parisc-*)
    849                 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
    850                 os=-linux
    851                 ;;
    852760        pbd)
    853761                basic_machine=sparc-tti
     
    859767                basic_machine=ns32k-pc532
    860768                ;;
    861         pc98)
    862                 basic_machine=i386-pc
    863                 ;;
    864         pc98-*)
    865                 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
    866                 ;;
    867769        pentium | p5 | k5 | k6 | nexgen | viac3)
    868770                basic_machine=i586-pc
     
    871773                basic_machine=i686-pc
    872774                ;;
    873         pentiumii | pentium2 | pentiumiii | pentium3)
     775        pentiumii | pentium2)
    874776                basic_machine=i686-pc
    875                 ;;
    876         pentium4)
    877                 basic_machine=i786-pc
    878777                ;;
    879778        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
     
    883782                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    884783                ;;
    885         pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
     784        pentiumii-* | pentium2-*)
    886785                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    887                 ;;
    888         pentium4-*)
    889                 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    890786                ;;
    891787        pn)
     
    921817                os=-pw32
    922818                ;;
    923         rdos)
    924                 basic_machine=i386-pc
    925                 os=-rdos
    926                 ;;
    927819        rom68k)
    928820                basic_machine=m68k-rom68k
     
    951843                basic_machine=mipsisa64sb1el-unknown
    952844                ;;
    953         sde)
    954                 basic_machine=mipsisa32-sde
    955                 os=-elf
    956                 ;;
    957         sei)
    958                 basic_machine=mips-sei
    959                 os=-seiux
    960                 ;;
    961845        sequent)
    962846                basic_machine=i386-sequent
     
    966850                os=-hms
    967851                ;;
    968         sh5el)
    969                 basic_machine=sh5le-unknown
    970                 ;;
    971         sh64)
    972                 basic_machine=sh64-unknown
    973                 ;;
    974852        sparclite-wrs | simso-wrs)
    975853                basic_machine=sparclite-wrs
     
    1046924                os=-unicos
    1047925                ;;
     926        tic4x | c4x*)
     927                basic_machine=tic4x-unknown
     928                os=-coff
     929                ;;
    1048930        tic54x | c54x*)
    1049931                basic_machine=tic54x-unknown
     
    1058940                os=-coff
    1059941                ;;
    1060         tile*)
    1061                 basic_machine=tile-unknown
    1062                 os=-linux-gnu
    1063                 ;;
    1064942        tx39)
    1065943                basic_machine=mipstx39-unknown
     
    1075953                basic_machine=m68k-ncr
    1076954                ;;
    1077         tpf)
    1078                 basic_machine=s390x-ibm
    1079                 os=-tpf
    1080                 ;;
    1081955        udi29k)
    1082956                basic_machine=a29k-amd
     
    1121995                basic_machine=hppa1.1-winbond
    1122996                os=-proelf
    1123                 ;;
    1124         xbox)
    1125                 basic_machine=i686-pc
    1126                 os=-mingw32
    1127997                ;;
    1128998        xps | xps100)
     
    11561026                basic_machine=romp-ibm
    11571027                ;;
    1158         mmix)
    1159                 basic_machine=mmix-knuth
    1160                 ;;
    11611028        rs6000)
    11621029                basic_machine=rs6000-ibm
     
    11751042                basic_machine=we32k-att
    11761043                ;;
    1177         sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
     1044        sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
    11781045                basic_machine=sh-unknown
    11791046                ;;
    1180         sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
     1047        sh64)
     1048                basic_machine=sh64-unknown
     1049                ;;
     1050        sparc | sparcv9 | sparcv9b)
    11811051                basic_machine=sparc-sun
    11821052                ;;
     
    12511121              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    12521122              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1253               | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
    1254               | -openbsd* | -solidbsd* \
    1255               | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
    1256               | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     1123              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
     1124              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    12571125              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    12581126              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    12591127              | -chorusos* | -chorusrdb* \
    12601128              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1261               | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
    1262               | -uxpv* | -beos* | -mpeix* | -udk* \
     1129              | -mingw32* | -msys* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    12631130              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    12641131              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
     
    12661133              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    12671134              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
    1268               | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
    1269               | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
     1135              | -powermax* | -dnix*)
    12701136        # Remember, each alternative MUST END IN *, to match a version number.
    12711137                ;;
     
    12851151                ;;
    12861152        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    1287               | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
     1153              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
    12881154              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    12891155                ;;
     
    12911157                os=`echo $os | sed -e 's|mac|macos|'`
    12921158                ;;
    1293         -linux-dietlibc)
    1294                 os=-linux-dietlibc
    1295                 ;;
    12961159        -linux*)
    12971160                os=`echo $os | sed -e 's|linux|linux-gnu|'`
     
    13061169                os=-openedition
    13071170                ;;
    1308         -os400*)
    1309                 os=-os400
    1310                 ;;
    13111171        -wince*)
    13121172                os=-wince
     
    13291189        -atheos*)
    13301190                os=-atheos
    1331                 ;;
    1332         -syllable*)
    1333                 os=-syllable
    13341191                ;;
    13351192        -386bsd)
     
    13551212                os=-sysv4
    13561213                ;;
    1357         -tpf*)
    1358                 os=-tpf
    1359                 ;;
    13601214        -triton*)
    13611215                os=-sysv3
     
    13931247        -kaos*)
    13941248                os=-kaos
    1395                 ;;
    1396         -zvmoe)
    1397                 os=-zvmoe
    1398                 ;;
    1399         -dicos*)
    1400                 os=-dicos
    14011249                ;;
    14021250        -none)
     
    14221270
    14231271case $basic_machine in
    1424         score-*)
    1425                 os=-elf
    1426                 ;;
    1427         spu-*)
    1428                 os=-elf
    1429                 ;;
    14301272        *-acorn)
    14311273                os=-riscix1.2
     
    14361278        arm*-semi)
    14371279                os=-aout
    1438                 ;;
    1439         c4x-* | tic4x-*)
    1440                 os=-coff
    14411280                ;;
    14421281        # This must come before the *-dec entry.
     
    14651304                os=-aout
    14661305                ;;
    1467         mep-*)
    1468                 os=-elf
    1469                 ;;
    14701306        mips*-cisco)
    14711307                os=-elf
     
    14861322                os=-beos
    14871323                ;;
    1488         *-haiku)
    1489                 os=-haiku
    1490                 ;;
    14911324        *-ibm)
    14921325                os=-aix
    1493                 ;;
    1494         *-knuth)
    1495                 os=-mmixware
    14961326                ;;
    14971327        *-wec)
     
    16271457                                vendor=ibm
    16281458                                ;;
    1629                         -os400*)
    1630                                 vendor=ibm
    1631                                 ;;
    16321459                        -ptx*)
    16331460                                vendor=sequent
    16341461                                ;;
    1635                         -tpf*)
    1636                                 vendor=ibm
    1637                                 ;;
    16381462                        -vxsim* | -vxworks* | -windiss*)
    16391463                                vendor=wrs
     
    16601484
    16611485echo $basic_machine$os
    1662 exit
     1486exit 0
    16631487
    16641488# Local variables:
  • branches/blt4/gui/cf/install-sh

    r1885 r2690  
    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 "$0: no input file specified" >&2
    110         exit 1
    111 else
    112         :
    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=$mkdirprog
    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" ] || [ -d "$src" ]
    132         then
    133                 :
    134         else
    135                 echo "$0: $src does not exist" >&2
    136                 exit 1
    137         fi
    138 
    139         if [ x"$dst" = x ]
    140         then
    141                 echo "$0: no destination specified" >&2
    142                 exit 1
    143         else
    144                 :
    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                 :
    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                 :
    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 : ; fi &&
    198         if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
    199         if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
    200         if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; 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                 :
    220         fi
    221 
    222 # Make a couple of temp file names in the proper directory.
    223 
    224         dsttmp=$dstdir/#inst.$$#
    225         rmtmp=$dstdir/#rm.$$#
    226 
    227 # Trap to clean up temp files at exit.
    228 
    229         trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
    230         trap '(exit $?); exit' 1 2 13 15
    231 
    232 # Move or copy the file name to the temp name
    233 
    234         $doit $instcmd "$src" "$dsttmp" &&
    235 
    236 # and set any options; do chmod last to preserve setuid bits
    237 
    238 # If any of these fail, we abort the whole thing.  If we want to
    239 # ignore errors from any of these, just make sure not to ignore
    240 # errors from the above "$doit $instcmd $src $dsttmp" command.
    241 
    242         if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
    243         if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
    244         if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
    245         if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
    246 
    247 # Now remove or move aside any old file at destination location.  We try this
    248 # two ways since rm can't unlink itself on some systems and the destination
    249 # file might be busy for other reasons.  In this case, the final cleanup
    250 # might fail but the new file should still install successfully.
    251 
     300# The final little trick to "correctly" pass the exit status to the exit trap.
    252301{
    253         if [ -f "$dstdir/$dstfile" ]
    254         then
    255                 $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
    256                 $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
    257                 {
    258                   echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
    259                   (exit 1); exit
    260                 }
    261         else
    262                 :
    263         fi
    264 } &&
    265 
    266 # Now rename the file to the real destination.
    267 
    268         $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
    269 
    270 fi &&
    271 
    272 # The final little trick to "correctly" pass the exit status to the exit trap.
    273 
    274 {
    275         (exit 0); exit
     302  (exit 0); exit
    276303}
     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:
  • branches/blt4/gui/configure

    r2528 r2690  
    605605LIBOBJS
    606606TK_VERSION
    607 TK_XLIBSW
    608 TK_LIB_SPEC
    609 TK_INC_SPEC
    610 TCL_VERSION
    611607TCL_LIB_SPEC
    612608TCL_INC_SPEC
     609TCL_VERSION
    613610TCLSH
     611ENABLE_GUI
     612MAKE
    614613SHLIB_LDFLAGS
    615 MAKE
    616 LIB_SEARCH_DIRS
    617 ENABLE_GUI
    618614INSTALL_STUB_LIB
    619615INSTALL_LIB
     
    656652INSTALL_SCRIPT
    657653INSTALL_PROGRAM
     654LIB_SEARCH_DIRS
    658655target_os
    659656target_vendor
     
    716713enable_gui
    717714with_tclsh
    718 with_tk
    719715'
    720716      ac_precious_vars='build_alias
     
    13551351  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    13561352  --with-tclsh=DIR        location of tclsh [default=yes]
    1357   --with-tcl=DIR          path of tclConfig.sh [default=yes]
    1358   --with-tk=DIR           path of tkConfig.sh [default=yes]
    13591353
    13601354Some influential environment variables:
     
    21132107
    21142108
    2115 
    21162109#------------------------------------------------------------------------
    21172110# Handle the --prefix=... option
     
    22402233    NONENONEs,x,x, &&
    22412234  program_prefix=${target_alias}-
     2235
    22422236
    22432237# Find a good install program.  We prefer a C program (faster),
     
    55445538
    55455539
    5546 with_tcl=""
    5547 with_tk=""
     5540
     5541
     5542
     5543
     5544
     5545
     5546
     5547
     5548gui_with_tcl=""
    55485549
    55495550make_command=""
     
    55585559  as_fn_error $? "Requires GNU make. You can specify a version with \$MAKE" "$LINENO" 5
    55595560fi
     5561MAKE=${make_command}
     5562
    55605563
    55615564# Check whether --enable-gui was given.
     
    55725575fi
    55735576
     5577
    55745578with_tclsh="yes"
    55755579
     
    55825586
    55835587
    5584 with_tcl="yes"
    5585 
    5586 # Check whether --with-tk was given.
    5587 if test "${with_tk+set}" = set; then :
    5588   withval=$with_tk;
    5589 else
    5590   with_tcl="yes"
    5591 fi
    5592 
    5593 
    5594 with_tk="yes"
    5595 
    5596 # Check whether --with-tk was given.
    5597 if test "${with_tk+set}" = set; then :
    5598   withval=$with_tk;
    5599 else
    5600   with_tk=yes
    5601 fi
    5602 
    56035588TCLSH=
    5604 
    56055589# -----------------------------------------------------------------------
    56065590#
     
    56085592#
    56095593# -----------------------------------------------------------------------
     5594
    56105595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
    56115596$as_echo_n "checking for tclConfig.sh... " >&6; }
    56125597tcl_config_sh=""
    5613 if test "$with_tcl" != "yes" ; then
     5598if test "x$gui_with_tcl" != "x" ; then
    56145599
    56155600  # Verify that a tclConfig.sh file exists in the directory specified
    56165601  # by --with-tcl.
    56175602
    5618   for dir in $with_tcl ; do
     5603  for dir in \
     5604   $gui_with_tcl
     5605  do
    56195606    if test -r "$dir/tclConfig.sh" ; then
    56205607      tcl_config_sh="$dir/tclConfig.sh"
     
    56315618  #  1. Search previously named locations.
    56325619
    5633   for dir in $prefix $exec_prefix $gui_cv_tcl_lib ; do
     5620  for dir in \
     5621   $prefix \
     5622   $exec_prefix \
     5623   $gui_cv_tcl_lib
     5624  do
    56345625    if test -r "$dir/tclConfig.sh" ; then
    56355626      tcl_config_sh="$dir/tclConfig.sh"
     
    56505641fi
    56515642. ${tcl_config_sh}
    5652 
    5653 
    5654 # -----------------------------------------------------------------------
    5655 #
    5656 #       Find the Tcl build configuration file "tclConfig.sh"
    5657 #
    5658 # -----------------------------------------------------------------------
    5659 
    5660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tkConfig.sh" >&5
    5661 $as_echo_n "checking for tkConfig.sh... " >&6; }
    5662 tk_config_sh=""
    5663 if test "$with_tk" != "yes" ; then
    5664 
    5665   # Verify that a tclConfig.sh file exists in the directory specified
    5666   # by --with-tk.
    5667 
    5668   for dir in $with_tk $with_tcl  ; do
    5669     if test -r "$dir/tkConfig.sh" ; then
    5670       tk_config_sh="$dir/tkConfig.sh"
    5671       break
    5672     elif test -r "$dir/lib/tkConfig.sh" ; then
    5673       tk_config_sh="$dir/lib/tkConfig.sh"
    5674       break
    5675     fi
    5676   done
    5677 else
    5678 
    5679   # Otherwise, search for Tcl configuration file.
    5680 
    5681   #  1. Search previously named locations.
    5682 
    5683   for dir in $prefix $exec_prefix ; do
    5684     if test -r "$dir/tkConfig.sh" ; then
    5685       tk_config_sh="$dir/tkConfig.sh"
    5686       break
    5687     elif test -r "$dir/lib/tkConfig.sh" ; then
    5688       tk_config_sh="$dir/lib/tkConfig.sh"
    5689       break
    5690     fi
    5691   done
    5692 fi
    5693 
    5694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tk_config_sh}" >&5
    5695 $as_echo "${tk_config_sh}" >&6; }
    5696 
    5697 if test "x$tk_config_sh" = "x" ; then
    5698   echo "can't find Tk configuration script \"tkConfig.sh\""
    5699   exit 1
    5700 fi
    5701 . ${tk_config_sh}
     5643TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
    57025644
    57035645case $target in
     
    57235665
    57245666
    5725 MAKE=${make_command}
    5726 
    5727 SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
    5728 
    5729 SHLIB_LD=${TCL_SHLIB_LD}
    5730 
    5731 SHLIB_LDFLAGS=${TCL_SHLIB_LDFLAGS}
    5732 
    5733 SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
    5734 
    5735 STLIB_LD=${TCL_STLIB_LD}
    5736 
    5737 
    5738 
    5739 
    5740 
    5741 
    5742 
    5743 
     5667
     5668if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     5669  . ${exec_prefix}/lib/tclConfig.sh
     5670fi
     5671if test -f "${exec_prefix}/lib/tkConfig.sh" ; then
     5672  . ${exec_prefix}/lib/tkConfig.sh
     5673fi
    57445674
    57455675
  • branches/blt4/gui/configure.in

    r2528 r2690  
    22AC_INIT([RapptureGUI],[1.1],[rappture@nanohub.org])
    33AC_CONFIG_AUX_DIR(cf)
    4 
    54#------------------------------------------------------------------------
    65# Handle the --prefix=... option
     
    2019fi
    2120AC_CANONICAL_TARGET
     21AC_SUBST(LIB_SEARCH_DIRS)
    2222
    2323AC_PROG_INSTALL
     
    3232SC_ENABLE_SHARED
    3333
    34 with_tcl=""
    35 with_tk=""
     34AC_SUBST(CFLAGS_DEBUG)
     35AC_SUBST(CFLAGS_OPTIMIZE)
     36AC_SUBST(STLIB_LD)
     37AC_SUBST(SHLIB_LD)
     38AC_SUBST(SHLIB_CFLAGS)
     39AC_SUBST(SHLIB_LDFLAGS)
     40AC_SUBST(SHLIB_SUFFIX)
     41
     42gui_with_tcl=""
    3643
    3744make_command=""
     
    4653  AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE])
    4754fi
     55AC_SUBST(MAKE, ${make_command})
    4856
    4957AC_ARG_ENABLE(
     
    5765    ENABLE_GUI="yes"
    5866fi
     67AC_SUBST(ENABLE_GUI)
    5968
    6069with_tclsh="yes"
     
    6675    [with_tclsh=yes])
    6776
    68 with_tcl="yes"
    69 AC_ARG_WITH(
    70     [tk],
    71     [AS_HELP_STRING([--with-tcl[=DIR]],
    72         [path of tclConfig.sh @<:@default=yes@:>@])],
    73     [],
    74     [with_tcl="yes"])
    75 
    76 with_tk="yes"
    77 AC_ARG_WITH(
    78     [tk],
    79     [AS_HELP_STRING([--with-tk[=DIR]],
    80         [path of tkConfig.sh @<:@default=yes@:>@])],
    81     [],
    82     [with_tk=yes])
    8377TCLSH=
    84 
    8578# -----------------------------------------------------------------------
    8679#
     
    8881#
    8982# -----------------------------------------------------------------------
     83
    9084AC_MSG_CHECKING([for tclConfig.sh])
    9185tcl_config_sh=""
    92 if test "$with_tcl" != "yes" ; then
     86if test "x$gui_with_tcl" != "x" ; then
    9387
    9488  # Verify that a tclConfig.sh file exists in the directory specified
    9589  # by --with-tcl.
    9690
    97   for dir in $with_tcl ; do
     91  for dir in \
     92   $gui_with_tcl
     93  do
    9894    if test -r "$dir/tclConfig.sh" ; then
    9995      tcl_config_sh="$dir/tclConfig.sh"
     
    110106  #  1. Search previously named locations.
    111107
    112   for dir in $prefix $exec_prefix $gui_cv_tcl_lib ; do
     108  for dir in \
     109   $prefix \
     110   $exec_prefix \
     111   $gui_cv_tcl_lib
     112  do
    113113    if test -r "$dir/tclConfig.sh" ; then
    114114      tcl_config_sh="$dir/tclConfig.sh"
     
    128128fi
    129129. ${tcl_config_sh}
    130 
    131 
    132 # -----------------------------------------------------------------------
    133 #
    134 #       Find the Tcl build configuration file "tclConfig.sh"
    135 #
    136 # -----------------------------------------------------------------------
    137 
    138 AC_MSG_CHECKING([for tkConfig.sh])
    139 tk_config_sh=""
    140 if test "$with_tk" != "yes" ; then
    141 
    142   # Verify that a tclConfig.sh file exists in the directory specified
    143   # by --with-tk.
    144 
    145   for dir in $with_tk $with_tcl  ; do
    146     if test -r "$dir/tkConfig.sh" ; then
    147       tk_config_sh="$dir/tkConfig.sh"
    148       break
    149     elif test -r "$dir/lib/tkConfig.sh" ; then
    150       tk_config_sh="$dir/lib/tkConfig.sh"
    151       break
    152     fi
    153   done
    154 else
    155 
    156   # Otherwise, search for Tcl configuration file. 
    157 
    158   #  1. Search previously named locations.
    159 
    160   for dir in $prefix $exec_prefix ; do
    161     if test -r "$dir/tkConfig.sh" ; then
    162       tk_config_sh="$dir/tkConfig.sh"
    163       break
    164     elif test -r "$dir/lib/tkConfig.sh" ; then
    165       tk_config_sh="$dir/lib/tkConfig.sh"
    166       break
    167     fi
    168   done
    169 fi
    170 
    171 AC_MSG_RESULT([${tk_config_sh}])
    172 
    173 if test "x$tk_config_sh" = "x" ; then
    174   echo "can't find Tk configuration script \"tkConfig.sh\""
    175   exit 1
    176 fi
    177 . ${tk_config_sh}
     130TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
    178131
    179132case $target in
     
    193146
    194147AC_MSG_RESULT([${TCLSH}])
     148AC_SUBST(TCLSH)
    195149
    196 AC_SUBST(CFLAGS_DEBUG)
    197 AC_SUBST(CFLAGS_OPTIMIZE)
    198 AC_SUBST(ENABLE_GUI)
    199 AC_SUBST(LIB_SEARCH_DIRS)
    200 AC_SUBST(MAKE, ${make_command})
    201 AC_SUBST(SHLIB_CFLAGS, ${TCL_SHLIB_CFLAGS})
    202 AC_SUBST(SHLIB_LD, ${TCL_SHLIB_LD})
    203 AC_SUBST(SHLIB_LDFLAGS, ${TCL_SHLIB_LDFLAGS})
    204 AC_SUBST(SHLIB_SUFFIX, ${TCL_SHLIB_SUFFIX})
    205 AC_SUBST(STLIB_LD, ${TCL_STLIB_LD})
    206 AC_SUBST(TCLSH)
     150AC_SUBST(TCL_VERSION)
    207151AC_SUBST(TCL_INC_SPEC)
    208152AC_SUBST(TCL_LIB_SPEC)
     153
     154if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     155  . ${exec_prefix}/lib/tclConfig.sh
     156fi
     157if test -f "${exec_prefix}/lib/tkConfig.sh" ; then
     158  . ${exec_prefix}/lib/tkConfig.sh     
     159fi
    209160AC_SUBST(TCL_VERSION)
    210 AC_SUBST(TCL_VERSION)
    211 AC_SUBST(TK_INC_SPEC)
    212 AC_SUBST(TK_LIB_SPEC)
    213 AC_SUBST(TK_XLIBSW)
    214161AC_SUBST(TK_VERSION)
    215162
  • branches/blt4/gui/scripts/Makefile.in

    r2562 r2690  
    143143
    144144tclIndex: $(FILES)
    145         $(TCLSH) $(srcdir)/../tclconfig/mkindex.tcl --srcdir $(srcdir) \
     145        $(TCLSH) $(srcdir)/../cf/mkindex.tcl --srcdir $(srcdir) \
    146146                --outfile tclIndex
    147147
  • branches/blt4/gui/scripts/analyzer.tcl

    r2534 r2690  
    443443        # It may be a real problem.
    444444        if {[Rappture::bugreport::shouldReport for jobs]} {
    445             set ::errorInfo "== RAPPTURE INPUT ==\n[$_tool xml xml]"
     445            set ::errorInfo "\n\n== RAPPTURE INPUT ==\n[$_tool xml xml]"
    446446            Rappture::bugreport::register "Problem launching job:\n$result"
     447            Rappture::bugreport::attachment [$_tool xml xml]
    447448            Rappture::bugreport::send
    448449        }
  • branches/blt4/gui/scripts/bugreport.tcl

    r2689 r2690  
    678678set btags [bindtags .bugreport]
    679679bindtags .bugreport [linsert $btags 0 BugReportOnTop]
     680
  • branches/blt4/gui/scripts/field.tcl

    r2534 r2690  
    3939    protected method _getValue {expr}
    4040
    41     private variable _xmlobj ""  ;# ref to XML obj with device data
    42 
    43     private variable _units ""   ;# system of units for this field
     41    private variable _xmlobj ""  ;      # ref to XML obj with device data
     42    private variable _path "";          # Path of this object in the XML
     43    private variable _units ""   ;      # system of units for this field
    4444    private variable _limits     ;# maps box name => {z0 z1} limits
    4545    private variable _zmax 0     ;# length of the device
     
    6969    }
    7070    set _xmlobj $xmlobj
     71    set _path $path
    7172    set _field [$xmlobj element -as object $path]
    7273    set _units [$_field get units]
     
    502503itcl::body Rappture::Field::hints {{keyword ""}} {
    503504    foreach {key path} {
    504         group   about.group
    505         label   about.label
    506         color   about.color
    507         style   about.style
    508         scale   about.scale
    509         seeds   about.seeds
    510         units   units
    511         updir   updir
    512         camera  camera.position
    513         type    about.type
     505        camera          camera.position
     506        color           about.color
     507        default         about.default
     508        group           about.group
     509        label           about.label
     510        scalars         about.scalars
     511        scale           about.scale
     512        seeds           about.seeds
     513        style           about.style
     514        toolId          tool.id
     515        toolName        tool.name
     516        toolRevision    tool.version.application.revision
     517        type            about.type
     518        units           units
     519        updir           updir
     520        vectors         about.vectors
    514521    } {
    515522        set str [$_field get $path]
     
    518525        }
    519526    }
    520 
    521     # to be compatible with curve objects
    522     set hints(xlabel) "Position"
    523 
     527    # Set tool and path hints
     528    set hints(tool) [$_xmlobj get tool.name]
     529    set hints(path) $_path
     530    if 0 {
     531        # to be compatible with curve objects
     532        set hints(xlabel) "Position"
     533    }
    524534    if {[info exists hints(group)] && [info exists hints(label)]} {
    525535        # pop-up help for each curve
     
    768778        } elseif {$type == "vtkstreamlines"} {
    769779            set _comp2dims($cname) "3D"
     780            # Allow redirects to another element.
     781            set vtkdata [$_field get $cname.vtk]
     782            if { ![string match "!*" $vtkdata] } {
     783                set _comp2vtkstreamlines($cname) $vtkdata
     784            } else {
     785                set path [string range $vtkdata 1 end]
     786                if { [$_xmlobj element $path] == "" } {
     787                    error "bad redirection path \"$path\""
     788                }
     789                puts stderr path=$path
     790                set element [$_xmlobj element -as type $path]
     791                if { $element != "vtk" } {
     792                    error "bad path \"$path\": must redirect to a vtk element"
     793                }
     794                set _comp2vtkstreamlines($cname) [$_xmlobj get $path]
     795            }
     796            set _comp2style($cname) [$_field get $cname.style]
     797            incr _counter
     798        } elseif {$type == "vtkstreamlines2"} {
     799            set _comp2dims($cname) "3D"
    770800            set _comp2vtkstreamlines($cname) [$_field get $cname.vtk]
    771801            set _comp2style($cname) [$_field get $cname.style]
  • branches/blt4/gui/scripts/flowvisviewer.tcl

    r2534 r2690  
    176176# ----------------------------------------------------------------------
    177177itcl::body Rappture::FlowvisViewer::constructor { hostlist args } {
     178    set _serverType "nanovis"
    178179
    179180    # Draw legend event
     
    260261
    261262    itk_component add 3dview {
    262         label $itk_component(plotarea).vol -image $_image(plot) \
     263        label $itk_component(plotarea).view -image $_image(plot) \
    263264            -highlightthickness 0 -borderwidth 0
    264265    } {
     
    28552856    $_dispatcher event -after 60000 !pngtimeout
    28562857    WaitIcon start $inner.icon
    2857     grab set -local $inner
     2858    grab set $inner
    28582859    focus $inner.cancel
    28592860
     
    29132914    $_dispatcher event -after 600000 !movietimeout
    29142915    WaitIcon start $inner.icon
    2915     grab set -local $inner
     2916    grab set $inner
    29162917    focus $inner.cancel
    29172918   
  • branches/blt4/gui/scripts/heightmapviewer.tcl

    r2327 r2690  
    6161    }
    6262    public method camera {option args}
     63
    6364    protected method Connect {}
    6465    protected method Disconnect {}
     
    132133# ----------------------------------------------------------------------
    133134itcl::body Rappture::HeightmapViewer::constructor {hostlist args} {
     135    set _serverType "nanovis"
     136
    134137    # Draw legend event
    135138    $_dispatcher register !legend
     
    186189
    187190    itk_component add 3dview {
    188         canvas $itk_component(plotarea).vol \
     191        canvas $itk_component(plotarea).view \
    189192            -highlightthickness 0 -borderwidth 0
    190193    } {
     
    664667    array set info $args
    665668    set bytes [ReceiveBytes $info(-bytes)]
    666     ReceiveEcho <<line "<read $info(-bytes) bytes args=$args"
    667  puts stderr "<read $info(-bytes) bytes"
     669    ReceiveEcho <<line "<read $info(-bytes) bytes"
    668670    if { $info(-type) == "image" } {
    669671        $_image(plot) configure -data $bytes
    670672        ReceiveEcho <<line "<read for [image width $_image(plot)]x[image height $_image(plot)] image>"
    671  puts stderr "<read for [image width $_image(plot)]x[image height $_image(plot)] image>"
    672673    } elseif { $info(type) == "print" } {
    673674        set tag $this-print-$info(-token)
  • branches/blt4/gui/scripts/molvisviewer.tcl

    r2048 r2690  
    4242
    4343    private variable _icon 0
    44 
     44    private variable _getimage 0
    4545    private variable _mevent;           # info used for mouse event operations
    4646    private variable _rocker;           # info used for rock operations
     
    6565    private variable _cacheid ""
    6666    private variable _cacheimage ""
    67 
    68     private variable _delta1 10
    69     private variable _delta2 2
    7067
    7168    private common _settings  ;         # Array of settings for all known
     
    8077    private variable _buffering 0;
    8178    private variable _resizePending 0;
     79    private variable _updatePending 0;
     80    private variable _rotatePending 0;
    8281    private variable _width
    8382    private variable _height
    84     private variable _restore 1;        # Restore camera settings
     83    private variable _reset 1;  # Restore camera settings
    8584    private variable _cell 0;           # Restore camera settings
    86     private variable _getimage 0;
     85    private variable _flush 1
    8786
    8887    constructor { hostlist args } {
     
    9998    private method BuildSettingsTab {}
    10099    private method DoResize {}
     100    private method DoRotate {}
     101    private method DoUpdate {}
    101102    private method EventuallyResize { w h }
     103    private method EventuallyRotate { a b c }
     104    private method EventuallyChangeSettings { args }
    102105    private method GetImage { widget }
    103106    private method ReceiveImage { size cacheid frame rock }
    104107    private method WaitIcon { option widget }
    105     private method DownloadPopup { popup command }
    106108    private method AddImageControls { frame widget }
    107109    private method SetWaitVariable { value } {
    108110        set _getimage $value
    109     }
    110     private method GetWaitVariable {} {
    111         return $_getimage
    112111    }
    113112    private method WaitForImage {} {
     
    143142    private method StickRadius {option {models "all"} }
    144143    private method OrthoProjection {option}
    145     private method Representation {option {model "all"} }
     144    private method Representation { {option ""} }
    146145    private method CartoonTrace {option {model "all"}}
    147146    private method ComputeParallelepipedVertices { dataobj }
     
    160159# ----------------------------------------------------------------------
    161160itcl::body Rappture::MolvisViewer::constructor {hostlist args} {
     161    set _serverType "pymol"
     162
    162163    # Register events to the dispatcher.  Base class expects !rebuild
    163164    # event to be registered.
     
    170171    $_dispatcher register !resize
    171172    $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list"
     173
     174    # Update event
     175    $_dispatcher register !update
     176    $_dispatcher dispatch $this !update "[itcl::code $this DoUpdate]; list"
     177
     178    # Rotate event
     179    $_dispatcher register !rotate
     180    $_dispatcher dispatch $this !rotate "[itcl::code $this DoRotate]; list"
    172181
    173182    # Rocker
     
    195204    set _state(client) 1
    196205    set _hostlist $hostlist
    197     set _restore 1
     206    set _reset 1
    198207
    199208    array set _view {
     
    231240   
    232241    itk_component add 3dview {
    233         label $itk_component(plotarea).vol -image $_image(plot) \
     242        label $itk_component(plotarea).view -image $_image(plot) \
    234243            -highlightthickness 0 -borderwidth 0
    235244    } {
     
    413422}
    414423
    415 itcl::body Rappture::MolvisViewer::BuildSettingsTab {} {
    416     set fg [option get $itk_component(hull) font Font]
    417 
    418     set tab [$itk_component(main) insert end \
    419         -title "Settings" \
    420         -icon [Rappture::icon wrench]]
    421     blt::scrollset $tab.ss \
    422         -xscrollbar $tab.ss.xs \
    423         -yscrollbar $tab.ss.ys \
    424         -window $tab.ss.frame
    425     pack $tab.ss -fill both -expand yes
    426     blt::tk::scrollbar $tab.ss.xs               
    427     blt::tk::scrollbar $tab.ss.ys               
    428     set inner [blt::tk::frame $tab.ss.frame]
    429 
    430     $inner configure -borderwidth 4
    431 
    432     label $inner.drawinglabel -text "Molecule Representation" \
    433         -font "Arial 9 bold"
    434 
    435     label $inner.pict -image $_settings($this-modelimg)
    436 
    437     radiobutton $inner.bstick -text "balls and sticks" \
    438         -command [itcl::code $this Representation ballnstick all] \
    439         -variable Rappture::MolvisViewer::_settings($this-model) \
    440         -value ballnstick -font "Arial 9" -pady 0
    441     Rappture::Tooltip::for $inner.bstick \
    442         "Display atoms (balls) and connections (sticks) "
    443 
    444     radiobutton $inner.spheres -text "spheres" \
    445         -command [itcl::code $this Representation spheres all] \
    446         -variable Rappture::MolvisViewer::_settings($this-model) \
    447         -value spheres -font "Arial 9" -pady 0
    448     Rappture::Tooltip::for $inner.spheres \
    449         "Display atoms as spheres. Do not display bonds."
    450 
    451     radiobutton $inner.sticks -text "sticks" \
    452         -command [itcl::code $this Representation sticks all] \
    453         -variable Rappture::MolvisViewer::_settings($this-model) \
    454         -value sticks -font "Arial 9" -pady 0
    455     Rappture::Tooltip::for $inner.sticks \
    456         "Display bonds as sticks. Do not display atoms."
    457 
    458     radiobutton $inner.lines -text "lines" \
    459         -command [itcl::code $this Representation lines all] \
    460         -variable [itcl::scope _settings($this-model)] \
    461         -value lines -font "Arial 9" -pady 0
    462     Rappture::Tooltip::for $inner.lines \
    463         "Display bonds as lines. Do not display atoms."
    464 
    465     radiobutton $inner.cartoon -text "cartoon" \
    466         -command [itcl::code $this Representation cartoon all] \
    467         -variable [itcl::scope _settings($this-model)] \
    468         -value cartoon -font "Arial 9" -pady 0
    469     Rappture::Tooltip::for $inner.cartoon \
    470         "Display cartoon representation of bonds (sticks)."
    471 
    472     scale $inner.spherescale -width 10 -font "Arial 9 bold" \
    473         -from 0.1 -to 2.0 -resolution 0.05 -label "Sphere Scale" \
    474         -showvalue true -orient horizontal \
    475         -command [itcl::code $this SphereScale] \
    476         -variable Rappture::MolvisViewer::_settings($this-spherescale)
    477     $inner.spherescale set $_settings($this-spherescale)
    478     Rappture::Tooltip::for $inner.spherescale \
    479         "Adjust scale of atoms (spheres or balls). 1.0 is the full VDW radius."
    480 
    481     scale $inner.stickradius -width 10 -font "Arial 9 bold" \
    482         -from 0.1 -to 1.0 -resolution 0.025 -label "Stick Radius" \
    483         -showvalue true -orient horizontal \
    484         -command [itcl::code $this StickRadius] \
    485         -variable Rappture::MolvisViewer::_settings($this-stickradius)
    486     Rappture::Tooltip::for $inner.stickradius \
    487         "Adjust scale of bonds (sticks)."
    488     $inner.stickradius set $_settings($this-stickradius)
    489 
    490     checkbutton $inner.labels -text "Show labels on atoms" \
    491         -command [itcl::code $this labels update] \
    492         -variable [itcl::scope _settings($this-showlabels)] \
    493         -font "Arial 9 bold"
    494     Rappture::Tooltip::for $inner.labels \
    495         "Display atom symbol and serial number."
    496 
    497     checkbutton $inner.rock -text "Rock model back and forth" \
    498         -command [itcl::code $this Rock toggle] \
    499         -variable Rappture::MolvisViewer::_settings($this-rock) \
    500         -font "Arial 9 bold"
    501     Rappture::Tooltip::for $inner.rock \
    502         "Rotate the object back and forth around the y-axis."
    503 
    504     checkbutton $inner.ortho -text "Orthoscopic projection" \
    505         -command [itcl::code $this OrthoProjection update] \
    506         -variable Rappture::MolvisViewer::_settings($this-ortho) \
    507          -font "Arial 9 bold"
    508     Rappture::Tooltip::for $inner.ortho \
    509         "Toggle between orthoscopic/perspective projection modes."
    510 
    511     checkbutton $inner.cartoontrace -text "Cartoon Trace" \
    512         -command [itcl::code $this CartoonTrace update] \
    513         -variable [itcl::scope _settings($this-cartoontrace)] \
    514         -font "Arial 9 bold"
    515     Rappture::Tooltip::for $inner.cartoontrace \
    516         "Set cartoon representation of bonds (sticks)."
    517 
    518     checkbutton $inner.cell -text "Parallelepiped" \
    519         -command [itcl::code $this Cell toggle] \
    520         -font "Arial 9 bold"
    521     $inner.cell select
    522 
    523     label $inner.spacer
    524     blt::table $inner \
    525         0,0 $inner.drawinglabel -anchor w -columnspan 4 \
    526         1,1 $inner.pict -anchor w -rowspan 5 \
    527         1,2 $inner.bstick -anchor w -columnspan 2 \
    528         2,2 $inner.spheres -anchor w -columnspan 2 \
    529         3,2 $inner.sticks -anchor w -columnspan 2 \
    530         4,2 $inner.lines -anchor w -columnspan 2 \
    531         5,2 $inner.cartoon -anchor w -columnspan 2 \
    532         6,0 $inner.labels -anchor w -columnspan 4 -pady {1 0} \
    533         7,0 $inner.rock -anchor w -columnspan 4 -pady {1 0} \
    534         8,0 $inner.ortho -anchor w -columnspan 4 -pady {1 0} \
    535         9,0 $inner.cartoontrace -anchor w -columnspan 4 -pady {1 0} \
    536         10,0 $inner.cell -anchor w -columnspan 4 -pady {1 0} \
    537         11,1 $inner.spherescale -fill x -columnspan 4 -pady {1 0} \
    538         12,1 $inner.stickradius -fill x -columnspan 4 -pady {1 0} \
    539 
    540     blt::table configure $inner c0 -resize expand -width 2
    541     blt::table configure $inner c1 c2 -resize none
    542     blt::table configure $inner c3 -resize expand
    543     blt::table configure $inner r* -resize none
    544     blt::table configure $inner r13 -resize expand
    545 }
    546 
    547424# ----------------------------------------------------------------------
    548425# DESTRUCTOR
     
    553430    image delete $_image(plot)
    554431    array unset _settings $this-*
     432}
     433
     434
     435# ----------------------------------------------------------------------
     436# USAGE: add <dataobj> ?<settings>?
     437#
     438# Clients use this to add a data object to the plot.  The optional
     439# <settings> are used to configure the plot.  Allowed settings are
     440# -color, -brightness, -width, -linestyle, and -raise. Only
     441# -brightness and -raise do anything.
     442# ----------------------------------------------------------------------
     443itcl::body Rappture::MolvisViewer::add { dataobj {options ""}} {
     444    array set params {
     445        -color          auto
     446        -brightness     0
     447        -width          1
     448        -raise          0
     449        -linestyle      solid
     450        -description    ""
     451        -param          ""
     452    }
     453
     454    foreach {opt val} $options {
     455        if {![info exists params($opt)]} {
     456            error "bad settings \"$opt\": should be [join [lsort [array names params]] {, }]"
     457        }
     458        set params($opt) $val
     459    }
     460
     461    set pos [lsearch -exact $dataobj $_dlist]
     462
     463    if {$pos < 0} {
     464        if {![Rappture::library isvalid $dataobj]} {
     465            error "bad value \"$dataobj\": should be Rappture::library object"
     466        }
     467
     468        if { !$_settings($this-showlabels-initialized) } {
     469            set showlabels [$dataobj get components.molecule.about.emblems]
     470            if { $showlabels != "" && [string is boolean $showlabels] } {
     471                set _settings($this-showlabels) $showlabels
     472            }
     473        }
     474
     475        lappend _dlist $dataobj
     476        if { $params(-brightness) >= 0.5 } {
     477            set _dobj2transparency($dataobj) "ghost"
     478        } else {
     479            set _dobj2transparency($dataobj) "normal"
     480        }
     481        set _dobj2raise($dataobj) $params(-raise)
     482        debug "setting parameters for $dataobj\n"
     483
     484        if { [isconnected] } {
     485            $_dispatcher event -idle !rebuild
     486        }
     487    }
     488}
     489
     490# ----------------------------------------------------------------------
     491# USAGE: delete ?<dataobj> <dataobj> ...?
     492#
     493# Clients use this to delete a dataobj from the plot. If no dataobjs
     494# are specified, then all dataobjs are deleted.
     495# ----------------------------------------------------------------------
     496itcl::body Rappture::MolvisViewer::delete { args } {
     497    if {[llength $args] == 0} {
     498        set args $_dlist
     499    }
     500
     501    # delete all specified dataobjs
     502    set changed 0
     503    set _flush 1
     504    foreach dataobj $args {
     505        set pos [lsearch -exact $_dlist $dataobj]
     506        if {$pos >= 0} {
     507            set _dlist [lreplace $_dlist $pos $pos]
     508            if { [info exists _obj2models($dataobj)] } {
     509                foreach model $_obj2models($dataobj) {
     510                    array unset _active $model
     511                }
     512            }
     513            array unset _obj2models $dataobj
     514            array unset _dobj2transparency $dataobj
     515            array unset _dobj2color $dataobj
     516            array unset _dobj2width $dataobj
     517            array unset _dobj2dashes $dataobj
     518            array unset _dobj2raise $dataobj
     519            set changed 1
     520        }
     521    }
     522
     523    # if anything changed, then rebuild the plot
     524    if {$changed} {
     525        if { [isconnected] } {
     526            $_dispatcher event -idle !rebuild
     527        }
     528    }
     529}
     530
     531# ----------------------------------------------------------------------
     532# USAGE: get
     533#
     534# Clients use this to query the list of objects being plotted, in
     535# order from bottom to top of this result.
     536# ----------------------------------------------------------------------
     537itcl::body Rappture::MolvisViewer::get {} {
     538    # put the dataobj list in order according to -raise options
     539    set dlist $_dlist
     540    foreach obj $dlist {
     541        if {[info exists _dobj2raise($obj)] && $_dobj2raise($obj)} {
     542            set i [lsearch -exact $dlist $obj]
     543            if {$i >= 0} {
     544                set dlist [lreplace $dlist $i $i]
     545                lappend dlist $obj
     546            }
     547        }
     548    }
     549    return $dlist
    555550}
    556551
     
    673668        return 0
    674669    }
    675     set _restore 1
     670    set _reset 1
    676671    set result [VisViewer::Connect $hosts]
    677672    if { $result } {
     
    766761}
    767762
     763itcl::body Rappture::MolvisViewer::BuildSettingsTab {} {
     764    set fg [option get $itk_component(hull) font Font]
     765
     766    set tab [$itk_component(main) insert end \
     767        -title "Settings" \
     768        -icon [Rappture::icon wrench]]
     769    blt::scrollset $tab.ss \
     770        -xscrollbar $tab.ss.xs \
     771        -yscrollbar $tab.ss.ys \
     772        -window $tab.ss.frame
     773    pack $tab.ss -fill both -expand yes
     774    blt::tk::scrollbar $tab.ss.xs               
     775    blt::tk::scrollbar $tab.ss.ys               
     776    set inner [blt::tk::frame $tab.ss.frame]
     777
     778    $inner configure -borderwidth 4
     779
     780    label $inner.rep_l -text "Molecule Representation" \
     781        -font "Arial 9"
     782
     783    label $inner.pict -image $_settings($this-modelimg)
     784
     785    radiobutton $inner.bstick -text "balls and sticks" \
     786        -command [itcl::code $this Representation ballnstick] \
     787        -variable Rappture::MolvisViewer::_settings($this-model) \
     788        -value ballnstick -font "Arial 9" -pady 0
     789    Rappture::Tooltip::for $inner.bstick \
     790        "Display atoms (balls) and connections (sticks) "
     791
     792    radiobutton $inner.spheres -text "spheres" \
     793        -command [itcl::code $this Representation spheres] \
     794        -variable Rappture::MolvisViewer::_settings($this-model) \
     795        -value spheres -font "Arial 9" -pady 0
     796    Rappture::Tooltip::for $inner.spheres \
     797        "Display atoms as spheres. Do not display bonds."
     798
     799    radiobutton $inner.sticks -text "sticks" \
     800        -command [itcl::code $this Representation sticks] \
     801        -variable Rappture::MolvisViewer::_settings($this-model) \
     802        -value sticks -font "Arial 9" -pady 0
     803    Rappture::Tooltip::for $inner.sticks \
     804        "Display bonds as sticks. Do not display atoms."
     805
     806    radiobutton $inner.lines -text "lines" \
     807        -command [itcl::code $this Representation lines] \
     808        -variable [itcl::scope _settings($this-model)] \
     809        -value lines -font "Arial 9" -pady 0
     810    Rappture::Tooltip::for $inner.lines \
     811        "Display bonds as lines. Do not display atoms."
     812
     813    radiobutton $inner.cartoon -text "cartoon" \
     814        -command [itcl::code $this Representation cartoon] \
     815        -variable [itcl::scope _settings($this-model)] \
     816        -value cartoon -font "Arial 9" -pady 0
     817    Rappture::Tooltip::for $inner.cartoon \
     818        "Display cartoon representation of bonds (sticks)."
     819
     820    scale $inner.spherescale -width 10 -font "Arial 9" \
     821        -from 0.1 -to 2.0 -resolution 0.05 -label "Sphere Scale" \
     822        -showvalue true -orient horizontal \
     823        -command [itcl::code $this EventuallyChangeSettings] \
     824        -variable Rappture::MolvisViewer::_settings($this-spherescale)
     825    $inner.spherescale set $_settings($this-spherescale)
     826    Rappture::Tooltip::for $inner.spherescale \
     827        "Adjust scale of atoms (spheres or balls). 1.0 is the full VDW radius."
     828
     829    scale $inner.stickradius -width 10 -font "Arial 9" \
     830        -from 0.1 -to 1.0 -resolution 0.025 -label "Stick Radius" \
     831        -showvalue true -orient horizontal \
     832        -command [itcl::code $this EventuallyChangeSettings] \
     833        -variable Rappture::MolvisViewer::_settings($this-stickradius)
     834    Rappture::Tooltip::for $inner.stickradius \
     835        "Adjust scale of bonds (sticks)."
     836    $inner.stickradius set $_settings($this-stickradius)
     837
     838    checkbutton $inner.labels -text "Show labels on atoms" \
     839        -command [itcl::code $this labels update] \
     840        -variable [itcl::scope _settings($this-showlabels)] \
     841        -font "Arial 9"
     842    Rappture::Tooltip::for $inner.labels \
     843        "Display atom symbol and serial number."
     844
     845    checkbutton $inner.rock -text "Rock model back and forth" \
     846        -command [itcl::code $this Rock toggle] \
     847        -variable Rappture::MolvisViewer::_settings($this-rock) \
     848        -font "Arial 9"
     849    Rappture::Tooltip::for $inner.rock \
     850        "Rotate the object back and forth around the y-axis."
     851
     852    checkbutton $inner.ortho -text "Orthoscopic projection" \
     853        -command [itcl::code $this OrthoProjection update] \
     854        -variable Rappture::MolvisViewer::_settings($this-ortho) \
     855         -font "Arial 9"
     856    Rappture::Tooltip::for $inner.ortho \
     857        "Toggle between orthoscopic/perspective projection modes."
     858
     859    checkbutton $inner.cartoontrace -text "Cartoon Trace" \
     860        -command [itcl::code $this CartoonTrace update] \
     861        -variable [itcl::scope _settings($this-cartoontrace)] \
     862        -font "Arial 9"
     863    Rappture::Tooltip::for $inner.cartoontrace \
     864        "Set cartoon representation of bonds (sticks)."
     865
     866    checkbutton $inner.cell -text "Parallelepiped" \
     867        -command [itcl::code $this Cell toggle] \
     868        -font "Arial 9"
     869    $inner.cell select
     870
     871    label $inner.spacer
     872    blt::table $inner \
     873        0,0 $inner.drawinglabel -anchor w -columnspan 4 \
     874        1,1 $inner.pict -anchor w -rowspan 5 \
     875        1,2 $inner.bstick -anchor w -columnspan 2 \
     876        2,2 $inner.spheres -anchor w -columnspan 2 \
     877        3,2 $inner.sticks -anchor w -columnspan 2 \
     878        4,2 $inner.lines -anchor w -columnspan 2 \
     879        5,2 $inner.cartoon -anchor w -columnspan 2 \
     880        6,0 $inner.labels -anchor w -columnspan 4 -pady {1 0} \
     881        7,0 $inner.rock -anchor w -columnspan 4 -pady {1 0} \
     882        8,0 $inner.ortho -anchor w -columnspan 4 -pady {1 0} \
     883        9,0 $inner.cartoontrace -anchor w -columnspan 4 -pady {1 0} \
     884        10,0 $inner.cell -anchor w -columnspan 4 -pady {1 0} \
     885        11,1 $inner.spherescale -fill x -columnspan 4 -pady {1 0} \
     886        12,1 $inner.stickradius -fill x -columnspan 4 -pady {1 0} \
     887
     888    blt::table configure $inner c0 -resize expand -width 2
     889    blt::table configure $inner c1 c2 -resize none
     890    blt::table configure $inner c3 -resize expand
     891    blt::table configure $inner r* -resize none
     892    blt::table configure $inner r13 -resize expand
     893}
    768894
    769895# ----------------------------------------------------------------------
     
    785911    set _cell 0
    786912
    787     if { $_restore } {
     913    if { $_reset } {
    788914        set _rocker(server) 0
    789915        set _cacheid 0
     
    812938        }
    813939        if { ![info exists _dataobjs($model-$state)] } {
    814             set data1 ""
     940            set data1      ""
    815941            set serial    1
    816942
     
    9301056            set vertices [ComputeParallelepipedVertices $dataobj]
    9311057            SendCmd "raw -defer {verts = \[$vertices\]\n}"
    932             SendCmd "raw -defer {run \$PYMOL_PATH/rappture/box.py\n}"
     1058            SendCmd "raw -defer {run \$PYMOL_SITE_PATH/rappture/box.py\n}"
    9331059            SendCmd "raw -defer {draw_box(verts)\n}"
    9341060            set _cell 1
     
    9931119        set flush 0
    9941120    }
    995     if { $_restore } {
     1121    if { $_reset } {
    9961122        # Set or restore viewing parameters.  We do this for the first
    9971123        # model and assume this works for everything else.
     
    10081134
    10091135        SendCmd "raw -defer {zoom complete=1}"
    1010         set _restore 0
     1136        set _reset 0
    10111137    }
    10121138    if { $changed } {
     
    10191145        Cell update
    10201146        OrthoProjection update
    1021         Representation update 
     1147        Representation update
    10221148    }
    10231149    set tab [$itk_component(main) panel "Settings"]
     
    10321158        set readyForNextFrame 0;        # Don't advance to the next frame
    10331159                                        # until we get an image.
    1034         SendCmd "bmp";                  # Flush the results.
     1160        #SendCmd "ppm";                 # Flush the results.
     1161        set _flush 0
    10351162    }
    10361163    set _buffering 0;                   # Turn off buffering.
     
    10821209    set _height $h
    10831210    if { !$_resizePending } {
    1084         $_dispatcher event -idle !resize
     1211        $_dispatcher event -after 400 !resize
    10851212        set _resizePending 1
     1213    }
     1214}
     1215
     1216itcl::body Rappture::MolvisViewer::DoRotate {} {
     1217    SendCmd "rotate $_view(a) $_view(b) $_view(c)"
     1218    set _rotatePending 0
     1219}
     1220   
     1221itcl::body Rappture::MolvisViewer::EventuallyRotate { a b c } {
     1222    set _view(a) $a
     1223    set _view(b) $b
     1224    set _view(c) $c
     1225    if { !$_rotatePending } {
     1226        $_dispatcher event -after 50 !rotate
     1227        set _rotatePending 1
     1228    }
     1229}
     1230
     1231itcl::body Rappture::MolvisViewer::DoUpdate { } {
     1232    set scale  $_settings($this-spherescale)
     1233    set radius $_settings($this-stickradius)
     1234    set overridescale [expr $scale * 0.8]
     1235    set overrideradius [expr $radius * 0.8]
     1236    SendCmd "spherescale -model all $overridescale"
     1237    SendCmd "stickradius -model all $overrideradius"
     1238    set models [array names _mlist]
     1239    foreach model $models {
     1240        if { [info exists _active($model)] } {
     1241            SendCmd "spherescale -model $model $scale"
     1242            SendCmd "stickradius -model $model $radius"
     1243        }
     1244    }
     1245    set _updatePending 0
     1246}
     1247
     1248itcl::body Rappture::MolvisViewer::EventuallyChangeSettings { args } {
     1249    if { !$_updatePending } {
     1250        $_dispatcher event -after 400 !update
     1251        set _updatePending 1
    10861252    }
    10871253}
     
    12781444        set _view(my) [expr {$_view(my) + $my}]
    12791445        set _view(mz) [expr {$_view(mz) + $mz}]
    1280         SendCmd "rotate $mx $my $mz"
     1446        #SendCmd "rotate $mx $my $mz"
     1447        EventuallyRotate $mx $my $mz
    12811448        debug "_vmmouse: rotate $_view(mx) $_view(my) $_view(mz)"
    12821449    }
     
    13741541                    vz $vz
    13751542                }]
    1376                 SendCmd "rotate $a $b $c"
     1543                EventuallyRotate $a $b $c
     1544                #SendCmd "rotate $a $b $c"
    13771545                debug "Rotate $x $y: rotate $_view(vx) $_view(vy) $_view(vz)"
    13781546                set _click(x) $x
     
    13981566# our scene.
    13991567# ----------------------------------------------------------------------
    1400 itcl::body Rappture::MolvisViewer::Representation {option {model "all"} } {
     1568itcl::body Rappture::MolvisViewer::Representation { { option "" } } {
     1569    if { $option == "" } {
     1570        set value [$itk_component(representation) value]
     1571        set option [$itk_component(representation) translate $value]
     1572    }
    14011573    if { $option == $_mrep } {
    14021574        return
     
    14191591    set _mrep $option
    14201592
    1421     if { $model == "all" } {
    1422         set models [array names _mlist]
    1423     } else {
    1424         set models $model
    1425     }
    1426 
    1427     foreach model $models {
     1593
     1594    foreach model [array names _mlist] {
    14281595        if { [info exists _model($model-rep)] } {
    14291596            if { $_model($model-rep) != $option } {
     
    15231690}
    15241691
    1525 
    1526 # ----------------------------------------------------------------------
    1527 # USAGE: add <dataobj> ?<settings>?
    1528 #
    1529 # Clients use this to add a data object to the plot.  The optional
    1530 # <settings> are used to configure the plot.  Allowed settings are
    1531 # -color, -brightness, -width, -linestyle, and -raise. Only
    1532 # -brightness and -raise do anything.
    1533 # ----------------------------------------------------------------------
    1534 itcl::body Rappture::MolvisViewer::add { dataobj {options ""}} {
    1535     array set params {
    1536         -color          auto
    1537         -brightness     0
    1538         -width          1
    1539         -raise          0
    1540         -linestyle      solid
    1541         -description    ""
    1542         -param          ""
    1543     }
    1544 
    1545     foreach {opt val} $options {
    1546         if {![info exists params($opt)]} {
    1547             error "bad settings \"$opt\": should be [join [lsort [array names params]] {, }]"
    1548         }
    1549         set params($opt) $val
    1550     }
    1551 
    1552     set pos [lsearch -exact $dataobj $_dlist]
    1553 
    1554     if {$pos < 0} {
    1555         if {![Rappture::library isvalid $dataobj]} {
    1556             error "bad value \"$dataobj\": should be Rappture::library object"
    1557         }
    1558 
    1559         if { !$_settings($this-showlabels-initialized) } {
    1560             set showlabels [$dataobj get components.molecule.about.emblems]
    1561             if { $showlabels != "" && [string is boolean $showlabels] } {
    1562                 set _settings($this-showlabels) $showlabels
    1563             }
    1564         }
    1565 
    1566         lappend _dlist $dataobj
    1567         if { $params(-brightness) >= 0.5 } {
    1568             set _dobj2transparency($dataobj) "ghost"
    1569         } else {
    1570             set _dobj2transparency($dataobj) "normal"
    1571         }
    1572         set _dobj2raise($dataobj) $params(-raise)
    1573         debug "setting parameters for $dataobj\n"
    1574 
    1575         if { [isconnected] } {
    1576             $_dispatcher event -idle !rebuild
    1577         }
    1578     }
    1579 }
    15801692
    15811693#
     
    15981710    }
    15991711    SendCmd "reset"
     1712    DoResize
    16001713    SendCmd "rotate $_view(mx) $_view(my) $_view(mz)"
    16011714    debug "ResetView: rotate $_view(mx) $_view(my) $_view(mz)"
     
    16031716    SendCmd "zoom $_view(zoom)"
    16041717}
    1605 
    1606 # ----------------------------------------------------------------------
    1607 # USAGE: get
    1608 #
    1609 # Clients use this to query the list of objects being plotted, in
    1610 # order from bottom to top of this result.
    1611 # ----------------------------------------------------------------------
    1612 itcl::body Rappture::MolvisViewer::get {} {
    1613     # put the dataobj list in order according to -raise options
    1614     set dlist $_dlist
    1615     foreach obj $dlist {
    1616         if {[info exists _dobj2raise($obj)] && $_dobj2raise($obj)} {
    1617             set i [lsearch -exact $dlist $obj]
    1618             if {$i >= 0} {
    1619                 set dlist [lreplace $dlist $i $i]
    1620                 lappend dlist $obj
    1621             }
    1622         }
    1623     }
    1624     return $dlist
    1625 }
    1626 
    1627 # ----------------------------------------------------------------------
    1628 # USAGE: delete ?<dataobj> <dataobj> ...?
    1629 #
    1630 # Clients use this to delete a dataobj from the plot. If no dataobjs
    1631 # are specified, then all dataobjs are deleted.
    1632 # ----------------------------------------------------------------------
    1633 itcl::body Rappture::MolvisViewer::delete { args } {
    1634     if {[llength $args] == 0} {
    1635         set args $_dlist
    1636     }
    1637 
    1638     # delete all specified dataobjs
    1639     set changed 0
    1640     foreach dataobj $args {
    1641         set pos [lsearch -exact $_dlist $dataobj]
    1642         if {$pos >= 0} {
    1643             set _dlist [lreplace $_dlist $pos $pos]
    1644             if { [info exists _obj2models($dataobj)] } {
    1645                 foreach model $_obj2models($dataobj) {
    1646                     array unset _active $model
    1647                 }
    1648             }
    1649             array unset _obj2models $dataobj
    1650             array unset _dobj2transparency $dataobj
    1651             array unset _dobj2color $dataobj
    1652             array unset _dobj2width $dataobj
    1653             array unset _dobj2dashes $dataobj
    1654             array unset _dobj2raise $dataobj
    1655             set changed 1
    1656         }
    1657     }
    1658 
    1659     # if anything changed, then rebuild the plot
    1660     if {$changed} {
    1661         if { [isconnected] } {
    1662             $_dispatcher event -idle !rebuild
    1663         }
    1664     }
    1665 }
    1666 
    1667 # ----------------------------------------------------------------------
    1668 # OPTION: -device
    1669 # ----------------------------------------------------------------------
    1670 itcl::configbody Rappture::MolvisViewer::device {
    1671     if {$itk_option(-device) != "" } {
    1672 
    1673         if {![Rappture::library isvalid $itk_option(-device)]} {
    1674             error "bad value \"$itk_option(-device)\": should be Rappture::library object"
    1675         }
    1676         $this delete
    1677         $this add $itk_option(-device)
    1678     } else {
    1679         $this delete
    1680     }
    1681 
    1682     if { [isconnected] } {
    1683         $_dispatcher event -idle !rebuild
    1684     }
    1685 }
    1686 
    16871718
    16881719
     
    17641795    $_dispatcher event -after 60000 !pngtimeout
    17651796    WaitIcon start $inner.icon
    1766     grab set -local $inner
     1797    grab set $inner
    17671798    focus $inner.cancel
    17681799   
     
    21052136    return $vertices
    21062137}
     2138
     2139
     2140# ----------------------------------------------------------------------
     2141# OPTION: -device
     2142# ----------------------------------------------------------------------
     2143itcl::configbody Rappture::MolvisViewer::device {
     2144    if {$itk_option(-device) != "" } {
     2145        if {![Rappture::library isvalid $itk_option(-device)]} {
     2146            error "bad value \"$itk_option(-device)\": should be Rappture::library object"
     2147        }
     2148        $this delete
     2149        $this add $itk_option(-device)
     2150    } else {
     2151        $this delete
     2152    }
     2153
     2154    if { [isconnected] } {
     2155        $_dispatcher event -idle !rebuild
     2156    }
     2157}
     2158
Note: See TracChangeset for help on using the changeset viewer.