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