		    SWI-Prolog Distribution Directory

** Last update: Fri Dec 18 13:57:18 1992 (1.6.7)

AUTHOR
======
	Jan Wielemaker
	SWI
	University of Amsterdam
	Roetersstraat 15
	1018 WB  Amsterdam
	The Netherlands
	E-mail: jan@swi.psy.uva.nl

DIRECTORIES
===========

The SWI-Prolog source tree consists of the following directories:

./src		C sources
./src/gnu	GNU-Emacs unexec() sources (MODIFIED VERSION)
./boot		Prolog system predicates defined in Prolog
./library	Prolog user's library
./include	Include files.  Mostly for handling foreign-code
./man		Manual (LaTeX)
./lisp		GNU-Emacs Lisp sources for a better Prolog-mode
./dld-3.2	Wilson Ho's `dynamic link editor' (SUN and VAX only)
		(MODIFIED VERSION)


BUILDING SWI-Prolog
===================

Using gcc

The C-compiler used for some architecture is defined in md-<machine.h>
using the macro M_CC

When available, please use  the GNU-C  compiler gcc.    SWI-Prolog has
been developed with this  compiler.  Do not use  version 2.0,  as this
compiler crashes on pl-wam.c. Version 2.1 is ok.  SWI-Prolog makes use
of  GCC-2's  facilities    to deal with   label   addresses, improving
performance with about 10%.


Building

First,  make a  directory for  the  specified machine  using the SETUP
script.  The argument to SETUP describes the machine you  are running.
This machine is described in the file src/md-MACHINE.h.  To get a list
of architectures run SETUP without arguments.

Next, edit config.h:

M_SYSTEMHOME	absolute path pointing to this directory
M_DEFSTARTUP	Personal startup file base-name
M_BINDIR	Installation directory for executables
M_PROLOG	Name of the resulting program

Next, check src/md-MACHINE.h for things specific to your machine.

Next:
	1) cd ./MACHINE
	2) make

Installation:

	1) cd ./MACHINE
	2) make install

Cleanup

	1) cd ./MACHINE
	2) make clean

Automount filesystems; symbolic links

When  the  installation directory is  on  an   automount filesystem or
symbolic  links  provide     multiple  absolute  pathnames   for   the
installation directory, the Unix  environment variable CANONICAL_PATHS
may be set to a ':' separated list of `canonical paths.   For example,
Prolog is installed   in /home/languages/pl.   Typing  'pwd'   in this
directory yields /tmp_mnt/home/languages/pl.  Correct installation may
be achieved by typing

	% setenv CANONICAL_PATHS /home/languages/pl


Prepare for static loading (runtime environment, PCE)

When Prolog is to be mixed with  C-code using static  loading (such as
for the graphical environment XPCE), the runtime environment has to be
created.  After the installation, do

	1) cd ./MACHINE
	2) make runtime


GNU-EMACS INTERFACE
===================

In the directory ./lisp, you'll find  an interface to  GNU-EMACS.  The
file README.SWI provides installation directives.  In  consists of the
Quintus  Prolog  gnu-emacs  interface    with   an   additional   file
swi-prolog.el that redefines and adds some things.


NOTES
=====

SunOs 3.x

Ancient  users of   SunOs 3.x  should set  the  corresponding  flag in
md-sun3.h. Dynamic stacks are not provided under SunOs 3.x.


MODIFYING SWI-Prolog

You are free to modify SWI-Prolog under the licence terms specified in
the  file LICENCE.  You  may  wish the  other    users can share  your
improvements.  For code   to be  accepted   as part of  the   official
distribution, it should be  written in the same  style as  the rest of
the SWI-Prolog  sources.  I do  not claim  this style  to be  the best
available, but I  want  the entire source to  have a consistent style.
Please document the modifications and  if reasonably possible indicate
them using #if ... #endif.  Please do  not send `diff' files  to me, I
probably do  not have  the same version   of  the sources, so complete
files, with the changes  indicated with #if ...  #endif are  easier to
incorporate.

If your change is accepted, you  will be appropriately acknowledged in
the distribution.

PROLOG PROGRAMS

Additions to the library and   other stand alone Prolog programs  have
less strick   conditions.   Add  comments such  that   other users can
understand the program or library module  and ensure the files provide
sufficient  documentation on its   origin,  waranty and   distribution
conditions.  Such contributions are copied verbatim and not maintained
by me.
