INSTALLING GLPK ON YOUR COMPUTER
********************************



Unpacking the distribution file
-------------------------------

The GLPK package (like all other GNU software) is distributed in the
form of packed archive. This is one file named 'glpk-x.y.tar.gz', where
x is the major version number and y is the minor version number.

In order to prepare the distribution for installation you should:

1. Copy the GLPK distribution file to some subdirectory.

2. Enter the command 'gzip -d glpk-x.y.tar.gz' in order to unpack the
   distribution file. After unpacking the name of the distribution file
   will be automatically changed to 'glpk-x.y.tar'.

3. Enter the command 'tar -x < glpk-x.y.tar' in order to unarchive the
   distribution. After this operation the subdirectory 'glpk-x.y' which
   is the GLPK distribution will have been automatically created.



Configuring the package
-----------------------

After you have unpacked and unarchived GLPK distribution you should
configure the package, i.e. automatically tune it for your computer.

Normally, you should just 'cd' to the subdirectory 'glpk-x.y' and enter
the command './configure'. If you are using 'csh' on an old version of
System V, you might need to type 'sh configure' instead to prevent 'csh'
from trying execute 'configure' itself.

The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation, and creates
'Makefile'. It also creates a file 'config.status' that you can run in
the future to recreate the current configuration.

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'.



Compiling the package
---------------------

Normally, in order to compile the package you should just enter the
command 'make'. This command reads 'Makefile' generated by 'configure'
and automatically performs all necessary job.

The result of compilation is:

* the file 'libglpk.a', which is a library archive containing object
  code for all GLPK routines; and

* the program 'glpsol', which is a stand-alone LP/MIP solver.

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.

On systems that require unusual options for compilation or linking the
package's 'configure' script does not know about, you can give
'configure' initial values for variables by setting them in the
environment. In Bourne-compatible shells, you can do that on the command
line like this:

   CC='gcc -traditional' LIBS=-lposix ./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:

Variable CC:         C compiler program. The default is 'cc'.

Variable INSTALL:    Program to use 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:

Variable DEFS:       Configuration options, in the form
                     '-Dfoo -Dbar ...'.

Variable LIBS:       Libraries to link with, in the form
                     '-lfoo -lbar ...'.



Checking the package
--------------------

In order to check the package (running some tests which are included to
the package) you can enter the command 'make check'.



Installing the package
----------------------

Normally, in order to install the GLPK package (i.e. copy GLPK library,
header files, and the solver to the system places) you should just enter
the command 'make install' (note that you should be the root user or
a superuser).

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.in' 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
------------------------

In order to uninstall the GLPK package (i.e. delete all GLPK files from
the system places) you can enter the command 'make uninstall'.



Making the documentation
------------------------

The documentation for GLPK is divided into the User's Guide and the
Library Reference. The texinfo source for both of these are included in
the main distribution file.

In order to make the documentation for reading and/or printing you can
type 'make dvi', 'make ps', 'make pdf', or 'make doc' depending on what
you would like to get.
