source: stable/1.8/Bonmin/configure.ac @ 2256

Last change on this file since 2256 was 2256, checked in by stefan, 17 months ago

restoring Bonmin/stable/1.8

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Author Date Id Revision"
File size: 7.8 KB
Line 
1# Copyright (C) 2006, 2008 International Business Machines.
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4
5## $Id: configure.ac 2256 2020-01-31 12:23:25Z stefan $
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([Bonmin],[1.8],[bonmin@list.coin-or.org])
16
17AC_COPYRIGHT([
18Copyright 2006, 2008 International Business Machines and others.
19All Rights Reserved.
20This file is part of the open source package BONMIN which is distributed
21under the Eclipse 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/CbcBonmin/BonCbc.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(Bonmin)
45
46# Check if user wants to produce debugging code
47AC_COIN_DEBUG_COMPILE(Bonmin)
48
49# Get the name of the C++ compiler and appropriate compiler options
50AC_COIN_PROG_CXX
51
52
53# Initialize automake and libtool
54AC_COIN_INIT_AUTO_TOOLS
55
56#############################################################################
57#                           COIN-OR components                              #
58#############################################################################
59
60AC_COIN_CHECK_PACKAGE(CoinDepend, [cbc osi-clp ipopt], [BonminLib])
61if test $coin_has_coindepend != yes ; then
62  AC_MSG_ERROR([Required package Cbc or Ipopt not available.])
63fi
64
65AC_COIN_CHECK_PACKAGE(ASL, [ipoptamplinterface], [BonminAmplInterfaceLib])
66
67#AC_COIN_CHECK_PACKAGE(Bcp, [bcp])
68#
69#AC_ARG_WITH([bonminbcp],
70#            AC_HELP_STRING([--with-bonminbcp],
71#                           [Compile Bonmin with Bcp-based parallel version]),
72#            [use_bcp="$withval"], [use_bcp=no])
73#if test "$use_bcp" = yes; then
74#  if test $coin_has_bcp != yes ; then
75#     AC_MSG_ERROR([You specified --with-bonminbcp, but Bcp is not available])
76#  fi
77#fi
78#AM_CONDITIONAL(COMPILE_BONMINBCP, test "$use_bcp" = yes)
79
80#############################################################################
81#                                     CPLEX                                 #
82#############################################################################
83
84# Check whether OsiCplex is available
85AC_COIN_CHECK_PACKAGE(OsiCpx, [osi-cplex], [BonminLib])
86
87# To get also the directory where cplex.h can be found, we also check for cplex directly.
88AC_COIN_CHECK_USER_LIBRARY([Cplex], [CPX],[cplex.h],[CPXgetstat])
89
90#############################################################################
91#                                FilterSQP                                  #
92#############################################################################
93
94# for backward compatibility, map --with-filtersqp to --with-filtersqp-libs
95AC_ARG_WITH([filtersqp],
96            AC_HELP_STRING([--with-filtersqp],
97                           [specify library for FilterSQP (or BUILD for compilation)]),
98            [filtersqp_libs="$withval"])
99
100AC_COIN_CHECK_PACKAGE(FilterSQP, [coinfiltersqp], [BonminLib])
101
102if test $coin_has_filtersqp = yes
103then
104  # Get the name of the Fortran compiler and appropriate compiler options
105  AC_COIN_PROG_F77
106
107  # Find out how to call Fortran from C and determine Fortran runtime libraries
108  AC_COIN_F77_WRAPPERS
109fi
110
111# we want to keep the linking check for FilterSQP, but cannot do this if FilterSQP will be build later (in ThirdParty)
112#if test $coin_has_filtersqp = yes ; then
113#  AC_MSG_CHECKING([whether FilterSQP library $FILTERSQP_LIBS works])
114#  SAVE_LIBS="$LIBS"
115#  LIBS="$FILTERSQP_LIBS $FLIBS $LIBS"
116#  AC_LANG_PUSH([Fortran 77])
117#  AC_TRY_LINK([],
118#[      call filterSQP
119#      end
120#      subroutine confun
121#      end
122#      subroutine objfun
123#      end
124#      subroutine gradient
125#      end
126#      subroutine hessian],
127#              [AC_MSG_RESULT([yes])
128#               FILTERSQP_LIBS="$FILTERSQP_LIBS $FLIBS"],
129#              [AC_MSG_RESULT([no])
130#               AC_MSG_ERROR([user supplied FilterSQP library $FILTERSQP_LIBS does not work])])
131#  AC_LANG_POP([Fortran 77])
132#  LIBS="$SAVE_LIBS"
133#fi
134
135#############################################################################
136#                           Feasibility Pump                                #
137#############################################################################
138
139#if test x"$BUILD_FP" != x; then
140#  build_fp=yes
141#fi
142#AM_CONDITIONAL(BUILD_FP, test x$build_fp = xyes)
143
144#############################################################################
145#                                 ASTYLE                                    #
146#############################################################################
147
148ASTYLE=astyle
149AC_SUBST(ASTYLE)
150
151ASTYLEFLAGS="--mode=c --indent=spaces=2 --indent-cases --indent-namespaces --min-conditional-indent=1 --brackets=linux --brackets=break-closing-headers --max-instatement-indent=2"
152AC_SUBST(ASTYLEFLAGS)
153
154#############################################################################
155#                            Stuff for Examples                             #
156#############################################################################
157
158AC_COIN_VPATH_LINK(test/bonmin.opt)
159AC_COIN_VPATH_LINK(test/mytoy.nl)
160AC_CONFIG_LINKS([test/MyBonmin.cpp:examples/CppExample/MyBonmin.cpp
161                 test/MyTMINLP.cpp:examples/CppExample/MyTMINLP.cpp
162                 test/MyTMINLP.hpp:examples/CppExample/MyTMINLP.hpp])
163
164#############################################################################
165#                  Check for doxygen                                        #
166#############################################################################
167
168AC_COIN_DOXYGEN(CoinUtils Osi Clp Cgl Cbc Ipopt)
169
170##############################################################################
171#                   Finishing up by writing all the output                   #
172##############################################################################
173
174AC_CONFIG_FILES([Makefile
175                 src/Apps/Makefile
176                 src/CbcBonmin/Makefile
177                 src/Interfaces/Makefile
178                 src/Interfaces/Ipopt/Makefile
179                 src/Interfaces/Filter/Makefile
180                 src/Interfaces/Ampl/Makefile
181                 src/Algorithms/Makefile
182                 src/Algorithms/Ampl/Makefile
183                 src/Algorithms/Branching/Makefile
184                 src/Algorithms/QuadCuts/Makefile
185                 src/Algorithms/OaGenerators/Makefile
186                 src/CbcBonmin/Heuristics/Makefile
187                 examples/OptionDocGen/Makefile
188                 experimental/Separable/Makefile
189                 experimental/RobotBonmin/Makefile
190                 test/Makefile
191                 examples/CppExample/Makefile
192                 bonmin.pc bonmin-uninstalled.pc
193                 doxydoc/doxygen.conf])
194
195if test $coin_has_asl = yes ; then
196  AC_CONFIG_FILES([bonminamplinterface.pc:src/CbcBonmin/bonminamplinterface.pc.in
197                   bonminamplinterface-uninstalled.pc:src/CbcBonmin/bonminamplinterface-uninstalled.pc.in
198                  ])
199fi
200
201AC_CONFIG_HEADER([src/Interfaces/config.h src/Interfaces/config_bonmin.h])
202
203AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.