                    Installing LablTk from sources
                    ------------------------------

PREREQUISITES

* OCaml (>= 4.08) should be installed

* Tcl/Tk (>= 8.03) should be installed

* ocamlfind is used if available

INSTALLATION INSTRUCTIONS FOR UNIX AND OSX

1- Configure the system. From the top directory, do:

        ./configure

In case of success, this generates config/Makefile which contains the
OCaml library path and compilation options.

The "configure" script accepts the following options:

-use-findlib
        If you want to use ocamlfind for installation.

-libdir <dir>                   (default: `ocamlc -where`)
        Directory where the OCaml library was installed,
        where Makefile.config can be found.

-installdir <dir>               (default: libdir/labltk)
-installbindir <dir>            (default: same as ocamlc)
        Where to install the library and the labltk script.
        When using findlib, the default is taken from it.

-tkdefs <cpp flags>             (default: none)
-tklibs <flags and libraries>   (default: determined automatically)
        These options specify where to find the Tcl/Tk libraries for
        LablTk. "-tkdefs" helps to find the headers, and "-tklibs"
        the C libraries. "-tklibs" may contain either only -L/path and
        -Wl,... flags, in which case the library names are determined
        automatically, or the actual libraries, which are used as given.
        Examples:
        for an OSX installation using macports, use just
         ./configure -tklibs -L/opt/local/lib -tkdefs -I/opt/local/include
        if you prefer to use the system Tcl/Tk,
         ./configure -tklibs "-framework Tcl -framework Tk" -tk-no-x11 -tkdefs "-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Headers"
        for Japanese Tcl/Tk whose headers are in specific directories
        and libraries in /usr/local/lib, you can use
         ./configure -tklibs "-L/usr/local/lib -ltk8.0jp -ltcl8.0jp"
          -tkdefs "-I/usr/local/include/tcl8.0jp -I/usr/local/include/tk8.0jp"

-tk-no-x11
        Build LablTk without explicitly linking to X11.
        This is now the default.

-tk-x11
        Build LablTk using X11 libraries detected by ocaml.
        Only works with old versions ocaml (before 4.09)

-verbose
        Verbose output of the configuration tests. Use it if the outcome
        of configure is not what you were expecting.

Additionally, you may set the MAKE environment variable to set the
command used to read the ocaml configuration Makefile.
Default is "make". It should be compatible with GNU Make.


2- From the top directory do

        make all

and optionally

        make opt

You may replace "all" with "library" if you wish to compile only
the library, without ocamlbrowser.

3- From the top directory do

        make install

It will install labltk at the above defined location.
You may need to become superuser first.


INSTALLATION INSTRUCTIONS FOR WINDOWS

1- In the config subdirectory, overwrite Makefile with the file
corresponding to your system

2- Continue from step 2 above
