
	Installation of MTtcl

Version 1.0

Building and installing MTtcl is a little unusual because additional
source must be supplied.  MTtcl includes a patch which must be applied
to a clean Tcl 7.4 source tree.  

WARNING
-------
MTtcl installs files which may have the same name as files in your
existing Tcl install.  This was done because the MT-sturdy shell and
library are a straight substitute for tclsh and libtcl.a.  A complete
list of installed files is given below.


Install for the impatient
-------------------------
Starting from the MTtcl1.0 directory;

	cd MTtcl1.0
	vi Makefile
	zcat location-of-tcl7.4-tar-file/tcl7.4.tar.Z | tar xvf -
OPTIONAL
	cd tcl7.4
	patch < location-of-tcl-patches/tcl7.4p1.patch
	patch < location-of-tcl-patches/tcl7.4p2.patch
	cd ..
OPTIONAL
	make

The default install directory is ../install

	make install install-man


Step-by-step install
--------------------
Since MTtcl is verified to run in only one configuration, very little
customization should be needed.  The most important items are the install
directories.  These are set with the prefix and exec_prefix make variables.

1. cd MTtcl1.0
	There are four directories; tcl_thread/ contains Tcl threads,
	examples/ contains sample MT Tcl scripts, man/ contains man
	pages, and doc/ contains a tutorial for MTtcl and threading.

2. vi Makefile
	Follow the instructions in the Makefile.  Variables set in the
	top-level Makefile will be used to build the subdirectories.
	For this reason, all builds must start with a "make" in the
	top-level.  To build an individual sub-directory, use the
	directory name as a target, as in "make tcl_thread".

3. zcat tcl7.4.tar.Z | tar xvf -
	Extract the Tcl 7.4 source tree into the top-level directory.
	This will create a directory called tcl7.4.

4. [OPTIONAL] (cd tcl7.4 ; patch < patch-directory/tcl7.4p1.patch)
	Apply the official patch p1 to Tcl.

5. [OPTIONAL] (cd tcl7.4 ; patch < patch-directory/tcl7.4p2.patch)
	Apply the official patch p2 to Tcl.

6. make
	Builds MTtcl.  First, mtsturdy.patch is applied to the Tcl
	source.  Then the configure script is run in tcl7.4 directory
	and the source is built.  Finally, the tcl_thread directory is
	built.

7. make examples
	Builds the examples to use the executable libraries from the
	build location (rather than the install location).  You can
	test the build before doing an install.  But you will need to
	set the environment variable TCL_LIBRARY to
	".../MTtcl1.0/tcl7.4/library" or the examples won't work.
	This is because Tcl was built to look in the install location
	for its Tcl library (the .tcl scripts).

8. run the examples

9. make install install-man
	Files will be installed in the location specified in Makefile.
	Note that MTtcl installs some files (such as tclsh and libtcl.a)
	which probably have the same name as existing files.  This should
	be ok since these are drop-in replacements.  The makefiles in
	tcl_thread and tcl7.4 will need to be modified for other
	arrangements.

10. [OPTIONAL] make examples_installed
	Builds the examples to use the executable libraries from the
	installed location.


Installables
------------

tcl7.4/			MT-sturdy stuff
	tclsh7.4	An MT-sturdy Tcl shell
	libtcl.a	Library of .o files
	libtcl.so.7	Library of position independent code (shared library)
	tcl.h		Tcl header file (no changes from Tcl 7.4)
	tclAppInit.c	Sample main() and Tcl_AppInit()

tcl7.4/library
	init.tcl	Standard Tcl auto-loading
	parray.tcl	Procedure to print arrays (standard Tcl)
	tclIndex	Index for the auto-loader

tcl_thread/		Tcl threads stuff
	mttclsh		An MT-sturdy Tcl shell with threads commands
	mtwish		An MT-sturdy Tk shell (wish) with threads commands
	libtcl_thread.a		Library of .o files
	libtcl_thread.so.1	A Shells loadable library of threads commands
	libtk_thread.a		Library of .o files, plus Tk support
	libtk_thread.so.1	A Shells loadable library of threads commands
				suitable for use with mtdwish (should you
				create one).
	tcl_thread.h		Header file for Tcl threads

man/			Man pages for Tcl threads
	cond.n
	mutex.n
	rwlock.n
	sema.n
	share.n
	thread.n
	mtwish.1

