You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
7.9 KiB

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