5 if [ -z "$TCLHOME" ]; then
6 echo "TCLHOME doesn't set"
10 check_lib_version tclsh8.4 ${TCLHOME}/bin
11 if [ "$?" -ne "0" ]; then
15 check_lib_version wish8.4 ${TCLHOME}/bin
16 if [ "$?" -ne "0" ]; then
20 check_lib_version libtcl8.4.so
21 if [ "$?" -ne "0" ]; then
25 check_lib_version libtk8.4.so
26 if [ "$?" -ne "0" ]; then
30 echo "The product ${PRODUCT} has been already installed on yours system"
36 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
37 #$DELIM ${PRODUCT_TYPE} $DELIM
38 export TCLHOME=\${INSTALL_ROOT}/${PRODUCT}
39 export PATH=\${TCLHOME}/bin:\${PATH}
40 export LD_LIBRARY_PATH=\${TCLHOME}/lib:\${LD_LIBRARY_PATH}
41 export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl8.4 \${TCLHOME}/lib/tk8.4 \${TCLLIBPATH}"
44 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
45 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
48 # looks for the native product and collects it's environment (used by make_env())
50 tclhome="`find_in_path tclsh ${PATH}`"
51 if [ -z "${tclhome}" ] ; then
52 tclhome="`find_in_path tclsh /usr/bin`"
54 if [ -n "${tclhome}" ] ; then
55 tclhome=`cd ${tclhome}/..; pwd`
56 tmp="\${TCLHOME}/bin ${tclhome}/bin \${PATH} ${PATH}";
57 path=`sort_path ${tmp}`
58 tmp="\${TCLHOME}/lib ${tclhome}/lib \${LD_LIBRARY_PATH} ${LD_LIBRARY_PATH}";
59 ld_library_path=`sort_path ${tmp}`
60 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
61 #$DELIM ${PRODUCT_TYPE} $DELIM
62 export TCLHOME=${tclhome}
64 export LD_LIBRARY_PATH=${ld_library_path}
65 export TCLLIBPATH="\${TCLHOME}/lib \${TCLHOME}/lib/tcl8.4 \${TCLHOME}/lib/tk8.4 \${TCLLIBPATH}"
68 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
69 make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
76 try_existing ${PRODUCT_DIR} ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}" ${PRODUCT_TYPE}
82 echo "The installation of tcl/tk 8.4.5 from sources is not provided! Use native tcl/tk."
88 echo "The installation of tcl/tk 8.4.5 from binaries is not provided! Use native tcl/tk."
93 export INSTALL_WORK=$2;
95 export INSTALL_ROOT=$4;
96 export PRODUCT_SEQUENCE=$5;
97 if [ $# == 6 ] ; then export PRODUCT_TYPE=$6 ; else export PRODUCT_TYPE="tcl" ; fi
98 export PRODUCT="tcltk8.4.5"
99 export PRODUCT_DIR=${INSTALL_ROOT}/${PRODUCT}
100 export PRODUCT_WORK=${INSTALL_WORK}/${PRODUCT}