Requirements
------------
This describes the installation process for the Tm library and the moat
interpreter. It is assumed that you have the Motif 1.2.1 development libraries
and the tcl libraries version 6.1. I don't know how you will fare with other
versions of these libraries - it almost certainly won't work with Motif 1.1
because I use lots of 1.2 functions that may or may not be in 1.1, but were
definitely never documented. I haven't caught up to tcl 7.0 yet.

Imakefile
---------
Edit the file src/Imakefile to set the location of the Motif and tcl include
header files and libraries in the variables 

	TCL_INCLUDE
	MOTIF_INCLUDE
	TCL_LIB
	MOTIF_LIB

Unless you know otherwise, assume that everything is ok and go to the
next step. Return here if it proves otherwise.

The TCL_INCLUDE assumes that the tcl include files are in a directory
/XYZ/tcl. The variable should be set to whatever XYZ is. This may not
be the case in your setup, because tcl has no install procedure to put
things in known places. If the last name differs, say it is /XYZ/tcl6.1,
you will have to edit src/tm.h to change <tcl/PQR> to <tcl6.1/PQR> for
each of the three occurrences. Similarly, the Motif headers should be
in /RST/Xm, so set MOTIF_INCLUDE to /RST.
(This should be done in the toplevel Imakefile, but I haven't figured out
how right now.)

Make
----
To create the library and moat, type

	xmkmf
	make Makefiles
	make

To install the library, moat and the man pages, type

	make install
	make install.man

If you don't have imake, xmkmf or really don't want to use them, the file
src/Makefile.orig can be used to build moat. You are a bit on your own from
there though.

Potential library rebuild
-------------------------
NB: there may be a serious imcompatability between Motif and tcl. Both use
functions called "regcomp" and "regexec". Motif uses the POSIX functions of
these names, tcl uses the Henry Spencer functions. They are not compatable.
This may cause a link time error, or possibly a runtime error. I have fixed
this myself by renaming all the regexp functions and data types in the
Henry Spencer code to start with "HS" (as in HSregcomp) in the files
regexp.c, regexp.h, tclCmdMZ.c, tclUtils.c. This is not hard. You may not have
this problem - Motif may be compiled either with or without using the POSIX
regexp functions. Test for this by looking at your Motif library:

	strings libXm.a | grep regcomp

If this returns "_regcomp" then you will need to fix the tcl code as above
or rebuild your Motif libraries with -DNO_REGCOMP. I have included in the
directory regexp my changed tcl files. If you don't have access to the source
code for *either* library then tough - I can't help you.
