Changeset 1464 for trunk/Cbc/configure.ac
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:externals
-
old new 1 BuildTools https://projects.coin-or.org/svn/BuildTools/stable/0.5 2 ThirdParty/ASL https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/stable/1.0 3 ThirdParty/Blas https://projects.coin-or.org/svn/BuildTools/ThirdParty/Blas/stable/1.0 4 ThirdParty/Lapack https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/stable/1.0 5 ThirdParty/Glpk https://projects.coin-or.org/svn/BuildTools/ThirdParty/Glpk/stable/1.5 6 Data/Sample https://projects.coin-or.org/svn/Data/stable/1.0/Sample 7 CoinUtils https://projects.coin-or.org/svn/CoinUtils/stable/2.6/CoinUtils 8 Cgl https://projects.coin-or.org/svn/Cgl/stable/0.55/Cgl 9 Clp https://projects.coin-or.org/svn/Clp/stable/1.12/Clp 10 Osi https://projects.coin-or.org/svn/Osi/stable/0.103/Osi 11 Vol https://projects.coin-or.org/svn/Vol/stable/1.1/Vol 1 BuildTools https://projects.coin-or.org/svn/BuildTools/trunk 2 ThirdParty/ASL https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/trunk 3 ThirdParty/Blas https://projects.coin-or.org/svn/BuildTools/ThirdParty/Blas/trunk 4 ThirdParty/Lapack https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/trunk 5 ThirdParty/Glpk https://projects.coin-or.org/svn/BuildTools/ThirdParty/Glpk/trunk 6 Data/Sample https://projects.coin-or.org/svn/Data/trunk/Sample 7 #Data/miplib3 https://projects.coin-or.org/svn/Data/trunk/miplib3 8 CoinUtils https://projects.coin-or.org/svn/CoinUtils/trunk/CoinUtils 9 Cgl https://projects.coin-or.org/svn/Cgl/trunk/Cgl 10 Clp https://projects.coin-or.org/svn/Clp/trunk/Clp 11 Osi https://projects.coin-or.org/svn/Osi/trunk/Osi 12 #Vol https://projects.coin-or.org/svn/Vol/trunk/Vol
-
- Property svn:mergeinfo changed
/branches/split (added) merged: 1437-1439,1444-1448,1463
- Property svn:externals
-
trunk/Cbc
- Property svn:mergeinfo changed
/branches/split/Cbc (added) merged: 1437-1439,1444-1448,1463
- Property svn:mergeinfo changed
-
trunk/Cbc/configure.ac
r1461 r1464 13 13 AC_PREREQ(2.59) 14 14 15 AC_INIT([Cbc],[trunk],[c oin-cbc@list.coin-or.org])15 AC_INIT([Cbc],[trunk],[cbc@lists.coin-or.org]) 16 16 17 17 AC_COPYRIGHT([ … … 42 42 # externals. The following macro ensures that those externals are 43 43 # retrieved by svn if they are not there yet. 44 AC_COIN_PROJECTDIR_INIT 44 AC_COIN_PROJECTDIR_INIT(Cbc) 45 45 46 46 # Check if user wants to produce debugging code … … 54 54 55 55 ############################################################################# 56 # COIN components # 57 ############################################################################# 58 59 AC_COIN_HAS_PROJECT(Cbc) 60 AC_COIN_HAS_PROJECT(Cgl) 61 AC_COIN_HAS_PROJECT(Clp) 62 AC_COIN_HAS_PROJECT(CoinUtils) 63 AC_COIN_HAS_PROJECT(DyLP) 64 AC_COIN_HAS_PROJECT(Osi) 65 AC_COIN_HAS_PROJECT(Vol) 66 AC_COIN_HAS_PROJECT(SYMPHONY) 67 AC_COIN_HAS_PROJECT(Cpx) 56 # COIN-OR components # 57 ############################################################################# 58 59 AC_COIN_HAS_MODULE(CoinDepend, [coinutils = trunk osi cgl]) 60 if test $coin_has_coindepend != yes ; then 61 #if we have to use the fallback routines, then obviously it will not find CoinUtils dependencies 62 #thus, we check whether ThirdParty/Blas, ThirdParty/Lapack, and ThirdParty/Glpk have been setup and 63 #assume that if present then they are dependencies of CoinUtils 64 AC_COIN_HAS_MODULE_FALLBACK(Blas, [coinblas], [../ThirdParty/Blas], [required=0 dodefine=0 doconditional=0]) 65 AC_COIN_HAS_MODULE_FALLBACK(Lapack, [coinlapack], [../ThirdParty/Lapack], [required=0 dodefine=0 doconditional=0]) 66 AC_COIN_HAS_MODULE_FALLBACK(Glpk, [coinglpk], [../ThirdParty/Glpk], [required=0 dodefine=0 doconditional=0]) 67 AC_COIN_HAS_MODULE_FALLBACK(CoinUtils, [coinutils], [../CoinUtils], [dodefine=0 doconditional=0]) 68 AC_COIN_HAS_MODULE_FALLBACK(Osi, [osi], [../Osi], [dodefine=0 doconditional=0]) 69 AC_COIN_HAS_MODULE_FALLBACK(Cgl, [cgl], [../Cgl], [dodefine=0 doconditional=0]) 70 COINDEPEND_LIBS="$COINUTILS_LIBS $BLAS_LIBS $LAPACK_LIBS $GLPK_LIBS $OSI_LIBS $CGL_LIBS" 71 COINDEPEND_CFLAGS="$COINUTILS_CFLAGS $GLPK_CFLAGS $OSI_CFLAGS $CGL_CFLAGS" 72 if test "${coin_has_coinutils}${coin_has_osi}${coin_has_cgl}" = yesyesyes ; then 73 coin_has_coindepend=yes 74 AC_DEFINE(m4_toupper(COIN_HAS_COINDEPEND),[1],[Define to 1 if the COINDEPEND module is available]) 75 AM_CONDITIONAL(COIN_HAS_COINDEPEND, [test $coin_has_coindepend = yes]) 76 fi 77 fi 78 if test $coin_has_coindepend != yes ; then 79 AC_MSG_ERROR([Required package CoinUtils, Osi, or Cgl not available.]) 80 fi 81 82 AC_COIN_HAS_MODULE(Clp, [osi-clp]) 83 if test $coin_has_clp != yes ; then 84 # OsiClp depends on Clp 85 # so if Clp is there, then we assume that also OsiClp will be there and add the corresponding flags to the Clp flags 86 AC_COIN_HAS_MODULE_FALLBACK(Clp, [clp], [../Clp]) 87 if test $coin_has_clp = yes ; then 88 AC_COIN_HAS_MODULE_FALLBACK(OsiClp, [osi-clp], [../Clp], [dodefine=0 doconditional=0]) 89 CLP_CFLAGS="$CLP_CFLAGS $OSICLP_CFLAGS" 90 CLP_LIBS="$CLP_LIBS $OSICLP_LIBS" 91 fi 92 fi 93 if test $coin_has_clp != yes ; then 94 AC_MSG_ERROR("Required package Clp unavailable.") 95 fi 96 97 # we skip fallbacks for the following two 98 AC_COIN_HAS_MODULE(DyLP, [osi-dylp]) 99 AC_COIN_HAS_MODULE(Vol, [osi-vol]) 100 AC_COIN_HAS_MODULE(OsiTests, [osi-unittests], [required=0], [../Osi]) 101 102 AC_COIN_HAS_MODULE(Sample, [coindatasample], [required=0], [../Data/Sample]) 103 AC_COIN_HAS_MODULE(Netlib, [coindatanetlib], [required=0], [../Data/Netlib]) 104 AC_COIN_HAS_MODULE(Miplib3, [coindatamiplib3], [required=0], [../Data/Miplib3]) 68 105 69 106 ############################################################################# … … 71 108 ############################################################################# 72 109 73 # Check which third party solvers are available ToDo! 74 AC_COIN_HAS_USER_LIBRARY([Cplex],[CPX],[cplex.h],[CPXgetstat]) 75 AC_COIN_HAS_USER_LIBRARY([FortMP],[FMP]) #ToDo! is Fortran? 76 AC_COIN_HAS_USER_LIBRARY([Mosek],[MSK],[mosek.h],[MSK_openmosek]) 77 AC_COIN_HAS_USER_LIBRARY([Osl],[OSL],[ekk_c_api.h],[ekk_simplex]) 78 AC_COIN_HAS_USER_LIBRARY([Soplex],[SPX],[spxsolver.h]) # ToDo 79 AC_COIN_HAS_USER_LIBRARY([Xpress],[XPR],[xprs.h],[XPRSsetintcontrol]) 80 81 AC_COIN_HAS_GLPK(Glpk) 110 # Check which third party solvers are available 111 AC_COIN_HAS_MODULE(Cpx, [osi-cplex]) 112 AC_COIN_HAS_MODULE(Glpk, [osi-glpk]) 113 AC_COIN_HAS_MODULE(Grb, [osi-gurobi]) 114 AC_COIN_HAS_MODULE(Msk, [osi-mosek]) 115 #AC_COIN_HAS_MODULE(Spx, [osi-soplex]) 116 AC_COIN_HAS_MODULE(Xpr, [osi-xpress]) 82 117 83 118 ############################################################################# … … 86 121 87 122 # Ampl Solver library 88 AC_COIN_HAS_ ASL123 AC_COIN_HAS_MODULE(ASL, [coinasl], [required=0], [../ThirdParty/ASL]) 89 124 90 125 ############################################################################# … … 159 194 160 195 ############################################################################## 196 # OsiCbc configuration # 197 ############################################################################## 198 199 # Handles configuration of the underlying default solver in OsiCbc. The issue 200 # is that OsiCbc defines a default solver, used when the client does not 201 # specify a solver in the constructor. The default solver must, therefore, 202 # be present in the build. This macro checks that this is true, and sets the 203 # compile-time symbols OSICBC_DFLT_SOLVER, OSICBC_CLP_DFLT_SOLVER, and 204 # OSICBC_DFLT_SOLVER_HPP that control the build. The parameter default_solver 205 # should normally be clp, unless you're working on some other solver. 206 207 # Ideally, this macro would not require enumeration of solvers, but the 208 # effort required to avoid it is just not justified at present. One enumeration 209 # is hidden in AC_OSI_CANONICAL. The other is visible, the AM_CONDITIONAL 210 # list at the end. 211 212 # In an ideal world this macro would do absolutely nothing if Cbc is not 213 # present, but autotools is not an ideal world and we have to satisfy its 214 # requirements. In particular, the AM_CONDITIONAL macros need to execute or 215 # automake will complain. Really the only thing we need to suppress is the 216 # check that the default solver exists. All the rest is irrelevant when Cbc 217 # isn't present (hence OsiCbc will be configured but not actually compiled). 218 219 # Process the with-osicbc-default-solver option. 220 221 AC_ARG_WITH([osicbc-default-solver], 222 AS_HELP_STRING([--with-osicbc-default-solver], 223 [specify underlying solver for OsiCbc (default clp)]), 224 [osicbc_with_solver=$withval], 225 [osicbc_with_solver=clp]) 226 227 case "${osicbc_with_solver}" in 228 @<:@Cc@:>@@<:@Ll@:>@@<:@Pp@:>@*) 229 osi_lc_solver=clp ; 230 osi_mc_solver=Clp ; 231 osi_uc_solver=CLP ; 232 osi_exists_solver=${coin_has_clp-"unavailable"} 233 ;; 234 @<:@Dd@:>@@<:@Yy@:>@@<:@Ll@:>@@<:@Pp@:>@*) 235 osi_lc_solver=dylp ; 236 osi_mc_solver=Dylp 237 osi_uc_solver=DYLP 238 osi_exists_solver=${coin_has_dylp-"unavailable"} 239 ;; 240 @<:@Cc@:>@@<:@Pp@:>@@<:@Xx@:>@*) 241 osi_lc_solver=cpx ; 242 osi_mc_solver=Cpx 243 osi_uc_solver=CPX 244 osi_exists_solver=${coin_has_cpx-"unavailable"} 245 ;; 246 @<:@Gg@:>@@<:@Ll@:>@@<:@Pp@:>@@<:@Kk@:>@*) 247 osi_lc_solver=glpk ; 248 osi_mc_solver=Glpk 249 osi_uc_solver=GLPK 250 osi_exists_solver=${coin_has_glpk-"unavailable"} 251 ;; 252 @<:@Gg@:>@@<:@Rr@:>@@<:@Bb@:>@*) 253 osi_lc_solver=grb ; 254 osi_mc_solver=Grb ; 255 osi_uc_solver=GRB ; 256 osi_exists_solver=${coin_has_grb-"unavailable"} 257 ;; 258 @<:@Mm@:>@@<:@Ss@:>@@<:@Kk@:>@*) 259 osi_lc_solver=msk ; 260 osi_mc_solver=Msk 261 osi_uc_solver=MSK 262 osi_exists_solver=${coin_has_msk-"unavailable"} 263 ;; 264 @<:@Ss@:>@@<:@Yy@:>@@<:@Mm@:>@*) 265 osi_lc_solver=sym ; 266 osi_mc_solver=Sym 267 osi_uc_solver=SYM 268 osi_exists_solver=${coin_has_sym-"unavailable"} 269 ;; 270 @<:@Vv@:>@@<:@Oo@:>@@<:@Ll@:>@*) 271 osi_lc_solver=vol ; 272 osi_mc_solver=Vol 273 osi_uc_solver=VOL 274 osi_exists_solver=${coin_has_vol-"unavailable"} 275 ;; 276 @<:@Xx@:>@@<:@Pp@:>@@<:@Rr@:>@*) 277 osi_lc_solver=xpr ; 278 osi_mc_solver=Xpr 279 osi_uc_solver=XPR 280 osi_exists_solver=${coin_has_xpr-"unavailable"} 281 ;; 282 *) 283 osi_lc_solver=clp ; 284 osi_mc_solver=Clp ; 285 osi_uc_solver=CLP ; 286 osi_exists_solver=${coin_has_clp-"unavailable"} 287 AC_MSG_WARN([Unrecognised solver $1; defaulting to $osi_lc_solver.]) 288 ;; 289 esac 290 291 # Check that the requested solver is available. 292 if test $osi_exists_solver = no; then 293 AC_MSG_ERROR([selected default solver $osicbc_with_solver is unavailable. 294 Please select an available solver using the --with-osicbc-default-solver option.]) 295 fi 296 297 # State the result. 298 AC_MSG_NOTICE([OsiCbc default solver is $osi_lc_solver]) 299 300 # And set the configuration variables. 301 AC_DEFINE_UNQUOTED([OSICBC_DFLT_SOLVER], 302 [Osi${osi_mc_solver}SolverInterface], 303 [define to the name of the default solver interface class, e.g., OsiClpSolverInterface]) 304 AC_DEFINE_UNQUOTED([OSICBC_DFLT_SOLVER_HPP], 305 ["Osi${osi_mc_solver}SolverInterface.hpp"], 306 [define to the name of the .hpp file for the default solver interface class, e.g., "OsiClpSolverInterface.hpp" (include quotes)]) 307 if test $osi_mc_solver = "Clp"; then 308 AC_DEFINE([OSICBC_DFLT_SOLVER_CLP],[1],[define this symbol if clp is the default solver]) 309 fi 310 311 # Last but not least, we need automake conditionals. 312 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_CLP],[test $osi_mc_solver = Clp]) 313 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_CPX],[test $osi_mc_solver = Cpx]) 314 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_DYLP],[test $osi_mc_solver = Dylp]) 315 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_GLPK],[test $osi_mc_solver = Glpk]) 316 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_GRB],[test $osi_mc_solver = Grb]) 317 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_MSK],[test $osi_mc_solver = Msk]) 318 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_SYM],[test $osi_mc_solver = Sym]) 319 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_VOL],[test $osi_mc_solver = Vol]) 320 AM_CONDITIONAL([OSICBC_DFLT_SOLVER_XPR],[test $osi_mc_solver = Xpr]) 321 322 ############################################################################## 161 323 # VPATH links for example input files # 162 324 ############################################################################## … … 178 340 examples/Makefile 179 341 src/Makefile 342 src/OsiCbc/Makefile 180 343 test/Makefile 181 cbc_addlibs.txt]) 344 cbc.pc cbc-uninstalled.pc 345 osi-cbc.pc osi-cbc-uninstalled.pc]) 182 346 183 347 # Here put the location and name of the configuration header file
Note: See TracChangeset
for help on using the changeset viewer.