echo $arg1:$arg2
fi
return $to_tail
-}
\ No newline at end of file
+}
+
+where_tcl(){
+if test -z "${TCLHOME}"; then
+ TCLHOME=/usr
+fi
+tclcfg=`find ${TCLHOME}/lib -name "tclConfig.sh" 2> /dev/null`
+file=""
+maxver=0
+for f in $tclcfg; do
+ ver=`cat $f | grep -e "TCL_VERSION=.*" | sed -e "s%TCL_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g" | awk -F. '{x=0;for(i=1;i<=3;i++){x=x*100;if(i<=NF)x+=$i;}print x;}'`
+ if [ $maxver -lt $ver ]; then
+ maxver=$ver
+ file=$f
+ fi
+done
+if test -n "$file"; then
+ echo `dirname $file`
+ return 0
+else
+ echo ""
+ return 1
+fi
+}
+
+where_tk(){
+if test -z "${TCLHOME}"; then
+ TCLHOME=/usr
+fi
+tclcfg=`find ${TCLHOME}/lib -name "tkConfig.sh" 2> /dev/null`
+file=""
+maxver=0
+for f in $tclcfg; do
+ ver=`cat $f | grep -e "TK_VERSION=.*" | sed -e "s%TK_VERSION=[\'|\"]\(.*\)[\'|\"]%\1%g" | awk -F. '{x=0;for(i=1;i<=3;i++){x=x*100;if(i<=NF)x+=$i;}print x;}'`
+ if [ $maxver -lt $ver ]; then
+ maxver=$ver
+ file=$f
+ fi
+done
+if test -n "$file"; then
+ echo `dirname $file`
+ return 0
+else
+ echo ""
+ return 1
+fi
+}