*******************************************************************************
*                                                                             *
*                             LEDA 3.5                                        *
*                                                                             *
*                          UNIX INSTALLATION                                  *
*                                                                             *
*******************************************************************************



In this file I use <LEDA> to denote the path name of the LEDA main 
directory. It should contain the following files and subdirectories: 

README                    information about LEDA
INSTALL                   this file
CHANGES  (please read !)  most recent changes
FIXES                     bug fixes since last release
Manual/                   user manual
Makefile                  make script
confdir/                  configuration directory
lconfig                   configuration command
incl/                     include directory
src/                      source files
test/                     test programs
demo/                     demo programs


1. CONFIGURATION
----------------

   a)  Go to the LEDA main directory

   b)  Type: lconfig <cc>  [static | shared]

       where <cc> is the name (or command) of your C++ compiler
       and the optional second parameter defines the kind of libraries
       to be generated. Note that in the current release shared
       libraries can be made only under SunOS 5.x (Solaris)  with
       SunPro C++ and g++ and under LINUX with g++. 

       Examples: lconfig CC, lconfig g++, lconfig sunpro shared

       lconfig without arguments prints a list of known compilers.
       If your compiler is not in the list you might have to
       edit the <LEDA/system.h> header file.


   c) LEDA contains a new (experimental) mechanism for avoiding
      name conflicts with other libraries. It is possible to redefine 
      LEDA type names using the prefix "leda_". If you decide to use
      this feature you must uncomment the corresponding lines in two special 
      header files <LEDA/REDEFINE_NAMES.H> and <LEDA/UNDEFINE_NAMES.h>
      ->BEFORE<- compiling the libraries (see below). Note that both files have
      to be CONSISTENT, in the sense that all type names redefined in 
      REDEFINE_NAMES.H have to be undefined in UNDEFINE_NAMES.h.

       


2. COMPILING
-------------

   Now just type "make"

   to make the following libraries (cf. user manual section 1.9) :

   libL.a   (libL.so)          main  library
   libG.a   (libG.so)          graph library
   libP.a   (libP.so)          plane library
   libW.a   (libW.so)          window library  (optional)

   ( *.so if shared libraries are used)

   The graphics library libW is based on X11. It can be made only if
   the main X11 include directory is located in one of the standard include 
   directories of your compiler (e.g. /usr/include/X11). If this is not the 
   case you have to tell the compiler where it is by using the -I option 
   in src/Make.src, e.g., -I/usr/openwin/include should work on most SUN 
   workstations 
  
  


3. INSTALLATION 
----------------

a) Header Files
  
   All LEDA header files are contained in "<LEDA>/incl/LEDA".
   You have to copy this directory to the C++ default include 
   directory, e.g., 

   AT&T CC:  cp -r <LEDA>/incl/LEDA /usr/include/CC

   GNU g++:  cp -r <LEDA>/incl/LEDA /usr/local/lib/g++-include     



b) Libraries

   Copy the libraries to /usr/lib  or /usr/local/lib, e.g.,

   static libraries: 
      cp <LEDA>/lib*.a  /usr/lib
      ranlib /usr/lib/lib[L,G,P,W]*.a  (if required by your system)

   shared libraries: 
      cp <LEDA>/lib*.so /usr/lib

   Now the -l option  can be used to compile and link programs
   (see section 1.9 of the user manual):


   CC (g++)  ... -lL -lm                    (if using basic data types)
   CC (g++)  ... -lG -lL -lm                (if using graph data types)
   CC (g++)  ... -lP -lG -lL -lm            (if using planar geometry)
   CC (g++)  ... -lW -lP -lG -lL -lX11 -lm (if using windows)

   If using windows on solaris systems you might have to link with the socket 
   and thread libraries as well:
   CC (g++)  ... -lW -lP -lG -lL -lX11 -lsocket -lthread -lm



   If you cannot write "/usr/(local/)include" and "/usr/(local/)lib"
   on your system, you have to use the -I and -L compiler flags to 
   compile and link LEDA programs:

   CC (g++) -I<LEDA>/incl -L<LEDA>  ...

   If using shared libraries you either have to include <LEDA> 
   into the dynamic library search path for ld

       setenv LD_LIBRARY_PATH <LEDA>:$LD_LIBRARY_PATH

   or you have to use the -R option

       CC (g++) -I<LEDA>/incl -L<LEDA> -R<LEDA>  ...




4. EXAMPLE PROGRAMS
-------------------

   Example programs can be found on  <LEDA>/test and <LEDA>/demo, 
   to compile them you have to use the following libraries:

   <LEDA>/test/basic:  -lL
   <LEDA>/test/graph:  -lG -lL -lm
   <LEDA>/test/plane:  -lP -lG -lL -lm
   <LEDA>/test/window: -lW -lP -lG -lL -lX11 -lm 
                      (-lW -lP -lG -lL -lX11 -lsocket -lthread -lm for Solaris)

   <LEDA>/demo/graph:  -lW -lP -lG -lL -lX11 -lm         (-lsocket -lthread)
   <LEDA>/demo/geo:    -lW -lP -lG -lL -lX11 -lm         (-lsocket -lthread)
   <LEDA>/demo/win:    -lW -lP -lG -lL -lX11 -lm         (-lsocket -lthread)
   <LEDA>/demo/d3_geo: -lD3 -lW -lP -lG -lL -lX11 -lm    (-lsocket -lthread)



5. USER MANUAL
--------------

   All manual pages have been incorporated into the corresponding header
   files. LEDA provides tools (see LEDA/Manual/README) to extract and
   typeset the user manual from these files. Postscript and LaTeX versions 
   of the manual are available on the ftp server (ftp.mpi-sb.mpg.de).
   The "Manual" directory also contains an interactive manual reader Lman.
   To use it you must have installed perl, LaTeX, and xdvi and you
   have to set the environment variable LEDAROOT to the name
   of the LEDA main directory.



