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

Last change on this file since 2228 was 2228, checked in by stefan, 9 years ago

small fixes for compiling

File size: 3.5 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 for external libraries                        #
56#############################################################################
57
58# check for some LP solvers
59# TODO check for more than Soplex and Clp and have a configure option to set prefered LP solver
60AC_COIN_CHECK_PACKAGE(SoPlex, coinsoplex, SCIPLib)
61if test "$coin_has_soplex" = no ; then
62  AC_COIN_CHECK_PACKAGE(Clp, clp, SCIPLib)
63else
64  AM_CONDITIONAL(COIN_HAS_CLP, test 0 = 1)
65fi
66#AC_COIN_CHECK_USER_LIBRARY([Cplex], [CPX],[cplex.h], [CPXgetstat])
67
68# check for NLP solvers
69AC_COIN_CHECK_PACKAGE(Ipopt, ipopt, SCIPLib)
70
71# check for CppAD
72AC_COIN_CHECK_PACKAGE(CppAD, cppad, SCIPLib)
73
74#############################################################################
75#                       Check for system header and libraries               #
76#############################################################################
77
78AC_COIN_CHECK_GNU_ZLIB(SCIPlib)
79if test $coin_has_zlib = "yes"; then
80  EXTRAFLAGS="$EXTRAFLAGS -DWITH_ZLIB" 
81fi
82
83AC_CHECK_MEMBER(struct sigaction.sa_handler,,
84  [EXTRAFLAGS="$EXTRAFLAGS -DNO_SIGACTION"],
85  [#include <signal.h>])
86   
87AC_CHECK_FUNC(rand_r,,
88  [EXTRAFLAGS="$EXTRAFLAGS -DNO_RAND_R"])
89   
90AC_CHECK_FUNC(strtok_r,,
91  [EXTRAFLAGS="$EXTRAFLAGS -DNO_STRTOK_R"])
92
93AC_CHECK_FUNC(strerror_r,,
94  [EXTRAFLAGS="$EXTRAFLAGS -DNO_STRERROR_R"])
95   
96AC_CHECK_HEADER([fenv.h],[EXTRAFLAGS="$EXTRAFLAGS -DROUNDING_FE"],
97  [AC_CHECK_HEADER([float.h],[EXTRAFLAGS="$EXTRAFLAGS -DROUNDING_MS"])])
98
99case "$CC" in
100  *gcc* )
101    EXTRAFLAGS="$EXTRAFLAGS -Wno-overlength-strings"
102    ;;
103esac
104 
105CFLAGS="$CFLAGS $EXTRAFLAGS"
106CXXFLAGS="$CXXFLAGS $EXTRAFLAGS"
107 
108AC_CONFIG_FILES([Makefile])
109
110# dummy header file to avoid many extra compiler flags
111AC_CONFIG_HEADER([config_scip.h])
112 
113AC_COIN_FINALIZE
Note: See TracBrowser for help on using the repository browser.