Changes between Version 12 and Version 13 of user-configure


Ignore:
Timestamp:
May 28, 2006 12:49:03 PM (14 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • user-configure

    v12 v13  
    77== Running the {{{configure}}} script ==
    88
    9 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 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.
     9Assume that you have dowloaded the package {{{Pkg}}}
     10in the directory {{{Coin-Pkg}}}.
    1011
    11 To run the configuration scripts, you go into base directory of the downloaded COIN package (e.g., {{{Coin-Clp}}}), and type
     12Before 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-Pkg}}}) and in the projects main directories (such as {{{Coin-Pkg/Pkg}}}) perform a number of tests and create the final Makefiles.  In addition, a {{{configure}}} script usually creates a header file (such as {{{Coin-Pkg/inc/config_clp.h}}}) for the individual packages, which contains {{{#define}}}s to help the source code to adapt to different platforms.
     13
     14To run the configuration scripts, you go into base directory of the downloaded COIN package (e.g., {{{Coin-Pkg}}}), and type
    1215
    1316{{{
     
    5356 * 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-cplex-lib}}} and {{{--with-cplex-incdir}}} options with the appropriate values.  (If such a value consists of more than one word, you need to enclose it in quotation marks.) For example:
    5457
    55 {{{--with-cplex-lib}}}="-L/usr/ilog/cplex90/lib/i86_linux2_glibc2.3_gcc3.2/static_pic -lcplex"
     58{{{--with-cplex-lib}}}="-L/usr/ilog/cplex90/lib/static_pic -lcplex"
    5659
    5760assuming that the cplex library (usually named libcplex.a)
    58 is located in /usr/ilog/cplex90/lib/i86_linux2_glibc2.3_gcc3.2/static_pic.
     61is located in /usr/ilog/cplex90/lib/static_pic.
    5962Note that, on some systems, the threading library must be
    6063added for cplex to work. In this case, the string is:
    6164
    62 {{{--with-cplex-lib}}}="-L/usr/ilog/cplex90/lib/i86_linux2_glibc2.3_gcc3.2/static_pic -lcplex -lpthread"
     65{{{--with-cplex-lib}}}="-L/usr/ilog/cplex90/lib/static_pic -lcplex -lpthread"
    6366
    6467For the include string:
     
    7376
    7477{{{
    75 ./configure --with-cplex-lib=="-L/usr/ilog/cplex90/lib/i86_linux2_glibc2.3_gcc3.2/static_pic -lcplex" --with-cplex-incdir= usr/ilog/cplex90/include/ilcplex --enable-static -C
     78./configure --with-cplex-lib=="-L/usr/ilog/cplex90/lib/static_pic -lcplex" --with-cplex-incdir= usr/ilog/cplex90/include/ilcplex --enable-static -C
    7679}}}
    7780
     
    120123If you follow the above instructions, the compiled files will be in the same directories as the source files.  It is possible to compile the code in a different place than where the source code is (using the make VPATH feature).  This can, for example, be handy, if you want to have several compiled versions around (e.g., for different operating systems when you are working on a shared files system, or a production and debug version).
    121124
    122 To do a VPATH compilation, you simply run the {{{configure}}} script in the directory where you want to have the compiled files.  E.g., if the base directory of the COIN packages is in {{{$HOME/Coin-Clp}}} and you want to compile the code in {{{$HOME/Obj/debug/Coin-Clp}}}, you go into the latter directory and type
     125To do a VPATH compilation, you simply run the {{{configure}}} script in the directory where you want to have the compiled files.  E.g., if the base directory of the COIN packages is in {{{$HOME/Coin-Pkg}}} and you want to compile the code in {{{$HOME/Obj/debug/Coin-Pkg}}}, you go into the latter directory and type
    123126
    124127{{{
    125 $HOME/Coin-Clp/configure --enable-debug -C
     128$HOME/Coin-Pkg/configure --enable-debug -C
    126129}}}
    127130
    128 (Of course, you use those options for {{{configure}}} that you want to use, not necessarily the above ones.)  After you run {{{configure}}}, you will find the same directory structure under {{{$HOME/Obj/debug/Coin-Clp}}} as in {{{$HOME/Coin-Clp}}} (at least those directories that have source code in {{{$HOME/Coin-Clp}}}), together with the Makefiles.  To compile the code, you how enter the {{{make}}} commands in {{{$HOME/Obj/debug/Coin-Clp}}}.  Note, that if you install the code and didn't specify a specific installation location with the {{{--prefix}}} flag, the installed files will go into {{{bin}}}, {{{lib}}}, and {{{include}}} subdirectories of {{{$HOME/Obj/debug/Coin-Clp}}}.
     131(Of course, you use those options for {{{configure}}} that you want to use, not necessarily the above ones.)  After you run {{{configure}}}, you will find the same directory structure under {{{$HOME/Obj/debug/Coin-Pkg}}} as in {{{$HOME/Coin-Pkg}}} (at least those directories that have source code in {{{$HOME/Coin-Pkg}}}), together with the Makefiles.  To compile the code, you how enter the {{{make}}} commands in {{{$HOME/Obj/debug/Coin-Pkg}}}.  Note, that if you install the code and didn't specify a specific installation location with the {{{--prefix}}} flag, the installed files will go into {{{bin}}}, {{{lib}}}, and {{{include}}} subdirectories of {{{$HOME/Obj/debug/Coin-Pkg}}}.
    129132
    130 '''Note:''' A VPATH compilation is not possible, if you ran {{{configure}}} already in the source code directory ({{{$HOME/Coin-Clp}}} in the example above).  You would need to do a {{{make distclean}}} in the source code directory first.
     133'''Note:''' A VPATH compilation is not possible, if you ran {{{configure}}} already in the source code directory ({{{$HOME/Coin-Pkg}}} in the example above).  You would need to do a {{{make distclean}}} in the source code directory first.