Changes between Version 1 and Version 2 of user-configure


Ignore:
Timestamp:
May 26, 2006 3:39:04 PM (14 years ago)
Author:
andreasw
Comment:

added variables

Legend:

Unmodified
Added
Removed
Modified
  • user-configure

    v1 v2  
    11= Preparing the Compilation =
    22
    3 Here 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 [http://projects.coin-or.org/MSDevStudio MSDevStudio project page].
     3Here we only describe the configuration procedure on UNIX-like systems (including Linux, Cygwin, and MSys), where the user can run the {{{configure}}} shell script.  If you are using the MS Developer Studio, you are referred to the [http://projects.coin-or.org/MSDevStudio MSDevStudio project page].
    44
    55== Running the {{{configure}}} script ==
    66
    7 Before 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.
     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 create the final Makefiles.  In addition, a {{{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.
    88
    99To run the configuration scripts, you go into base directory of the downloaded COIN package (e.g., {{{Coin-Clp}}}), and type
     
    1313}}}
    1414
    15 This 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.
     15This picks default settings for compilers and compiler options.  You can change some aspects of the configuration by providing arguments to the configuration script, as described next.
    1616
    1717== Giving Options to the {{{configure}}} script ==
    1818
    19 There 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.
     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 those can be provided either on the command line, or can be set as environment variables.
    2020
    2121An alternative to providing configuration options through the command line is the {{{config.site}}} file, see below.
    2222
    23 For 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.
     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 base {{{configure}}} script, since they are given to the sub{{{configure}}} scripts.
    2424
    2525You can see a list of all available (documented) options by running
     
    5555=== Variable Arguments for {{{configure}}} ===
    5656
    57 Other 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").
     57Other options, usually related to compilation configuration (such as compiler names 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, followed ''immediately'' by an {{{=}}} and the value, possibly enclosed in quotation marks (such as CXX="cl").
     58
     59Commonly used variable arguments are
     60
     61 * '''{{{CC}}}''':  Name of the C compiler.  If this is not given, the {{{configure}}} script tries a list of compiler names.  You only need to specify this if you are not happy with the default selection.  If you want to compile the code in a non-default bit mode (say, 64bit on AIX), you should specify the corresponding flag here (e.g., {{{CC='xlc -q64'}}}), and not in {{{CFLAGS}}}.
     62
     63 * '''{{{CFLAGS}}}''':  C compiler falgs.  If this is not given, the {{{configure}}} script chooses a default set of compiler flags, depending on the compiler, operating system, and whether the {{{--enable-debug}}} flag is given.
     64
     65 * '''{{{CXX}}}''':  Name of the C++ compiler.  If this is not given, the {{{configure}}} script tries a list of compiler names.  You only need to specify this if you are not happy with the default selection.  If you want to compile the code in a non-default bit mode (say, 64bit on AIX), you should specify the corresponding flag here (e.g., {{{CXX='xlC -q64'}}}), and not in {{{CXXFLAGS}}}.  This only applies to packages that require the C++ compiler.
     66
     67 * '''{{{CXXFLAGS}}}''':  C++ compiler falgs.  If this is not given, the {{{configure}}} script chooses a default set of compiler flags, depending on the compiler, operating system, and whether the {{{--enable-debug}}} flag is given.  This only applies to packages that require the C++ compiler.
     68
     69 * '''{{{F77}}}''':  Name of the Fortran compiler.  If this is not given, the {{{configure}}} script tries a list of compiler names.  You only need to specify this if you are not happy with the default selection.  If you want to compile the code in a non-default bit mode (say, 64bit on AIX), you should specify the corresponding flag here (e.g., {{{F77='xlf -q64'}}}), and not in {{{FFLAGS}}}.  This only applies to packages that require the Fortran compiler.
     70
     71 * '''{{{FFLAGS}}}''':  Fortran compiler falgs.  If this is not given, the {{{configure}}} script chooses a default set of compiler flags, depending on the compiler, operating system, and whether the {{{--enable-debug}}} flag is given.  This only applies to packages that require the Fortran compiler.
     72
     73 * '''{{{ADDDEFS}}}''':  If you want to have the C and C++ compile use additional {{{-D}}} preprocessor macro defintions, you should list them in this variable (e.g., {{{ADDDEFS="-DPARANOIA"}}}).
     74
     75 * '''{{{AR}}}''':  Program for handling archives.  The default selection usually works fine.  Only on some systems (such as AIX), it is necessary to specify additional flags when compiling in 64bit mode (e.g., {{{AR="ar -X64"}}}).
     76
     77 * '''{{{NM}}}''':  Program for listing symbols in object files.  The default selection usually works fine.  Only on some systems (such as AIX), it is necessary to specify additional flags when compiling in 64bit mode (e.g., {{{NM="nm -X64"}}}).
     78
     79A complete invokation of the configure script could look like:
     80
     81{{{
     82./configure CXX="xlC -q64" CC="xlc -q64" F77="xlf -q64" AR="ar -X64" NM="nm -X64+ --enable-gnu-packages -C
     83}}}
     84
     85== Specifying Options in a {{{config.site}}} File ==
     86