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.

198 lines
7.4 KiB

2 months ago
  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. --enable-dl The same as --enable-dl=ltdl
  56. --enable-dl=ltdl Enable shared library support (GNU)
  57. --enable-dl=dlfcn Enable shared library support (POSIX)
  58. Currently this feature is only needed to provide dynamic linking to
  59. ODBC and MySQL shared libraries (see below).
  60. For details about the GNU shared library support see the manual at
  61. <http://www.gnu.org/software/libtool/manual/>.
  62. --enable-odbc Enable using ODBC table driver (libiodbc)
  63. --enable-odbc=unix Enable using ODBC table driver (libodbc)
  64. This feature allows transmitting data between MathProg model objects
  65. and relational databases accessed through ODBC.
  66. For more details about this feature see the supplement "Using Data
  67. Tables in the GNU MathProg Modeling Language" (doc/tables.*).
  68. --enable-mysql Enable using MySQL table driver (libmysql)
  69. This feature allows transmitting data between MathProg model objects
  70. and MySQL relational databases.
  71. For more details about this feature see the supplement "Using Data
  72. Tables in the GNU MathProg Modeling Language" (doc/tables.*).
  73. Compiling the package
  74. ---------------------
  75. Normally, you can compile (build) the package by typing the command:
  76. make
  77. It reads `Makefile' generated by `configure' and performs all necessary
  78. jobs.
  79. If you want, you can override the `make' variables CFLAGS and LDFLAGS
  80. like this:
  81. make CFLAGS=-O2 LDFLAGS=-s
  82. To compile the package in a different directory from the one containing
  83. the source code, you must use a version of `make' that supports `VPATH'
  84. variable, such as GNU `make'. `cd' to the directory where you want the
  85. object files and executables to go and run the `configure' script.
  86. `configure' automatically checks for the source code in the directory
  87. that `configure' is in and in `..'. If for some reason `configure' is
  88. not in the source code directory that you are configuring, then it will
  89. report that it can't find the source code. In that case, run `configure'
  90. with the option `--srcdir=DIR', where DIR is the directory that contains
  91. the source code.
  92. Some systems require unusual options for compilation or linking that
  93. the `configure' script does not know about. You can give `configure'
  94. initial values for variables by setting them in the environment. Using
  95. a Bourne-compatible shell, you can do that on the command line like
  96. this:
  97. CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
  98. Or on systems that have the `env' program, you can do it like this:
  99. env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
  100. Here are the `make' variables that you might want to override with
  101. environment variables when running `configure'.
  102. For these variables, any value given in the environment overrides the
  103. value that `configure' would choose:
  104. CC: C compiler program. The default is `cc'.
  105. INSTALL: Program used to install files. The default value is `install'
  106. if you have it, otherwise `cp'.
  107. For these variables, any value given in the environment is added to the
  108. value that `configure' chooses:
  109. DEFS: Configuration options, in the form `-Dfoo -Dbar ...'.
  110. LIBS: Libraries to link with, in the form `-lfoo -lbar ...'.
  111. Checking the package
  112. --------------------
  113. To check the package, i.e. to run some tests included in the package,
  114. you can use the following command:
  115. make check
  116. Installing the package
  117. ----------------------
  118. Normally, to install the GLPK package you should type the following
  119. command:
  120. make install
  121. By default, `make install' will install the package's files in
  122. `usr/local/bin', `usr/local/lib', etc. You can specify an installation
  123. prefix other than `/usr/local' by giving `configure' the option
  124. `--prefix=PATH'. Alternately, you can do so by consistently giving a
  125. value for the `prefix' variable when you run `make', e.g.
  126. make prefix=/usr/gnu
  127. make prefix=/usr/gnu install
  128. After installing you can remove the program binaries and object files
  129. from the source directory by typing `make clean'. To remove all files
  130. that `configure' created (`Makefile', `config.status', etc.), just type
  131. `make distclean'.
  132. The file `configure.ac' is used to create `configure' by a program
  133. called `autoconf'. You only need it if you want to remake `configure'
  134. using a newer version of `autoconf'.
  135. Uninstalling the package
  136. ------------------------
  137. To uninstall the GLPK package, i.e. to remove all the package's files
  138. from the system places, you can use the following command:
  139. make uninstall
  140. ========================================================================