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.

  • The system builds a shared library by default. Use the option --disable-shared for configure if this is not desired.
  • To check the extension, type make test or make check. This will run some test-scripts checking the behaviour of the created library.
  • At last type make install to install the generated library, the exported headers and the script library. 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. ../../tcl/generic
    5. ../../tcl
    6. $(prefix)
    7. /usr/local/include
    8. /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. ../../tcl/unix
    5. ../../tcl
    6. $(exec_prefix)
    7. /usr/local/include
    8. /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 Fri Apr 27 00:47:30 CEST 2001