-
Notifications
You must be signed in to change notification settings - Fork 42
/
configure.ac
153 lines (115 loc) · 5.4 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Copyright (C) 2006,2009 International Business Machines.
# All Rights Reserved.
# This file is distributed under the Eclipse Public License.
#
# Author: Andreas Waechter IBM 2006-04-13
#############################################################################
# Names and other basic things #
#############################################################################
AC_INIT([CoinUtils],[devel],[https://github.com/coin-or/CoinUtils/issues/new],[coin-or-coinutils],[https://github.com/coin-or/CoinUtils])
AC_COPYRIGHT([
Copyright 2006 International Business Machines and others.
All Rights Reserved.
This file is part of the open source package CoinUtils which is distributed
under the Eclipse Public License.])
# List one file in the package so that the configure script can test whether
# the package is actually there.
AC_CONFIG_SRCDIR(src/CoinError.cpp)
# Do some project-level initialization work (version numbers, change prefix
# default, ...)
AC_COIN_INITIALIZE
#############################################################################
# Standard build tool stuff #
#############################################################################
# Get the name of the C++ compiler and appropriate compiler options.
AC_COIN_PROG_CXX
# This is a C++ package, set the language accordingly.
AC_LANG_PUSH(C++)
# Initialize libtool
AC_COIN_PROG_LIBTOOL
# get COINUTILS_CHECKLEVEL define, used in CoinSmartPtr and CoinPackedMatrix
AC_COIN_DEBUGLEVEL
#############################################################################
# Header files #
#############################################################################
AC_CHECK_HEADERS([windows.h])
AC_CHECK_HEADERS([endian.h])
AC_CHECK_HEADERS([execinfo.h])
############################################################################
# Data type and math function definitions #
############################################################################
AC_COINUTILS_INT64
AC_COINUTILS_INTPTR
AC_COINUTILS_BIGTYPES
AC_COIN_CHECK_ISFINITE
AC_COIN_CHECK_ISNAN
#############################################################################
# Thread configuration #
#############################################################################
# Define new options:
# --enable-coinutils-threads
# --enable-coinutils-mempool-override-new
# --enable-coinutils-mempool-maxpooled
# Thread-aware features are disabled by default. Specifying
# --enable-coinutils-threads on the command line will turn them on.
AC_COINUTILS_THREADS(no)
# Configure the CoinUtils mempool. Set the default maximum block size to 4096
# bytes. This can be overridden at configuration by specifying a value, as
# --enable-coinutils-mempool-maxpooled=NNN
# or at run time with environment variable
# COINUTILS_MEMPOOL_MAXPOOLED=NNN
# Do not redirect global new/delete to the CoinUtils mempool.
# 170909 (lh) Changing the second parameter to yes causes compilation errors
# in CoinAlloc with C++11. Likely the best solution is to remove the
# dynamic throw spec.
AC_COINUTILS_MEMPOOL(4096,no)
#############################################################################
# COIN-OR components #
#############################################################################
# Collect information required to use component libraries.
AC_COIN_CHK_LAPACK(CoinUtilsLib)
AC_COIN_CHK_PKG(Glpk,[CoinUtilsLib CoinUtilsTest],[coinglpk])
AC_COIN_CHK_PKG(ASL,[CoinUtilsLib],[coinasl])
AC_COIN_CHK_PKG(Sample,[],[coindatasample],[],dataonly)
AC_COIN_CHK_PKG(Netlib,[],[coindatanetlib],[],dataonly)
AC_COIN_CHK_LIBM(CoinUtilsLib)
AC_COIN_CHK_ZLIB(CoinUtilsLib)
AC_COIN_CHK_BZLIB(CoinUtilsLib)
AC_COIN_CHK_GNU_READLINE(CoinUtilsLib)
# Finalize libs and cflags for building CoinUtilsLib.
AC_COIN_FINALIZE_FLAGS(CoinUtilsLib)
AC_COIN_FINALIZE_FLAGS(CoinUtilsTest)
AC_LANG_POP(C++)
AC_LANG_PUSH(C++)
AC_MSG_CHECKING([whether C++11 is available])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(, [
#if __cplusplus < 201103L
#error "No C++11"
#endif
])],
[AC_MSG_RESULT(yes)
AC_DEFINE([COINUTILS_CPLUSPLUS11], [1], [Define to 1 if CoinUtils uses C++11])],
[AC_MSG_RESULT(no)]
)
AC_LANG_POP(C++)
#############################################################################
# Check for doxygen #
#############################################################################
AC_COIN_DOXYGEN
##############################################################################
# Finishing up by writing all the output #
##############################################################################
# Here list all the files that configure should create (except for the
# configuration header file)
AC_CONFIG_FILES([Makefile
src/Makefile
test/Makefile
coinutils.pc])
AC_CONFIG_FILES([doxydoc/doxygen.conf])
# Here put the location and name of the configuration header file
AC_CONFIG_HEADERS([src/config.h src/config_coinutils.h])
# Here make sure we have data files in the build directory
AC_CONFIG_LINKS(test/plan.mod:test/plan.mod)
# Finally, we let configure write all the output...
AC_COIN_FINALIZE