source: stable/BSPsplit/Cbc/configure.ac @ 1187

Last change on this file since 1187 was 1187, checked in by andreasw, 10 years ago

final instdir commits for tonight

  • Property svn:keywords set to Author Date Id Revision
File size: 7.4 KB
Line 
1# Copyright (C) 2006, 2007 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Common Public License.
4
5## $Id: configure.ac 1187 2009-07-08 03:03:13Z andreasw $
6
7# Author:  Andreas Waechter            IBM    2006-04-13
8
9#############################################################################
10#                       Names and other basic things                        #
11#############################################################################
12
13AC_PREREQ(2.59)
14
15AC_INIT([Cbc],[2.3stable],[coin-cbc@list.coin-or.org])
16
17AC_COPYRIGHT([
18Copyright 2006 International Business Machines and others.
19All Rights Reserved.
20This file is part of the open source package Coin which is distributed
21under 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
25AC_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.
31AC_PREFIX_DEFAULT([`pwd`])
32
33#############################################################################
34#                         Standard build tool stuff                         #
35#############################################################################
36
37# Get the system type
38AC_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.
44AC_COIN_PROJECTDIR_INIT
45
46# Check if user wants to produce debugging code
47AC_COIN_DEBUG_COMPILE(Cbc)
48
49# Get the name of the C++ compiler and appropriate compiler options
50AC_COIN_PROG_CXX
51
52# Initialize automake and libtool
53AC_COIN_INIT_AUTO_TOOLS
54
55#############################################################################
56#                              COIN components                              #
57#############################################################################
58
59AC_COIN_HAS_PROJECT(Cbc, CbcModel.hpp, libCbc)
60AC_COIN_HAS_PROJECT(Cgl, CglCutGenerator.hpp, libCgl)
61AC_COIN_HAS_PROJECT(Clp, ClpNode.hpp, libClp)
62AC_COIN_HAS_PROJECT(CoinUtils, CoinTime.hpp, libCoinUtils)
63AC_COIN_HAS_PROJECT(DyLP, dylp.h, libDylp)
64AC_COIN_HAS_PROJECT(Osi, OsiSolverInterface.hpp, libOsi)
65AC_COIN_HAS_PROJECT(Vol, VolVolume.hpp, libVol)
66AC_COIN_HAS_PROJECT(SYMPHONY, symphony.h, libSym)
67
68# AC_COIN_HAS_PROJECT(Cpx)
69# What is this in the line above?
70# This should already be taken care of with
71# AC_COIN_HAS_USER_LIBRARY([Cplex],[CPX],[cplex.h],[CPXgetstat])
72# below
73
74#############################################################################
75#                            Third party solvers                            #
76#############################################################################
77
78# Check which third party solvers are available ToDo!
79AC_COIN_HAS_USER_LIBRARY([Cplex],[CPX],[cplex.h],[CPXgetstat])
80AC_COIN_HAS_USER_LIBRARY([FortMP],[FMP])  #ToDo! is Fortran?
81AC_COIN_HAS_USER_LIBRARY([Mosek],[MSK],[mosek.h],[MSK_openmosek])
82AC_COIN_HAS_USER_LIBRARY([Osl],[OSL],[ekk_c_api.h],[ekk_simplex])
83AC_COIN_HAS_USER_LIBRARY([Soplex],[SPX],[spxsolver.h]) # ToDo
84AC_COIN_HAS_USER_LIBRARY([Xpress],[XPR],[xprs.h],[XPRSsetintcontrol])
85
86AC_COIN_HAS_GLPK(Glpk)
87
88#############################################################################
89#                       Other third party software                          #
90#############################################################################
91
92# Ampl Solver library
93AC_COIN_HAS_ASL
94
95#############################################################################
96#                       CbcGeneric configuration                            #
97#############################################################################
98
99# Are we building cbc-generic? Default is no (false).
100
101AC_ARG_WITH([cbc-generic],
102  AS_HELP_STRING([--with-cbc-generic],
103                 [specify whether to build cbc-generic (default: no)]),
104  [case $withval in
105    yes) cbc_with_cbc_generic=true ;;
106      *) cbc_with_cbc_generic=false ;;
107   esac],
108  [cbc_with_cbc_generic=false])
109if test x"$cbc_with_cbc_generic" = xyes ; then
110  AC_MSG_NOTICE([building cbc-generic])
111fi
112AM_CONDITIONAL(CBC_BUILD_CBC_GENERIC,
113               test x"$cbc_with_cbc_generic" = xtrue)
114
115# Set the default solver for cbc-generic. In theory, any OsiXXX should work.
116# In practice, only the three listed below have had any testing.
117
118AC_MSG_CHECKING(for cbc-generic default solver)
119AC_ARG_WITH([cbc-generic-solver],
120            AC_HELP_STRING([--with-cbc-generic-solver],
121                           [specify default solver for cbc-generic in lower
122                            case letters (if not given, clp is assumed)]),
123            [cbc_default_solver=$withval],
124            [cbc_default_solver=clp])
125AC_MSG_RESULT($cbc_default_solver)
126
127case $cbc_default_solver in
128   clp)
129    ;;
130  dylp)
131    ;;
132  glpk)
133    ;;
134     *)
135    AC_MSG_WARN([Unrecognised solver $cbc_default_solver chosen as cbc-generic default solver.])
136    ;;
137esac
138AC_DEFINE_UNQUOTED([CBC_DEFAULT_SOLVER],"$cbc_default_solver",
139  [Define to the name of the default solver to be used in cbc-generic in small letters])
140AC_DEFINE_UNQUOTED(CBCVERSION, "$PACKAGE_VERSION", "Version of Cbc")
141
142
143#############################################################################
144#                       Cbc parallel configuration                          #
145#############################################################################
146
147# First we define a new option, --enable-cbc-parallel
148
149AC_ARG_ENABLE([cbc-parallel],
150[AC_HELP_STRING([--enable-cbc-parallel],
151                [enables compilation of the SMP version of Cbc])])
152
153if test "$enable_cbc_parallel" = yes; then
154  # Define the preprocessor macro
155  AC_DEFINE([CBC_THREAD],[1],[Define to 1 if the SMP version of Cbc should be compiled])
156  AC_CHECK_LIB([rt],[clock_gettime],
157               [ADDLIBS="-lrt $ADDLIBS"
158                AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Define if clock_gettime and rt library is available])],
159               [AC_MSG_WARN([--enable-cbc-parallel selected, but -lrt unavailable; using gettimeofday instead of clock_gettime])])
160  AC_CHECK_LIB([pthread],[pthread_create],
161               [ADDLIBS="-lpthread $ADDLIBS"],
162               [AC_MSG_ERROR([--enable-cbc-parallel selected, but -lpthreads unavailable])])
163fi
164
165##############################################################################
166#                   VPATH links for example input files                      #
167##############################################################################
168
169# In case this is a VPATH configuration we need to make sure that the
170# input files for the examples are available in the VPATH directory.
171
172AC_COIN_VPATH_LINK(examples/sudoku_sample.csv)
173AC_COIN_VPATH_LINK(examples/quad.mps)
174AC_COIN_VPATH_LINK(examples/quad2.mps)
175
176##############################################################################
177#                   Finishing up by writing all the output                   #
178##############################################################################
179
180# Here list all the files that configure should create (except for the
181# configuration header file)
182AC_CONFIG_FILES([Makefile
183                 examples/Makefile
184                 src/Makefile
185                 test/Makefile
186                 cbc_addlibs.txt])
187
188# Here put the location and name of the configuration header file
189AC_CONFIG_HEADER([inc/config_cbc.h])
190
191# Finally, we let configure write all the output...
192AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.