lemon-project-template-glpk

annotate deps/glpk/INSTALL @ 11:4fc6ad2fb8a6

Test GLPK in src/main.cc
author Alpar Juttner <alpar@cs.elte.hu>
date Sun, 06 Nov 2011 21:43:29 +0100
parents
children
rev   line source
alpar@9 1 INSTALLING GLPK ON YOUR COMPUTER
alpar@9 2 ********************************
alpar@9 3
alpar@9 4 Unpacking the distribution file
alpar@9 5 -------------------------------
alpar@9 6 The GLPK package (like all other GNU software) is distributed in the
alpar@9 7 form of a packed archive. It is one file named `glpk-X.Y.tar.gz', where
alpar@9 8 `X' is the major version number and `Y' is the minor version number;
alpar@9 9 for example, the archive name might be `glpk-4.15.tar.gz'.
alpar@9 10
alpar@9 11 In order to prepare the distribution for installation you should:
alpar@9 12
alpar@9 13 1. Copy the GLPK distribution file to a working directory.
alpar@9 14
alpar@9 15 2. Unpack the distribution file with the following command:
alpar@9 16
alpar@9 17 gzip -d glpk-X.Y.tar.gz
alpar@9 18
alpar@9 19 After unpacking the distribution file is automatically renamed to
alpar@9 20 `glpk-X.Y.tar'.
alpar@9 21
alpar@9 22 3. Unarchive the distribution file with the following command:
alpar@9 23
alpar@9 24 tar -x < glpk-X.Y.tar
alpar@9 25
alpar@9 26 It automatically creates the subdirectory `glpk-X.Y' containing the
alpar@9 27 GLPK distribution.
alpar@9 28
alpar@9 29 Configuring the package
alpar@9 30 -----------------------
alpar@9 31 After unpacking and unarchiving the GLPK distribution you should
alpar@9 32 configure the package, i.e. automatically tune it for your platform.
alpar@9 33
alpar@9 34 Normally, you should just `cd' to the directory `glpk-X.Y' and run the
alpar@9 35 `configure' script, e.g.
alpar@9 36
alpar@9 37 ./configure
alpar@9 38
alpar@9 39 The `configure' shell script attempts to guess correct values for
alpar@9 40 various system-dependent variables used during compilation. It uses
alpar@9 41 those values to create a `Makefile' in each directory of the package.
alpar@9 42 It also creates file `config.h' containing platform-dependent
alpar@9 43 definitions. Finally, it creates a shell script `config.status' that
alpar@9 44 you can run in the future to recreate the current configuration, a file
alpar@9 45 `config.cache' that saves the results of its tests to speed up
alpar@9 46 reconfiguring, and a file `config.log' containing compiler output
alpar@9 47 (useful mainly for debugging `configure').
alpar@9 48
alpar@9 49 Running `configure' takes about a few seconds. While it is running, it
alpar@9 50 displays some messages that tell you what it is doing. If you don't want
alpar@9 51 to see the messages, run `configure' with its standard output redirected
alpar@9 52 to `dev/null'; for example, `./configure > /dev/null'.
alpar@9 53
alpar@9 54 By default both static and shared versions of the GLPK library will be
alpar@9 55 compiled. Compilation of the shared librariy can be turned off by
alpar@9 56 specifying the `--disable-shared' option to `configure', e.g.
alpar@9 57
alpar@9 58 ./configure --disable-shared
alpar@9 59
alpar@9 60 If you encounter problems building the library try using the above
alpar@9 61 option, because some platforms do not support shared libraries.
alpar@9 62
alpar@9 63 The GLPK package has some optional features listed below. By default
alpar@9 64 all these features are disabled. To enable a feature the corresponding
alpar@9 65 option should be passed to the configure script.
alpar@9 66
alpar@9 67 --with-gmp Enable using the GNU MP bignum library
alpar@9 68
alpar@9 69 This feature allows the exact simplex solver to use the GNU MP
alpar@9 70 bignum library. If it is disabled, the exact simplex solver uses the
alpar@9 71 GLPK bignum module, which provides the same functionality as GNU MP,
alpar@9 72 however, it is much less efficient.
alpar@9 73
alpar@9 74 For details about the GNU MP bignum library see its web page at
alpar@9 75 <http://gmplib.org/>.
alpar@9 76
alpar@9 77 --with-zlib Enable using the zlib data compression library
alpar@9 78
alpar@9 79 This feature allows GLPK API routines and the stand-alone solver to
alpar@9 80 read and write compressed data files performing compression and
alpar@9 81 decompression "on the fly" (compressed data files are recognized by
alpar@9 82 suffix `.gz' in the file name). It may be useful in case of large
alpar@9 83 MPS files to save the disk space.
alpar@9 84
alpar@9 85 For details about the zlib compression library see its web page at
alpar@9 86 <http://www.zlib.net/>.
alpar@9 87
alpar@9 88 --enable-dl The same as --enable-dl=ltdl
alpar@9 89 --enable-dl=ltdl Enable shared library support (GNU)
alpar@9 90 --enable-dl=dlfcn Enable shared library support (POSIX)
alpar@9 91
alpar@9 92 Currently this feature is only needed to provide dynamic linking to
alpar@9 93 ODBC and MySQL shared libraries (see below).
alpar@9 94
alpar@9 95 For details about the GNU shared library support see the manual at
alpar@9 96 <http://www.gnu.org/software/libtool/manual/>.
alpar@9 97
alpar@9 98 --enable-odbc Enable using ODBC table driver (libiodbc)
alpar@9 99 --enable-odbc=unix Enable using ODBC table driver (libodbc)
alpar@9 100
alpar@9 101 This feature allows transmitting data between MathProg model objects
alpar@9 102 and relational databases accessed through ODBC.
alpar@9 103
alpar@9 104 For more details about this feature see the supplement "Using Data
alpar@9 105 Tables in the GNU MathProg Modeling Language" (doc/tables.*).
alpar@9 106
alpar@9 107 --enable-mysql Enable using MySQL table driver (libmysql)
alpar@9 108
alpar@9 109 This feature allows transmitting data between MathProg model objects
alpar@9 110 and MySQL relational databases.
alpar@9 111
alpar@9 112 For more details about this feature see the supplement "Using Data
alpar@9 113 Tables in the GNU MathProg Modeling Language" (doc/tables.*).
alpar@9 114
alpar@9 115 Compiling the package
alpar@9 116 ---------------------
alpar@9 117 Normally, you can compile (build) the package by typing the command:
alpar@9 118
alpar@9 119 make
alpar@9 120
alpar@9 121 It reads `Makefile' generated by `configure' and performs all necessary
alpar@9 122 jobs.
alpar@9 123
alpar@9 124 If you want, you can override the `make' variables CFLAGS and LDFLAGS
alpar@9 125 like this:
alpar@9 126
alpar@9 127 make CFLAGS=-O2 LDFLAGS=-s
alpar@9 128
alpar@9 129 To compile the package in a different directory from the one containing
alpar@9 130 the source code, you must use a version of `make' that supports `VPATH'
alpar@9 131 variable, such as GNU `make'. `cd' to the directory where you want the
alpar@9 132 object files and executables to go and run the `configure' script.
alpar@9 133 `configure' automatically checks for the source code in the directory
alpar@9 134 that `configure' is in and in `..'. If for some reason `configure' is
alpar@9 135 not in the source code directory that you are configuring, then it will
alpar@9 136 report that it can't find the source code. In that case, run `configure'
alpar@9 137 with the option `--srcdir=DIR', where DIR is the directory that contains
alpar@9 138 the source code.
alpar@9 139
alpar@9 140 Some systems require unusual options for compilation or linking that
alpar@9 141 the `configure' script does not know about. You can give `configure'
alpar@9 142 initial values for variables by setting them in the environment. Using
alpar@9 143 a Bourne-compatible shell, you can do that on the command line like
alpar@9 144 this:
alpar@9 145
alpar@9 146 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
alpar@9 147
alpar@9 148 Or on systems that have the `env' program, you can do it like this:
alpar@9 149
alpar@9 150 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
alpar@9 151
alpar@9 152 Here are the `make' variables that you might want to override with
alpar@9 153 environment variables when running `configure'.
alpar@9 154
alpar@9 155 For these variables, any value given in the environment overrides the
alpar@9 156 value that `configure' would choose:
alpar@9 157
alpar@9 158 CC: C compiler program. The default is `cc'.
alpar@9 159
alpar@9 160 INSTALL: Program used to install files. The default value is `install'
alpar@9 161 if you have it, otherwise `cp'.
alpar@9 162
alpar@9 163 For these variables, any value given in the environment is added to the
alpar@9 164 value that `configure' chooses:
alpar@9 165
alpar@9 166 DEFS: Configuration options, in the form `-Dfoo -Dbar ...'.
alpar@9 167
alpar@9 168 LIBS: Libraries to link with, in the form `-lfoo -lbar ...'.
alpar@9 169
alpar@9 170 Checking the package
alpar@9 171 --------------------
alpar@9 172 To check the package, i.e. to run some tests included in the package,
alpar@9 173 you can use the following command:
alpar@9 174
alpar@9 175 make check
alpar@9 176
alpar@9 177 Installing the package
alpar@9 178 ----------------------
alpar@9 179 Normally, to install the GLPK package you should type the following
alpar@9 180 command:
alpar@9 181
alpar@9 182 make install
alpar@9 183
alpar@9 184 By default, `make install' will install the package's files in
alpar@9 185 `usr/local/bin', `usr/local/lib', etc. You can specify an installation
alpar@9 186 prefix other than `/usr/local' by giving `configure' the option
alpar@9 187 `--prefix=PATH'. Alternately, you can do so by consistently giving a
alpar@9 188 value for the `prefix' variable when you run `make', e.g.
alpar@9 189
alpar@9 190 make prefix=/usr/gnu
alpar@9 191 make prefix=/usr/gnu install
alpar@9 192
alpar@9 193 After installing you can remove the program binaries and object files
alpar@9 194 from the source directory by typing `make clean'. To remove all files
alpar@9 195 that `configure' created (`Makefile', `config.status', etc.), just type
alpar@9 196 `make distclean'.
alpar@9 197
alpar@9 198 The file `configure.ac' is used to create `configure' by a program
alpar@9 199 called `autoconf'. You only need it if you want to remake `configure'
alpar@9 200 using a newer version of `autoconf'.
alpar@9 201
alpar@9 202 Uninstalling the package
alpar@9 203 ------------------------
alpar@9 204 To uninstall the GLPK package, i.e. to remove all the package's files
alpar@9 205 from the system places, you can use the following command:
alpar@9 206
alpar@9 207 make uninstall
alpar@9 208
alpar@9 209 ========================================================================