Ignore:
Timestamp:
Sep 13, 2010 3:41:21 AM (10 years ago)
Author:
stefan
Message:

change from COIN_HAS_MODULE to COIN_HAS_PACKAGE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/configure.ac

    r1490 r1501  
    5757#############################################################################
    5858
    59 AC_COIN_HAS_MODULE(CoinDepend, [coinutils = trunk osi cgl])
     59AC_COIN_HAS_PACKAGE(CoinDepend, [cgl osi coinutils = trunk], [CbcLib CbcGeneric])
    6060if test $coin_has_coindepend != yes ; then
    6161  AC_MSG_ERROR([Required package CoinUtils, Osi, or Cgl not available.])
     
    6464# Clp and OsiClp are inseparable here.
    6565
    66 AC_COIN_HAS_MODULE(Clp,[osi-clp])
     66AC_COIN_HAS_PACKAGE(Clp, [osi-clp], [CbcLib CbcGeneric])
    6767if test $coin_has_clp != yes ; then
    6868  AC_MSG_ERROR("Required package Clp unavailable.")
    6969fi
    7070
    71 # The rest are not so critical, so we don't put in quite so much effort.
    72 
    73 AC_COIN_HAS_MODULE(DyLP,[osi-dylp])
    74 AC_COIN_HAS_MODULE(Vol, [osi-vol])
    75 AC_COIN_HAS_MODULE(OsiTests, [osi-unittests], [required=0])
    76 
    77 AC_COIN_HAS_MODULE(Sample,  [coindatasample],  [required=0])
    78 AC_COIN_HAS_MODULE(Netlib,  [coindatanetlib],  [required=0])
    79 AC_COIN_HAS_MODULE(Miplib3, [coindatamiplib3], [required=0])
     71# The rest are not required for linking against Cbc
     72
     73AC_COIN_HAS_PACKAGE(OsiTests, [osi-unittests])
     74AC_COIN_HAS_PACKAGE(Sample,   [coindatasample])
     75AC_COIN_HAS_PACKAGE(Netlib,   [coindatanetlib])
     76AC_COIN_HAS_PACKAGE(Miplib3,  [coindatamiplib3])
    8077
    8178#############################################################################
     
    8380#############################################################################
    8481
    85 # Check which other LP solvers are available
    86 AC_COIN_HAS_MODULE(DyLP, [osi-dylp])
    87 AC_COIN_HAS_MODULE(Vol,  [osi-vol])
    88 AC_COIN_HAS_MODULE(Cpx,  [osi-cplex])
    89 AC_COIN_HAS_MODULE(Glpk, [osi-glpk])
    90 AC_COIN_HAS_MODULE(Grb,  [osi-gurobi])
    91 AC_COIN_HAS_MODULE(Msk,  [osi-mosek])
    92 AC_COIN_HAS_MODULE(Spx,  [osi-soplex])
    93 AC_COIN_HAS_MODULE(Xpr,  [osi-xpress])
     82# Check which other LP solvers are available, some of them become a dependency of CbcGeneric
     83AC_COIN_HAS_PACKAGE(DyLP, [osi-dylp],   [CbcGeneric])
     84AC_COIN_HAS_PACKAGE(Vol,  [osi-vol])
     85AC_COIN_HAS_PACKAGE(Cpx,  [osi-cplex],  [CbcGeneric])
     86AC_COIN_HAS_PACKAGE(Glpk, [osi-glpk],   [CbcGeneric])
     87AC_COIN_HAS_PACKAGE(Grb,  [osi-gurobi])
     88AC_COIN_HAS_PACKAGE(Msk,  [osi-mosek],  [CbcGeneric])
     89AC_COIN_HAS_PACKAGE(Spx,  [osi-soplex], [CbcGeneric])
     90AC_COIN_HAS_PACKAGE(Xpr,  [osi-xpress])
    9491
    9592#############################################################################
     
    9895
    9996# Ampl Solver library
    100 AC_COIN_HAS_MODULE(ASL, [coinasl], [required=0])
     97AC_COIN_HAS_PACKAGE(ASL, [coinasl])
    10198
    10299#############################################################################
     
    132129AC_MSG_RESULT($cbc_default_solver)
    133130
     131# FIXME what about cplex and mosek here?
    134132case $cbc_default_solver in
    135133    clp)
     
    163161  AC_DEFINE([CBC_THREAD],[1],[Define to 1 if the SMP version of Cbc should be compiled])
    164162  AC_CHECK_LIB([rt],[clock_gettime],
    165                [ADDLIBS="-lrt $ADDLIBS"
    166                 AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define if clock_gettime and rt library is available])],
     163               [CBCLIB_LIBS="-lrt $CBCLIB_LIBS"
     164                CBCLIB_PCLIBS="-lrt $CBCLIB_PCLIBS"
     165                AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define if clock_gettime and rt library is available])
     166               ],
    167167               [AC_MSG_WARN([--enable-cbc-parallel selected, but -lrt unavailable; using gettimeofday instead of clock_gettime])])
    168168  AC_CHECK_LIB([pthread],[pthread_create],
    169                [ADDLIBS="-lpthread $ADDLIBS"],
     169               [CBCLIB_LIBS="-lpthread $CBCLIB_LIBS"
     170                CBCLIB_PCLIBS="-lpthread $CBCLIB_PCLIBS"
     171               ],
    170172               [AC_MSG_ERROR([--enable-cbc-parallel selected, but -lpthreads unavailable])])
    171173fi
Note: See TracChangeset for help on using the changeset viewer.