forked from lballabio/QuantLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
232 lines (204 loc) · 8.08 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# Process this file with autoconf to produce a configure script.
AC_INIT([QuantLib], [0.3.6],
[QuantLib])
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR([ql/qldefines.hpp])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([ql/config.hpp])
AM_INIT_AUTOMAKE([foreign])
AC_COPYRIGHT([Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it under the
terms of the QuantLib license. You should have received a copy of the
license along with this program; if not, please email [email protected]
The license is also available online at http://quantlib.org/html/license.html
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.])
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_LIBTOOL
AM_PATH_LISPDIR
AC_PATH_PROG([SED], [sed])
AC_PATH_PROG([DOXYGEN], [doxygen])
AC_PATH_PROG([LATEX], [latex])
AC_PATH_PROG([PDFLATEX], [pdflatex])
AC_PATH_PROG([MAKEINDEX], [makeindex])
AC_PATH_PROG([DVIPS], [dvips])
AC_LANG([C++])
QL_CHECK_HEADER([stdlib])
QL_CHECK_TYPE([size_t],[],[$ql_stdlib])
QL_CHECK_FUNC([atoi],["1.0"],[$ql_stdlib])
QL_CHECK_HEADER([stdio])
QL_CHECK_FUNC([sprintf],[s,"foo"],[$ql_stdio])
QL_CHECK_HEADER([math])
QL_CHECK_FUNC([sqrt],[1.0],[$ql_math])
QL_CHECK_FUNC([fabs],[1.0],[$ql_math])
QL_CHECK_FUNC([exp],[1.0],[$ql_math])
QL_CHECK_FUNC([log],[1.0],[$ql_math])
QL_CHECK_FUNC([sin],[1.0],[$ql_math])
QL_CHECK_FUNC([cos],[1.0],[$ql_math])
QL_CHECK_FUNC([pow],[1.0,2],[$ql_math])
QL_CHECK_FUNC([modf],[1.0,&x],[$ql_math])
QL_CHECK_FUNC([floor],[1.0],[$ql_math])
QL_CHECK_CONSTANT([M_PI],[double],[$ql_math],
[3.141592653589793238462643383280],[pi])
QL_CHECK_CONSTANT([M_SQRT_2],[double],[$ql_math],
[0.7071067811865475244008443621048],[1/sqrt(2)])
QL_CHECK_CONSTANT([M_SQRTPI],[double],[$ql_math],
[1.77245385090551602792981],[sqrt(pi)])
QL_CHECK_CONSTANT([M_1_SQRTPI],[double],[$ql_math],
[0.564189583547756286948],[1/sqrt(pi)])
QL_CHECK_HEADER([string])
QL_CHECK_FUNC([strlen],["foo"],[$ql_string])
QL_CHECK_HEADER([ctype])
QL_CHECK_FUNC([tolower],['c'],[$ql_ctype])
QL_CHECK_FUNC([toupper],['c'],[$ql_ctype])
QL_CHECK_HEADER([time])
QL_CHECK_TYPE([time_t],[],[$ql_time])
QL_CHECK_TYPE([tm],[],[$ql_time])
QL_CHECK_FUNC([clock],[],[$ql_time])
QL_CHECK_FUNC([time],[0],[$ql_time])
QL_CHECK_GMTIME
AC_CHECK_HEADERS([limits],,[AC_MSG_WARN([<limits> not found])])
QL_CHECK_HEADER([limits])
AC_CHECK_HEADERS([float.h],,[AC_MSG_WARN([<float.h> not found])])
AC_CHECK_HEADERS([algorithm],,[AC_MSG_WARN([<algorithm> not found])])
QL_CHECK_FUNC([min],[1,2],[algorithm])
QL_CHECK_FUNC([max],[1,2],[algorithm])
AC_CHECK_HEADERS([iterator],,[AC_MSG_WARN([<iterator> not found])])
QL_CHECK_TEMPLATE_TYPE([iterator],[std::input_iterator_tag,double],
[],[iterator])
QL_CHECK_TEMPLATE_TYPE([iterator_traits],[double*],
[],[iterator])
QL_CHECK_NAMESPACES
QL_CHECK_STRING
QL_CHECK_BOOST
AM_CONDITIONAL(EMACS_FOUND, test "${EMACS}" != "no")
# site configuration
AC_ARG_ENABLE([extra-safety-checks],
AC_HELP_STRING([--enable-extra-safety-checks],
[If enabled, extra run-time checks are added
to a few functions. This can prevent their
inlining and degrade performance.]),
[ql_belt_and_braces=$enableval],
[ql_belt_and_braces=no])
if test "$ql_belt_and_braces" = "yes" ; then
AC_DEFINE([QL_EXTRA_SAFETY_CHECKS],[1],
[Define this if extra safety checks should be performed.
This can degrade performance.])
fi
AC_ARG_ENABLE([negative-rates],
AC_HELP_STRING([--enable-negative-rates],
[If enabled, negative yield rates are allowed
in a few places where they are currently
forbidden. It is still not clear whether
this is safe.]),
[ql_negative_rates=$enableval],
[ql_negative_rates=no])
if test "$ql_negative_rates" = "yes" ; then
AC_DEFINE([QL_NEGATIVE_RATES],[1],
[Define this if negative yield rates should be allowed.
This might not be safe.])
fi
AC_ARG_ENABLE([error-lines],
AC_HELP_STRING([--enable-error-lines],
[If enabled, file and line information is
added to the error messages thrown by the
library.]),
[ql_error_lines=$enableval],
[ql_error_lines=no])
if test "$ql_error_lines" = "yes" ; then
AC_DEFINE([QL_ERROR_LINES],[1],
[Define this if error messages should include file and line
information.])
fi
AC_ARG_ENABLE([early-payments],
AC_HELP_STRING([--enable-early-payments],
[If enabled (the default), payments are
considered to be settled at the beginning
of the day. Therefore, payments occurring
at today's date are not included in the NPV
of an instrument.]),
[ql_early_payments=$enableval],
[ql_early_payments=yes])
if test "$ql_early_payments" = "no" ; then
AC_DEFINE([QL_TODAYS_PAYMENTS],[1],
[Define this if payments occurring today should enter the NPV
of an instrument.])
fi
AC_ARG_ENABLE([examples],
AC_HELP_STRING([--enable-examples],
[If enabled, examples are built and installed
when "make" and "make install" are invoked.
If disabled (the default) they are built
with "make examples" and not installed.]),
[ql_install_examples=$enableval],
[ql_install_examples=no])
AM_CONDITIONAL(AUTO_EXAMPLES, test "$ql_install_examples" != "no")
# manual configurations for specific hosts
case $host in
powerpc-apple-darwin*)
AC_DEFINE([QL_PATCH_DARWIN],[1],
[Define if running on a Mac OS X machine.])
;;
sparc-sun-solaris*)
AC_DEFINE([QL_PATCH_SOLARIS],[1],
[Define if running on a Sun Solaris machine.])
;;
esac
# done, output the configured files
AC_CONFIG_FILES([
Makefile
config/Makefile
ql/Makefile
ql/Calendars/Makefile
ql/CashFlows/Makefile
ql/DayCounters/Makefile
ql/FiniteDifferences/Makefile
ql/functions/Makefile
ql/Indexes/Makefile
ql/Instruments/Makefile
ql/Lattices/Makefile
ql/Math/Makefile
ql/MonteCarlo/Makefile
ql/Optimization/Makefile
ql/Patterns/Makefile
ql/Pricers/Makefile
ql/PricingEngines/Makefile
ql/PricingEngines/Asian/Makefile
ql/PricingEngines/Barrier/Makefile
ql/PricingEngines/Basket/Makefile
ql/PricingEngines/CapFloor/Makefile
ql/PricingEngines/Forward/Makefile
ql/PricingEngines/Quanto/Makefile
ql/PricingEngines/Swaption/Makefile
ql/PricingEngines/Vanilla/Makefile
ql/RandomNumbers/Makefile
ql/ShortRateModels/Makefile
ql/ShortRateModels/CalibrationHelpers/Makefile
ql/ShortRateModels/OneFactorModels/Makefile
ql/ShortRateModels/TwoFactorModels/Makefile
ql/Solvers1D/Makefile
ql/TermStructures/Makefile
ql/Utilities/Makefile
ql/Volatilities/Makefile
man/Makefile
Docs/Makefile
Docs/pages/Makefile
Docs/Examples/Makefile
Docs/images/Makefile
Examples/Makefile
Examples/AmericanOption/Makefile
Examples/BermudanSwaption/Makefile
Examples/DiscreteHedging/Makefile
Examples/EuropeanOption/Makefile
Examples/Swap/Makefile
test-suite/Makefile])
AC_CONFIG_FILES([quantlib-config],[chmod +x quantlib-config])
AC_CONFIG_FILES([QuantLib.spec])
AC_OUTPUT