1 | # Copyright (C) 2006 International Business Machines. |
---|
2 | # All Rights Reserved. |
---|
3 | # This file is distributed under the Common Public License. |
---|
4 | |
---|
5 | ## $Id: configure.ac 405 2006-07-10 18:52:52Z forrest $ |
---|
6 | |
---|
7 | # Author: Andreas Waechter IBM 2006-04-13 |
---|
8 | |
---|
9 | ############################################################################# |
---|
10 | # Names and other basic things # |
---|
11 | ############################################################################# |
---|
12 | |
---|
13 | AC_PREREQ(2.59) |
---|
14 | |
---|
15 | AC_INIT([Cbc],[0.1],[coin-cbc@list.coin-or.org]) |
---|
16 | |
---|
17 | AC_COPYRIGHT([ |
---|
18 | Copyright 2006 International Business Machines and others. |
---|
19 | All Rights Reserved. |
---|
20 | This file is part of the open source package Coin which is distributed |
---|
21 | under the Common Public License.]) |
---|
22 | |
---|
23 | # List one file in the package so that the configure script can test |
---|
24 | # whether the package is actually there |
---|
25 | AC_CONFIG_SRCDIR(src/CbcTree.hpp) |
---|
26 | |
---|
27 | # Where should everything be installed by default? Here, we want it |
---|
28 | # to be installed directly in 'bin', 'lib', 'include' subdirectories |
---|
29 | # of the directory where configure is run. The default would be |
---|
30 | # /usr/local. |
---|
31 | AC_PREFIX_DEFAULT([`pwd`]) |
---|
32 | |
---|
33 | ############################################################################# |
---|
34 | # Standard build tool stuff # |
---|
35 | ############################################################################# |
---|
36 | |
---|
37 | # Get the system type |
---|
38 | AC_CANONICAL_BUILD |
---|
39 | |
---|
40 | # If this project depends on external projects, the Externals file in |
---|
41 | # the source root directory contains definition of where to find those |
---|
42 | # externals. The following macro ensures that those externals are |
---|
43 | # retrieved by svn if they are not there yet. |
---|
44 | AC_COIN_PROJECTDIR_INIT |
---|
45 | |
---|
46 | # Check if user wants to produce debugging code |
---|
47 | AC_COIN_DEBUG_COMPILE(Cbc) |
---|
48 | |
---|
49 | # Get the name of the C++ compiler and appropriate compiler options |
---|
50 | AC_COIN_PROG_CXX |
---|
51 | |
---|
52 | # Initialize automake and libtool |
---|
53 | AC_COIN_INIT_AUTO_TOOLS |
---|
54 | |
---|
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(Sym) |
---|
66 | AC_COIN_HAS_PROJECT(Vol) |
---|
67 | |
---|
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 | |
---|
101 | ############################################################################# |
---|
102 | # Third party solvers # |
---|
103 | ############################################################################# |
---|
104 | |
---|
105 | # Check which third party solvers are available ToDo! |
---|
106 | AC_COIN_HAS_USER_LIBRARY([Cplex],[CPX],[cplex.h],[CPXgetstat]) |
---|
107 | AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],[glp_lpx_simplex]) |
---|
108 | AC_COIN_HAS_USER_LIBRARY([FortMP],[FMP]) #ToDo! is Fortran? |
---|
109 | AC_COIN_HAS_USER_LIBRARY([Mosek],[MSK],[mosekdl.h],[MSK_openmosek]) |
---|
110 | AC_COIN_HAS_USER_LIBRARY([Osl],[OSL],[ekk_c_api.h],[ekk_simplex]) |
---|
111 | AC_COIN_HAS_USER_LIBRARY([Soplex],[SPX],[spxsolver.h]) # ToDo |
---|
112 | AC_COIN_HAS_USER_LIBRARY([Xpress],[XPR],[xprs.h],[XPRSsetintcontrol]) |
---|
113 | |
---|
114 | ############################################################################# |
---|
115 | # Other third party software # |
---|
116 | ############################################################################# |
---|
117 | |
---|
118 | # Ampl Solver library |
---|
119 | AC_COIN_HAS_ASL |
---|
120 | |
---|
121 | ############################################################################## |
---|
122 | # VPATH links for example input files # |
---|
123 | ############################################################################## |
---|
124 | |
---|
125 | # In case this is a VPATH configuration we need to make sure that the |
---|
126 | # input files for the examples are available in the VPATH directory. |
---|
127 | |
---|
128 | AC_COIN_VPATH_LINK(examples/sudoku_sample.csv) |
---|
129 | AC_COIN_VPATH_LINK(examples/quad.mps) |
---|
130 | AC_COIN_VPATH_LINK(examples/quad2.mps) |
---|
131 | |
---|
132 | ############################################################################## |
---|
133 | # Finishing up by writing all the output # |
---|
134 | ############################################################################## |
---|
135 | |
---|
136 | # Here list all the files that configure should create (except for the |
---|
137 | # configuration header file) |
---|
138 | AC_CONFIG_FILES([Makefile |
---|
139 | examples/Makefile |
---|
140 | src/Makefile |
---|
141 | test/Makefile |
---|
142 | cbc_addlibs.txt]) |
---|
143 | |
---|
144 | # Here put the location and name of the configuration header file |
---|
145 | AC_CONFIG_HEADER([inc/config_cbc.h]) |
---|
146 | |
---|
147 | # Finally, we let configure write all the output... |
---|
148 | AC_COIN_FINALIZE |
---|