========================================================================
DISCUS - Installation                                        Version 3.2
========================================================================

This file contains a short introduction how to obtain, compile
and customize the program DISCUS. For convenience, DISCUS
is distributed as part of the diffuse scattering software package
DISCUS which consists of the three programs DISCUS itself,
the plot program KUPLOT and the new program PDFFIT.
However, DISCUS is also available in a stand-alone distribution.
We assume that you install the software on a UNIX type platform.
In order to install the programs a FORTRAN and C compiler are 
required. The GNU compilers gcc and g77 used in the 
development of the programs are available for various platforms
and can be downloaded from the Internet free of charge.
However, the source code might be successfully compiled on other
platforms. Thanks to a 'gcc cross-compiler', MSDOS binaries of
DISCUS and DISCUS can be obtained from the authors. Contact
Thomas Proffen (Email: proffen@pa.msu.edu) for details.

========================================================================
Obtaining and unpacking DISCUS
========================================================================

First one needs to obtain the complete 'diffuse' archive named 
diffuse-xx.xx.xx.tar.gz or just the DISCUS archive called
discus-3.2.tar.gz from the Internet. Note that xx.xx.xx in
the file name stands for the creation date of the complete archive.
For the remainder of this section we assume you obtained the complete 
archive and you need to unpack it using the commands

      gzip -d diffuse-xx.xx.xx.tar.gz
      tar -xvof diffuse-xx.xx.xx.tar

This will create a directory 'diffuse' containing the distribution. 
Within this directory there are separate directories discus,
kuplot and discus containing the three different programs
as well as a directory lib_f77 which contains command language
related routines common to all three programs. In each program 
directory, you will find the following directory structure:

    ./prog     : Contains the source code
    ./doc      : Contains POSTSCRIPT version of the documentation
    ./tutorial : Contains the tutorial for the program

========================================================================
Customizing and installing DISCUS
========================================================================

After proceeding to the discus/prog directory you need to choose
a Makefile that suits your needs and customize the Makefile
as well as one configuration file 'config.inc'. There are four 
different Makefiles for UNIX platforms depending on the FORTRAN
compiler you are using. 

    cp Makefile.f77 Makefile    (f77 compiler version)
    cp makefile.f2c Makefile    (f2c compiler version)
    cp makefile.g77 Makefile    (g77 compiler version)
    cp makefile.f90 Makefile    (f90 compiler version)

Next edit the Makefile and alter the location where the program(s)
shall be installed defined by the variable BINDIR. Read the
comments in the Makefile to select the appropriate compiler switches
for your platform. Finally edit 'config.inc' and adjust array 
sizes to suit your needs. An explanation of the variables in are
found in the header of the file 'config.inc'. Keep the memory
size of your computer in mind when adjusting those array sizes !
Next the program is compiled and linked by executing the commands

    make 
    make install 

Make sure an appropriate path for the binaries to be installed is set
in the Makefile. After that you can perform a make clean to remove the 
binary and the object files from the source directory. If you want to 
install the program manually you have to put the files 'discus'
and 'discus.hlp' in the same directory.

Before you actually can use the online help of the program, an 
environment variable DISCUS has to be set to the path where 
the program is installed in. This can be done e.g. in the .login
or .cshrc file using the command 

    setenv DISCUS /path/to/discus               (csh)
    set DISCUS=/path/to/discus; export DISCUS   (bourne shell)

If this path is also included in your search path you can start the 
program simply by entering discus.

The program DISCUS can also be installed on a DEC VMS machine.
Tools like gzip and tar are freely available from the
Internet. The file Makefile.vax is a compilation script that
is part of the distribution. 

========================================================================
Please register
========================================================================

Please register yourself as a user of one or more programs of the 
DISCUS program package. In the top directory of the distribution
you will find the file REGISTER. Please fill in the corresponding
information and send the file via email to proffen@pa.msu.edu.
Thank you for registering, a feedback is always a strong motivation
to proceed with the program development and making it available
to the public. By registering you also enable us to inform you of
program updates, workshops and other related topics.

========================================================================
