What do I need to do to reuse someone else's Tcl code

Purpose: to describe building and installing extensions

The process of building and installing Tcl extensions is basically:

  1. Locate the extension - see http://purl.org/net/tcl-faq/ or one of the other resources to locate an extension you want.
  2. Obtain the source or binary for the extension. Note that to build the source of many extensions requires a C compiler, make command, and shell command such as /bin/sh. Also note that many extension authors do not, themselves, provide pointers to binary versions of their extensions. These binary packages may still be available - check archives for your operating system and hardware to see if perhaps someone has built the extension.
  3. If you got the source, then create a directory where you are

going to build the extension. You will find that it is quite common for an extension to require you to have available at build time the uncompressed source code for Tcl and possibly Tk. It is recommended that, to reduce problems, you place the new extension in the same directory where you have placed the Tcl and Tk code.

  1. Extract the extension source code into it's own directory. Most extensions will create their own directory automatically.
  2. Change into the extension's directory and read the README files as well as any other referenced files.
  3. Determine what configure options are available to you. Invoke the following command, read through the output produced, and read through any documentation with the package to determine what options you want to provide.
   ./configure --help
  1. If there were any errors, resolve them either by obtaining missing software, changing flags specified, correcting paths in your environment, or contacting the extension author or appropriate mailing list or newsgroup.
  2. Once the configuration process is successful, to build an extension type
   make all
  1. If there are errors, correct configuration flags, paths, download appropriate versions of software required, or contact the extension author or appropriate mailing list or newsgroup.
  2. Once the compilation is successful, see if any extension testing capability is available. Frequently the documentation will mention testing. If it does not, attempt one of these commands:
   make check

   or

   make test
  1. If there are problems, correct configuration flags, paths, update required utilities to the appropriate versions, or contact the extension author or appropriate mailing list or newsgroup.
  2. Once testing is successful, install the extension. One of the configuration options was a specification of the directory into which the extension is to be installed. If you specified that appropriately and if the included documentation does not mention any other special installation handling, installation should be successfully completed after typing:
   make install
  1. If there are problems, correct configuration flags, update required utilities, or contact the extension author or appropriate mailing list or newsgroup.

Feel free to add details above as necessary.