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