This file is install.mac.  It contains installation instructions for
cgi.tcl on MacOS.

If you do not have Tcl, get it (the README explains how) and install
it.  The rest of these instructions assume that you have Tcl
installed.

--------------------
Installation
--------------------

These instructions are based on contributions courtesy of Henk-Jan
Kooiman <hjk@cable.a2000.nl>.  Send fixes to me (libes@nist.gov).

If you just want to experiment with cgi.tcl, you can simply source it
into your Tcl files by saying "source cgi.tcl".

Once you're done playing, go ahead and install it.  To install it:

1) Follow the instructions in the pkg_mkIndex man page.  (This will
create pkgIndex.tcl which will make it possible to use "package
require cgi" in scripts.)

2) You may want to edit some things in cgi.tcl at this time.

2a) Upon errors in production code, cgi.tcl sends mail to an
administrator.  This can be set on a per-script basis but it defaults
to "root".  You'll probably want to change this for your site.  To do
that, search cgi.tcl for cgi_admin_mail_addr "root" and change the
argument to whatever you prefer.

2b) The cgi_mail_end procedure attempts to do mail delivery using SMTP
(the de facto Internet mail protocol).  However, this mechanism is not
robust.  For example, if the mail gateway is down, the mail will not
be requeued for later delivery.  If you have a robust mailer program
or some other interface, you should switch to using it.  The ability
to send mail isn't required for basic use of cgi.tcl, but this ability
is especially useful for in-the-field debugging so I encourage you to
use it.

3) The web server may need to be told about Tcl.  The exact details
depend on your particular server.  Feel free to send me instructions you feel might help others.

You're done!  Now you can use cgi.tcl.

--------------------
Examples
--------------------

The example directory has some examples.  See the README in there.

