install.dox
changeset 19 9196fcd0d4d6
parent 18 a291609dad52
child 20 3ffc47b666b1
     1.1 --- a/install.dox	Thu Nov 06 16:55:09 2008 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,229 +0,0 @@
     1.4 -/* -*- mode: C++; indent-tabs-mode: nil; -*-
     1.5 - *
     1.6 - * This file is a part of LEMON, a generic C++ optimization library.
     1.7 - *
     1.8 - * Copyright (C) 2003-2008
     1.9 - * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11 - *
    1.12 - * Permission to use, modify and distribute this software is granted
    1.13 - * provided that this copyright notice appears in all copies. For
    1.14 - * precise terms see the accompanying LICENSE file.
    1.15 - *
    1.16 - * This software is provided "AS IS" with no warranty of any kind,
    1.17 - * express or implied, and with no claim as to its suitability for any
    1.18 - * purpose.
    1.19 - *
    1.20 - */
    1.21 -
    1.22 -/**
    1.23 -[PAGE]install[PAGE] Installation Guide
    1.24 -
    1.25 -In this section we detail how to start using LEMON, from downloading it
    1.26 -to your computer, through the steps of installation, to showing how to
    1.27 -compile programs that use LEMON. We assume that you
    1.28 -have a basic knowledge of your operating system and C++ programming
    1.29 -language. The procedure is pretty straightforward, but if you have any
    1.30 -difficulties do not hesitate to
    1.31 -<a href="mailto:lemon-user@lemon.cs.elte.hu"><b>ask</b></a>.
    1.32 -
    1.33 -[SEC]requirements_lemon[SEC] Hardware and Software Requirements
    1.34 -
    1.35 -In LEMON we use C++ templates heavily, thus compilation takes a
    1.36 -considerable amount of time and memory. So some decent box would be
    1.37 -advantageousm, but otherwise there are no special hardware requirements.
    1.38 -
    1.39 -You will need a recent C++ compiler. Our primary target is the GNU C++
    1.40 -Compiler (g++), from version 3.3 upwards. We also checked the Intel C++
    1.41 -Compiler (icc) and Microsoft Visual C++ (on Windows).
    1.42 -If you want to develop with LEMON under Windows, you can use a Windows
    1.43 -installer or you can consider using Cygwin.
    1.44 -
    1.45 -In this description we will suppose a Linux environment and GNU C++ Compiler.
    1.46 -If you would like to develop under Windows and use a Windows installer,
    1.47 -you could skip the following sections and continue reading
    1.48 -\ref basic_concepts.
    1.49 -However keep in mind that you have to make appropriate steps instead of
    1.50 -the instructions detailed here to be able to use LEMON with your compiler.
    1.51 -
    1.52 -[SEC]requirements_lp[SEC] LP Solver Requirements
    1.53 -
    1.54 -The LEMON LP solver interface can use the GLPK (GNU Linear Programming
    1.55 -Kit), CPLEX and SoPlex solver. If you want to use it, you will need at
    1.56 -least one of these.
    1.57 -See the <b><tt>INSTALL</tt></b> file how to enable these at compile time.
    1.58 -
    1.59 -[SEC]install_from_source[SEC] Install from Source
    1.60 -
    1.61 -You can download LEMON from the web site:
    1.62 -<a href="http://lemon.cs.elte.hu/">http://lemon.cs.elte.hu/</a>.
    1.63 -There you will find released versions in form of <tt>.tar.gz</tt> files
    1.64 -(and Windows installers).
    1.65 -If you want a developer version (for example you want to contribute in
    1.66 -developing LEMON) then you might want to use our Mercurial repository.
    1.67 -This case is detailed \ref install_hg "later", so from now on we
    1.68 -suppose that you downloaded a <tt>.tar.gz</tt> file.
    1.69 -
    1.70 -Thus you have to do the following steps.
    1.71 -
    1.72 -Download the tarball either from the browser or just issuing
    1.73 -
    1.74 -\verbatim
    1.75 -wget http://lemon.cs.elte.hu/pub/sources/lemon-1.0.tar.gz
    1.76 -\endverbatim
    1.77 -
    1.78 -\note The tarball is named <tt>lemon-x.y.z.tar.gz</tt> where \c x, \c
    1.79 -y and \c z (which is missing if it is 0) are numbers indicating the
    1.80 -version of the library, in our example we will have
    1.81 -<tt>lemon-1.0.tar.gz</tt>.
    1.82 -
    1.83 -Then issue the following commands:
    1.84 -
    1.85 -\verbatim
    1.86 -tar xvzf lemon-1.0.tar.gz
    1.87 -cd lemon-1.0
    1.88 -./configure
    1.89 -make
    1.90 -make check    # This is optional, but recommended. It runs a bunch of tests.
    1.91 -make install
    1.92 -\endverbatim
    1.93 -
    1.94 -These commands install LEMON under \c /usr/local (you will
    1.95 -need root privileges to be able to install to that
    1.96 -directory). If you want to install it to some other place, then
    1.97 -pass the \c --prefix=DIRECTORY flag to <tt>./configure</tt>, for example:
    1.98 -
    1.99 -\verbatim
   1.100 -./configure --prefix=/home/username/lemon
   1.101 -\endverbatim
   1.102 -
   1.103 -We briefly explain these commands below.
   1.104 -
   1.105 -\verbatim
   1.106 -tar xvzf lemon-1.0.tar.gz
   1.107 -\endverbatim
   1.108 -This command untars the <tt>tar.gz</tt> file into a directory named
   1.109 -<tt>lemon-1.0</tt>.
   1.110 -
   1.111 -\verbatim
   1.112 -cd lemon-1.0
   1.113 -\endverbatim
   1.114 -This command enters the directory.
   1.115 -
   1.116 -\verbatim
   1.117 -./configure
   1.118 -\endverbatim
   1.119 -This command runs the configure shell script, which does some checks and
   1.120 -creates the makefiles.
   1.121 -
   1.122 -\verbatim
   1.123 -make
   1.124 -\endverbatim
   1.125 -This command compiles the non-template part of LEMON into <tt>libemon.a</tt>
   1.126 -file. It also compiles the programs in the tools and demo subdirectories
   1.127 -when enabled.
   1.128 -
   1.129 -\verbatim
   1.130 -make check
   1.131 -\endverbatim
   1.132 -This step is optional, but recommended. It performes a bunch of library
   1.133 -self-tests.
   1.134 -
   1.135 -\verbatim
   1.136 -make install
   1.137 -\endverbatim
   1.138 -This command will copy the directory structure to its final destination
   1.139 -(e.g. to \c /usr/local) so that your system can access it.
   1.140 -This command should be issued as "root", unless you provided a
   1.141 -\c --prefix switch to the \c configure to install the library in
   1.142 -non-default location.
   1.143 -
   1.144 -Several other configure flags can be passed to <tt>./configure</tt>.
   1.145 -For more information see the <b><tt>INSTALL</tt></b> file.
   1.146 -
   1.147 -[SEC]install_hg[SEC] Install the Latest Development Version
   1.148 -
   1.149 -You can also use the latest (developer) version of LEMON from our Mercurial
   1.150 -repository. You need a couple additional tool for that.
   1.151 -
   1.152 -- <a href="http://www.selenic.com/mercurial">Mercurial</a>
   1.153 -  - for obtaining the latest code (and for contributing into it)
   1.154 -- <a href="http://www.gnu.org/software/automake/">automake</a> (1.7 or newer)
   1.155 -- <a href="http://www.gnu.org/software/autoconf/">autoconf</a> (2.59 or newer)
   1.156 -- <a href="http://www.gnu.org/software/libtool/">libtool</a>
   1.157 -- <a href="http://pkgconfig.freedesktop.org/">pkgconfig</a>
   1.158 -  - for initializing the build framework
   1.159 -- <a href="http://doxygen.org">Doxygen</a>
   1.160 -  - for generating the documentations (optional, but recommended)
   1.161 -
   1.162 -Once you have all these tools installed, the process is fairly easy.
   1.163 -First, you have to get the copy of the latest version.
   1.164 -
   1.165 -\verbatim
   1.166 -hg clone http://lemon.cs.elte.hu/hg/lemon-main lemon-src
   1.167 -\endverbatim
   1.168 -
   1.169 -The next step is to initialize the build system.
   1.170 -
   1.171 -\verbatim
   1.172 -autoreconf -vif
   1.173 -\endverbatim
   1.174 -
   1.175 -Then the process is the same as in case of using the release tarball.
   1.176 -
   1.177 -\verbatim
   1.178 -./configure
   1.179 -make
   1.180 -make check    # This is optional, but recommended. It runs a bunch of tests.
   1.181 -make install
   1.182 -\endverbatim
   1.183 -
   1.184 -To generate the documentation, just run
   1.185 -\verbatim
   1.186 -make html
   1.187 -\endverbatim
   1.188 -\todo Is <tt><b>make html</b></tt> really necessary after
   1.189 -<tt><b>make install</b></tt>?
   1.190 -
   1.191 -
   1.192 -[SEC]install_rpm[SEC] Install from rpm
   1.193 -
   1.194 -\todo Write this section (\ref install_rpm).
   1.195 -
   1.196 -[SEC]install_user[SEC] Install Locally to the User
   1.197 -
   1.198 -\todo Write this section (\ref install_user).
   1.199 -
   1.200 -
   1.201 -[SEC]compile_codes[SEC] Compile Codes that Use LEMON
   1.202 -
   1.203 -Now let us see how to use the library after installing it.
   1.204 -
   1.205 -[SEC]compile_system_wide[SEC] If LEMON is Installed System-Wide
   1.206 -
   1.207 -If your installation of LEMON into directory \c /usr/local was
   1.208 -successful, then you have to issue a command like this to compile a
   1.209 -source file that uses LEMON.
   1.210 -
   1.211 -\verbatim
   1.212 -g++ -lemon [other options] <source file>
   1.213 -\endverbatim
   1.214 -
   1.215 -The argument <tt>-lemon</tt> tells the compiler that we are using the
   1.216 -installed library LEMON.
   1.217 -
   1.218 -[SEC]compile_user_local[SEC] If LEMON is Installed User-Local
   1.219 -
   1.220 -You have to give more options to the compiler if LEMON is installed
   1.221 -user-local into a directory (denoted by <tt>&lt;dir&gt;</tt>).
   1.222 -
   1.223 -\verbatim
   1.224 -g++ -lemon -I <dir>/include -L <dir>/lib [other options] <source file>
   1.225 -\endverbatim
   1.226 -
   1.227 -[SEC]compile_use_pkg_config[SEC] Use pkg-config
   1.228 -
   1.229 -\todo Write this sub-subsection (\ref compile_use_pkg_config).
   1.230 -
   1.231 -[TRAILER]
   1.232 -*/