source: ThirdParty/SCIP/trunk/configure.ac @ 2232

Last change on this file since 2232 was 2232, checked in by stefan, 10 years ago

put back check for SCIP version number

File size: 4.4 KB
Line 
1# Copyright (C) 2011 Stefan Vigerske and others
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4
5## $Id: configure.ac 937 2010-10-02 19:05:12Z stefan $
6
7#############################################################################
8#                       Names and other basic things                        #
9#############################################################################
10
11AC_PREREQ(2.59)
12
13AC_INIT([ThirdPartyScip],[trunk],[http://projects.coin-or.org/BuildTools/newticket])
14
15AC_COPYRIGHT([
16Copyright 2011 Stefan Vigerske and others.
17All Rights Reserved.
18This file is part of the open source package COIN-OR which is distributed
19under the Eclipse Public License.])
20
21# List one file in the package so that the configure script can test
22# whether the package is actually there
23AC_CONFIG_SRCDIR(scip/src/scip/scip.h)
24
25# Where should everything be installed by default?  Here, we want it
26# to be installed directly in 'bin', 'lib', 'include' subdirectories
27# of the directory where configure is run.  The default would be
28# /usr/local.
29AC_PREFIX_DEFAULT([`pwd`])
30
31AC_COIN_PROJECTDIR_INIT(SCIP)
32
33#############################################################################
34#                         Standard build tool stuff                         #
35#############################################################################
36
37# Get the system type
38AC_CANONICAL_BUILD
39
40# Check if user wants to produce debugging code
41AC_COIN_DEBUG_COMPILE(SCIP)
42
43# Get the name of the C compiler and appropriate compiler options
44AC_COIN_PROG_CC
45
46# Get the name of the C++ compiler and appropriate compiler options
47AC_COIN_PROG_CXX
48
49# Initialize automake
50AM_INIT_AUTOMAKE([subdir-objects])
51AM_PROG_CC_C_O
52AC_COIN_INIT_AUTO_TOOLS
53
54#############################################################################
55#                         Check SCIP version number                         #
56#############################################################################
57
58AC_MSG_CHECKING([SCIP version])
59scipver=`awk '/define SCIP_VERSION/ {print $3}' ${srcdir}/scip/src/scip/def.h`
60scipsubver=`awk '/define SCIP_SUBVERSION/ {print $3}' ${srcdir}/scip/src/scip/def.h`
61AC_MSG_RESULT([${scipver}.${scipsubver}])
62if test $scipver -lt 200 -o $scipver -ge 210 ; then
63  AC_MSG_ERROR(["Incorrect SCIP version. This build system is made for SCIP 2.0.x"])
64fi
65
66#############################################################################
67#                       Check for external libraries                        #
68#############################################################################
69
70# check for some LP solvers
71# TODO check for more than Soplex and Clp and have a configure option to set prefered LP solver
72AC_COIN_CHECK_PACKAGE(SoPlex, coinsoplex, SCIPLib)
73if test "$coin_has_soplex" = no ; then
74  AC_COIN_CHECK_PACKAGE(Clp, clp, SCIPLib)
75else
76  AM_CONDITIONAL(COIN_HAS_CLP, test 0 = 1)
77fi
78#AC_COIN_CHECK_USER_LIBRARY([Cplex], [CPX],[cplex.h], [CPXgetstat])
79
80# check for NLP solvers
81AC_COIN_CHECK_PACKAGE(Ipopt, ipopt, SCIPLib)
82
83# check for CppAD
84AC_COIN_CHECK_PACKAGE(CppAD, cppad, SCIPLib)
85
86#############################################################################
87#                       Check for system header and libraries               #
88#############################################################################
89
90AC_COIN_CHECK_GNU_ZLIB(SCIPlib)
91if test $coin_has_zlib = "yes"; then
92  EXTRAFLAGS="$EXTRAFLAGS -DWITH_ZLIB" 
93fi
94
95AC_CHECK_MEMBER(struct sigaction.sa_handler,,
96  [EXTRAFLAGS="$EXTRAFLAGS -DNO_SIGACTION"],
97  [#include <signal.h>])
98   
99AC_CHECK_FUNC(rand_r,,
100  [EXTRAFLAGS="$EXTRAFLAGS -DNO_RAND_R"])
101   
102AC_CHECK_FUNC(strtok_r,,
103  [EXTRAFLAGS="$EXTRAFLAGS -DNO_STRTOK_R"])
104
105AC_CHECK_FUNC(strerror_r,,
106  [EXTRAFLAGS="$EXTRAFLAGS -DNO_STRERROR_R"])
107   
108AC_CHECK_HEADER([fenv.h],[EXTRAFLAGS="$EXTRAFLAGS -DROUNDING_FE"],
109  [AC_CHECK_HEADER([float.h],[EXTRAFLAGS="$EXTRAFLAGS -DROUNDING_MS"])])
110
111case "$CC" in
112  *gcc* )
113    EXTRAFLAGS="$EXTRAFLAGS -Wno-overlength-strings"
114    ;;
115esac
116 
117CFLAGS="$CFLAGS $EXTRAFLAGS"
118CXXFLAGS="$CXXFLAGS $EXTRAFLAGS"
119
120#############################################################################
121#                                Finish up                                  #
122#############################################################################
123
124AC_CONFIG_FILES([Makefile coinscip.pc coinscip-uninstalled.pc])
125
126# dummy header file to avoid many extra compiler flags
127AC_CONFIG_HEADER([config_scip.h])
128 
129AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.