= Install on Linux/Unix (using autotool) = == Hardware and Software Requirements == In LEMON we use C++ templates heavily, thus compilation takes a considerable amount of time and memory. So some decent box would be advantageous, but otherwise there are no special hardware requirements. You will need a recent C++ compiler. Our primary target is the GNU C++ Compiler (g++), from version 3.3 upwards. We also checked the Intel C++ Compiler (icc), the IBM XL C++ compiler (xlC) and Microsoft Visual C++ (on Windows). In this description we will suppose a Linux environment and GNU C++ Compiler. === LP Solver Requirements === The LEMON LP solver interface can use the [http://www.gnu.org/software/glpk/ GLPK] (GNU Linear Programming Kit), [http://www.ilog.com/ CPLEX], [http://soplex.zib.de/ SoPlex] and [http://www.coin-or.org/Clp/ CLP] solvers. If you want to use it, you will need at least one of these. See the [source:INSTALL INSTALL] file how to enable these at compile time. === Install from Source === You can download LEMON from the web site: [http://lemon.cs.elte.hu]. There you will find released versions in form of {{{.tar.gz}}} and {{{.zip}}} files. If you want a developer version (for example you want to contribute in developing LEMON) then you might want to use our Mercurial repository. This case is detailed [#InstalltheLatestDevelopmentVersion later], so from now on we suppose that you downloaded a {{{.tar.gz}}} file. Thus you have to do the following steps. Download the tarball either from the browser or just issuing {{{ wget http://lemon.cs.elte.hu/pub/sources/lemon-1.0.4.tar.gz }}} Note, that the tarball is named {{{lemon-x.y.z.tar.gz}}} where {{{x}}}, {{{y}}} and {{{z}}} (which is missing if it is 0) are numbers indicating the version of the library, in our example we will have {{{lemon-1.0.4.tar.gz}}}. Then issue the following commands: {{{ tar xvzf lemon-1.0.4.tar.gz cd lemon-1.0.4 ./configure make make check # This is optional, but recommended. It runs a bunch of tests. make install }}} These commands install LEMON under {{{/usr/local}}} (you will need root privileges to be able to install to that directory). If you want to install it to some other place, then pass the {{{--prefix=DIRECTORY}}} flag to {{{./configure}}}, for example: {{{ ./configure --prefix=/home/username/lemon }}} We briefly explain these commands below. {{{ tar xvzf lemon-1.0.4.tar.gz }}} This command untars the {{{tar.gz}}} file into a directory named {{{lemon-1.0.2}}}. {{{ cd lemon-1.0.4 }}} This command enters the directory. {{{ ./configure }}} This command runs the configure shell script, which does some checks and creates the makefiles. {{{ make }}} This command compiles the non-template part of LEMON into {{{libemon.a}}} file. It also compiles the programs in the tools and demo subdirectories when enabled. {{{ make check }}} This step is optional, but recommended. It runs the self test programs that we developed for LEMON to check whether the library works properly on your platform. {{{ make install }}} This command will copy the directory structure to its final destination (e.g. to {{{/usr/local}}}) so that your system can access it. This command should be issued as "root", unless you provided a {{{--prefix}}} switch to the {{{configure}}} to install the library in non-default location. Several other configure flags can be passed to {{{./configure}}}. For more information see the [source:INSTALL INSTALL] file. === Install the Latest Development Version === You can also use the latest (developer) version of LEMON from our Mercurial repository. You need a couple additional tool for that. - [http://www.selenic.com/mercurial Mercurial] - for obtaining the latest code (and for contributing into it) - [http://www.gnu.org/software/automake/ automake] (1.7 or newer) - [http://www.gnu.org/software/autoconf/ autoconf] (2.59 or newer) - [http://www.gnu.org/software/libtool/ libtool] - [http://pkgconfig.freedesktop.org/ pkgconfig] - for initializing the build framework - [http://www.doxygen.org Doxygen], [http://www.graphviz.org Graphviz], [http://pages.cs.wisc.edu/~ghost/ Ghostscript] and [http://www.latex-project.org/ LaTeX] - for generating the documentations (optional, but recommended) Once you have all these tools installed, the process is fairly easy. First, you have to get the copy of the latest version. {{{ hg clone http://lemon.cs.elte.hu/hg/lemon-main lemon-src }}} The next step is to initialize the build system. {{{ autoreconf -vif }}} Then the process is the same as in case of using the release tarball. {{{ ./configure make make check # This is optional, but recommended. It runs a bunch of tests. make install }}} To generate the documentation, just run {{{ make html }}}