Changes between Initial Version and Version 1 of user-configure

May 26, 2006 2:42:53 PM (14 years ago)

first draft - to be continued after break


  • user-configure

    v1 v1  
     1= Preparing the Compilation =
     3Here we only describe the configuration procedure on UNIX-like systems (including Linux, Cygwin, and MSys), where the user can run the {{{configure}}} script.  If you are using the MS Developer Studio, you are referred to the [ MSDevStudio project page].
     5== Running the {{{configure}}} script ==
     7Before you can compile the source code using {{{make}}}, the Makefiles have to be created, so that they contain the correct compiler names and options, as well as other system dependent information.  To this purpose, the shell scripts {{{configure}}} in the package's base directory (e.g., {{{Coin-Clp}}}) and in the projects main directories (such as {{{Coin-Clp/CoinUtils}}}) perform a number of tests and creates the final Makefiles.  In addition, the {{{configure}}} script usually creates a header file (such as {{{inc/config_clp.h}}}) for the individual packages, which contains {{{#define}}}s to help the source code to adapt to different platforms.
     9To run the configuration scripts, you go into base directory of the downloaded COIN package (e.g., {{{Coin-Clp}}}), and type
     15This picks default settings for compilers and compiler options.  You can change some aspects of the configuration by providing arguments to the configuration script, see below.
     17== Giving Options to the {{{configure}}} script ==
     19There are two types of arguments that can be given to the {{{configure}}} script.  The first set of arguments have the form of regular command line options, such as {{{--enable-debug}}} or {{{-C}}}.  The second set of options works through variables, and they can be provided either on the command line, or can be set as environment variables.
     21An alternative to providing configuration options through the command line is the {{{}}} file, see below.
     23For most COIN packages, several configuration scripts are run recursively.  You need to specify the options for all subprojects (e.g., {{{Clp}}} and {{{CoinUtils}}}) when you run the case {{{configure}}} script, since they are given to the sub{{{configure}}} scripts.
     25You can see a list of all available (documented) options by running
     28./configure --help=recursive
     31=== Command Line Arguments for {{{configure}}} ===
     33The command line arguments are given to {{{configure}}} simply as additional arguments for to the command line.  Some common arguments are described here, but there might be additional options that you can find on the home pages for the individual COIN projects.
     35 * '''{{{-C}}}''': Makes {{{configure}}} use a cache file to speed up the tests when they been performed earlier.  If you rerun {{{configure}}} with different options (so that the results of tests might change), you should delete the {{{config.cache}}} file before the rerun.
     37 * '''{{{--prefix}}}''': By default, the binaries and header files are installed (by {{{make install}}}) into {{{bin}}}, {{{lib}}}, and {{{include}}} directories of where the main configuration scripts was run.  If you prefer to have {{{make install}}} install in a different location (such as {{{$HOME}}}), you need to use this option, e.g., with {{{--prefix=$HOME}}}.
     39 * '''{{{--enable-debug}}}''': This causes {{{configure}}} to select the debug compiler options.  It also defines the preprocessor macro {{{COIN_DEBUG}}}, which in some source code is use to activate additional time-consuming consistency tests.
     41 * '''{{{--enable-static}}}''': By detault, the COIN libraries are compiled as shared libraries or DLLs, at least on platforms that support this.  If you want to also have static libraries to be generated as well, you need to specify this option.
     43 * '''{{{--disable-shared}}}''': If you want only static libraries to be compiled and no shared objects or DLLs, you should speficy this option.
     45 * '''{{{--with-gnu-packages}}}''': Some of the COIN projects can make use of GNU packages (such as zlib, bzlib, or readline).  Since those are usually provided under the GPL license, which has rather strong conditions, the configuration scripts do not check for the availability of those packages by default.  If you want to compile the COIN code so that it uses those packages, you need to provide this option.
     47 * Further options of the form '''{{{--enable-...}}}''' and '''{{{with-...}}}''' might be understood by the configuration scripts for specific COIN projects.  For example, if you want to tell the Open Solver Interface (OSI) that you want to compile the CPLEX solver interface, you need to specify the {{{--with-clp-lib}}} and {{{--with-clp-incdir}}} options with the appropriate values.  If such a value consists of more than one word (e.g., -L/opt/cplex -lcpx), you need to enclose it in quotation marks.
     49A typical call for the configuration script would then look like
     52./configure --with-cplex-lib="L/opt/cplex -lcpx" --with-cplex-incdir=/opt/cplex/include --enable-static -C
     55=== Variable Arguments for {{{configure}}} ===
     57Other options, usually related to compilation configuration (such as compiler name and options) can be set as variables.  The values for those variables can be either provided as environment variables (e.g., set in your shell startup script), or on the command line.  Values set on the command line overwrite values set in the environment.  If you want to set the value of a variable (such as {{{CXX}}}) in the comamnd line for {{{configure}}}, you simply list the variable, follow ''immediately'' by an {{{=}}} and the value, possibly enclosed in quotation marks (such as CXX="cl").