Compilation on Unix

UpCompilation
Sitemap
 

There are several different flavors of Un*x out there in this small world. A configure script, as generated by GNU autoconf, is provided to handle them all together.

  • Simply type:

    • configure
    • make

    The makefile will then check number and names of the files in the package, generate dependency information, compile them and at last build the library.

  • In contrast to earlier versions the system will build a shared library by default. Give option --disable-shared to configure if this is not desired.
  • To check the extension, type make test or make check. This will build a tclsh containing just tcl and giot, and then runs some test-scripts checking the behaviour of the created library.
  • At last type make install to install the generated library and the exported header. This installation conforms to the rules set by the package loader mechanism of the tcl-core.

You do have a non-standard setup (tcl not installed below /usr/local) ?

Don't fret, there are some tuning options for configure to help you.

  • The configure script searches the core header tcl.h in the following places:

    1. $(TCL_INCLUDE_DIR)
    2. ../../tcl8.2*/generic
    3. ../../tcl8.1*/generic
    4. ../../tcl8.0*/generic
    5. ../../tcl/generic
    6. ../../tcl
    7. $(prefix)
    8. /usr/local/include
    9. /usr/include

    By default $(TCL_INCLUDE_DIR) is empty and $(prefix) points to the location of an installed 'tclsh' or is /usr/local if tclsh could not be found via $PATH.

    There are three options to override these defaults:

    --prefix=DIR

    $(prefix)=DIR

    --with-tcl=DIR

    $(TCL_INCLUDE_DIR)=DIR/include

    --with-tcl-include-dir=DIR

    $(TCL_INCLUDE_DIR)=DIR

  • To find libtcl.a (or libtcl.so.??) the paths

    1. $(TCL_LIB_DIR)
    2. ../../tcl8.2*/unix
    3. ../../tcl8.1*/unix
    4. ../../tcl8.0*/unix
    5. ../../tcl/unix
    6. ../../tcl
    7. $(exec_prefix)
    8. /usr/local/include
    9. /usr/include

    are searched. $(TCL_LIB_DIR) is empty by default, but can be set via

    --with-tcl=DIR

    $(TCL_LIB_DIR)=DIR/lib

    --with-tcl-lib-dir=DIR

    $(TCL_LIB_DIR)=DIR

    $(exec_prefix) contains the same value as $(prefix) by default, but can be set explicitly via --exec-prefix.


© Andreas Kupries
Last update at Tue Sep 28 20:49:35 MEST 1999