{
isdot=`which dot 2>/dev/null`
if [ -n "$isdot" ]; then
- ver=`dot -V 2>&1 | awk '{print $5}'`
+ ver=`dot -V 2>&1 | sed -e "s%[A-Za-z-]%%g" | awk '{print $1}'`
maj_ver=`echo $ver | awk -F. '{if(NF>0) print $1; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
min_ver=`echo $ver | awk -F. '{if(NF>1) print $2; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
rel_ver=`echo $ver | awk -F. '{if(NF>2) print $3; else print 0}' | sed -e 's/^\([0-9]*\).*$/\1/'`
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
sed -i 's%PYTHON_LIBS="\(.*\)"%PYTHON_LIBS="-L\$PYTHON_PREFIX/lib \1"%g' configure
+sed -i "s%echo 'puts \[info tclversion\]' | \$TCLSH%echo 'puts \[info tclversion\]' | \$TCLSH 2>/dev/null | grep -E '^[0-9.]+$'%g" configure
CONFIGURE_FLAGS="--disable-rpath"
if [ "${EXPAT_ROOT}" != "" ] ; then