source: branches/devel/Cbc/configure.ac @ 595

Last change on this file since 595 was 592, checked in by lou, 13 years ago

Configuration and makefile changes for cbc-generic.

  • Property svn:keywords set to Author Date Id Revision
File size: 5.9 KB
Line 
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 592 2007-03-30 21:16:44Z forrest $
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],[0.1],[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)
60AC_COIN_HAS_PROJECT(Cgl)
61AC_COIN_HAS_PROJECT(Clp)
62AC_COIN_HAS_PROJECT(CoinUtils)
63AC_COIN_HAS_PROJECT(DyLP)
64AC_COIN_HAS_PROJECT(Osi)
65AC_COIN_HAS_PROJECT(Sym)
66AC_COIN_HAS_PROJECT(Vol)
67
68#############################################################################
69#                            Third party solvers                            #
70#############################################################################
71
72# Check which third party solvers are available ToDo!
73AC_COIN_HAS_USER_LIBRARY([Cplex],[CPX],[cplex.h],[CPXgetstat])
74AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],[glp_lpx_simplex])
75AC_COIN_HAS_USER_LIBRARY([FortMP],[FMP])  #ToDo! is Fortran?
76AC_COIN_HAS_USER_LIBRARY([Mosek],[MSK],[mosekdl.h],[MSK_openmosek])
77AC_COIN_HAS_USER_LIBRARY([Osl],[OSL],[ekk_c_api.h],[ekk_simplex])
78AC_COIN_HAS_USER_LIBRARY([Soplex],[SPX],[spxsolver.h]) # ToDo
79AC_COIN_HAS_USER_LIBRARY([Xpress],[XPR],[xprs.h],[XPRSsetintcontrol])
80
81#############################################################################
82#                       Other third party software                          #
83#############################################################################
84
85# Ampl Solver library
86AC_COIN_HAS_ASL
87
88#############################################################################
89#                       CbcGeneric configuration                            #
90#############################################################################
91
92# Are we building cbc-generic? Default is no (false).
93
94AC_ARG_WITH([cbc-generic],
95  AS_HELP_STRING([--with-cbc-generic],
96                 [specify whether to build cbc-generic (default: no)]),
97  [case $withval in
98    yes) cbc_with_cbc_generic=true ;;
99      *) cbc_with_cbc_generic=false ;;
100   esac],
101  [cbc_with_cbc_generic=false])
102if test x"$cbc_with_cbc_generic" = xyes ; then
103  AC_MSG_NOTICE([building cbc-generic])
104fi
105AM_CONDITIONAL(CBC_BUILD_CBC_GENERIC,
106               test x"$cbc_with_cbc_generic" = xtrue)
107
108# Set the default solver for cbc-generic. In theory, any OsiXXX should work.
109# In practice, only the three listed below have had any testing.
110
111AC_MSG_CHECKING(for cbc-generic default solver)
112AC_ARG_WITH([cbc-generic-solver],
113            AC_HELP_STRING([--with-cbc-generic-solver],
114                           [specify default solver for cbc-generic in lower
115                            case letters (if not given, clp is assumed)]),
116            [cbc_default_solver=$withval],
117            [cbc_default_solver=clp])
118AC_MSG_RESULT($cbc_default_solver)
119
120case $cbc_default_solver in
121   clp)
122    ;;
123  dylp)
124    ;;
125  glpk)
126    ;;
127     *)
128    AC_MSG_WARN([Unrecognised solver $cbc_default_solver chosen as cbc-generic default solver.])
129    ;;
130esac
131AC_DEFINE_UNQUOTED([CBC_DEFAULT_SOLVER],"$cbc_default_solver",
132  [Define to the name of the default solver to be used in cbc-generic in small letters])
133
134#
135
136##############################################################################
137#                   VPATH links for example input files                      #
138##############################################################################
139
140# In case this is a VPATH configuration we need to make sure that the
141# input files for the examples are available in the VPATH directory.
142
143AC_COIN_VPATH_LINK(examples/sudoku_sample.csv)
144AC_COIN_VPATH_LINK(examples/quad.mps)
145AC_COIN_VPATH_LINK(examples/quad2.mps)
146
147##############################################################################
148#                   Finishing up by writing all the output                   #
149##############################################################################
150
151# Here list all the files that configure should create (except for the
152# configuration header file)
153AC_CONFIG_FILES([Makefile
154                 examples/Makefile
155                 src/Makefile
156                 test/Makefile
157                 cbc_addlibs.txt])
158
159# Here put the location and name of the configuration header file
160AC_CONFIG_HEADER([inc/config_cbc.h])
161
162# Finally, we let configure write all the output...
163AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.