Changeset 2690
- Timestamp:
- Nov 17, 2011 8:40:07 AM (13 years ago)
- 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)1 builtin(include,./cf/tcl.m4) -
branches/blt4/gui/apps/Makefile.in
r2536 r2690 34 34 rappture.use \ 35 35 rerun \ 36 rpdiff \ 36 37 simsim \ 37 38 xmldiff \ … … 55 56 56 57 distclean: clean 57 $(RM) encodedata rappture.env rappture rappture.use rerun simsim xmldiff58 $(RM) encodedata rappture.env rappture rappture.use rerun rpdiff simsim xmldiff 58 59 $(RM) Makefile *~ 59 60 -
branches/blt4/gui/apps/simsim.in
r2536 r2690 620 620 for {set i 0} {$i < $argc} {incr i} { 621 621 set opt [lindex $argv $i] 622 if {("-t" == $opt) || ("-tool" == $opt) || ("--tool" == $opt)} { 622 if { ("-t" == $opt) || 623 ("-tool" == $opt) || 624 ("--tool" == $opt) } { 623 625 if {[expr {$i + 1}] < $argc} { 624 626 incr i 625 627 set params(--tool) [lindex $argv $i] 626 628 # 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 627 638 } else { 628 639 printHelp … … 688 699 } 689 700 701 proc storeoutput {data} { 702 global _d 703 append _d $data 704 } 705 690 706 proc main {argv} { 691 707 # set default values … … 700 716 --runfile "" 701 717 --tool "./tool.xml" 718 --tooldir "" 702 719 oParams {} 703 720 } 704 721 705 722 parseOptions argv params 723 724 # keep the wish window from popping up 725 catch {wm withdraw .} 706 726 707 727 # parse out path=val combinations from the list of orphaned parameters … … 723 743 724 744 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 } 726 750 727 751 # need a better way to do this, … … 759 783 set result "" 760 784 # 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 770 786 771 787 # if run was successful, check to see if we should compare 772 788 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 } 774 796 # do comparison if user chose to compare with other results 775 797 if {"" != $params(--compare)} { -
branches/blt4/gui/cf/config.guess
r1885 r2690 2 2 # Attempt to guess a canonical system name. 3 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 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 6 timestamp='2003-02-22' 8 7 9 8 # This file is free software; you can redistribute it and/or modify it … … 19 18 # You should have received a copy of the GNU General Public License 20 19 # 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. 23 21 # 24 22 # As a special exception to the GNU General Public License, if you … … 26 24 # configuration script generated by Autoconf, you may include it under 27 25 # the same distribution terms that you use for the rest of that program. 28 29 26 30 27 # Originally written by Per Bothner <per@bothner.com>. … … 57 54 58 55 Originally written by Per Bothner. 59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ,60 2002, 2003, 2004, 2005, 2006, 2007, 2008Free Software Foundation, Inc.56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 57 Free Software Foundation, Inc. 61 58 62 59 This is free software; see the source for copying conditions. There is NO … … 70 67 case $1 in 71 68 --time-stamp | --time* | -t ) 72 echo "$timestamp" ; exit ;;69 echo "$timestamp" ; exit 0 ;; 73 70 --version | -v ) 74 echo "$version" ; exit ;;71 echo "$version" ; exit 0 ;; 75 72 --help | --h* | -h ) 76 echo "$usage"; exit ;;73 echo "$usage"; exit 0 ;; 77 74 -- ) # Stop option processing 78 75 shift; break ;; … … 108 105 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 109 106 : ${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" ; } || 111 108 { 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 ; } ||113 109 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 114 110 dummy=$tmp/dummy ; … … 127 123 ,,*) CC_FOR_BUILD=$CC ;; 128 124 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 129 esac ; set_cc_for_build= ;'125 esac ;' 130 126 131 127 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. … … 162 158 sh3el) machine=shl-unknown ;; 163 159 sh3eb) machine=sh-unknown ;; 164 sh5el) machine=sh5le-unknown ;;165 160 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 166 161 esac … … 201 196 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 202 197 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 ;; 204 235 *: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 ;; 220 238 alpha:OSF1:*:*) 221 case $UNAME_RELEASE in 222 *4.0) 239 if test $UNAME_RELEASE = "V4.0"; then 223 240 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 229 242 # According to Compaq, /usr/sbin/psrinfo has been available on 230 243 # OSF/1 and Tru64 systems produced since 1995. I hope that … … 264 277 UNAME_MACHINE="alphaev79" ;; 265 278 esac 266 # A Pn.n version is a patched version.267 279 # A Vn.n version is a released version. 268 280 # A Tn.n version is a released field test version. 269 281 # A Xn.n version is an unreleased experimental baselevel. 270 282 # 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 ;; 273 285 Alpha\ *:Windows_NT*:*) 274 286 # How do we know it's Interix rather than the generic POSIX subsystem? … … 276 288 # of the specific Alpha model? 277 289 echo alpha-pc-interix 278 exit ;;290 exit 0 ;; 279 291 21064:Windows_NT:50:3) 280 292 echo alpha-dec-winnt3.5 281 exit ;;293 exit 0 ;; 282 294 Amiga*:UNIX_System_V:4.0:*) 283 295 echo m68k-unknown-sysv4 284 exit ;;296 exit 0;; 285 297 *:[Aa]miga[Oo][Ss]:*:*) 286 298 echo ${UNAME_MACHINE}-unknown-amigaos 287 exit ;;299 exit 0 ;; 288 300 *:[Mm]orph[Oo][Ss]:*:*) 289 301 echo ${UNAME_MACHINE}-unknown-morphos 290 exit ;;302 exit 0 ;; 291 303 *:OS/390:*:*) 292 304 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 ;; 300 306 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 301 307 echo arm-acorn-riscix${UNAME_RELEASE} 302 exit ;; 303 arm:riscos:*:*|arm:RISCOS:*:*) 304 echo arm-unknown-riscos 305 exit ;; 308 exit 0;; 306 309 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 307 310 echo hppa1.1-hitachi-hiuxmpp 308 exit ;;311 exit 0;; 309 312 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 310 313 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. … … 314 317 echo pyramid-pyramid-bsd 315 318 fi 316 exit ;;319 exit 0 ;; 317 320 NILE*:*:*:dcosx) 318 321 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*) 324 324 case `/usr/bin/uname -p` in 325 sparc) echo sparc-icl-nx7 ; exit;;325 sparc) echo sparc-icl-nx7 && exit 0 ;; 326 326 esac ;; 327 327 sun4H:SunOS:5.*:*) 328 328 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 329 exit ;;329 exit 0 ;; 330 330 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 331 331 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.*:*) 334 334 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335 exit ;;335 exit 0 ;; 336 336 sun4*:SunOS:6*:*) 337 337 # According to config.sub, this is the proper way to canonicalize … … 339 339 # it's likely to be more like Solaris than SunOS4. 340 340 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 341 exit ;;341 exit 0 ;; 342 342 sun4*:SunOS:*:*) 343 343 case "`/usr/bin/arch -k`" in … … 348 348 # Japanese Language versions have a version number like `4.1.3-JL'. 349 349 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 350 exit ;;350 exit 0 ;; 351 351 sun3*:SunOS:*:*) 352 352 echo m68k-sun-sunos${UNAME_RELEASE} 353 exit ;;353 exit 0 ;; 354 354 sun*:*:4.2BSD:*) 355 355 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` … … 363 363 ;; 364 364 esac 365 exit ;;365 exit 0 ;; 366 366 aushp:SunOS:*:*) 367 367 echo sparc-auspex-sunos${UNAME_RELEASE} 368 exit ;;368 exit 0 ;; 369 369 # The situation for MiNT is a little confusing. The machine name 370 370 # can be virtually everything (everything which is not … … 377 377 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 378 378 echo m68k-atari-mint${UNAME_RELEASE} 379 exit ;;379 exit 0 ;; 380 380 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 381 381 echo m68k-atari-mint${UNAME_RELEASE} 382 exit ;;382 exit 0 ;; 383 383 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 384 384 echo m68k-atari-mint${UNAME_RELEASE} 385 exit ;;385 exit 0 ;; 386 386 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 387 387 echo m68k-milan-mint${UNAME_RELEASE} 388 exit ;;388 exit 0 ;; 389 389 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 390 390 echo m68k-hades-mint${UNAME_RELEASE} 391 exit ;;391 exit 0 ;; 392 392 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 393 393 echo m68k-unknown-mint${UNAME_RELEASE} 394 exit ;; 395 m68k:machten:*:*) 396 echo m68k-apple-machten${UNAME_RELEASE} 397 exit ;; 394 exit 0 ;; 398 395 powerpc:machten:*:*) 399 396 echo powerpc-apple-machten${UNAME_RELEASE} 400 exit ;;397 exit 0 ;; 401 398 RISC*:Mach:*:*) 402 399 echo mips-dec-mach_bsd4.3 403 exit ;;400 exit 0 ;; 404 401 RISC*:ULTRIX:*:*) 405 402 echo mips-dec-ultrix${UNAME_RELEASE} 406 exit ;;403 exit 0 ;; 407 404 VAX*:ULTRIX*:*:*) 408 405 echo vax-dec-ultrix${UNAME_RELEASE} 409 exit ;;406 exit 0 ;; 410 407 2020:CLIX:*:* | 2430:CLIX:*:*) 411 408 echo clipper-intergraph-clix${UNAME_RELEASE} 412 exit ;;409 exit 0 ;; 413 410 mips:*:*:UMIPS | mips:*:*:RISCos) 414 411 eval $set_cc_for_build … … 434 431 } 435 432 EOF 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 440 436 echo mips-mips-riscos${UNAME_RELEASE} 441 exit ;;437 exit 0 ;; 442 438 Motorola:PowerMAX_OS:*:*) 443 439 echo powerpc-motorola-powermax 444 exit ;;440 exit 0 ;; 445 441 Motorola:*:4.3:PL8-*) 446 442 echo powerpc-harris-powermax 447 exit ;;443 exit 0 ;; 448 444 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 449 445 echo powerpc-harris-powermax 450 exit ;;446 exit 0 ;; 451 447 Night_Hawk:Power_UNIX:*:*) 452 448 echo powerpc-harris-powerunix 453 exit ;;449 exit 0 ;; 454 450 m88k:CX/UX:7*:*) 455 451 echo m88k-harris-cxux7 456 exit ;;452 exit 0 ;; 457 453 m88k:*:4*:R4*) 458 454 echo m88k-motorola-sysv4 459 exit ;;455 exit 0 ;; 460 456 m88k:*:3*:R3*) 461 457 echo m88k-motorola-sysv3 462 exit ;;458 exit 0 ;; 463 459 AViiON:dgux:*:*) 464 460 # DG/UX returns AViiON for all architectures … … 476 472 echo i586-dg-dgux${UNAME_RELEASE} 477 473 fi 478 exit ;;474 exit 0 ;; 479 475 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 480 476 echo m88k-dolphin-sysv3 481 exit ;;477 exit 0 ;; 482 478 M88*:*:R3*:*) 483 479 # Delta 88k system running SVR3 484 480 echo m88k-motorola-sysv3 485 exit ;;481 exit 0 ;; 486 482 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 487 483 echo m88k-tektronix-sysv3 488 exit ;;484 exit 0 ;; 489 485 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 490 486 echo m68k-tektronix-bsd 491 exit ;;487 exit 0 ;; 492 488 *:IRIX*:*:*) 493 489 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 494 exit ;;490 exit 0 ;; 495 491 ????????: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 id497 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 ' 498 494 i*86:AIX:*:*) 499 495 echo i386-ibm-aix 500 exit ;;496 exit 0 ;; 501 497 ia64:AIX:*:*) 502 498 if [ -x /usr/bin/oslevel ] ; then … … 506 502 fi 507 503 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 508 exit ;;504 exit 0 ;; 509 505 *:AIX:2:3) 510 506 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then … … 521 517 } 522 518 EOF 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 529 521 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 530 522 echo rs6000-ibm-aix3.2.4 … … 532 524 echo rs6000-ibm-aix3.2 533 525 fi 534 exit ;;535 *:AIX:*:[45 6])526 exit 0 ;; 527 *:AIX:*:[45]) 536 528 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 537 529 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then … … 546 538 fi 547 539 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 548 exit ;;540 exit 0 ;; 549 541 *:AIX:*:*) 550 542 echo rs6000-ibm-aix 551 exit ;;543 exit 0 ;; 552 544 ibmrt:4.4BSD:*|romp-ibm:BSD:*) 553 545 echo romp-ibm-bsd4.4 554 exit ;;546 exit 0 ;; 555 547 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 556 548 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 557 exit ;;# report: romp-ibm BSD 4.3549 exit 0 ;; # report: romp-ibm BSD 4.3 558 550 *:BOSX:*:*) 559 551 echo rs6000-bull-bosx 560 exit ;;552 exit 0 ;; 561 553 DPX/2?00:B.O.S.:*:*) 562 554 echo m68k-bull-sysv3 563 exit ;;555 exit 0 ;; 564 556 9000/[34]??:4.3bsd:1.*:*) 565 557 echo m68k-hp-bsd 566 exit ;;558 exit 0 ;; 567 559 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 568 560 echo m68k-hp-bsd4.4 569 exit ;;561 exit 0 ;; 570 562 9000/[34678]??:HP-UX:*:*) 571 563 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` … … 629 621 if [ ${HP_ARCH} = "hppa2.0w" ] 630 622 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 644 626 then 645 627 HP_ARCH="hppa2.0w" … … 649 631 fi 650 632 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 651 exit ;;633 exit 0 ;; 652 634 ia64:HP-UX:*:*) 653 635 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 654 636 echo ia64-hp-hpux${HPUX_REV} 655 exit ;;637 exit 0 ;; 656 638 3050*:HI-UX:*:*) 657 639 eval $set_cc_for_build … … 681 663 } 682 664 EOF 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 685 666 echo unknown-hitachi-hiuxwe2 686 exit ;;667 exit 0 ;; 687 668 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 688 669 echo hppa1.1-hp-bsd 689 exit ;;670 exit 0 ;; 690 671 9000/8??:4.3bsd:*:*) 691 672 echo hppa1.0-hp-bsd 692 exit ;;673 exit 0 ;; 693 674 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 694 675 echo hppa1.0-hp-mpeix 695 exit ;;676 exit 0 ;; 696 677 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 697 678 echo hppa1.1-hp-osf 698 exit ;;679 exit 0 ;; 699 680 hp8??:OSF1:*:*) 700 681 echo hppa1.0-hp-osf 701 exit ;;682 exit 0 ;; 702 683 i*86:OSF1:*:*) 703 684 if [ -x /usr/sbin/sysversion ] ; then … … 706 687 echo ${UNAME_MACHINE}-unknown-osf1 707 688 fi 708 exit ;;689 exit 0 ;; 709 690 parisc*:Lites*:*:*) 710 691 echo hppa1.1-hp-lites 711 exit ;;692 exit 0 ;; 712 693 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 713 694 echo c1-convex-bsd 714 exit ;;695 exit 0 ;; 715 696 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 716 697 if getsysinfo -f scalar_acc … … 718 699 else echo c2-convex-bsd 719 700 fi 720 exit ;;701 exit 0 ;; 721 702 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 722 703 echo c34-convex-bsd 723 exit ;;704 exit 0 ;; 724 705 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 725 706 echo c38-convex-bsd 726 exit ;;707 exit 0 ;; 727 708 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 728 709 echo c4-convex-bsd 729 exit ;;710 exit 0 ;; 730 711 CRAY*Y-MP:*:*:*) 731 712 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 732 exit ;;713 exit 0 ;; 733 714 CRAY*[A-Z]90:*:*:*) 734 715 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ … … 736 717 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 737 718 -e 's/\.[^.]*$/.X/' 738 exit ;;719 exit 0 ;; 739 720 CRAY*TS:*:*:*) 740 721 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 741 exit ;;722 exit 0 ;; 742 723 CRAY*T3E:*:*:*) 743 724 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 744 exit ;;725 exit 0 ;; 745 726 CRAY*SV1:*:*:*) 746 727 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 747 exit ;;728 exit 0 ;; 748 729 *: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 ;; 751 732 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 752 733 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` … … 754 735 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 755 736 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 ;; 762 738 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 763 739 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 764 exit ;;740 exit 0 ;; 765 741 sparc*:BSD/OS:*:*) 766 742 echo sparc-unknown-bsdi${UNAME_RELEASE} 767 exit ;;743 exit 0 ;; 768 744 *:BSD/OS:*:*) 769 745 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 770 exit ;;746 exit 0 ;; 771 747 *: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 757 EOF 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 ;; 781 761 i*:CYGWIN*:*) 782 762 echo ${UNAME_MACHINE}-pc-cygwin 783 exit ;;784 *:MINGW*:*)763 exit 0 ;; 764 i*:MINGW*:*) 785 765 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 ;; 791 770 i*:PW*:*) 792 771 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 ;; 806 776 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 807 777 echo i${UNAME_MACHINE}-pc-mks 808 exit ;;778 exit 0 ;; 809 779 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 810 780 # How do we know it's Interix rather than the generic POSIX subsystem? … … 812 782 # UNAME_MACHINE based on the output of uname instead of i386? 813 783 echo i586-pc-interix 814 exit ;;784 exit 0 ;; 815 785 i*:UWIN*:*) 816 786 echo ${UNAME_MACHINE}-pc-uwin 817 exit ;; 818 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 819 echo x86_64-unknown-cygwin 820 exit ;; 787 exit 0 ;; 821 788 p*:CYGWIN*:*) 822 789 echo powerpcle-unknown-cygwin 823 exit ;;790 exit 0 ;; 824 791 prep*:SunOS:5.*:*) 825 792 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 826 exit ;;793 exit 0 ;; 827 794 *:GNU:*:*) 828 # the GNU system829 795 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 ;; 835 797 i*86:Minix:*:*) 836 798 echo ${UNAME_MACHINE}-pc-minix 837 exit ;;799 exit 0 ;; 838 800 arm*:Linux:*:*) 839 eval $set_cc_for_build840 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \841 | grep -q __ARM_EABI__842 then843 echo ${UNAME_MACHINE}-unknown-linux-gnu844 else845 echo ${UNAME_MACHINE}-unknown-linux-gnueabi846 fi847 exit ;;848 avr32*:Linux:*:*)849 801 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 ;; 860 803 ia64:Linux:*:*) 861 804 echo ${UNAME_MACHINE}-unknown-linux-gnu 862 exit ;; 863 m32r*:Linux:*:*) 864 echo ${UNAME_MACHINE}-unknown-linux-gnu 865 exit ;; 805 exit 0 ;; 866 806 m68*:Linux:*:*) 867 807 echo ${UNAME_MACHINE}-unknown-linux-gnu 868 exit ;;808 exit 0 ;; 869 809 mips:Linux:*:*) 870 810 eval $set_cc_for_build … … 883 823 #endif 884 824 EOF 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 891 827 ;; 892 828 mips64:Linux:*:*) … … 906 842 #endif 907 843 EOF 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 914 846 ;; 915 or32:Linux:*:*)916 echo or32-unknown-linux-gnu917 exit ;;918 847 ppc:Linux:*:*) 919 848 echo powerpc-unknown-linux-gnu 920 exit ;;849 exit 0 ;; 921 850 ppc64:Linux:*:*) 922 851 echo powerpc64-unknown-linux-gnu 923 exit ;;852 exit 0 ;; 924 853 alpha:Linux:*:*) 925 854 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in … … 935 864 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 936 865 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 937 exit ;;866 exit 0 ;; 938 867 parisc:Linux:*:* | hppa:Linux:*:*) 939 868 # Look for CPU level … … 943 872 *) echo hppa-unknown-linux-gnu ;; 944 873 esac 945 exit ;;874 exit 0 ;; 946 875 parisc64:Linux:*:* | hppa64:Linux:*:*) 947 876 echo hppa64-unknown-linux-gnu 948 exit ;;877 exit 0 ;; 949 878 s390:Linux:*:* | s390x:Linux:*:*) 950 879 echo ${UNAME_MACHINE}-ibm-linux 951 exit ;; 952 sh64*:Linux:*:*) 953 echo ${UNAME_MACHINE}-unknown-linux-gnu 954 exit ;; 880 exit 0 ;; 955 881 sh*:Linux:*:*) 956 882 echo ${UNAME_MACHINE}-unknown-linux-gnu 957 exit ;;883 exit 0 ;; 958 884 sparc:Linux:*:* | sparc64:Linux:*:*) 959 885 echo ${UNAME_MACHINE}-unknown-linux-gnu 960 exit ;; 961 vax:Linux:*:*) 962 echo ${UNAME_MACHINE}-dec-linux-gnu 963 exit ;; 886 exit 0 ;; 964 887 x86_64:Linux:*:*) 965 888 echo x86_64-unknown-linux-gnu 966 exit ;; 967 xtensa*:Linux:*:*) 968 echo ${UNAME_MACHINE}-unknown-linux-gnu 969 exit ;; 889 exit 0 ;; 970 890 i*86:Linux:*:*) 971 891 # The BFD linker knows what the default object file format is, so … … 985 905 a.out-i386-linux) 986 906 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 987 exit ;; 907 exit 0 ;; 908 coff-i386) 909 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 910 exit 0 ;; 988 911 "") 989 912 # Either a pre-BFD a.out linker (linux-gnuoldld) or 990 913 # one that does not give us useful --help. 991 914 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 992 exit ;;915 exit 0 ;; 993 916 esac 994 917 # Determine whether the default compiler is a.out or elf … … 1007 930 # endif 1008 931 #else 1009 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)932 #ifdef __INTEL_COMPILER 1010 933 LIBC=gnu 1011 934 #else … … 1013 936 #endif 1014 937 #endif 1015 #ifdef __dietlibc__1016 LIBC=dietlibc1017 #endif1018 938 EOF 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 1029 942 ;; 1030 943 i*86:DYNIX/ptx:4*:*) … … 1033 946 # sysname and nodename. 1034 947 echo i386-sequent-sysv4 1035 exit ;;948 exit 0 ;; 1036 949 i*86:UNIX_SV:4.2MP:2.*) 1037 950 # Unixware is an offshoot of SVR4, but it has its own version … … 1041 954 # Use sysv4.2uw... so that sysv4* matches it. 1042 955 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1043 exit ;;956 exit 0 ;; 1044 957 i*86:OS/2:*:*) 1045 958 # If we were able to find `uname', then EMX Unix compatibility 1046 959 # is probably installed. 1047 960 echo ${UNAME_MACHINE}-pc-os2-emx 1048 exit ;;961 exit 0 ;; 1049 962 i*86:XTS-300:*:STOP) 1050 963 echo ${UNAME_MACHINE}-unknown-stop 1051 exit ;;964 exit 0 ;; 1052 965 i*86:atheos:*:*) 1053 966 echo ${UNAME_MACHINE}-unknown-atheos 1054 exit ;; 1055 i*86:syllable:*:*) 1056 echo ${UNAME_MACHINE}-pc-syllable 1057 exit ;; 967 exit 0 ;; 1058 968 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1059 969 echo i386-unknown-lynxos${UNAME_RELEASE} 1060 exit ;;970 exit 0 ;; 1061 971 i*86:*DOS:*:*) 1062 972 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1063 exit ;;973 exit 0 ;; 1064 974 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1065 975 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` … … 1069 979 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1070 980 fi 1071 exit ;; 1072 i*86:*:5:[678]*) 1073 # UnixWare 7.x, OpenUNIX and OpenServer 6. 981 exit 0 ;; 982 i*86:*:5:[78]*) 1074 983 case `/bin/uname -X | grep "^Machine"` in 1075 984 *486*) UNAME_MACHINE=i486 ;; … … 1078 987 esac 1079 988 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1080 exit ;;989 exit 0 ;; 1081 990 i*86:*:3.2:*) 1082 991 if test -f /usr/options/cb.name; then … … 1096 1005 echo ${UNAME_MACHINE}-pc-sysv32 1097 1006 fi 1098 exit ;;1007 exit 0 ;; 1099 1008 pc:*:*:*) 1100 1009 # Left here for compatibility: … … 1102 1011 # the processor, so we play safe by assuming i386. 1103 1012 echo i386-pc-msdosdjgpp 1104 exit ;;1013 exit 0 ;; 1105 1014 Intel:Mach:3*:*) 1106 1015 echo i386-pc-mach3 1107 exit ;;1016 exit 0 ;; 1108 1017 paragon:*:*:*) 1109 1018 echo i860-intel-osf1 1110 exit ;;1019 exit 0 ;; 1111 1020 i860:*:4.*:*) # i860-SVR4 1112 1021 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then … … 1115 1024 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1116 1025 fi 1117 exit ;;1026 exit 0 ;; 1118 1027 mini*:CTIX:SYS*5:*) 1119 1028 # "miniframe" 1120 1029 echo m68010-convergent-sysv 1121 exit ;;1030 exit 0 ;; 1122 1031 mc68k:UNIX:SYSTEM5:3.51m) 1123 1032 echo m68k-convergent-sysv 1124 exit ;;1033 exit 0 ;; 1125 1034 M680?0:D-NIX:5.3:*) 1126 1035 echo m68k-diab-dnix 1127 exit ;;1128 M68*:*:R3V[567 8]*:*)1129 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; };;1130 3[34 5]??:*: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) 1131 1040 OS_REL='' 1132 1041 test -r /etc/.relid \ 1133 1042 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1134 1043 /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 1136 1045 /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 ;; 1138 1047 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1139 1048 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1140 && { echo i486-ncr-sysv4; exit; };;1049 && echo i486-ncr-sysv4 && exit 0 ;; 1141 1050 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1142 1051 echo m68k-unknown-lynxos${UNAME_RELEASE} 1143 exit ;;1052 exit 0 ;; 1144 1053 mc68030:UNIX_System_V:4.*:*) 1145 1054 echo m68k-atari-sysv4 1146 exit ;;1055 exit 0 ;; 1147 1056 TSUNAMI:LynxOS:2.*:*) 1148 1057 echo sparc-unknown-lynxos${UNAME_RELEASE} 1149 exit ;;1058 exit 0 ;; 1150 1059 rs6000:LynxOS:2.*:*) 1151 1060 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1152 exit ;;1061 exit 0 ;; 1153 1062 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1154 1063 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1155 exit ;;1064 exit 0 ;; 1156 1065 SM[BE]S:UNIX_SV:*:*) 1157 1066 echo mips-dde-sysv${UNAME_RELEASE} 1158 exit ;;1067 exit 0 ;; 1159 1068 RM*:ReliantUNIX-*:*:*) 1160 1069 echo mips-sni-sysv4 1161 exit ;;1070 exit 0 ;; 1162 1071 RM*:SINIX-*:*:*) 1163 1072 echo mips-sni-sysv4 1164 exit ;;1073 exit 0 ;; 1165 1074 *:SINIX-*:*:*) 1166 1075 if uname -p 2>/dev/null >/dev/null ; then … … 1170 1079 echo ns32k-sni-sysv 1171 1080 fi 1172 exit ;;1081 exit 0 ;; 1173 1082 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1174 1083 # says <Richard.M.Bartel@ccMail.Census.GOV> 1175 1084 echo i586-unisys-sysv4 1176 exit ;;1085 exit 0 ;; 1177 1086 *:UNIX_System_V:4*:FTX*) 1178 1087 # From Gerald Hewes <hewes@openmarket.com>. 1179 1088 # How about differentiating between stratus architectures? -djm 1180 1089 echo hppa1.1-stratus-sysv4 1181 exit ;;1090 exit 0 ;; 1182 1091 *:*:*:FTX*) 1183 1092 # From seanf@swdc.stratus.com. 1184 1093 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 ;; 1190 1095 *:VOS:*:*) 1191 1096 # From Paul.Green@stratus.com. 1192 1097 echo hppa1.1-stratus-vos 1193 exit ;;1098 exit 0 ;; 1194 1099 mc68*:A/UX:*:*) 1195 1100 echo m68k-apple-aux${UNAME_RELEASE} 1196 exit ;;1101 exit 0 ;; 1197 1102 news*:NEWS-OS:6*:*) 1198 1103 echo mips-sony-newsos6 1199 exit ;;1104 exit 0 ;; 1200 1105 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1201 1106 if [ -d /usr/nec ]; then … … 1204 1109 echo mips-unknown-sysv${UNAME_RELEASE} 1205 1110 fi 1206 exit ;;1111 exit 0 ;; 1207 1112 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1208 1113 echo powerpc-be-beos 1209 exit ;;1114 exit 0 ;; 1210 1115 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1211 1116 echo powerpc-apple-beos 1212 exit ;;1117 exit 0 ;; 1213 1118 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1214 1119 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 ;; 1219 1121 SX-4:SUPER-UX:*:*) 1220 1122 echo sx4-nec-superux${UNAME_RELEASE} 1221 exit ;;1123 exit 0 ;; 1222 1124 SX-5:SUPER-UX:*:*) 1223 1125 echo sx5-nec-superux${UNAME_RELEASE} 1224 exit ;;1126 exit 0 ;; 1225 1127 SX-6:SUPER-UX:*:*) 1226 1128 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 ;; 1237 1130 Power*:Rhapsody:*:*) 1238 1131 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1239 exit ;;1132 exit 0 ;; 1240 1133 *:Rhapsody:*:*) 1241 1134 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1242 exit ;;1135 exit 0 ;; 1243 1136 *:Darwin:*:*) 1244 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown1245 case $UNAME_PROCESSOR in1246 unknown) UNAME_PROCESSOR=powerpc ;;1137 case `uname -p` in 1138 *86) UNAME_PROCESSOR=i686 ;; 1139 powerpc) UNAME_PROCESSOR=powerpc ;; 1247 1140 esac 1248 1141 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1249 exit ;;1142 exit 0 ;; 1250 1143 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1251 1144 UNAME_PROCESSOR=`uname -p` … … 1255 1148 fi 1256 1149 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1257 exit ;;1150 exit 0 ;; 1258 1151 *:QNX:*:4*) 1259 1152 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:*:*) 1265 1155 echo nsr-tandem-nsk${UNAME_RELEASE} 1266 exit ;;1156 exit 0 ;; 1267 1157 *:NonStop-UX:*:*) 1268 1158 echo mips-compaq-nonstopux 1269 exit ;;1159 exit 0 ;; 1270 1160 BS2000:POSIX*:*:*) 1271 1161 echo bs2000-siemens-sysv 1272 exit ;;1162 exit 0 ;; 1273 1163 DS/*:UNIX_System_V:*:*) 1274 1164 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1275 exit ;;1165 exit 0 ;; 1276 1166 *:Plan9:*:*) 1277 1167 # "uname -m" is not consistent, so use $cputype instead. 386 … … 1284 1174 fi 1285 1175 echo ${UNAME_MACHINE}-unknown-plan9 1286 exit ;;1176 exit 0 ;; 1287 1177 *:TOPS-10:*:*) 1288 1178 echo pdp10-unknown-tops10 1289 exit ;;1179 exit 0 ;; 1290 1180 *:TENEX:*:*) 1291 1181 echo pdp10-unknown-tenex 1292 exit ;;1182 exit 0 ;; 1293 1183 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1294 1184 echo pdp10-dec-tops20 1295 exit ;;1185 exit 0 ;; 1296 1186 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1297 1187 echo pdp10-xkl-tops20 1298 exit ;;1188 exit 0 ;; 1299 1189 *:TOPS-20:*:*) 1300 1190 echo pdp10-unknown-tops20 1301 exit ;;1191 exit 0 ;; 1302 1192 *:ITS:*:*) 1303 1193 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 ;; 1327 1195 esac 1328 1196 … … 1356 1224 1357 1225 #if defined (__arm) && defined (__acorn) && defined (__unix) 1358 printf ("arm-acorn-riscix \n"); exit (0);1226 printf ("arm-acorn-riscix"); exit (0); 1359 1227 #endif 1360 1228 … … 1445 1313 EOF 1446 1314 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 1449 1316 1450 1317 # Apollos put the system type in the environment. 1451 1318 1452 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit ; }1319 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 1453 1320 1454 1321 # Convex versions that predate uname can use getsysinfo(1) … … 1459 1326 c1*) 1460 1327 echo c1-convex-bsd 1461 exit ;;1328 exit 0 ;; 1462 1329 c2*) 1463 1330 if getsysinfo -f scalar_acc … … 1465 1332 else echo c2-convex-bsd 1466 1333 fi 1467 exit ;;1334 exit 0 ;; 1468 1335 c34*) 1469 1336 echo c34-convex-bsd 1470 exit ;;1337 exit 0 ;; 1471 1338 c38*) 1472 1339 echo c38-convex-bsd 1473 exit ;;1340 exit 0 ;; 1474 1341 c4*) 1475 1342 echo c4-convex-bsd 1476 exit ;;1343 exit 0 ;; 1477 1344 esac 1478 1345 fi … … 1485 1352 download the most up to date version of the config scripts from 1486 1353 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/ 1490 1355 1491 1356 If the version you run ($0) is already up to date, please -
branches/blt4/gui/cf/config.sub
r1885 r2690 2 2 # Configuration validation subroutine script. 3 3 # 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 6 timestamp='2003-02-22' 8 7 9 8 # This file is (in principle) common to ALL GNU software. … … 23 22 # You should have received a copy of the GNU General Public License 24 23 # along with this program; if not, write to the Free Software 25 # Foundation, Inc., 5 1 Franklin Street - Fifth Floor, Boston, MA26 # 02110-1301, USA.27 # 24 # Foundation, Inc., 59 Temple Place - Suite 330, 25 # Boston, MA 02111-1307, USA. 26 28 27 # As a special exception to the GNU General Public License, if you 29 28 # distribute this file as part of a program that contains a 30 29 # configuration script generated by Autoconf, you may include it under 31 30 # the same distribution terms that you use for the rest of that program. 32 33 31 34 32 # Please send patches to <config-patches@gnu.org>. Submit a context … … 73 71 GNU config.sub ($timestamp) 74 72 75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ,76 2002, 2003, 2004, 2005, 2006, 2007, 2008Free Software Foundation, Inc.73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 74 Free Software Foundation, Inc. 77 75 78 76 This is free software; see the source for copying conditions. There is NO … … 86 84 case $1 in 87 85 --time-stamp | --time* | -t ) 88 echo "$timestamp" ; exit ;;86 echo "$timestamp" ; exit 0 ;; 89 87 --version | -v ) 90 echo "$version" ; exit ;;88 echo "$version" ; exit 0 ;; 91 89 --help | --h* | -h ) 92 echo "$usage"; exit ;;90 echo "$usage"; exit 0 ;; 93 91 -- ) # Stop option processing 94 92 shift; break ;; … … 102 100 # First pass through any local machine types. 103 101 echo $1 104 exit ;;102 exit 0;; 105 103 106 104 * ) … … 121 119 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 122 120 case $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*) 126 122 os=-$maybe_os 127 123 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` … … 149 145 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 150 146 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 151 -apple | -axis | -knuth | -cray)147 -apple | -axis) 152 148 os= 153 149 basic_machine=$1 … … 174 170 os=-hiuxwe2 175 171 ;; 176 -sco6)177 os=-sco5v6178 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`179 ;;180 172 -sco5) 181 173 os=-sco3.2v5 … … 191 183 ;; 192 184 -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*)197 185 # Don't forget version if it is 3.2v4 or newer. 198 186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` … … 241 229 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 242 230 | 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 \ 247 233 | d10v | d30v | dlx | dsp16xx \ 248 | f ido | fr30 | frv \234 | fr30 | frv \ 249 235 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 250 236 | 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 \ 254 239 | mips | mipsbe | mipseb | mipsel | mipsle \ 255 240 | mips16 \ 256 241 | mips64 | mips64el \ 257 | mips64 octeon | mips64octeonel \242 | mips64vr | mips64vrel \ 258 243 | mips64orion | mips64orionel \ 259 | mips64r5900 | mips64r5900el \260 | mips64vr | mips64vrel \261 244 | mips64vr4100 | mips64vr4100el \ 262 245 | mips64vr4300 | mips64vr4300el \ 263 246 | mips64vr5000 | mips64vr5000el \ 264 | mips64vr5900 | mips64vr5900el \265 247 | mipsisa32 | mipsisa32el \ 266 248 | mipsisa32r2 | mipsisa32r2el \ 267 249 | mipsisa64 | mipsisa64el \ 268 | mipsisa64r2 | mipsisa64r2el \269 250 | mipsisa64sb1 | mipsisa64sb1el \ 270 251 | mipsisa64sr71k | mipsisa64sr71kel \ 271 252 | mipstx39 | mipstx39el \ 272 253 | mn10200 | mn10300 \ 273 | mt \274 254 | msp430 \ 275 | nios | nios2 \276 255 | ns16k | ns32k \ 277 | o r32 \256 | openrisc | or32 \ 278 257 | pdp10 | pdp11 | pj | pjl \ 279 258 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 280 259 | 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 \ 283 261 | 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 \ 288 265 | v850 | v850e \ 289 266 | we32k \ 290 | x86 | x c16x | xscale | xscalee[bl]| xstormy16 | xtensa \267 | x86 | xscale | xstormy16 | xtensa \ 291 268 | z8k) 292 269 basic_machine=$basic_machine-unknown … … 298 275 ;; 299 276 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 300 ;;301 ms1)302 basic_machine=mt-unknown303 277 ;; 304 278 … … 321 295 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 322 296 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 323 | avr-* | avr32-*\324 | b fin-* | bs2000-* \297 | avr-* \ 298 | bs2000-* \ 325 299 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 326 | clipper-* | c raynv-* | cydra-* \300 | clipper-* | cydra-* \ 327 301 | d10v-* | d30v-* | dlx-* \ 328 302 | elxsi-* \ 329 | f30[01]-* | f700-* | f ido-* | fr30-* | frv-* | fx80-* \303 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 330 304 | h8300-* | h8500-* \ 331 305 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 332 306 | i*86-* | i860-* | i960-* | ia64-* \ 333 | ip2k-* | iq2000-*\334 | m32 c-* | m32r-* | m32rle-* \307 | ip2k-* \ 308 | m32r-* \ 335 309 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 336 | m88110-* | m88k-* | m axq-* | mcore-* | metag-* \310 | m88110-* | m88k-* | mcore-* \ 337 311 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 338 312 | mips16-* \ 339 313 | mips64-* | mips64el-* \ 340 | mips64 octeon-* | mips64octeonel-* \314 | mips64vr-* | mips64vrel-* \ 341 315 | mips64orion-* | mips64orionel-* \ 342 | mips64r5900-* | mips64r5900el-* \343 | mips64vr-* | mips64vrel-* \344 316 | mips64vr4100-* | mips64vr4100el-* \ 345 317 | mips64vr4300-* | mips64vr4300el-* \ 346 318 | mips64vr5000-* | mips64vr5000el-* \ 347 | mips64vr5900-* | mips64vr5900el-* \348 319 | mipsisa32-* | mipsisa32el-* \ 349 320 | mipsisa32r2-* | mipsisa32r2el-* \ 350 321 | mipsisa64-* | mipsisa64el-* \ 351 | mipsisa64r2-* | mipsisa64r2el-* \352 322 | mipsisa64sb1-* | mipsisa64sb1el-* \ 353 323 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 354 324 | mipstx39-* | mipstx39el-* \ 355 | mmix-* \356 | mt-* \357 325 | msp430-* \ 358 | nios-* | nios2-* \ 359 | none-* | np1-* | ns16k-* | ns32k-* \ 326 | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ 360 327 | orion-* \ 361 328 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ … … 363 330 | pyramid-* \ 364 331 | romp-* | rs6000-* \ 365 | sh-* | sh[1234]-* | sh[2 4]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \332 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 366 333 | 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?-* \ 370 336 | tahoe-* | thumb-* \ 371 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-*\337 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 372 338 | tron-* \ 373 339 | v850-* | v850e-* | vax-* \ 374 340 | we32k-* \ 375 | x86-* | x86_64-* | x c16x-* | xps100-* | xscale-* | xscalee[bl]-* \376 | x stormy16-* | xtensa*-* \341 | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ 342 | xtensa-* \ 377 343 | ymp-* \ 378 344 | z8k-*) 379 ;;380 # Recognize the basic CPU types without company name, with glob match.381 xtensa*)382 basic_machine=$basic_machine-unknown383 345 ;; 384 346 # Recognize the various machine names and aliases which stand … … 398 360 os=-udi 399 361 ;; 400 abacus)401 basic_machine=abacus-unknown402 ;;403 362 adobe68k) 404 363 basic_machine=m68010-adobe … … 415 374 os=-bsd 416 375 ;; 417 amd64)418 basic_machine=x86_64-pc419 ;;420 amd64-*)421 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`422 ;;423 376 amdahl) 424 377 basic_machine=580-amdahl … … 452 405 os=-dynix 453 406 ;; 454 blackfin)455 basic_machine=bfin-unknown456 os=-linux457 ;;458 blackfin-*)459 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`460 os=-linux461 ;;462 407 c90) 463 408 basic_machine=c90-cray … … 488 433 os=-unicos 489 434 ;; 490 craynv)491 basic_machine=craynv-cray492 os=-unicosmp493 ;;494 cr16)495 basic_machine=cr16-unknown496 os=-elf497 ;;498 435 crds | unos) 499 436 basic_machine=m68k-crds 500 437 ;; 501 crisv32 | crisv32-* | etraxfs*)502 basic_machine=crisv32-axis503 ;;504 438 cris | cris-* | etrax*) 505 439 basic_machine=cris-axis 506 ;;507 crx)508 basic_machine=crx-unknown509 os=-elf510 440 ;; 511 441 da30 | da30-*) … … 530 460 basic_machine=m88k-motorola 531 461 os=-sysv3 532 ;;533 dicos)534 basic_machine=i686-pc535 os=-dicos536 ;;537 djgpp)538 basic_machine=i586-pc539 os=-msdosdjgpp540 462 ;; 541 463 dpx20 | dpx20-*) … … 689 611 os=-sysv 690 612 ;; 691 m68knommu)692 basic_machine=m68k-unknown693 os=-linux694 ;;695 m68knommu-*)696 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`697 os=-linux698 ;;699 613 m88k-omron*) 700 614 basic_machine=m88k-omron … … 709 623 ;; 710 624 mingw32) 711 basic_machine=i 386-pc625 basic_machine=i686-pc 712 626 os=-mingw32 713 627 ;; 714 m ingw32ce)715 basic_machine= arm-unknown716 os=-m ingw32ce628 msys) 629 basic_machine=i686-pc 630 os=-msys 717 631 ;; 718 632 miniframe) … … 729 643 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 730 644 ;; 645 mmix*) 646 basic_machine=mmix-knuth 647 os=-mmixware 648 ;; 731 649 monitor) 732 650 basic_machine=m68k-rom68k … … 740 658 basic_machine=i386-pc 741 659 os=-msdos 742 ;;743 ms1-*)744 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`745 660 ;; 746 661 mvs) … … 812 727 basic_machine=np1-gould 813 728 ;; 729 nv1) 730 basic_machine=nv1-cray 731 os=-unicosmp 732 ;; 814 733 nsr-tandem) 815 734 basic_machine=nsr-tandem … … 819 738 os=-proelf 820 739 ;; 821 o penrisc | openrisc-*)740 or32 | or32-*) 822 741 basic_machine=or32-unknown 823 ;; 824 os400) 825 basic_machine=powerpc-ibm 826 os=-os400 742 os=-coff 827 743 ;; 828 744 OSE68000 | ose68000) … … 842 758 os=-osf 843 759 ;; 844 parisc)845 basic_machine=hppa-unknown846 os=-linux847 ;;848 parisc-*)849 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`850 os=-linux851 ;;852 760 pbd) 853 761 basic_machine=sparc-tti … … 859 767 basic_machine=ns32k-pc532 860 768 ;; 861 pc98)862 basic_machine=i386-pc863 ;;864 pc98-*)865 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`866 ;;867 769 pentium | p5 | k5 | k6 | nexgen | viac3) 868 770 basic_machine=i586-pc … … 871 773 basic_machine=i686-pc 872 774 ;; 873 pentiumii | pentium2 | pentiumiii | pentium3)775 pentiumii | pentium2) 874 776 basic_machine=i686-pc 875 ;;876 pentium4)877 basic_machine=i786-pc878 777 ;; 879 778 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) … … 883 782 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 884 783 ;; 885 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)784 pentiumii-* | pentium2-*) 886 785 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 887 ;;888 pentium4-*)889 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`890 786 ;; 891 787 pn) … … 921 817 os=-pw32 922 818 ;; 923 rdos)924 basic_machine=i386-pc925 os=-rdos926 ;;927 819 rom68k) 928 820 basic_machine=m68k-rom68k … … 951 843 basic_machine=mipsisa64sb1el-unknown 952 844 ;; 953 sde)954 basic_machine=mipsisa32-sde955 os=-elf956 ;;957 sei)958 basic_machine=mips-sei959 os=-seiux960 ;;961 845 sequent) 962 846 basic_machine=i386-sequent … … 966 850 os=-hms 967 851 ;; 968 sh5el)969 basic_machine=sh5le-unknown970 ;;971 sh64)972 basic_machine=sh64-unknown973 ;;974 852 sparclite-wrs | simso-wrs) 975 853 basic_machine=sparclite-wrs … … 1046 924 os=-unicos 1047 925 ;; 926 tic4x | c4x*) 927 basic_machine=tic4x-unknown 928 os=-coff 929 ;; 1048 930 tic54x | c54x*) 1049 931 basic_machine=tic54x-unknown … … 1058 940 os=-coff 1059 941 ;; 1060 tile*)1061 basic_machine=tile-unknown1062 os=-linux-gnu1063 ;;1064 942 tx39) 1065 943 basic_machine=mipstx39-unknown … … 1075 953 basic_machine=m68k-ncr 1076 954 ;; 1077 tpf)1078 basic_machine=s390x-ibm1079 os=-tpf1080 ;;1081 955 udi29k) 1082 956 basic_machine=a29k-amd … … 1121 995 basic_machine=hppa1.1-winbond 1122 996 os=-proelf 1123 ;;1124 xbox)1125 basic_machine=i686-pc1126 os=-mingw321127 997 ;; 1128 998 xps | xps100) … … 1156 1026 basic_machine=romp-ibm 1157 1027 ;; 1158 mmix)1159 basic_machine=mmix-knuth1160 ;;1161 1028 rs6000) 1162 1029 basic_machine=rs6000-ibm … … 1175 1042 basic_machine=we32k-att 1176 1043 ;; 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) 1178 1045 basic_machine=sh-unknown 1179 1046 ;; 1180 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 1047 sh64) 1048 basic_machine=sh64-unknown 1049 ;; 1050 sparc | sparcv9 | sparcv9b) 1181 1051 basic_machine=sparc-sun 1182 1052 ;; … … 1251 1121 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1252 1122 | -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* \ 1257 1125 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1258 1126 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1259 1127 | -chorusos* | -chorusrdb* \ 1260 1128 | -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* \ 1263 1130 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1264 1131 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ … … 1266 1133 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1267 1134 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1268 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1269 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) 1135 | -powermax* | -dnix*) 1270 1136 # Remember, each alternative MUST END IN *, to match a version number. 1271 1137 ;; … … 1285 1151 ;; 1286 1152 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1287 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku*\1153 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 1288 1154 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1289 1155 ;; … … 1291 1157 os=`echo $os | sed -e 's|mac|macos|'` 1292 1158 ;; 1293 -linux-dietlibc)1294 os=-linux-dietlibc1295 ;;1296 1159 -linux*) 1297 1160 os=`echo $os | sed -e 's|linux|linux-gnu|'` … … 1306 1169 os=-openedition 1307 1170 ;; 1308 -os400*)1309 os=-os4001310 ;;1311 1171 -wince*) 1312 1172 os=-wince … … 1329 1189 -atheos*) 1330 1190 os=-atheos 1331 ;;1332 -syllable*)1333 os=-syllable1334 1191 ;; 1335 1192 -386bsd) … … 1355 1212 os=-sysv4 1356 1213 ;; 1357 -tpf*)1358 os=-tpf1359 ;;1360 1214 -triton*) 1361 1215 os=-sysv3 … … 1393 1247 -kaos*) 1394 1248 os=-kaos 1395 ;;1396 -zvmoe)1397 os=-zvmoe1398 ;;1399 -dicos*)1400 os=-dicos1401 1249 ;; 1402 1250 -none) … … 1422 1270 1423 1271 case $basic_machine in 1424 score-*)1425 os=-elf1426 ;;1427 spu-*)1428 os=-elf1429 ;;1430 1272 *-acorn) 1431 1273 os=-riscix1.2 … … 1436 1278 arm*-semi) 1437 1279 os=-aout 1438 ;;1439 c4x-* | tic4x-*)1440 os=-coff1441 1280 ;; 1442 1281 # This must come before the *-dec entry. … … 1465 1304 os=-aout 1466 1305 ;; 1467 mep-*)1468 os=-elf1469 ;;1470 1306 mips*-cisco) 1471 1307 os=-elf … … 1486 1322 os=-beos 1487 1323 ;; 1488 *-haiku)1489 os=-haiku1490 ;;1491 1324 *-ibm) 1492 1325 os=-aix 1493 ;;1494 *-knuth)1495 os=-mmixware1496 1326 ;; 1497 1327 *-wec) … … 1627 1457 vendor=ibm 1628 1458 ;; 1629 -os400*)1630 vendor=ibm1631 ;;1632 1459 -ptx*) 1633 1460 vendor=sequent 1634 1461 ;; 1635 -tpf*)1636 vendor=ibm1637 ;;1638 1462 -vxsim* | -vxworks* | -windiss*) 1639 1463 vendor=wrs … … 1660 1484 1661 1485 echo $basic_machine$os 1662 exit 1486 exit 0 1663 1487 1664 1488 # Local variables: -
branches/blt4/gui/cf/install-sh
r1885 r2690 1 1 #!/bin/sh 2 #3 2 # 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 4 scriptversion=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. 17 36 # 18 37 # Calling this script install-sh is preferred over install.sh, to prevent … … 24 43 # shared with many OS's install programs. 25 44 26 27 45 # set DOITPROG to echo to test this script 28 46 29 47 # Don't use :- since 4.3BSD and earlier shells don't like it. 30 48 doit="${DOITPROG-}" 31 32 49 33 50 # put in absolute paths if you don't have them in your path; or use env. vars. … … 42 59 mkdirprog="${MKDIRPROG-mkdir}" 43 60 44 transformbasename= ""45 transform_arg= ""61 transformbasename= 62 transform_arg= 46 63 instcmd="$mvprog" 47 64 chmodcmd="$chmodprog 0755" 48 chowncmd= ""49 chgrpcmd= ""50 stripcmd= ""65 chowncmd= 66 chgrpcmd= 67 stripcmd= 51 68 rmcmd="$rmprog -f" 52 69 mvcmd="$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;; 70 src= 71 dst= 72 dir_arg= 73 74 usage="Usage: $0 [OPTION]... SRCFILE DSTFILE 75 or: $0 [OPTION]... SRCFILES... DIRECTORY 76 or: $0 -d DIRECTORIES... 77 78 In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. 79 In the second, create the directory path DIR. 80 81 Options: 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 93 Environment variables override the default commands: 94 CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG 95 " 96 97 while 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 153 done 154 155 if 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 163 fi 164 165 for src 166 do 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 ;; 104 200 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; } 105 298 done 106 299 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. 252 301 { 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 276 303 } 304 305 # Local variables: 306 # eval: (add-hook 'write-file-hooks 'time-stamp) 307 # time-stamp-start: "scriptversion=" 308 # time-stamp-format: "%:y-%02m-%02d.%02H" 309 # time-stamp-end: "$" 310 # End: -
branches/blt4/gui/configure
r2528 r2690 605 605 LIBOBJS 606 606 TK_VERSION 607 TK_XLIBSW608 TK_LIB_SPEC609 TK_INC_SPEC610 TCL_VERSION611 607 TCL_LIB_SPEC 612 608 TCL_INC_SPEC 609 TCL_VERSION 613 610 TCLSH 611 ENABLE_GUI 612 MAKE 614 613 SHLIB_LDFLAGS 615 MAKE616 LIB_SEARCH_DIRS617 ENABLE_GUI618 614 INSTALL_STUB_LIB 619 615 INSTALL_LIB … … 656 652 INSTALL_SCRIPT 657 653 INSTALL_PROGRAM 654 LIB_SEARCH_DIRS 658 655 target_os 659 656 target_vendor … … 716 713 enable_gui 717 714 with_tclsh 718 with_tk719 715 ' 720 716 ac_precious_vars='build_alias … … 1355 1351 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1356 1352 --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]1359 1353 1360 1354 Some influential environment variables: … … 2113 2107 2114 2108 2115 2116 2109 #------------------------------------------------------------------------ 2117 2110 # Handle the --prefix=... option … … 2240 2233 NONENONEs,x,x, && 2241 2234 program_prefix=${target_alias}- 2235 2242 2236 2243 2237 # Find a good install program. We prefer a C program (faster), … … 5544 5538 5545 5539 5546 with_tcl="" 5547 with_tk="" 5540 5541 5542 5543 5544 5545 5546 5547 5548 gui_with_tcl="" 5548 5549 5549 5550 make_command="" … … 5558 5559 as_fn_error $? "Requires GNU make. You can specify a version with \$MAKE" "$LINENO" 5 5559 5560 fi 5561 MAKE=${make_command} 5562 5560 5563 5561 5564 # Check whether --enable-gui was given. … … 5572 5575 fi 5573 5576 5577 5574 5578 with_tclsh="yes" 5575 5579 … … 5582 5586 5583 5587 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 else5590 with_tcl="yes"5591 fi5592 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 else5600 with_tk=yes5601 fi5602 5603 5588 TCLSH= 5604 5605 5589 # ----------------------------------------------------------------------- 5606 5590 # … … 5608 5592 # 5609 5593 # ----------------------------------------------------------------------- 5594 5610 5595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5 5611 5596 $as_echo_n "checking for tclConfig.sh... " >&6; } 5612 5597 tcl_config_sh="" 5613 if test " $with_tcl" != "yes" ; then5598 if test "x$gui_with_tcl" != "x" ; then 5614 5599 5615 5600 # Verify that a tclConfig.sh file exists in the directory specified 5616 5601 # by --with-tcl. 5617 5602 5618 for dir in $with_tcl ; do 5603 for dir in \ 5604 $gui_with_tcl 5605 do 5619 5606 if test -r "$dir/tclConfig.sh" ; then 5620 5607 tcl_config_sh="$dir/tclConfig.sh" … … 5631 5618 # 1. Search previously named locations. 5632 5619 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 5634 5625 if test -r "$dir/tclConfig.sh" ; then 5635 5626 tcl_config_sh="$dir/tclConfig.sh" … … 5650 5641 fi 5651 5642 . ${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} 5643 TCL_INC_SPEC="$TCL_INCLUDE_SPEC" 5702 5644 5703 5645 case $target in … … 5723 5665 5724 5666 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 5668 if test -f "${exec_prefix}/lib/tclConfig.sh" ; then 5669 . ${exec_prefix}/lib/tclConfig.sh 5670 fi 5671 if test -f "${exec_prefix}/lib/tkConfig.sh" ; then 5672 . ${exec_prefix}/lib/tkConfig.sh 5673 fi 5744 5674 5745 5675 -
branches/blt4/gui/configure.in
r2528 r2690 2 2 AC_INIT([RapptureGUI],[1.1],[rappture@nanohub.org]) 3 3 AC_CONFIG_AUX_DIR(cf) 4 5 4 #------------------------------------------------------------------------ 6 5 # Handle the --prefix=... option … … 20 19 fi 21 20 AC_CANONICAL_TARGET 21 AC_SUBST(LIB_SEARCH_DIRS) 22 22 23 23 AC_PROG_INSTALL … … 32 32 SC_ENABLE_SHARED 33 33 34 with_tcl="" 35 with_tk="" 34 AC_SUBST(CFLAGS_DEBUG) 35 AC_SUBST(CFLAGS_OPTIMIZE) 36 AC_SUBST(STLIB_LD) 37 AC_SUBST(SHLIB_LD) 38 AC_SUBST(SHLIB_CFLAGS) 39 AC_SUBST(SHLIB_LDFLAGS) 40 AC_SUBST(SHLIB_SUFFIX) 41 42 gui_with_tcl="" 36 43 37 44 make_command="" … … 46 53 AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE]) 47 54 fi 55 AC_SUBST(MAKE, ${make_command}) 48 56 49 57 AC_ARG_ENABLE( … … 57 65 ENABLE_GUI="yes" 58 66 fi 67 AC_SUBST(ENABLE_GUI) 59 68 60 69 with_tclsh="yes" … … 66 75 [with_tclsh=yes]) 67 76 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])83 77 TCLSH= 84 85 78 # ----------------------------------------------------------------------- 86 79 # … … 88 81 # 89 82 # ----------------------------------------------------------------------- 83 90 84 AC_MSG_CHECKING([for tclConfig.sh]) 91 85 tcl_config_sh="" 92 if test " $with_tcl" != "yes" ; then86 if test "x$gui_with_tcl" != "x" ; then 93 87 94 88 # Verify that a tclConfig.sh file exists in the directory specified 95 89 # by --with-tcl. 96 90 97 for dir in $with_tcl ; do 91 for dir in \ 92 $gui_with_tcl 93 do 98 94 if test -r "$dir/tclConfig.sh" ; then 99 95 tcl_config_sh="$dir/tclConfig.sh" … … 110 106 # 1. Search previously named locations. 111 107 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 113 113 if test -r "$dir/tclConfig.sh" ; then 114 114 tcl_config_sh="$dir/tclConfig.sh" … … 128 128 fi 129 129 . ${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} 130 TCL_INC_SPEC="$TCL_INCLUDE_SPEC" 178 131 179 132 case $target in … … 193 146 194 147 AC_MSG_RESULT([${TCLSH}]) 148 AC_SUBST(TCLSH) 195 149 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) 150 AC_SUBST(TCL_VERSION) 207 151 AC_SUBST(TCL_INC_SPEC) 208 152 AC_SUBST(TCL_LIB_SPEC) 153 154 if test -f "${exec_prefix}/lib/tclConfig.sh" ; then 155 . ${exec_prefix}/lib/tclConfig.sh 156 fi 157 if test -f "${exec_prefix}/lib/tkConfig.sh" ; then 158 . ${exec_prefix}/lib/tkConfig.sh 159 fi 209 160 AC_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)214 161 AC_SUBST(TK_VERSION) 215 162 -
branches/blt4/gui/scripts/Makefile.in
r2562 r2690 143 143 144 144 tclIndex: $(FILES) 145 $(TCLSH) $(srcdir)/../ tclconfig/mkindex.tcl --srcdir $(srcdir) \145 $(TCLSH) $(srcdir)/../cf/mkindex.tcl --srcdir $(srcdir) \ 146 146 --outfile tclIndex 147 147 -
branches/blt4/gui/scripts/analyzer.tcl
r2534 r2690 443 443 # It may be a real problem. 444 444 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]" 446 446 Rappture::bugreport::register "Problem launching job:\n$result" 447 Rappture::bugreport::attachment [$_tool xml xml] 447 448 Rappture::bugreport::send 448 449 } -
branches/blt4/gui/scripts/bugreport.tcl
r2689 r2690 678 678 set btags [bindtags .bugreport] 679 679 bindtags .bugreport [linsert $btags 0 BugReportOnTop] 680 -
branches/blt4/gui/scripts/field.tcl
r2534 r2690 39 39 protected method _getValue {expr} 40 40 41 private variable _xmlobj "" ; # ref to XML obj with device data42 43 private variable _units "" ; # system of units for this field41 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 44 44 private variable _limits ;# maps box name => {z0 z1} limits 45 45 private variable _zmax 0 ;# length of the device … … 69 69 } 70 70 set _xmlobj $xmlobj 71 set _path $path 71 72 set _field [$xmlobj element -as object $path] 72 73 set _units [$_field get units] … … 502 503 itcl::body Rappture::Field::hints {{keyword ""}} { 503 504 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 514 521 } { 515 522 set str [$_field get $path] … … 518 525 } 519 526 } 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 } 524 534 if {[info exists hints(group)] && [info exists hints(label)]} { 525 535 # pop-up help for each curve … … 768 778 } elseif {$type == "vtkstreamlines"} { 769 779 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" 770 800 set _comp2vtkstreamlines($cname) [$_field get $cname.vtk] 771 801 set _comp2style($cname) [$_field get $cname.style] -
branches/blt4/gui/scripts/flowvisviewer.tcl
r2534 r2690 176 176 # ---------------------------------------------------------------------- 177 177 itcl::body Rappture::FlowvisViewer::constructor { hostlist args } { 178 set _serverType "nanovis" 178 179 179 180 # Draw legend event … … 260 261 261 262 itk_component add 3dview { 262 label $itk_component(plotarea).v ol-image $_image(plot) \263 label $itk_component(plotarea).view -image $_image(plot) \ 263 264 -highlightthickness 0 -borderwidth 0 264 265 } { … … 2855 2856 $_dispatcher event -after 60000 !pngtimeout 2856 2857 WaitIcon start $inner.icon 2857 grab set -local$inner2858 grab set $inner 2858 2859 focus $inner.cancel 2859 2860 … … 2913 2914 $_dispatcher event -after 600000 !movietimeout 2914 2915 WaitIcon start $inner.icon 2915 grab set -local$inner2916 grab set $inner 2916 2917 focus $inner.cancel 2917 2918 -
branches/blt4/gui/scripts/heightmapviewer.tcl
r2327 r2690 61 61 } 62 62 public method camera {option args} 63 63 64 protected method Connect {} 64 65 protected method Disconnect {} … … 132 133 # ---------------------------------------------------------------------- 133 134 itcl::body Rappture::HeightmapViewer::constructor {hostlist args} { 135 set _serverType "nanovis" 136 134 137 # Draw legend event 135 138 $_dispatcher register !legend … … 186 189 187 190 itk_component add 3dview { 188 canvas $itk_component(plotarea).v ol\191 canvas $itk_component(plotarea).view \ 189 192 -highlightthickness 0 -borderwidth 0 190 193 } { … … 664 667 array set info $args 665 668 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" 668 670 if { $info(-type) == "image" } { 669 671 $_image(plot) configure -data $bytes 670 672 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>"672 673 } elseif { $info(type) == "print" } { 673 674 set tag $this-print-$info(-token) -
branches/blt4/gui/scripts/molvisviewer.tcl
r2048 r2690 42 42 43 43 private variable _icon 0 44 44 private variable _getimage 0 45 45 private variable _mevent; # info used for mouse event operations 46 46 private variable _rocker; # info used for rock operations … … 65 65 private variable _cacheid "" 66 66 private variable _cacheimage "" 67 68 private variable _delta1 1069 private variable _delta2 270 67 71 68 private common _settings ; # Array of settings for all known … … 80 77 private variable _buffering 0; 81 78 private variable _resizePending 0; 79 private variable _updatePending 0; 80 private variable _rotatePending 0; 82 81 private variable _width 83 82 private variable _height 84 private variable _res tore1; # Restore camera settings83 private variable _reset 1; # Restore camera settings 85 84 private variable _cell 0; # Restore camera settings 86 private variable _ getimage 0;85 private variable _flush 1 87 86 88 87 constructor { hostlist args } { … … 99 98 private method BuildSettingsTab {} 100 99 private method DoResize {} 100 private method DoRotate {} 101 private method DoUpdate {} 101 102 private method EventuallyResize { w h } 103 private method EventuallyRotate { a b c } 104 private method EventuallyChangeSettings { args } 102 105 private method GetImage { widget } 103 106 private method ReceiveImage { size cacheid frame rock } 104 107 private method WaitIcon { option widget } 105 private method DownloadPopup { popup command }106 108 private method AddImageControls { frame widget } 107 109 private method SetWaitVariable { value } { 108 110 set _getimage $value 109 }110 private method GetWaitVariable {} {111 return $_getimage112 111 } 113 112 private method WaitForImage {} { … … 143 142 private method StickRadius {option {models "all"} } 144 143 private method OrthoProjection {option} 145 private method Representation { option {model "all"} }144 private method Representation { {option ""} } 146 145 private method CartoonTrace {option {model "all"}} 147 146 private method ComputeParallelepipedVertices { dataobj } … … 160 159 # ---------------------------------------------------------------------- 161 160 itcl::body Rappture::MolvisViewer::constructor {hostlist args} { 161 set _serverType "pymol" 162 162 163 # Register events to the dispatcher. Base class expects !rebuild 163 164 # event to be registered. … … 170 171 $_dispatcher register !resize 171 172 $_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" 172 181 173 182 # Rocker … … 195 204 set _state(client) 1 196 205 set _hostlist $hostlist 197 set _res tore1206 set _reset 1 198 207 199 208 array set _view { … … 231 240 232 241 itk_component add 3dview { 233 label $itk_component(plotarea).v ol-image $_image(plot) \242 label $itk_component(plotarea).view -image $_image(plot) \ 234 243 -highlightthickness 0 -borderwidth 0 235 244 } { … … 413 422 } 414 423 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.frame425 pack $tab.ss -fill both -expand yes426 blt::tk::scrollbar $tab.ss.xs427 blt::tk::scrollbar $tab.ss.ys428 set inner [blt::tk::frame $tab.ss.frame]429 430 $inner configure -borderwidth 4431 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 0441 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 0448 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 0455 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 0462 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 0469 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 select522 523 label $inner.spacer524 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 2541 blt::table configure $inner c1 c2 -resize none542 blt::table configure $inner c3 -resize expand543 blt::table configure $inner r* -resize none544 blt::table configure $inner r13 -resize expand545 }546 547 424 # ---------------------------------------------------------------------- 548 425 # DESTRUCTOR … … 553 430 image delete $_image(plot) 554 431 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 # ---------------------------------------------------------------------- 443 itcl::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 # ---------------------------------------------------------------------- 496 itcl::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 # ---------------------------------------------------------------------- 537 itcl::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 555 550 } 556 551 … … 673 668 return 0 674 669 } 675 set _res tore1670 set _reset 1 676 671 set result [VisViewer::Connect $hosts] 677 672 if { $result } { … … 766 761 } 767 762 763 itcl::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 } 768 894 769 895 # ---------------------------------------------------------------------- … … 785 911 set _cell 0 786 912 787 if { $_res tore} {913 if { $_reset } { 788 914 set _rocker(server) 0 789 915 set _cacheid 0 … … 812 938 } 813 939 if { ![info exists _dataobjs($model-$state)] } { 814 set data1 ""940 set data1 "" 815 941 set serial 1 816 942 … … 930 1056 set vertices [ComputeParallelepipedVertices $dataobj] 931 1057 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}" 933 1059 SendCmd "raw -defer {draw_box(verts)\n}" 934 1060 set _cell 1 … … 993 1119 set flush 0 994 1120 } 995 if { $_res tore} {1121 if { $_reset } { 996 1122 # Set or restore viewing parameters. We do this for the first 997 1123 # model and assume this works for everything else. … … 1008 1134 1009 1135 SendCmd "raw -defer {zoom complete=1}" 1010 set _res tore01136 set _reset 0 1011 1137 } 1012 1138 if { $changed } { … … 1019 1145 Cell update 1020 1146 OrthoProjection update 1021 Representation update 1147 Representation update 1022 1148 } 1023 1149 set tab [$itk_component(main) panel "Settings"] … … 1032 1158 set readyForNextFrame 0; # Don't advance to the next frame 1033 1159 # until we get an image. 1034 SendCmd "bmp"; # Flush the results. 1160 #SendCmd "ppm"; # Flush the results. 1161 set _flush 0 1035 1162 } 1036 1163 set _buffering 0; # Turn off buffering. … … 1082 1209 set _height $h 1083 1210 if { !$_resizePending } { 1084 $_dispatcher event - idle!resize1211 $_dispatcher event -after 400 !resize 1085 1212 set _resizePending 1 1213 } 1214 } 1215 1216 itcl::body Rappture::MolvisViewer::DoRotate {} { 1217 SendCmd "rotate $_view(a) $_view(b) $_view(c)" 1218 set _rotatePending 0 1219 } 1220 1221 itcl::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 1231 itcl::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 1248 itcl::body Rappture::MolvisViewer::EventuallyChangeSettings { args } { 1249 if { !$_updatePending } { 1250 $_dispatcher event -after 400 !update 1251 set _updatePending 1 1086 1252 } 1087 1253 } … … 1278 1444 set _view(my) [expr {$_view(my) + $my}] 1279 1445 set _view(mz) [expr {$_view(mz) + $mz}] 1280 SendCmd "rotate $mx $my $mz" 1446 #SendCmd "rotate $mx $my $mz" 1447 EventuallyRotate $mx $my $mz 1281 1448 debug "_vmmouse: rotate $_view(mx) $_view(my) $_view(mz)" 1282 1449 } … … 1374 1541 vz $vz 1375 1542 }] 1376 SendCmd "rotate $a $b $c" 1543 EventuallyRotate $a $b $c 1544 #SendCmd "rotate $a $b $c" 1377 1545 debug "Rotate $x $y: rotate $_view(vx) $_view(vy) $_view(vz)" 1378 1546 set _click(x) $x … … 1398 1566 # our scene. 1399 1567 # ---------------------------------------------------------------------- 1400 itcl::body Rappture::MolvisViewer::Representation {option {model "all"} } { 1568 itcl::body Rappture::MolvisViewer::Representation { { option "" } } { 1569 if { $option == "" } { 1570 set value [$itk_component(representation) value] 1571 set option [$itk_component(representation) translate $value] 1572 } 1401 1573 if { $option == $_mrep } { 1402 1574 return … … 1419 1591 set _mrep $option 1420 1592 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] { 1428 1595 if { [info exists _model($model-rep)] } { 1429 1596 if { $_model($model-rep) != $option } { … … 1523 1690 } 1524 1691 1525 1526 # ----------------------------------------------------------------------1527 # USAGE: add <dataobj> ?<settings>?1528 #1529 # Clients use this to add a data object to the plot. The optional1530 # <settings> are used to configure the plot. Allowed settings are1531 # -color, -brightness, -width, -linestyle, and -raise. Only1532 # -brightness and -raise do anything.1533 # ----------------------------------------------------------------------1534 itcl::body Rappture::MolvisViewer::add { dataobj {options ""}} {1535 array set params {1536 -color auto1537 -brightness 01538 -width 11539 -raise 01540 -linestyle solid1541 -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) $val1550 }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) $showlabels1563 }1564 }1565 1566 lappend _dlist $dataobj1567 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 !rebuild1577 }1578 }1579 }1580 1692 1581 1693 # … … 1598 1710 } 1599 1711 SendCmd "reset" 1712 DoResize 1600 1713 SendCmd "rotate $_view(mx) $_view(my) $_view(mz)" 1601 1714 debug "ResetView: rotate $_view(mx) $_view(my) $_view(mz)" … … 1603 1716 SendCmd "zoom $_view(zoom)" 1604 1717 } 1605 1606 # ----------------------------------------------------------------------1607 # USAGE: get1608 #1609 # Clients use this to query the list of objects being plotted, in1610 # 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 options1614 set dlist $_dlist1615 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 $obj1621 }1622 }1623 }1624 return $dlist1625 }1626 1627 # ----------------------------------------------------------------------1628 # USAGE: delete ?<dataobj> <dataobj> ...?1629 #1630 # Clients use this to delete a dataobj from the plot. If no dataobjs1631 # are specified, then all dataobjs are deleted.1632 # ----------------------------------------------------------------------1633 itcl::body Rappture::MolvisViewer::delete { args } {1634 if {[llength $args] == 0} {1635 set args $_dlist1636 }1637 1638 # delete all specified dataobjs1639 set changed 01640 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 $model1647 }1648 }1649 array unset _obj2models $dataobj1650 array unset _dobj2transparency $dataobj1651 array unset _dobj2color $dataobj1652 array unset _dobj2width $dataobj1653 array unset _dobj2dashes $dataobj1654 array unset _dobj2raise $dataobj1655 set changed 11656 }1657 }1658 1659 # if anything changed, then rebuild the plot1660 if {$changed} {1661 if { [isconnected] } {1662 $_dispatcher event -idle !rebuild1663 }1664 }1665 }1666 1667 # ----------------------------------------------------------------------1668 # OPTION: -device1669 # ----------------------------------------------------------------------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 delete1677 $this add $itk_option(-device)1678 } else {1679 $this delete1680 }1681 1682 if { [isconnected] } {1683 $_dispatcher event -idle !rebuild1684 }1685 }1686 1687 1718 1688 1719 … … 1764 1795 $_dispatcher event -after 60000 !pngtimeout 1765 1796 WaitIcon start $inner.icon 1766 grab set -local$inner1797 grab set $inner 1767 1798 focus $inner.cancel 1768 1799 … … 2105 2136 return $vertices 2106 2137 } 2138 2139 2140 # ---------------------------------------------------------------------- 2141 # OPTION: -device 2142 # ---------------------------------------------------------------------- 2143 itcl::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.