Compilation on Unix

Installation
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 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 runs some 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.1/generic/
    3. ../../tcl8.0/generic/
    4. ../../tcl/generic/
    5. ../../tcl/
    6. ../tcl8.1/generic/
    7. ../tcl8.0/generic/
    8. ../tcl/generic/
    9. ../tcl/
    10. $(prefix)/include/
    11. /usr/local/include/
    12. /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.1/unix/
    3. ../../tcl8.0/unix/
    4. ../../tcl/unix/
    5. ../../tcl/
    6. ../tcl8.1/unix/
    7. ../tcl8.0/unix/
    8. ../tcl/unix/
    9. ../tcl/
    10. $(exec_prefix)/lib/
    11. /usr/local/lib/
    12. /usr/lib/

    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.

  • Remark 1: If only one of the options --with-tcl-lib-dir and --with-tcl-include-dir is specified the system will derive the other location automatically, by going up one level and then down into the appropriate directory.
  • Remark 2: I decided to let the system search both .. and ../.. for tcl to be more flexible in the placement of the sources relative to tcl and pilot-link. It especially covers the case of a distribution inside of pilot-link, and that being installed as sibling of the tcl directory.
  • The configure script searches the pilot-link header directory (pi-args.h in the following places:

    1. $(PILOT_INCLUDE_DIR)
    2. ../include
    3. ../pilot-link-*/include/
    4. $(prefix)/include
    5. /usr/local/include/
    6. /usr/include/

    By default $(PILOT_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 two options to override these defaults:

    --prefix=DIR

    $(prefix)=DIR

    --with-pilot-include-dir=DIR

    $(PILOT_INCLUDE_DIR)=DIR

  • To find libpisock.* the paths

    1. $(PILOT_LIB_DIR)
    2. ../libsock
    3. ../pilot-link-*/libsock/
    4. $(exec_prefix)/lib/
    5. /usr/local/lib/
    6. /usr/lib/

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

    --with-pilot-lib-dir=DIR

    $(PILOT_LIB_DIR)=DIR

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

  • Remark: If only one of the options --with-pilot-lib-dir and --with-pilot-include-dir is specified the system will derive the other location automatically, by going up one level and then down into the appropriate directory.

© Andreas Kupries
Last update at Sun Aug 29 00:44:04 MEST 1999