next up previous contents index
Next: Usage Up: Technical Information Previous: Technical Information

Subsections


    
Installation

As mentioned before, you can either get the source code package or the object code package from the LEDA download site. Both have to be unpacked as follows. Suppose the downloaded file is LEDA-3.8.tgz. Place it into a directory for which you have write permission and type

gunzip LEDA-3.8.tgz
and
tar xvf LEDA-3.8.tar
 

If you have the source code of LEDA just continue reading, otherwise go to section Object Code Packages

    
Source Code Package

The source code package is only distributed for unix installation (see section Platforms for details). In this subsection we use leda-root-path to denote the path name of the LEDA main directory (in the source code package the name usually consists of the prefix LEDA followed by the version number, for instance LEDA-3.8). 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/ example and test programs
demo/ demo programs

Configuration

1.
Go to leda-root-path.

2.
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), Linux, IRIX, and HP-UX.

Examples: lconfig sunpro, lconfig g++, lconfig CC 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/sys/unix.h> header file.

   
Compilation

Now just type

make
to make the following libraries (cf. section Libraries):
libL.a (libL.so) main library
libG.a (libG.so) graph library
libP.a (libP.so) d2-geo library
libD3.a (libP.so) d3-geo library
libW.a (libW.so) window library
(*.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. Now you are in a situation similar to people having downloaded the object code package. So please read on!

    
Object Code Packages

If you have unpacked an object code package, then your current working directory should contain the files libL.a, libG.a, libP.a, libW.a and lib3D.a.

To procede you have to modify your environment as follows:

1.
set the the environment variable LEDAROOT to the path leda-root-path containing the extracted package. Use setenv LEDAROOT leda-root-path for csh/tcsh and LEDAROOT = leda-root-path; export LEDAROOT; for sh/bash.

2.
Extend the command search path by including $LEDAROOT/Manual/cmd into your command search path (environment variable path (csh) or PATH (sh)) and call rehash (if required by your system).

3.
You can produce shared libraries for the systems solaris, linux, irix, and hpux. Include $LEDAROOT into the LD_LIBRARY_PATH search path. Then goto $LEDAROOT and type make shared. This will construct the shared libraries libL.so,libG.so,libP.so,libW.so, and libD3.so (*.sl for hpux).

4.
For the online documentation tool go to $LEDAROOT and type make xlman to compile and link LEDA's interactive manual reader "xlman" and some demo programs. Now you can start "xlman" for reading and printing manual pages, starting demo programs and browsing more release notes.

You may want to ask your system adminstrator to install the header files and libraries in the system's default directories. Then you no longer have to specify header and library search paths on the compiler command line.

Remark: Of course you can also use LEDA if you do not have access to the standard directories of the compiler you're using. Section Libraries will tell you how.


next up previous contents index
Next: Usage Up: Technical Information Previous: Technical Information
LEDA research project
1999-04-23