Changeset 640 for trunk/Cbc/configure.ac


Ignore:
Timestamp:
Jun 26, 2007 5:17:15 AM (12 years ago)
Author:
forrest
Message:

trunk from branches/devel

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:externals
      •  

        old new  
        1 MSVisualStudio   https://projects.coin-or.org/svn/MSVisualStudio/trunk/ExternalsDirs/Cbc
        2 BuildTools    https://projects.coin-or.org/svn/BuildTools/stable/0.5
         1MSVisualStudio   https://projects.coin-or.org/svn/MSVisualStudio/branches/devel/ExternalsDirs/Cbc
         2BuildTools    https://projects.coin-or.org/svn/BuildTools/trunk
        33ThirdParty/ASL https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/stable/1.0
         4ThirdParty/Blas https://projects.coin-or.org/svn/BuildTools/ThirdParty/Blas/stable/1.0
         5ThirdParty/Lapack https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/stable/1.0
        46Data/Netlib   https://projects.coin-or.org/svn/Data/stable/1.0/Netlib
        57Data/Sample   https://projects.coin-or.org/svn/Data/stable/1.0/Sample
  • trunk/Cbc/configure.ac

    r405 r640  
    1 # Copyright (C) 2006 International Business Machines.
     1# Copyright (C) 2006, 2007 International Business Machines.
    22# All Rights Reserved.
    33# This file is distributed under the Common Public License.
     
    6666AC_COIN_HAS_PROJECT(Vol)
    6767
    68 # ToDo: find out when CBC_HAS_CLP should be defined!  For now, I
    69 # replaced all CBC_USE by COIN_HAS #ifdef's
    70 
    71 # Decide which one is the default solver
    72 AC_MSG_CHECKING(for CBC default solver)
    73 AC_ARG_WITH([cbc-default-solver],
    74             AC_HELP_STRING([--with-cbc-default-solver],
    75                            [specify default solver for Cbc in lower case letters (if not given, clp is assumed)]),
    76             [cbc_default_solver=$withval],
    77             [cbc_default_solver=clp])
    78 AC_MSG_RESULT($cbc_default_solver)
    79 
    80 case $cbc_default_solver in
    81   clp)
    82     AC_DEFINE([CBC_DEFAULT_SOLVER],"clp",
    83               [Define to the name of the default solver to be used in CBC in small letters])
    84     ;;
    85   dylp)
    86     AC_DEFINE([CBC_DEFAULT_SOLVER],"dylp")
    87     ;;
    88   *)
    89     AC_MSG_ERROR([Unknown solver $cbc_default_solver chosen as CBC's default solver])
    90     ;;
    91 esac
    92 
    93 # Steal some files from Clp - they are going to be deleted by a
    94 # distclean in src (see the Makefile.am there)
    95 if test x"$coin_has_clp" != xunavailable; then
    96   AC_MSG_NOTICE([Stealing CbcOrClpParam's files from Clp])
    97   AC_CONFIG_LINKS([src/CbcOrClpParam.cpp:../Clp/src/CbcOrClpParam.cpp
    98                    src/CbcOrClpParam.hpp:../Clp/src/CbcOrClpParam.hpp])
    99 fi
    100 
    10168#############################################################################
    10269#                            Third party solvers                            #
     
    10572# Check which third party solvers are available ToDo!
    10673AC_COIN_HAS_USER_LIBRARY([Cplex],[CPX],[cplex.h],[CPXgetstat])
    107 AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],[glp_lpx_simplex])
     74AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],
     75    [_glp_lpx_simplex glp_lpx_simplex])
    10876AC_COIN_HAS_USER_LIBRARY([FortMP],[FMP])  #ToDo! is Fortran?
    10977AC_COIN_HAS_USER_LIBRARY([Mosek],[MSK],[mosekdl.h],[MSK_openmosek])
     
    11886# Ampl Solver library
    11987AC_COIN_HAS_ASL
     88
     89#############################################################################
     90#                       CbcGeneric configuration                            #
     91#############################################################################
     92
     93# Are we building cbc-generic? Default is no (false).
     94
     95AC_ARG_WITH([cbc-generic],
     96  AS_HELP_STRING([--with-cbc-generic],
     97                 [specify whether to build cbc-generic (default: no)]),
     98  [case $withval in
     99    yes) cbc_with_cbc_generic=true ;;
     100      *) cbc_with_cbc_generic=false ;;
     101   esac],
     102  [cbc_with_cbc_generic=false])
     103if test x"$cbc_with_cbc_generic" = xyes ; then
     104  AC_MSG_NOTICE([building cbc-generic])
     105fi
     106AM_CONDITIONAL(CBC_BUILD_CBC_GENERIC,
     107               test x"$cbc_with_cbc_generic" = xtrue)
     108
     109# Set the default solver for cbc-generic. In theory, any OsiXXX should work.
     110# In practice, only the three listed below have had any testing.
     111
     112AC_MSG_CHECKING(for cbc-generic default solver)
     113AC_ARG_WITH([cbc-generic-solver],
     114            AC_HELP_STRING([--with-cbc-generic-solver],
     115                           [specify default solver for cbc-generic in lower
     116                            case letters (if not given, clp is assumed)]),
     117            [cbc_default_solver=$withval],
     118            [cbc_default_solver=clp])
     119AC_MSG_RESULT($cbc_default_solver)
     120
     121case $cbc_default_solver in
     122   clp)
     123    ;;
     124  dylp)
     125    ;;
     126  glpk)
     127    ;;
     128     *)
     129    AC_MSG_WARN([Unrecognised solver $cbc_default_solver chosen as cbc-generic default solver.])
     130    ;;
     131esac
     132AC_DEFINE_UNQUOTED([CBC_DEFAULT_SOLVER],"$cbc_default_solver",
     133  [Define to the name of the default solver to be used in cbc-generic in small letters])
     134
     135
     136#############################################################################
     137#                       Cbc parallel configuration                          #
     138#############################################################################
     139
     140# First we define a new option, --enable-cbc-parallel
     141
     142AC_ARG_ENABLE([cbc-parallel],
     143[AC_HELP_STRING([--enable-cbc-parallel],
     144                [enables compilation of the SMP version of Cbc])])
     145
     146if test "$enable_cbc_parallel" = yes; then
     147  # Define the preprocessor macro
     148  AC_DEFINE([CBC_THREAD],[1],[Define to 1 if the SMP version of Cbc should be compiled])
     149  AC_CHECK_LIB([rt],[clock_gettime],
     150               [ADDLIBS="-lrt $ADDLIBS"],
     151               [AC_MSG_ERROR([--enable-cbc-parallel selected, but -lrt unavailable])])
     152  AC_CHECK_LIB([pthread],[pthread_create],
     153               [ADDLIBS="-lpthread $ADDLIBS"],
     154               [AC_MSG_ERROR([--enable-cbc-parallel selected, but -lpthreads unavailable])])
     155fi
    120156
    121157##############################################################################
Note: See TracChangeset for help on using the changeset viewer.