|
|
INSTALLING GLPK ON YOUR COMPUTER ********************************
Unpacking the distribution file ------------------------------- The GLPK package (like all other GNU software) is distributed in the form of a packed archive. It is one file named `glpk-X.Y.tar.gz', where `X' is the major version number and `Y' is the minor version number; for example, the archive name might be `glpk-4.15.tar.gz'.
In order to prepare the distribution for installation you should:
1. Copy the GLPK distribution file to a working directory.
2. Unpack the distribution file with the following command:
gzip -d glpk-X.Y.tar.gz
After unpacking the distribution file is automatically renamed to `glpk-X.Y.tar'.
3. Unarchive the distribution file with the following command:
tar -x < glpk-X.Y.tar
It automatically creates the subdirectory `glpk-X.Y' containing the GLPK distribution.
Configuring the package ----------------------- After unpacking and unarchiving the GLPK distribution you should configure the package, i.e. automatically tune it for your platform.
Normally, you should just `cd' to the directory `glpk-X.Y' and run the `configure' script, e.g.
./configure
The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It also creates file `config.h' containing platform-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure').
Running `configure' takes about a few seconds. While it is running, it displays some messages that tell you what it is doing. If you don't want to see the messages, run `configure' with its standard output redirected to `dev/null'; for example, `./configure > /dev/null'.
By default both static and shared versions of the GLPK library will be compiled. Compilation of the shared librariy can be turned off by specifying the `--disable-shared' option to `configure', e.g.
./configure --disable-shared
If you encounter problems building the library try using the above option, because some platforms do not support shared libraries.
The GLPK package has some optional features listed below. By default all these features are disabled. To enable a feature the corresponding option should be passed to the configure script.
--with-gmp Enable using the GNU MP bignum library
This feature allows the exact simplex solver to use the GNU MP bignum library. If it is disabled, the exact simplex solver uses the GLPK bignum module, which provides the same functionality as GNU MP, however, it is much less efficient.
For details about the GNU MP bignum library see its web page at <http://gmplib.org/>.
--with-zlib Enable using the zlib data compression library
This feature allows GLPK API routines and the stand-alone solver to read and write compressed data files performing compression and decompression "on the fly" (compressed data files are recognized by suffix `.gz' in the file name). It may be useful in case of large MPS files to save the disk space.
For details about the zlib compression library see its web page at <http://www.zlib.net/>.
--enable-dl The same as --enable-dl=ltdl --enable-dl=ltdl Enable shared library support (GNU) --enable-dl=dlfcn Enable shared library support (POSIX)
Currently this feature is only needed to provide dynamic linking to ODBC and MySQL shared libraries (see below).
For details about the GNU shared library support see the manual at <http://www.gnu.org/software/libtool/manual/>.
--enable-odbc Enable using ODBC table driver (libiodbc) --enable-odbc=unix Enable using ODBC table driver (libodbc)
This feature allows transmitting data between MathProg model objects and relational databases accessed through ODBC.
For more details about this feature see the supplement "Using Data Tables in the GNU MathProg Modeling Language" (doc/tables.*).
--enable-mysql Enable using MySQL table driver (libmysql)
This feature allows transmitting data between MathProg model objects and MySQL relational databases.
For more details about this feature see the supplement "Using Data Tables in the GNU MathProg Modeling Language" (doc/tables.*).
Compiling the package --------------------- Normally, you can compile (build) the package by typing the command:
make
It reads `Makefile' generated by `configure' and performs all necessary jobs.
If you want, you can override the `make' variables CFLAGS and LDFLAGS like this:
make CFLAGS=-O2 LDFLAGS=-s
To compile the package in a different directory from the one containing the source code, you must use a version of `make' that supports `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If for some reason `configure' is not in the source code directory that you are configuring, then it will report that it can't find the source code. In that case, run `configure' with the option `--srcdir=DIR', where DIR is the directory that contains the source code.
Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Here are the `make' variables that you might want to override with environment variables when running `configure'.
For these variables, any value given in the environment overrides the value that `configure' would choose:
CC: C compiler program. The default is `cc'.
INSTALL: Program used to install files. The default value is `install' if you have it, otherwise `cp'.
For these variables, any value given in the environment is added to the value that `configure' chooses:
DEFS: Configuration options, in the form `-Dfoo -Dbar ...'.
LIBS: Libraries to link with, in the form `-lfoo -lbar ...'.
Checking the package -------------------- To check the package, i.e. to run some tests included in the package, you can use the following command:
make check
Installing the package ---------------------- Normally, to install the GLPK package you should type the following command:
make install
By default, `make install' will install the package's files in `usr/local/bin', `usr/local/lib', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. Alternately, you can do so by consistently giving a value for the `prefix' variable when you run `make', e.g.
make prefix=/usr/gnu make prefix=/usr/gnu install
After installing you can remove the program binaries and object files from the source directory by typing `make clean'. To remove all files that `configure' created (`Makefile', `config.status', etc.), just type `make distclean'.
The file `configure.ac' is used to create `configure' by a program called `autoconf'. You only need it if you want to remake `configure' using a newer version of `autoconf'.
Uninstalling the package ------------------------ To uninstall the GLPK package, i.e. to remove all the package's files from the system places, you can use the following command:
make uninstall
========================================================================
|