$Id: INSTALL,v 1.13 1997/07/12 02:01:08 phil Exp $

       ``The Macro Implementation of SNOBOL4 in C'' (C-MAINBOL)
		      Installation instructions

Unix systems (or systems with POSIX shell, make and m4);
=======================================================

Compilation
-----------

In most cases all you need to type is "make".

The top level makefile will run "autoconf" to create "config.m4",
which is in turn used to create Makefile2, which is then run, creating
a test version of snobol4 (named "xsnobol4") which is then regression
tested and timed.

The "autoconf" tries to use the available C compiler which works best.
If you wish to alter autoconf's decision process, you can run it
manually by typing "./autoconf OPTIONS >config.m4" with zero or more
of the following options;

	--add-cppflags=STRING
		Add additional C preprocessor flags (ie; -DXXX) to
		compile commands
	--add-ldflags=STRING
		Add additional flags to final load command (ie; -lxxx)
	--add-objs=STRING
		Add additional object file to final load command
		(ie; for "poor mans load" functions)
	--add-opt=STRING
		Add additional optimization flags to compile commands
	--add-srcs=STRING
		Add additional source files for "make depend"
	--force-gcc
		Force use of gcc, the GNU C compiler;
		fail if gcc not available.
	--force-memmove
		Force use of system memmove() function (if preseent)
		if no bcopy() function is available.  Otherwise the
		bcopy.c source file will be used.
	--no-dlopen
	--no-dynlib
		Disable use of dlopen (or shl_load on HP-UX) for dynamic LOAD()
	--no-gcc
		Eliminate gcc from consideration.
	--opt=STRING
		Supply C optimization flags (replacing default "-O"),
		for example; -O2

Even if your system has not previously been tested (see doc/ports.doc)
autoconf will make a guess. If the build does not succeed, you may
want to consult doc/porting.doc (also available as html) for
information on the available options for use in creating a
system-specific config file.

For information on including "external" C functions in the linked
binary see doc/load.doc.

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

Typing "make install" will install the snobol4 binary and man page.
The snobol4 binary and man page destnations are controlled by make
variables BINDEST (default: /usr/local/bin/snobol4) and MANDEST
(default: /usr/local/man/man1/snobol4.1) which can be overridden by
editing config.m4, or creating "local-config" (and then removing
config.m4 to trigger autoconf).

"make install" also installs the snolib.a object library, doc/load.doc
and snolib/*.sno files to the directory named in the SNOLIB_DIR make
variable.

Please mail timing.out files to snobol4-timing@ultimate.com!

Non-unix systems;
================

None of the ports below have been tested with the latest sources.
Please send me any fixes you discover!  See doc/porting.doc for
details on porting C-MAINBOL.

The routines in tty.c (tty_save, tty_restore, tty_mode, tty_close) and
inet.c (tcp_open, udp_open) need to be supplied.  Dummy versions exist
in lib/dummy/tty.c and lib/dummy/inet.c.

The functions referenced from pml.h will not be loaded by the existing
command files, and will cause the link to fail.  There are three
possible solutions;

1. Add commands to build a SNOLIB library and include it in the link.

2. Compile the needed objects and add them directly to the link command.

3. Define one or more of NO_PML_(HOST|EXIT|REAL|FILE|DELETE|RENAME)
	when compiling pml.c.

The SPITBOL HOST() function simulation may call functions not
available on the target system.  Rather than adding a nest of ifdefs,
dummy versions of getenv() and system() have been provided in the
lib/dummy directory for this eventuality.  The SPITBOL EXIT()
simulation requires an execute() function to pass pass control to
another program.  A dummy version is provided in lib/dummy/execute.c.

MS-DOS using Borland C++
------------------------

Mark Emmer of Catspaw has compiled an older version of C-MAINBOL using
Borland C++.  Look in config/borland (or CONFIG\BORLAND).

VMS using DEC C
---------------

Older versions of C-MAINBOL have been run under VAX and ALPHA VMS
using DEC C, and the DEC C RTL.  config/vms/build.com is a command
file to build XSNOBOL4.EXE; config/vms/descrip.mms is an MMS description
file, which can be used by typing MMS/DESCRIP=[.CONFIG.VMS]DESCRIP.MMS.

VMS using GNU C
---------------

Jerry Lichter has run an older version of C-MAINBOL under VMS using
the GNU C compiler and the GNU C library. No command files are
available.

Anything else
-------------

C-MAINBOL has been designed to be modular, and makes only modest
demands on the C library.  See doc/porting.doc for information.

Let me know!
============

Please let me know of your success and failures to bring up C-SNOBOL4!

Please mail timing.out files to snobol4-timing@ultimate.com along with
information on your system make, model and CPU clock speed, if known.

If you want to recieve a note when new releases are made, send mail
to c-mainbol-users-request@ultimate.com
