			Installation of Clam

Clam is designed to be a portable shell, and compiles under the systems
given in the file Portlist.

To compile Clam for your system, uncomment the appropriate system in the
Makefile, and change the compile flags & included libraries if needed. Then
edit header.h to define the locations of the files Clam needs to run. After
that, just make, and Clam should compile.

In this version of Clam, the source code is #ifdef'd according to the
features of Clam, as well as the type of operating system it is being compiled
for. This means that you can include or exclude features as you see fit.

The currently available #ifdefs for OS dependencies are:

	UCB	- BSD4.x dependencies, and also the BSD signals
	ATT	- SysV dependencies, and the ATT-type ioctls
       MINIX	- Minix dependencies
      COHERENT  - Coherent dependencies.

You must define one of the above ONLY. Some of the above have subtypes
which can be #ifdef'd as follows:

	SUN	- Used with -DUCB for Sun dependencies
      ATARI-ST	- Used with -DMINIX for the ST-Minix dependencies

The available #ifdef'd features are:

	PROTO	- Use Ansi C prototypes. This is turned on when
		  __STDC__ has a non-zero definition; if your
		  compiler has prototypes but doesn't define __STDC__
		  to be non-zero, define this.
	HASH	- Use hashing for faster access of programs. This uses
		  a fair amount of memory, and is not used under Minix
	JOB	- Job control. Needs the BSD signals, and will definitely
		  not work under a non-BSD4.x machine.
	SCRIPT	- Clam shell programming builtins. Most of these are not
		  implemented yet, and so they have been left out of the
		  Minix version to save memory.
	DEBUG	- Give debugging message during Clam's runtime. These tend
		  to be extremely verbose, and usually it's a good idea
		  to turn debugging on only in the .c file(s) that you are
		  interested in. Clam also provides -v & -x flags, which
		  provide limited debugging output even when compiled
		  without -DDEBUG.

Some systems have small problems etc. with Clam. Notes are given below:

PC-Minix

Currently Clam doesn't compile under 16-bit PC-Minix as asld runs out of
symbol table space. However, it can be persuaded to compile by using parts
of both the ACK compiler and the (betatest) Ansi compiler. Once Clam1.4 is
betatested, I'll post a binary to the net. If you have Bruce Evans' 32-bit
kernel, it goes with no troubles using bcc. If you have the Ansi compiler,
it dies at qsort() in meta.c - I don't know why.


ST-Minix

The ATARI-ST define was used in Minix 1.3c as ST and PC-Minix were pretty
different then. You probably don't need to define it now. Let me know what
you needed to do to get Clam going with every compiler you can use (and
ST-Minix has several).


Coherent

Firstly thanks to David Fenyes for his help with the port. About the only
change is to add a `nd' entry to your /etc/termcap. You will need to be
root to do this. The old and new lines should be:

<  :li#24:ll=\E[24;1H:hd=\E[C:se=\E[m:sf=\E[S:sg#0:so=\E[7m:sr=\E[T:\
---
>  :li#24:ll=\E[24;1H:hd=\E[C:nd=\E[C:se=\E[m:sf=\E[S:sg#0:so=\E[7m:sr=\E[T:\

Check the protections in termcap before you edit, and make sure they are
the same afterwards.


Pyramid OSx

Pyramid's compiler pushes arguments on the stack before a function call, then
lets the function call move the stack pointer. This causes (s|f|)prints to
fail, as they don't know how many args have been pushed, and often overwrite
some of them. The solution is to define some dummy arguments to stop the
passed ones being munched, e.g: do these changes

< void fprints(out, s, arglist)
< int out;
< register char *s;
< int *arglist;
---
> void fprints(out, s, arglist,a,b,c,d)
> int out;
> register char *s;
> int *arglist,a,b,c,d;

< void sprints(dest, s, arglist)
< char *dest;
< register char *s;
< int *arglist;
---
> void sprints(dest, s, arglist,a,b,c,d)
> char *dest;
> register char *s;
> int *arglist,a,b,c,d;

< void prints(s, arglist)
< register char *s;
< int *arglist;
---
> void prints(s, arglist,a,b,c,d)
> register char *s;
> int *arglist,a,b,c,d;
