Introduction to Tcl

The Tcl package contains Tool Command Language.

Package information

Installation of Tcl



This package is also installed in LFS during the bootstrap phase. The significant difference between the two installations (other than installing to /usr) is to install the package in such a way that there is no need to keep the build directory around after installation.

Install Tcl by running the following commands:

VERSION=8.4.6 &&
V=`echo $VERSION | cut -d "." -f 1,2` &&
cd unix &&
./configure --prefix=/usr &&
make &&
sed -i "s:${DIR}/unix:/usr/lib:" &&
sed -i "s:${DIR}:/usr/include/tcl${V}:" &&
sed -i "s,^TCL_LIB_FILE='libtcl${V}',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," \ &&
mv ../doc/{,Tcl_}Thread.3 &&
sed -i 's/ Thread.3/ Tcl_Thread.3/' mkLinks &&
make install &&
install -d /usr/include/tcl${V}/unix &&
install -m644 *.h /usr/include/tcl${V}/unix/ &&
install -d /usr/include/tcl${V}/generic &&
install -c -m644 ../generic/*.h /usr/include/tcl${V}/generic/ &&
rm -f /usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h &&
ln -nsf /usr/include/tcl${V} /usr/lib/tcl${V}/include &&
ln -sf libtcl${V}.so /usr/lib/ &&
ln -sf tclsh${V} /usr/bin/tclsh

Command explanations

sed -i ...: The Tcl package assumes that the source that is used to build Tcl is always kept around for compiling packages that depend on Tcl. These sed's remove the reference to the build directory and replace them by saner system wide locations.

install ...: These commands install the internal headers into a system-wide location.

ln -sf ...: These commands create compatibility symbolic links.