$Id: SAModule.txt,v 1.2 2001/01/24 06:17:17 ioilam Exp $

		     ==================
 	             STAND-ALONE MODULE 
                     ==================

INTRODUCTION

    This document describes how to build Tix as a stand-alone module.

    You should read this document if you use a "Tcl wrapping system"
    to package your Tcl application in a single executable. Typical
    Tcl wrapping systems include Embedded TK (ET), ProWrap, FreeWrap
    and others. More information about these wrapping systems can be
    found in the Tcl FAQ at

        http://www.tclfaq.wservice.com/tcl-faq/

BUILDING TIX AS A STAND-ALONE MODULE

    To use Tix with a Tcl wrapping system, you need to build the Tix
    library as a "stand-alone module". Currently this is implemented
    for Unix only.

    When you run the unix/configure script, specify the --enable-sam
    option. This will compile all the Tix library scripts and images
    into the Tix library.

USING A STAND-ALONE TIX LIBRARY IN YOUR APPLICATION

    Depending on your requirements, you may build Tix as a shared
    library (libtix8.2.so) or a static library (libtix8.2.a).

    SHARED LIBRARY:

    You may build Tix as a shared library if you are willing to
    distribute a set of shared libraries with your application. In
    this case, your application should know where libtix8.2.so is
    installed. Before accessing any Tix features, your application
    should invoke the command:

        load $location_of_tix_lib/libtix8.2.so Tix

    STATIC LIBRARY:    

    If you need to distribute your entire application in a single
    executable file, you should build Tix as a static library. Most
    wrapping system would require you to create a C function named
    Tcl_AppInit(). In this function, you should issue the following
    calls:

        if (Tix_Init(interp) == TCL_ERROR) {
	    return TCL_ERROR;
        }
        Tcl_StaticPackage(interp, "Tix", Tix_Init, NULL);

APPENDIX: CHANGES FROM PREVIOUS VERSIONS

    In Tix versions prior to 8.2.0, if you built Tix as a stand-alone
    module, you would get two library files: libtixsam.a and
    libtix.a. This is no longer the case. From Tix 8.2.0 onwards, you
    always get one library file.


