Google

mod_dtcl Installation

  1. Check dependencies
    To install mod_dtcl, you will need Tcl 8.2 or greater and Apache 1.3.xx. It is known to run on Linux, FreeBSD, OpenBSD, and Solaris and HPUX. NT is also possible - please see the directions in the distribution.
  2. Get mod_dtcl
    If you are running a Debian or FreeBSD system, there are pre-built packages available at: http://www.debian.org/Packages/unstable/web/libapache-mod-dtcl.html or http://www.freebsd.org/cgi/ports.cgi?query=mod_dtcl.
    Otherwise, download the sources at http://tcl.apache.org/mod_dtcl/download/.
  3. Uncompress the sources
    gunzip apache-1.3.X.tar.gz
    tar -xvf apache-1.3.X.tar.gz
    You don't need the Apache sources if you are building a shared object module. You do, however, need the header files. Some systems, such as Debian GNU/Linux, provide these independently - otherwise, you probably still need the sources.
    gunzip mod_dtcl-X.X.X.tar.gz
    tar -xvf mod_dtcl-X.X.X.tar.gz
  4. Configuring, builddtcl.sh, etc...
    Do you want to build mod_dtcl as a shared object (such as a .so file on Linux, or a .dll on windows), or compile it directly as a part of the Apache executable? The Apache Software Foundation has put together a nice manual which explains things in detail.
    • For shared objects
      cd ../mod_dtcl/
      Edit the builddtcl.sh script. The 3 variables you may need to change are:
      • TCLSH
        Name of the tclsh program on your computer.
      • APACHE
        Location of the Apache sources (for static builds only).
      • INC
        Location of the Apache headers (you will need this even for building shared objects).
      ./builddtcl.sh shared
      cp mod_dtcl.so /usr/lib/apache/wherever/the/other/shared/objects/reside For shared object builds, you need to copy the object into the directory where the other shared objects are kept for your Apache build. On Debian GNU/Linux systems, for instance, this is in /usr/lib/apache/1.3/.
    • For static builds
      cd apache-1.3.X/
      ./configure
      cd ../mod_dtcl/
      Edit the builddtcl.sh script. The 3 variables you may need to change are:
      • TCLSH
        Name of the tclsh program on your computer.
      • APACHE
        Location of the Apache sources (for static builds only).
      • INC
        Location of the Apache headers (you will need this even for building shared objects).
      ./builddtcl.sh static
      ./builddtcl.sh install
      cd ../apache-1.3.X
      ./configure --activate-module=src/modules/mod_dtcl/mod_dtcl.a [ other configure options ]
      export EXTRA_LIBS="-ltcl8.X -lm"
      make -e
      make install
  5. Configure Apache
    • http.conf
      LoadModule dtcl_module /usr/lib/apache/1.3/mod_dtcl.so
      This points Apache to the shared object if mod_dtcl is being used as a loadable module. In some cases, adding AddModule mod_dtcl.c seems to also have positive effects.
    • srm.conf
      AddType application/x-httpd-tcl .ttml
      AddType application/x-dtcl-tcl .tcl (optional)
      These add the .ttml and .tcl (if desired) types to Apache, so that they are processed by mod_dtcl.