#!/bin/csh -f

setenv USE_TCL_833 1

if ( -e $ICEM_ACN/bin/wish8.3.3 && $?USE_TCL_833 ) then

    setenv TK_LIBRARY $ICEM_ACN/lib/tk8.3.3
    setenv TCL_LIBRARY $ICEM_ACN/lib/tcl8.3.3
    echo "Using tk8.3.3 / tcl8.3.3" 
    set wish = wish8.3.3

else
    
    setenv TK_LIBRARY $ICEM_ACN/lib/tk8.0
    setenv TCL_LIBRARY $ICEM_ACN/lib/tcl8.0
    setenv BLT_LIBRARY $ICEM_ACN/lib/blt2.4
    echo "Using tk8.0 / tcl8.0" 
    set wish = bltwish

endif

if $?GLOBAL_DIR then
	set tooldir = $GLOBAL_DIR
else
	set tooldir = $ICEM_ACN/lib/global
endif

if $?GUIBASE_DIR then
	set guibase = $GUIBASE_DIR
else
	if -d $tooldir/guibase then
		set guibase = $tooldir/guibase
	else
		set guibase = $ICEM_ACN/lib/guibase
	endif
	setenv GUIBASE_DIR $guibase
endif

$ICEM_ACN/bin/$wish -f $guibase/guibase.tcl -tool $tooldir/global.tcl $*
