home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ledar34.zip / leda-r-3_4_tar / LEDA-3.4 / INSTALL < prev    next >
Text File  |  1996-09-03  |  6KB  |  174 lines

  1. *******************************************************************************
  2. *                                                                             *
  3. *                             LEDA 3.4                                        *
  4. *                                                                             *
  5. *                          UNIX INSTALLATION                                  *
  6. *                                                                             *
  7. *******************************************************************************
  8.  
  9.  
  10.  
  11. In this file I use <LEDA> to denote the path name of the LEDA main 
  12. directory. It should contain the following files and subdirectories: 
  13.  
  14. README                    information about LEDA
  15. INSTALL                   this file
  16. CHANGES  (please read !)  most recent changes
  17. FIXES                     bug fixes since last release
  18. Manual/                   user manual
  19. Makefile                  make script
  20. confdir/                  configuration directory
  21. lconfig                   configuration command
  22. incl/                     include directory
  23. src/                      source files
  24. prog/                     example programs
  25. demo/                     demo programs
  26.  
  27.  
  28. 1. CONFIGURATION
  29. ----------------
  30.  
  31.    a)  Go to the LEDA main directory
  32.  
  33.    b)  Type: lconfig <cc>  [static | shared]
  34.  
  35.        where <cc> is the name (or command) of your C++ compiler
  36.        and the optional second parameter defines the kind of libraries
  37.        to be generated. Note that in the current release shared
  38.        libraries can be made only under SunOS 5.x (Solaris)  with
  39.        SunPro C++ and g++ and under LINUX with g++. 
  40.  
  41.        Examples: lconfig CC, lconfig g++, lconfig sunpro shared
  42.  
  43.        lconfig without arguments prints a list of known compilers.
  44.        If your compiler is not in the list you might have to
  45.        edit the <LEDA/system.h> header files.
  46.  
  47.  
  48.    c) LEDA contains a new (experimental) mechanism for avoiding
  49.       name conflicts with other libraries. It is possible to redefine 
  50.       LEDA type names using the prefix "leda_". If you decide to use
  51.       this feature you must uncomment the corresponding lines in two special 
  52.       header files <LEDA/REDEFINE_NAMES.H> and <LEDA/UNDEFINE_NAMES.h>
  53.       ->BEFORE<- compiling the libraries (see below). Note that both files have
  54.       to be CONSISTENT, in the sense that all type names redefined in 
  55.       REDEFINE_NAMES.H have to be undefined in UNDEFINE_NAMES.h.
  56.  
  57.        
  58.  
  59.  
  60. 2. COMPILING
  61. -------------
  62.  
  63.    Now just type "make"
  64.  
  65.    to make the following libraries (cf. user manual section 1.9) :
  66.  
  67.    libL.a   (libL.so)          main  library
  68.    libG.a   (libG.so)          graph library
  69.    libP.a   (libP.so)          plane library
  70.    libW.a   (libW.so)          window library  (optional)
  71.  
  72.    ( *.so if shared libraries are used)
  73.  
  74.    The graphics library libW is based on X11. It can be made only if
  75.    the main X11 include directory is located in one of the standard include 
  76.    directories of your compiler (e.g. /usr/include/X11). If this is not the 
  77.    case you have to tell the compiler where it is by using the -I option 
  78.    in src/Make.src, e.g., -I/usr/openwin/include should work on most SUN 
  79.    workstations 
  80.   
  81.   
  82.  
  83.  
  84. 3. INSTALLATION 
  85. ----------------
  86.  
  87. a) Header Files
  88.   
  89.    All LEDA header files are contained in "<LEDA>/incl/LEDA".
  90.    You have to copy this directory to the C++ default include 
  91.    directory, e.g., 
  92.  
  93.    AT&T CC:  cp -r <LEDA>/incl/LEDA /usr/include/CC
  94.  
  95.    GNU g++:  cp -r <LEDA>/incl/LEDA /usr/local/lib/g++-include     
  96.  
  97.  
  98.  
  99. b) Libraries
  100.  
  101.    Copy the libraries to /usr/lib  or /usr/local/lib, e.g.,
  102.  
  103.    static libraries: 
  104.       cp <LEDA>/lib*.a  /usr/lib
  105.       ranlib /usr/lib/lib[L,G,P,W]*.a  (if required by your system)
  106.  
  107.    shared libraries: 
  108.       cp <LEDA>/lib*.so /usr/lib
  109.  
  110.    Now the -l option  can be used to compile and link programs
  111.    (see section 1.9 of the user manual):
  112.  
  113.  
  114.    CC (g++)  ... -lL -lm                    (if using basic data types)
  115.    CC (g++)  ... -lG -lL -lm                (if using graph data types)
  116.    CC (g++)  ... -lP -lG -lL -lm            (if using planar geometry)
  117.    CC (g++)  ... -lW -lP -lG -lL -lX11 -lm (if using windows)
  118.  
  119.    If using windows on solaris systems you might have to link with the socket 
  120.    and thread libraries as well:
  121.    CC (g++)  ... -lW -lP -lG -lL -lX11 -lsocket -lthread -lm
  122.  
  123.  
  124.  
  125.    If you cannot write "/usr/(local/)include" and "/usr/(local/)lib"
  126.    on your system, you have to use the -I and -L compiler flags to 
  127.    compile and link LEDA programs:
  128.  
  129.    CC (g++) -I<LEDA>/incl -L<LEDA>  ...
  130.  
  131.    If using shared libraries you either have to include <LEDA> 
  132.    into the dynamic library search path for ld
  133.  
  134.        setenv LD_LIBRARY_PATH <LEDA>:$LD_LIBRARY_PATH
  135.  
  136.    or you have to use the -R option
  137.  
  138.        CC (g++) -I<LEDA>/incl -L<LEDA> -R<LEDA>  ...
  139.  
  140.  
  141.  
  142.  
  143. 4. EXAMPLE PROGRAMS
  144. -------------------
  145.  
  146.    Example programs can be found on  <LEDA>/prog, to compile them 
  147.    you have to use the following libraries:
  148.  
  149.    <LEDA>/prog/basic:  -lL
  150.    <LEDA>/prog/graph:  -lG -lL -lm
  151.    <LEDA>/prog/plane:  -lP -lG -lL -lm
  152.    <LEDA>/prog/window: -lW -lP -lG -lL -lX11 -lm 
  153.    <LEDA>/prog/demo:   -lW -lP -lG -lL -lX11 -lm 
  154.                       (-lW -lP -lG -lL -lX11 -lsocket -lthread -lm for Solaris)
  155.  
  156.    <LEDA>/demo/...
  157.  
  158.  
  159.  
  160. 5. USER MANUAL
  161. --------------
  162.  
  163.    All manual pages have been incorporated into the corresponding header
  164.    files. LEDA provides tools (see LEDA/Manual/README) to extract and
  165.    typeset the user manual from these files. Postscript and LaTeX versions 
  166.    of the manual are available on the ftp server (ftp.mpi-sb.mpg.de).
  167.    The "Manual" directory also contains an interactive manual reader Lman.
  168.    To use it you must have installed perl, LaTeX, and xdvi and you
  169.    have to set the environment variable LEDAROOT to the name
  170.    of the LEDA main directory.
  171.  
  172.  
  173.  
  174.