Lines 1-5
Link Here
|
1 |
# boost.m4: Locate Boost headers and libraries for autoconf-based projects. |
1 |
# boost.m4: Locate Boost headers and libraries for autoconf-based projects. |
2 |
# Copyright (C) 2007, 2008, 2009 Benoit Sigoure <tsuna@lrde.epita.fr> |
2 |
# Copyright (C) 2007-2011, 2014 Benoit Sigoure <tsuna@lrde.epita.fr> |
3 |
# |
3 |
# |
4 |
# This program is free software: you can redistribute it and/or modify |
4 |
# This program is free software: you can redistribute it and/or modify |
5 |
# it under the terms of the GNU General Public License as published by |
5 |
# it under the terms of the GNU General Public License as published by |
Lines 22-28
Link Here
|
22 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
22 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
23 |
|
23 |
|
24 |
m4_define([_BOOST_SERIAL], [m4_translit([ |
24 |
m4_define([_BOOST_SERIAL], [m4_translit([ |
25 |
# serial 12 |
25 |
# serial 24 |
26 |
], [# |
26 |
], [# |
27 |
], [])]) |
27 |
], [])]) |
28 |
|
28 |
|
Lines 45-61
m4_define([_BOOST_SERIAL], [m4_translit([
Link Here
|
45 |
# Note: THESE MACROS ASSUME THAT YOU USE LIBTOOL. If you don't, don't worry, |
45 |
# Note: THESE MACROS ASSUME THAT YOU USE LIBTOOL. If you don't, don't worry, |
46 |
# simply read the README, it will show you what to do step by step. |
46 |
# simply read the README, it will show you what to do step by step. |
47 |
|
47 |
|
48 |
m4_pattern_forbid([^_?BOOST_]) |
48 |
m4_pattern_forbid([^_?(BOOST|Boost)_]) |
49 |
|
49 |
|
50 |
|
50 |
|
51 |
# _BOOST_SED_CPP(SED-PROGRAM, PROGRAM, |
51 |
# _BOOST_SED_CPP(SED-PROGRAM, PROGRAM, |
52 |
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
52 |
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
53 |
# -------------------------------------------------------- |
53 |
# -------------------------------------------------------- |
54 |
# Same as AC_EGREP_CPP, but leave the result in conftest.i. |
54 |
# Same as AC_EGREP_CPP, but leave the result in conftest.i. |
55 |
# PATTERN is *not* overquoted, as in AC_EGREP_CPP. It could be useful |
55 |
# |
56 |
# to turn this into a macro which extracts the value of any macro. |
56 |
# SED-PROGRAM is *not* overquoted, as in AC_EGREP_CPP. It is expanded |
|
|
57 |
# in double-quotes, so escape your double quotes. |
58 |
# |
59 |
# It could be useful to turn this into a macro which extracts the |
60 |
# value of any macro. |
57 |
m4_define([_BOOST_SED_CPP], |
61 |
m4_define([_BOOST_SED_CPP], |
58 |
[AC_LANG_PREPROC_REQUIRE()dnl |
62 |
[AC_LANG_PUSH([C++])dnl |
|
|
63 |
AC_LANG_PREPROC_REQUIRE()dnl |
59 |
AC_REQUIRE([AC_PROG_SED])dnl |
64 |
AC_REQUIRE([AC_PROG_SED])dnl |
60 |
AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) |
65 |
AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) |
61 |
AS_IF([dnl eval is necessary to expand ac_cpp. |
66 |
AS_IF([dnl eval is necessary to expand ac_cpp. |
Lines 67-79
dnl strip `\n' with backquotes, not the `\r'. This results in
Link Here
|
67 |
dnl boost_cv_lib_version='1_37\r' for instance, which breaks |
72 |
dnl boost_cv_lib_version='1_37\r' for instance, which breaks |
68 |
dnl everything else. |
73 |
dnl everything else. |
69 |
dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK |
74 |
dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK |
|
|
75 |
dnl |
76 |
dnl Beware that GCC 5, when expanding macros, may embed # line directives |
77 |
dnl a within single line: |
78 |
dnl |
79 |
dnl # 1 "conftest.cc" |
80 |
dnl # 1 "<built-in>" |
81 |
dnl # 1 "<command-line>" |
82 |
dnl # 1 "conftest.cc" |
83 |
dnl # 1 "/opt/local/include/boost/version.hpp" 1 3 |
84 |
dnl # 2 "conftest.cc" 2 |
85 |
dnl boost-lib-version = |
86 |
dnl # 2 "conftest.cc" 3 |
87 |
dnl "1_56" |
88 |
dnl |
89 |
dnl So get rid of the # lines, and glue the remaining ones together. |
70 |
(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | |
90 |
(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | |
|
|
91 |
grep -v '#' | |
71 |
tr -d '\r' | |
92 |
tr -d '\r' | |
|
|
93 |
tr -s '\n' ' ' | |
72 |
$SED -n -e "$1" >conftest.i 2>&1], |
94 |
$SED -n -e "$1" >conftest.i 2>&1], |
73 |
[$3], |
95 |
[$3], |
74 |
[$4]) |
96 |
[$4]) |
75 |
rm -rf conftest* |
97 |
rm -rf conftest* |
76 |
])# AC_EGREP_CPP |
98 |
AC_LANG_POP([C++])dnl |
|
|
99 |
])# _BOOST_SED_CPP |
77 |
|
100 |
|
78 |
|
101 |
|
79 |
|
102 |
|
Lines 98-103
set x $boost_version_req 0 0 0
Link Here
|
98 |
IFS=$boost_save_IFS |
121 |
IFS=$boost_save_IFS |
99 |
shift |
122 |
shift |
100 |
boost_version_req=`expr "$[1]" '*' 100000 + "$[2]" '*' 100 + "$[3]"` |
123 |
boost_version_req=`expr "$[1]" '*' 100000 + "$[2]" '*' 100 + "$[3]"` |
|
|
124 |
boost_version_req_string=$[1].$[2].$[3] |
101 |
AC_ARG_WITH([boost], |
125 |
AC_ARG_WITH([boost], |
102 |
[AS_HELP_STRING([--with-boost=DIR], |
126 |
[AS_HELP_STRING([--with-boost=DIR], |
103 |
[prefix of Boost $1 @<:@guess@:>@])])dnl |
127 |
[prefix of Boost $1 @<:@guess@:>@])])dnl |
Lines 113-121
if test x"$BOOST_ROOT" != x; then
Link Here
|
113 |
fi |
137 |
fi |
114 |
fi |
138 |
fi |
115 |
AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], |
139 |
AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], |
116 |
["$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"]) |
140 |
["$DISTCHECK_CONFIGURE_FLAGS '--with-boost=$with_boost'"])dnl |
117 |
boost_save_CPPFLAGS=$CPPFLAGS |
141 |
boost_save_CPPFLAGS=$CPPFLAGS |
118 |
AC_CACHE_CHECK([for Boost headers version >= $boost_version_req], |
142 |
AC_CACHE_CHECK([for Boost headers version >= $boost_version_req_string], |
119 |
[boost_cv_inc_path], |
143 |
[boost_cv_inc_path], |
120 |
[boost_cv_inc_path=no |
144 |
[boost_cv_inc_path=no |
121 |
AC_LANG_PUSH([C++])dnl |
145 |
AC_LANG_PUSH([C++])dnl |
Lines 183-189
AC_LANG_POP([C++])dnl
Link Here
|
183 |
]) |
207 |
]) |
184 |
case $boost_cv_inc_path in #( |
208 |
case $boost_cv_inc_path in #( |
185 |
no) |
209 |
no) |
186 |
boost_errmsg="cannot find Boost headers version >= $boost_version_req" |
210 |
boost_errmsg="cannot find Boost headers version >= $boost_version_req_string" |
187 |
m4_if([$2], [], [AC_MSG_ERROR([$boost_errmsg])], |
211 |
m4_if([$2], [], [AC_MSG_ERROR([$boost_errmsg])], |
188 |
[AC_MSG_NOTICE([$boost_errmsg])]) |
212 |
[AC_MSG_NOTICE([$boost_errmsg])]) |
189 |
$2 |
213 |
$2 |
Lines 192-198
AC_LANG_POP([C++])dnl
Link Here
|
192 |
BOOST_CPPFLAGS= |
216 |
BOOST_CPPFLAGS= |
193 |
;;#( |
217 |
;;#( |
194 |
*) |
218 |
*) |
195 |
AC_SUBST([BOOST_CPPFLAGS], ["-I$boost_cv_inc_path"]) |
219 |
AC_SUBST([BOOST_CPPFLAGS], ["-I$boost_cv_inc_path"])dnl |
196 |
;; |
220 |
;; |
197 |
esac |
221 |
esac |
198 |
if test x"$boost_cv_inc_path" != xno; then |
222 |
if test x"$boost_cv_inc_path" != xno; then |
Lines 201-207
AC_LANG_POP([C++])dnl
Link Here
|
201 |
AC_CACHE_CHECK([for Boost's header version], |
225 |
AC_CACHE_CHECK([for Boost's header version], |
202 |
[boost_cv_lib_version], |
226 |
[boost_cv_lib_version], |
203 |
[m4_pattern_allow([^BOOST_LIB_VERSION$])dnl |
227 |
[m4_pattern_allow([^BOOST_LIB_VERSION$])dnl |
204 |
_BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;g;}], |
228 |
_BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]], |
205 |
[#include <boost/version.hpp> |
229 |
[#include <boost/version.hpp> |
206 |
boost-lib-version = BOOST_LIB_VERSION], |
230 |
boost-lib-version = BOOST_LIB_VERSION], |
207 |
[boost_cv_lib_version=`cat conftest.i`])]) |
231 |
[boost_cv_lib_version=`cat conftest.i`])]) |
Lines 209-232
boost-lib-version = BOOST_LIB_VERSION],
Link Here
|
209 |
boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` |
233 |
boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` |
210 |
case $boost_major_version in #( |
234 |
case $boost_major_version in #( |
211 |
'' | *[[!0-9]]*) |
235 |
'' | *[[!0-9]]*) |
212 |
AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version]) |
236 |
AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version']) |
213 |
;; |
237 |
;; |
214 |
esac |
238 |
esac |
215 |
fi |
239 |
fi |
216 |
CPPFLAGS=$boost_save_CPPFLAGS |
240 |
CPPFLAGS=$boost_save_CPPFLAGS |
217 |
])# BOOST_REQUIRE |
241 |
])# BOOST_REQUIRE |
218 |
|
242 |
|
|
|
243 |
|
219 |
# BOOST_STATIC() |
244 |
# BOOST_STATIC() |
220 |
# -------------- |
245 |
# -------------- |
221 |
# Add the "--enable-static-boost" configure argument. If this argument is given |
246 |
# Add the "--enable-static-boost" configure argument. If this argument is given |
222 |
# on the command line, static versions of the libraries will be looked up. |
247 |
# on the command line, static versions of the libraries will be looked up. |
223 |
AC_DEFUN([BOOST_STATIC], |
248 |
AC_DEFUN([BOOST_STATIC], |
224 |
[AC_ARG_ENABLE([static-boost], |
249 |
[AC_ARG_ENABLE([static-boost], |
225 |
[AC_HELP_STRING([--enable-static-boost], |
250 |
[AS_HELP_STRING([--enable-static-boost], |
226 |
[Prefer the static boost libraries over the shared ones [no]])], |
251 |
[Prefer the static boost libraries over the shared ones [no]])], |
227 |
[enable_static_boost=yes], |
252 |
[enable_static_boost=yes], |
228 |
[enable_static_boost=no])])# BOOST_STATIC |
253 |
[enable_static_boost=no])])# BOOST_STATIC |
229 |
|
254 |
|
|
|
255 |
|
230 |
# BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND]) |
256 |
# BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND]) |
231 |
# -------------------------------------------------------------------------- |
257 |
# -------------------------------------------------------------------------- |
232 |
# Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for |
258 |
# Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for |
Lines 259-272
fi
Link Here
|
259 |
])# BOOST_FIND_HEADER |
285 |
])# BOOST_FIND_HEADER |
260 |
|
286 |
|
261 |
|
287 |
|
262 |
# BOOST_FIND_LIB([LIB-NAME], [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], |
288 |
# BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES], |
263 |
# [CXX-PROLOGUE]) |
289 |
# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], |
264 |
# ------------------------------------------------------------------------- |
290 |
# [CXX-PROLOGUE]) |
265 |
# Look for the Boost library LIB-NAME (e.g., LIB-NAME = `thread', for |
291 |
# -------------------------------------------------------------- |
266 |
# libboost_thread). Check that HEADER-NAME works and check that |
292 |
# Look for the Boost library COMPONENT-NAME (e.g., `thread', for |
267 |
# libboost_LIB-NAME can link with the code CXX-TEST. The optional argument |
293 |
# libboost_thread) under the possible CANDIDATE-LIB-NAMES (e.g., |
268 |
# CXX-PROLOGUE can be used to include some C++ code before the `main' |
294 |
# "thread_win32 thread"). Check that HEADER-NAME works and check that |
269 |
# function. |
295 |
# libboost_LIB-NAME can link with the code CXX-TEST. The optional |
|
|
296 |
# argument CXX-PROLOGUE can be used to include some C++ code before |
297 |
# the `main' function. |
270 |
# |
298 |
# |
271 |
# Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). |
299 |
# Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). |
272 |
# |
300 |
# |
Lines 280-286
fi
Link Here
|
280 |
# builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp |
308 |
# builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp |
281 |
# ... If you want to make sure you have a specific version of Boost |
309 |
# ... If you want to make sure you have a specific version of Boost |
282 |
# (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro. |
310 |
# (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro. |
283 |
AC_DEFUN([BOOST_FIND_LIB], |
311 |
AC_DEFUN([BOOST_FIND_LIBS], |
284 |
[AC_REQUIRE([BOOST_REQUIRE])dnl |
312 |
[AC_REQUIRE([BOOST_REQUIRE])dnl |
285 |
AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl |
313 |
AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl |
286 |
AC_REQUIRE([BOOST_STATIC])dnl |
314 |
AC_REQUIRE([BOOST_STATIC])dnl |
Lines 292-324
dnl The else branch is huge and wasn't intended on purpose.
Link Here
|
292 |
AC_LANG_PUSH([C++])dnl |
320 |
AC_LANG_PUSH([C++])dnl |
293 |
AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl |
321 |
AS_VAR_PUSHDEF([Boost_lib], [boost_cv_lib_$1])dnl |
294 |
AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl |
322 |
AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl |
|
|
323 |
AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl |
295 |
AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl |
324 |
AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl |
296 |
BOOST_FIND_HEADER([$3]) |
325 |
BOOST_FIND_HEADER([$4]) |
297 |
boost_save_CPPFLAGS=$CPPFLAGS |
326 |
boost_save_CPPFLAGS=$CPPFLAGS |
298 |
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
327 |
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
299 |
# Now let's try to find the library. The algorithm is as follows: first look |
|
|
300 |
# for a given library name according to the user's PREFERRED-RT-OPT. For each |
301 |
# library name, we prefer to use the ones that carry the tag (toolset name). |
302 |
# Each library is searched through the various standard paths were Boost is |
303 |
# usually installed. If we can't find the standard variants, we try to |
304 |
# enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist |
305 |
# but there's -obviously- libboost_threads-mt.dylib). |
306 |
AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib], |
328 |
AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib], |
307 |
[Boost_lib=no |
329 |
[_BOOST_FIND_LIBS($@)]) |
308 |
case "$2" in #( |
330 |
case $Boost_lib in #( |
309 |
mt | mt-) boost_mt=-mt; boost_rtopt=;; #( |
331 |
(no) _AC_MSG_LOG_CONFTEST |
310 |
mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$2" : 'Xmt-*\(.*\)'`;; #( |
332 |
AC_MSG_ERROR([cannot find the flags to link with Boost $1]) |
311 |
*) boost_mt=; boost_rtopt=$2;; |
333 |
;; |
|
|
334 |
esac |
335 |
AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl |
336 |
AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl |
337 |
AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl |
338 |
AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl |
339 |
CPPFLAGS=$boost_save_CPPFLAGS |
340 |
AS_VAR_POPDEF([Boost_lib])dnl |
341 |
AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl |
342 |
AS_VAR_POPDEF([Boost_lib_LDPATH])dnl |
343 |
AS_VAR_POPDEF([Boost_lib_LIBS])dnl |
344 |
AC_LANG_POP([C++])dnl |
345 |
fi |
346 |
]) |
347 |
|
348 |
|
349 |
# BOOST_FIND_LIB([LIB-NAME], |
350 |
# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], |
351 |
# [CXX-PROLOGUE]) |
352 |
# -------------------------------------------------------------- |
353 |
# Backward compatibility wrapper for BOOST_FIND_LIBS. |
354 |
AC_DEFUN([BOOST_FIND_LIB], |
355 |
[BOOST_FIND_LIBS([$1], $@)]) |
356 |
|
357 |
|
358 |
# _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES], |
359 |
# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], |
360 |
# [CXX-PROLOGUE]) |
361 |
# -------------------------------------------------------------- |
362 |
# Real implementation of BOOST_FIND_LIBS: rely on these local macros: |
363 |
# Boost_lib, Boost_lib_LDFLAGS, Boost_lib_LDPATH, Boost_lib_LIBS |
364 |
# |
365 |
# The algorithm is as follows: first look for a given library name |
366 |
# according to the user's PREFERRED-RT-OPT. For each library name, we |
367 |
# prefer to use the ones that carry the tag (toolset name). Each |
368 |
# library is searched through the various standard paths were Boost is |
369 |
# usually installed. If we can't find the standard variants, we try |
370 |
# to enforce -mt (for instance on MacOSX, libboost_thread.dylib |
371 |
# doesn't exist but there's -obviously- libboost_thread-mt.dylib). |
372 |
AC_DEFUN([_BOOST_FIND_LIBS], |
373 |
[Boost_lib=no |
374 |
case "$3" in #( |
375 |
(mt | mt-) boost_mt=-mt; boost_rtopt=;; #( |
376 |
(mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #( |
377 |
(*) boost_mt=; boost_rtopt=$3;; |
312 |
esac |
378 |
esac |
313 |
if test $enable_static_boost = yes; then |
379 |
if test $enable_static_boost = yes; then |
314 |
boost_rtopt="s$boost_rtopt" |
380 |
boost_rtopt="s$boost_rtopt" |
315 |
fi |
381 |
fi |
316 |
# Find the proper debug variant depending on what we've been asked to find. |
382 |
# Find the proper debug variant depending on what we've been asked to find. |
317 |
case $boost_rtopt in #( |
383 |
case $boost_rtopt in #( |
318 |
*d*) boost_rt_d=$boost_rtopt;; #( |
384 |
(*d*) boost_rt_d=$boost_rtopt;; #( |
319 |
*[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') |
385 |
(*[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') |
320 |
boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( |
386 |
boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( |
321 |
*) boost_rt_d='-d';; |
387 |
(*) boost_rt_d='-d';; |
322 |
esac |
388 |
esac |
323 |
# If the PREFERRED-RT-OPT are not empty, prepend a `-'. |
389 |
# If the PREFERRED-RT-OPT are not empty, prepend a `-'. |
324 |
test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" |
390 |
test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" |
Lines 329-336
AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib],
Link Here
|
329 |
AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?]) |
395 |
AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?]) |
330 |
boost_save_ac_objext=$ac_objext |
396 |
boost_save_ac_objext=$ac_objext |
331 |
# Generate the test file. |
397 |
# Generate the test file. |
332 |
AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$3> |
398 |
AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4> |
333 |
$5], [$4])]) |
399 |
$6], [$5])]) |
334 |
dnl Optimization hacks: compiling C++ is slow, especially with Boost. What |
400 |
dnl Optimization hacks: compiling C++ is slow, especially with Boost. What |
335 |
dnl we're trying to do here is guess the right combination of link flags |
401 |
dnl we're trying to do here is guess the right combination of link flags |
336 |
dnl (LIBS / LDFLAGS) to use a given library. This can take several |
402 |
dnl (LIBS / LDFLAGS) to use a given library. This can take several |
Lines 352-389
dnl start the for loops).
Link Here
|
352 |
[AC_MSG_ERROR([cannot compile a test that uses Boost $1])]) |
418 |
[AC_MSG_ERROR([cannot compile a test that uses Boost $1])]) |
353 |
ac_objext=$boost_save_ac_objext |
419 |
ac_objext=$boost_save_ac_objext |
354 |
boost_failed_libs= |
420 |
boost_failed_libs= |
355 |
# Don't bother to ident the 6 nested for loops, only the 2 innermost ones |
421 |
# Don't bother to ident the following nested for loops, only the 2 |
356 |
# matter. |
422 |
# innermost ones matter. |
|
|
423 |
for boost_lib_ in $2; do |
357 |
for boost_tag_ in -$boost_cv_lib_tag ''; do |
424 |
for boost_tag_ in -$boost_cv_lib_tag ''; do |
358 |
for boost_ver_ in -$boost_cv_lib_version ''; do |
425 |
for boost_ver_ in -$boost_cv_lib_version ''; do |
359 |
for boost_mt_ in $boost_mt -mt ''; do |
426 |
for boost_mt_ in $boost_mt -mt ''; do |
360 |
for boost_rtopt_ in $boost_rtopt '' -d; do |
427 |
for boost_rtopt_ in $boost_rtopt '' -d; do |
361 |
for boost_lib in \ |
428 |
for boost_lib in \ |
362 |
boost_$1$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ |
429 |
boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ |
363 |
boost_$1$boost_tag_$boost_rtopt_$boost_ver_ \ |
430 |
boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \ |
364 |
boost_$1$boost_tag_$boost_mt_$boost_ver_ \ |
431 |
boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \ |
365 |
boost_$1$boost_tag_$boost_ver_ |
432 |
boost_$boost_lib_$boost_tag_$boost_ver_ |
366 |
do |
433 |
do |
367 |
# Avoid testing twice the same lib |
434 |
# Avoid testing twice the same lib |
368 |
case $boost_failed_libs in #( |
435 |
case $boost_failed_libs in #( |
369 |
*@$boost_lib@*) continue;; |
436 |
(*@$boost_lib@*) continue;; |
370 |
esac |
437 |
esac |
371 |
# If with_boost is empty, we'll search in /lib first, which is not quite |
438 |
# If with_boost is empty, we'll search in /lib first, which is not quite |
372 |
# right so instead we'll try to a location based on where the headers are. |
439 |
# right so instead we'll try to a location based on where the headers are. |
373 |
boost_tmp_lib=$with_boost |
440 |
boost_tmp_lib=$with_boost |
374 |
test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} |
441 |
test x"$with_boost" = x && boost_tmp_lib=${boost_cv_inc_path%/include} |
375 |
for boost_ldpath in "$boost_tmp_lib/lib" '' \ |
442 |
for boost_ldpath in "$boost_tmp_lib/lib" '' \ |
376 |
/opt/local/lib /usr/local/lib /opt/lib /usr/lib \ |
443 |
/opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ |
377 |
"$with_boost" C:/Boost/lib /lib /usr/lib64 /lib64 |
444 |
"$with_boost" C:/Boost/lib /lib* |
378 |
do |
445 |
do |
379 |
test -e "$boost_ldpath" || continue |
446 |
# Don't waste time with directories that don't exist. |
|
|
447 |
if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then |
448 |
continue |
449 |
fi |
380 |
boost_save_LDFLAGS=$LDFLAGS |
450 |
boost_save_LDFLAGS=$LDFLAGS |
381 |
# Are we looking for a static library? |
451 |
# Are we looking for a static library? |
382 |
case $boost_ldpath:$boost_rtopt_ in #( |
452 |
case $boost_ldpath:$boost_rtopt_ in #( |
383 |
*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) |
453 |
(*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) |
384 |
Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext" |
454 |
Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext" |
385 |
test -e "$Boost_lib_LIBS" || continue;; #( |
455 |
test -e "$Boost_lib_LIBS" || continue;; #( |
386 |
*) # No: use -lboost_foo to find the shared library. |
456 |
(*) # No: use -lboost_foo to find the shared library. |
387 |
Boost_lib_LIBS="-l$boost_lib";; |
457 |
Boost_lib_LIBS="-l$boost_lib";; |
388 |
esac |
458 |
esac |
389 |
boost_save_LIBS=$LIBS |
459 |
boost_save_LIBS=$LIBS |
Lines 397-404
dnl generated only once above (before we start the for loops).
Link Here
|
397 |
LDFLAGS=$boost_save_LDFLAGS |
467 |
LDFLAGS=$boost_save_LDFLAGS |
398 |
LIBS=$boost_save_LIBS |
468 |
LIBS=$boost_save_LIBS |
399 |
if test x"$Boost_lib" = xyes; then |
469 |
if test x"$Boost_lib" = xyes; then |
400 |
Boost_lib_LDFLAGS="-L$boost_ldpath -R$boost_ldpath" |
470 |
# Check or used cached result of whether or not using -R or |
401 |
break 6 |
471 |
# -rpath makes sense. Some implementations of ld, such as for |
|
|
472 |
# Mac OSX, require -rpath but -R is the flag known to work on |
473 |
# other systems. https://github.com/tsuna/boost.m4/issues/19 |
474 |
AC_CACHE_VAL([boost_cv_rpath_link_ldflag], |
475 |
[case $boost_ldpath in |
476 |
'') # Nothing to do. |
477 |
boost_cv_rpath_link_ldflag= |
478 |
boost_rpath_link_ldflag_found=yes;; |
479 |
*) |
480 |
for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do |
481 |
LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" |
482 |
LIBS="$boost_save_LIBS $Boost_lib_LIBS" |
483 |
_BOOST_AC_LINK_IFELSE([], |
484 |
[boost_rpath_link_ldflag_found=yes |
485 |
break], |
486 |
[boost_rpath_link_ldflag_found=no]) |
487 |
done |
488 |
;; |
489 |
esac |
490 |
AS_IF([test "x$boost_rpath_link_ldflag_found" != "xyes"], |
491 |
[AC_MSG_ERROR([Unable to determine whether to use -R or -rpath])]) |
492 |
LDFLAGS=$boost_save_LDFLAGS |
493 |
LIBS=$boost_save_LIBS |
494 |
]) |
495 |
test x"$boost_ldpath" != x && |
496 |
Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" |
497 |
Boost_lib_LDPATH="$boost_ldpath" |
498 |
break 7 |
402 |
else |
499 |
else |
403 |
boost_failed_libs="$boost_failed_libs@$boost_lib@" |
500 |
boost_failed_libs="$boost_failed_libs@$boost_lib@" |
404 |
fi |
501 |
fi |
Lines 408-429
done
Link Here
|
408 |
done |
505 |
done |
409 |
done |
506 |
done |
410 |
done |
507 |
done |
|
|
508 |
done # boost_lib_ |
411 |
rm -f conftest.$ac_objext |
509 |
rm -f conftest.$ac_objext |
412 |
]) |
510 |
]) |
413 |
case $Boost_lib in #( |
511 |
|
414 |
no) _AC_MSG_LOG_CONFTEST |
|
|
415 |
AC_MSG_ERROR([cannot not find the flags to link with Boost $1]) |
416 |
;; |
417 |
esac |
418 |
AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS]) |
419 |
AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS]) |
420 |
CPPFLAGS=$boost_save_CPPFLAGS |
421 |
AS_VAR_POPDEF([Boost_lib])dnl |
422 |
AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl |
423 |
AS_VAR_POPDEF([Boost_lib_LIBS])dnl |
424 |
AC_LANG_POP([C++])dnl |
425 |
fi |
426 |
])# BOOST_FIND_LIB |
427 |
|
512 |
|
428 |
|
513 |
|
429 |
# --------------------------------------- # |
514 |
# --------------------------------------- # |
Lines 434-475
fi
Link Here
|
434 |
# The page http://beta.boost.org/doc/libs is useful: it gives the first release |
519 |
# The page http://beta.boost.org/doc/libs is useful: it gives the first release |
435 |
# version of each library (among other things). |
520 |
# version of each library (among other things). |
436 |
|
521 |
|
|
|
522 |
# BOOST_DEFUN(LIBRARY, CODE) |
523 |
# -------------------------- |
524 |
# Define BOOST_<LIBRARY-UPPERCASE> as a macro that runs CODE. |
525 |
# |
526 |
# Use indir to avoid the warning on underquoted macro name given to AC_DEFUN. |
527 |
m4_define([BOOST_DEFUN], |
528 |
[m4_indir([AC_DEFUN], |
529 |
m4_toupper([BOOST_$1]), |
530 |
[m4_pushdef([BOOST_Library], [$1])dnl |
531 |
$2 |
532 |
m4_popdef([BOOST_Library])dnl |
533 |
]) |
534 |
]) |
535 |
|
437 |
# BOOST_ARRAY() |
536 |
# BOOST_ARRAY() |
438 |
# ------------- |
537 |
# ------------- |
439 |
# Look for Boost.Array |
538 |
# Look for Boost.Array |
440 |
AC_DEFUN([BOOST_ARRAY], |
539 |
BOOST_DEFUN([Array], |
441 |
[BOOST_FIND_HEADER([boost/array.hpp])]) |
540 |
[BOOST_FIND_HEADER([boost/array.hpp])]) |
442 |
|
541 |
|
443 |
|
542 |
|
444 |
# BOOST_ASIO() |
543 |
# BOOST_ASIO() |
445 |
# ------------ |
544 |
# ------------ |
446 |
# Look for Boost.Asio (new in Boost 1.35). |
545 |
# Look for Boost.Asio (new in Boost 1.35). |
447 |
AC_DEFUN([BOOST_ASIO], |
546 |
BOOST_DEFUN([Asio], |
448 |
[AC_REQUIRE([BOOST_SYSTEM])dnl |
547 |
[AC_REQUIRE([BOOST_SYSTEM])dnl |
449 |
BOOST_FIND_HEADER([boost/asio.hpp])]) |
548 |
BOOST_FIND_HEADER([boost/asio.hpp])]) |
450 |
|
549 |
|
451 |
|
550 |
|
452 |
# BOOST_BIND() |
551 |
# BOOST_BIND() |
453 |
# ------------ |
552 |
# ------------ |
454 |
# Look for Boost.Bind |
553 |
# Look for Boost.Bind. |
455 |
AC_DEFUN([BOOST_BIND], |
554 |
BOOST_DEFUN([Bind], |
456 |
[BOOST_FIND_HEADER([boost/bind.hpp])]) |
555 |
[BOOST_FIND_HEADER([boost/bind.hpp])]) |
457 |
|
556 |
|
458 |
|
557 |
|
|
|
558 |
# BOOST_CHRONO() |
559 |
# -------------- |
560 |
# Look for Boost.Chrono. |
561 |
BOOST_DEFUN([Chrono], |
562 |
[# Do we have to check for Boost.System? This link-time dependency was |
563 |
# added as of 1.35.0. If we have a version <1.35, we must not attempt to |
564 |
# find Boost.System as it didn't exist by then. |
565 |
if test $boost_major_version -ge 135; then |
566 |
BOOST_SYSTEM([$1]) |
567 |
fi # end of the Boost.System check. |
568 |
boost_filesystem_save_LIBS=$LIBS |
569 |
boost_filesystem_save_LDFLAGS=$LDFLAGS |
570 |
m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl |
571 |
LIBS="$LIBS $BOOST_SYSTEM_LIBS" |
572 |
LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" |
573 |
BOOST_FIND_LIB([chrono], [$1], |
574 |
[boost/chrono.hpp], |
575 |
[boost::chrono::thread_clock d;]) |
576 |
if test $enable_static_boost = yes && test $boost_major_version -ge 135; then |
577 |
BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" |
578 |
fi |
579 |
LIBS=$boost_filesystem_save_LIBS |
580 |
LDFLAGS=$boost_filesystem_save_LDFLAGS |
581 |
])# BOOST_CHRONO |
582 |
|
583 |
|
584 |
# BOOST_CONTEXT([PREFERRED-RT-OPT]) |
585 |
# ----------------------------------- |
586 |
# Look for Boost.Context. For the documentation of PREFERRED-RT-OPT, see the |
587 |
# documentation of BOOST_FIND_LIB above. This library was introduced in Boost |
588 |
# 1.51.0 |
589 |
BOOST_DEFUN([Context], |
590 |
[BOOST_FIND_LIB([context], [$1], |
591 |
[boost/context/all.hpp],[[ |
592 |
// creates a stack |
593 |
void * stack_pointer = new void*[4096]; |
594 |
std::size_t const size = sizeof(void*[4096]); |
595 |
|
596 |
// context fc uses f() as context function |
597 |
// fcontext_t is placed on top of context stack |
598 |
// a pointer to fcontext_t is returned |
599 |
fc = ctx::make_fcontext(stack_pointer, size, f); |
600 |
return ctx::jump_fcontext(&fcm, fc, 3) == 6;]],[dnl |
601 |
namespace ctx = boost::context; |
602 |
// context |
603 |
static ctx::fcontext_t fcm, *fc; |
604 |
// context-function |
605 |
static void f(intptr_t i) { |
606 |
ctx::jump_fcontext(fc, &fcm, i * 2); |
607 |
}]) |
608 |
])# BOOST_CONTEXT |
609 |
|
610 |
|
459 |
# BOOST_CONVERSION() |
611 |
# BOOST_CONVERSION() |
460 |
# ------------------ |
612 |
# ------------------ |
461 |
# Look for Boost.Conversion (cast / lexical_cast) |
613 |
# Look for Boost.Conversion (cast / lexical_cast) |
462 |
AC_DEFUN([BOOST_CONVERSION], |
614 |
BOOST_DEFUN([Conversion], |
463 |
[BOOST_FIND_HEADER([boost/cast.hpp]) |
615 |
[BOOST_FIND_HEADER([boost/cast.hpp]) |
464 |
BOOST_FIND_HEADER([boost/lexical_cast.hpp]) |
616 |
BOOST_FIND_HEADER([boost/lexical_cast.hpp]) |
465 |
])# BOOST_CONVERSION |
617 |
])# BOOST_CONVERSION |
466 |
|
618 |
|
467 |
|
619 |
|
|
|
620 |
# BOOST_COROUTINE([PREFERRED-RT-OPT]) |
621 |
# ----------------------------------- |
622 |
# Look for Boost.Coroutine. For the documentation of PREFERRED-RT-OPT, see the |
623 |
# documentation of BOOST_FIND_LIB above. This library was introduced in Boost |
624 |
# 1.53.0 |
625 |
BOOST_DEFUN([Coroutine], |
626 |
[ |
627 |
boost_coroutine_save_LIBS=$LIBS |
628 |
boost_coroutine_save_LDFLAGS=$LDFLAGS |
629 |
# Link-time dependency from coroutine to context |
630 |
BOOST_CONTEXT([$1]) |
631 |
# Starting from Boost 1.55 a dependency on Boost.System is added |
632 |
if test $boost_major_version -ge 155; then |
633 |
BOOST_SYSTEM([$1]) |
634 |
fi |
635 |
m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)]) |
636 |
LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS" |
637 |
LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS" |
638 |
|
639 |
BOOST_FIND_LIB([coroutine], [$1], |
640 |
[boost/coroutine/coroutine.hpp], |
641 |
[boost::coroutines::coroutine< int(int) > coro; coro.empty();]) |
642 |
|
643 |
# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54 |
644 |
# coroutine doesn't use context from its headers but from its library. |
645 |
if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then |
646 |
BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_CONTEXT_LIBS" |
647 |
BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_CONTEXT_LDFLAGS" |
648 |
fi |
649 |
if test $enable_static_boost = yes && test $boost_major_version -ge 155; then |
650 |
BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_SYSTEM_LIBS" |
651 |
BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_SYSTEM_LDFLAGS" |
652 |
fi |
653 |
LIBS=$boost_coroutine_save_LIBS |
654 |
LDFLAGS=$boost_coroutine_save_LDFLAGS |
655 |
])# BOOST_COROUTINE |
656 |
|
657 |
|
658 |
# BOOST_CRC() |
659 |
# ----------- |
660 |
# Look for Boost.CRC |
661 |
BOOST_DEFUN([CRC], |
662 |
[BOOST_FIND_HEADER([boost/crc.hpp]) |
663 |
])# BOOST_CRC |
664 |
|
665 |
|
468 |
# BOOST_DATE_TIME([PREFERRED-RT-OPT]) |
666 |
# BOOST_DATE_TIME([PREFERRED-RT-OPT]) |
469 |
# ----------------------------------- |
667 |
# ----------------------------------- |
470 |
# Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the |
668 |
# Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the |
471 |
# documentation of BOOST_FIND_LIB above. |
669 |
# documentation of BOOST_FIND_LIB above. |
472 |
AC_DEFUN([BOOST_DATE_TIME], |
670 |
BOOST_DEFUN([Date_Time], |
473 |
[BOOST_FIND_LIB([date_time], [$1], |
671 |
[BOOST_FIND_LIB([date_time], [$1], |
474 |
[boost/date_time/posix_time/posix_time.hpp], |
672 |
[boost/date_time/posix_time/posix_time.hpp], |
475 |
[boost::posix_time::ptime t;]) |
673 |
[boost::posix_time::ptime t;]) |
Lines 482-493
AC_DEFUN([BOOST_DATE_TIME],
Link Here
|
482 |
# the documentation of BOOST_FIND_LIB above. |
680 |
# the documentation of BOOST_FIND_LIB above. |
483 |
# Do not check for boost/filesystem.hpp because this file was introduced in |
681 |
# Do not check for boost/filesystem.hpp because this file was introduced in |
484 |
# 1.34. |
682 |
# 1.34. |
485 |
AC_DEFUN([BOOST_FILESYSTEM], |
683 |
BOOST_DEFUN([Filesystem], |
486 |
[# Do we have to check for Boost.System? This link-time dependency was |
684 |
[# Do we have to check for Boost.System? This link-time dependency was |
487 |
# added as of 1.35.0. If we have a version <1.35, we must not attempt to |
685 |
# added as of 1.35.0. If we have a version <1.35, we must not attempt to |
488 |
# find Boost.System as it didn't exist by then. |
686 |
# find Boost.System as it didn't exist by then. |
489 |
if test $boost_major_version -ge 135; then |
687 |
if test $boost_major_version -ge 135; then |
490 |
BOOST_SYSTEM([$1]) |
688 |
BOOST_SYSTEM([$1]) |
491 |
fi # end of the Boost.System check. |
689 |
fi # end of the Boost.System check. |
492 |
boost_filesystem_save_LIBS=$LIBS |
690 |
boost_filesystem_save_LIBS=$LIBS |
493 |
boost_filesystem_save_LDFLAGS=$LDFLAGS |
691 |
boost_filesystem_save_LDFLAGS=$LDFLAGS |
Lines 496-566
LIBS="$LIBS $BOOST_SYSTEM_LIBS"
Link Here
|
496 |
LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" |
694 |
LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" |
497 |
BOOST_FIND_LIB([filesystem], [$1], |
695 |
BOOST_FIND_LIB([filesystem], [$1], |
498 |
[boost/filesystem/path.hpp], [boost::filesystem::path p;]) |
696 |
[boost/filesystem/path.hpp], [boost::filesystem::path p;]) |
|
|
697 |
if test $enable_static_boost = yes && test $boost_major_version -ge 135; then |
698 |
BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" |
699 |
fi |
499 |
LIBS=$boost_filesystem_save_LIBS |
700 |
LIBS=$boost_filesystem_save_LIBS |
500 |
LDFLAGS=$boost_filesystem_save_LDFLAGS |
701 |
LDFLAGS=$boost_filesystem_save_LDFLAGS |
501 |
])# BOOST_FILESYSTEM |
702 |
])# BOOST_FILESYSTEM |
502 |
|
703 |
|
503 |
|
704 |
|
|
|
705 |
# BOOST_FLYWEIGHT() |
706 |
# ----------------- |
707 |
# Look for Boost.Flyweight. |
708 |
BOOST_DEFUN([Flyweight], |
709 |
[dnl There's a hidden dependency on pthreads. |
710 |
AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl |
711 |
BOOST_FIND_HEADER([boost/flyweight.hpp]) |
712 |
AC_SUBST([BOOST_FLYWEIGHT_LIBS], [$boost_cv_pthread_flag]) |
713 |
]) |
714 |
|
715 |
|
504 |
# BOOST_FOREACH() |
716 |
# BOOST_FOREACH() |
505 |
# --------------- |
717 |
# --------------- |
506 |
# Look for Boost.Foreach |
718 |
# Look for Boost.Foreach. |
507 |
AC_DEFUN([BOOST_FOREACH], |
719 |
BOOST_DEFUN([Foreach], |
508 |
[BOOST_FIND_HEADER([boost/foreach.hpp])]) |
720 |
[BOOST_FIND_HEADER([boost/foreach.hpp])]) |
509 |
|
721 |
|
510 |
|
722 |
|
511 |
# BOOST_FORMAT() |
723 |
# BOOST_FORMAT() |
512 |
# -------------- |
724 |
# -------------- |
513 |
# Look for Boost.Format |
725 |
# Look for Boost.Format. |
514 |
# Note: we can't check for boost/format/format_fwd.hpp because the header isn't |
726 |
# Note: we can't check for boost/format/format_fwd.hpp because the header isn't |
515 |
# standalone. It can't be compiled because it triggers the following error: |
727 |
# standalone. It can't be compiled because it triggers the following error: |
516 |
# boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std' |
728 |
# boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std' |
517 |
# does not name a type |
729 |
# does not name a type |
518 |
AC_DEFUN([BOOST_FORMAT], |
730 |
BOOST_DEFUN([Format], |
519 |
[BOOST_FIND_HEADER([boost/format.hpp])]) |
731 |
[BOOST_FIND_HEADER([boost/format.hpp])]) |
520 |
|
732 |
|
521 |
|
733 |
|
522 |
# BOOST_FUNCTION() |
734 |
# BOOST_FUNCTION() |
523 |
# ---------------- |
735 |
# ---------------- |
524 |
# Look for Boost.Function |
736 |
# Look for Boost.Function |
525 |
AC_DEFUN([BOOST_FUNCTION], |
737 |
BOOST_DEFUN([Function], |
526 |
[BOOST_FIND_HEADER([boost/function.hpp])]) |
738 |
[BOOST_FIND_HEADER([boost/function.hpp])]) |
527 |
|
739 |
|
528 |
|
740 |
|
|
|
741 |
# BOOST_GEOMETRY() |
742 |
# ---------------- |
743 |
# Look for Boost.Geometry (new since 1.47.0). |
744 |
BOOST_DEFUN([Geometry], |
745 |
[BOOST_FIND_HEADER([boost/geometry.hpp]) |
746 |
])# BOOST_GEOMETRY |
747 |
|
748 |
|
529 |
# BOOST_GRAPH([PREFERRED-RT-OPT]) |
749 |
# BOOST_GRAPH([PREFERRED-RT-OPT]) |
530 |
# ------------------------------- |
750 |
# ------------------------------- |
531 |
# Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the |
751 |
# Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the |
532 |
# documentation of BOOST_FIND_LIB above. |
752 |
# documentation of BOOST_FIND_LIB above. |
533 |
AC_DEFUN([BOOST_GRAPH], |
753 |
BOOST_DEFUN([Graph], |
534 |
[BOOST_FIND_LIB([graph], [$1], |
754 |
[BOOST_FIND_LIB([graph], [$1], |
535 |
[boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;]) |
755 |
[boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;]) |
536 |
])# BOOST_GRAPH |
756 |
])# BOOST_GRAPH |
537 |
|
757 |
|
538 |
|
758 |
|
539 |
# BOOST_IOSTREAMS([PREFERRED-RT-OPT]) |
759 |
# BOOST_IOSTREAMS([PREFERRED-RT-OPT]) |
540 |
# ------------------------------- |
760 |
# ----------------------------------- |
541 |
# Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the |
761 |
# Look for Boost.IOStreams. For the documentation of PREFERRED-RT-OPT, see the |
542 |
# documentation of BOOST_FIND_LIB above. |
762 |
# documentation of BOOST_FIND_LIB above. |
543 |
AC_DEFUN([BOOST_IOSTREAMS], |
763 |
BOOST_DEFUN([IOStreams], |
544 |
[BOOST_FIND_LIB([iostreams], [$1], |
764 |
[BOOST_FIND_LIB([iostreams], [$1], |
545 |
[boost/iostreams/device/file_descriptor.hpp], |
765 |
[boost/iostreams/device/file_descriptor.hpp], |
546 |
[boost::iostreams::file_descriptor fd(0); fd.close();]) |
766 |
[boost::iostreams::file_descriptor fd; fd.close();]) |
547 |
])# BOOST_IOSTREAMS |
767 |
])# BOOST_IOSTREAMS |
548 |
|
768 |
|
549 |
|
769 |
|
550 |
# BOOST_HASH() |
770 |
# BOOST_HASH() |
551 |
# ------------ |
771 |
# ------------ |
552 |
# Look for Boost.Functional/Hash |
772 |
# Look for Boost.Functional/Hash |
553 |
AC_DEFUN([BOOST_HASH], |
773 |
BOOST_DEFUN([Hash], |
554 |
[BOOST_FIND_HEADER([boost/functional/hash.hpp])]) |
774 |
[BOOST_FIND_HEADER([boost/functional/hash.hpp])]) |
555 |
|
775 |
|
556 |
|
776 |
|
557 |
# BOOST_LAMBDA() |
777 |
# BOOST_LAMBDA() |
558 |
# -------------- |
778 |
# -------------- |
559 |
# Look for Boost.Lambda |
779 |
# Look for Boost.Lambda |
560 |
AC_DEFUN([BOOST_LAMBDA], |
780 |
BOOST_DEFUN([Lambda], |
561 |
[BOOST_FIND_HEADER([boost/lambda/lambda.hpp])]) |
781 |
[BOOST_FIND_HEADER([boost/lambda/lambda.hpp])]) |
562 |
|
782 |
|
563 |
|
783 |
|
|
|
784 |
# BOOST_LOCALE() |
785 |
# -------------- |
786 |
# Look for Boost.Locale |
787 |
BOOST_DEFUN([Locale], |
788 |
[BOOST_FIND_LIB([locale], [$1], |
789 |
[boost/locale.hpp], |
790 |
[[boost::locale::generator gen; std::locale::global(gen(""));]]) |
791 |
])# BOOST_LOCALE |
792 |
|
793 |
# BOOST_LOG([PREFERRED-RT-OPT]) |
794 |
# ----------------------------- |
795 |
# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the |
796 |
# documentation of BOOST_FIND_LIB above. |
797 |
BOOST_DEFUN([Log], |
798 |
[BOOST_FIND_LIB([log], [$1], |
799 |
[boost/log/core/core.hpp], |
800 |
[boost::log::attribute a; a.get_value();]) |
801 |
])# BOOST_LOG |
802 |
|
803 |
|
804 |
# BOOST_LOG_SETUP([PREFERRED-RT-OPT]) |
805 |
# ----------------------------------- |
806 |
# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the |
807 |
# documentation of BOOST_FIND_LIB above. |
808 |
BOOST_DEFUN([Log_Setup], |
809 |
[AC_REQUIRE([BOOST_LOG])dnl |
810 |
BOOST_FIND_LIB([log_setup], [$1], |
811 |
[boost/log/utility/setup/from_settings.hpp], |
812 |
[boost::log::basic_settings<char> bs; bs.empty();]) |
813 |
])# BOOST_LOG_SETUP |
814 |
|
815 |
|
564 |
# BOOST_MATH() |
816 |
# BOOST_MATH() |
565 |
# ------------ |
817 |
# ------------ |
566 |
# Look for Boost.Math |
818 |
# Look for Boost.Math |
Lines 569-589
AC_DEFUN([BOOST_LAMBDA],
Link Here
|
569 |
# libboost_math_c99f, libboost_math_c99l, libboost_math_tr1, |
821 |
# libboost_math_c99f, libboost_math_c99l, libboost_math_tr1, |
570 |
# libboost_math_tr1f, libboost_math_tr1l). This macro must be fixed to do the |
822 |
# libboost_math_tr1f, libboost_math_tr1l). This macro must be fixed to do the |
571 |
# right thing anyway. |
823 |
# right thing anyway. |
572 |
AC_DEFUN([BOOST_MATH], |
824 |
BOOST_DEFUN([Math], |
573 |
[BOOST_FIND_HEADER([boost/math/special_functions.hpp])]) |
825 |
[BOOST_FIND_HEADER([boost/math/special_functions.hpp])]) |
574 |
|
826 |
|
575 |
|
827 |
|
|
|
828 |
# BOOST_MPI([PREFERRED-RT-OPT]) |
829 |
# ------------------------------- |
830 |
# Look for Boost MPI. For the documentation of PREFERRED-RT-OPT, see the |
831 |
# documentation of BOOST_FIND_LIB above. Uses MPICXX variable if it is |
832 |
# set, otherwise tries CXX |
833 |
# |
834 |
BOOST_DEFUN([MPI], |
835 |
[boost_save_CXX=${CXX} |
836 |
boost_save_CXXCPP=${CXXCPP} |
837 |
if test x"${MPICXX}" != x; then |
838 |
CXX=${MPICXX} |
839 |
CXXCPP="${MPICXX} -E" |
840 |
fi |
841 |
BOOST_FIND_LIB([mpi], [$1], |
842 |
[boost/mpi.hpp], |
843 |
[int argc = 0; |
844 |
char **argv = 0; |
845 |
boost::mpi::environment env(argc,argv);]) |
846 |
CXX=${boost_save_CXX} |
847 |
CXXCPP=${boost_save_CXXCPP} |
848 |
])# BOOST_MPI |
849 |
|
850 |
|
576 |
# BOOST_MULTIARRAY() |
851 |
# BOOST_MULTIARRAY() |
577 |
# ------------------ |
852 |
# ------------------ |
578 |
# Look for Boost.MultiArray |
853 |
# Look for Boost.MultiArray |
579 |
AC_DEFUN([BOOST_MULTIARRAY], |
854 |
BOOST_DEFUN([MultiArray], |
580 |
[BOOST_FIND_HEADER([boost/multi_array.hpp])]) |
855 |
[BOOST_FIND_HEADER([boost/multi_array.hpp])]) |
581 |
|
856 |
|
582 |
|
857 |
|
|
|
858 |
# BOOST_NUMERIC_UBLAS() |
859 |
# -------------------------- |
860 |
# Look for Boost.NumericUblas (Basic Linear Algebra) |
861 |
BOOST_DEFUN([Numeric_Ublas], |
862 |
[BOOST_FIND_HEADER([boost/numeric/ublas/vector.hpp]) |
863 |
])# BOOST_NUMERIC_UBLAS |
864 |
|
865 |
|
583 |
# BOOST_NUMERIC_CONVERSION() |
866 |
# BOOST_NUMERIC_CONVERSION() |
584 |
# -------------------------- |
867 |
# -------------------------- |
585 |
# Look for Boost.NumericConversion (policy-based numeric conversion) |
868 |
# Look for Boost.NumericConversion (policy-based numeric conversion) |
586 |
AC_DEFUN([BOOST_NUMERIC_CONVERSION], |
869 |
BOOST_DEFUN([Numeric_Conversion], |
587 |
[BOOST_FIND_HEADER([boost/numeric/conversion/converter.hpp]) |
870 |
[BOOST_FIND_HEADER([boost/numeric/conversion/converter.hpp]) |
588 |
])# BOOST_NUMERIC_CONVERSION |
871 |
])# BOOST_NUMERIC_CONVERSION |
589 |
|
872 |
|
Lines 591-622
AC_DEFUN([BOOST_NUMERIC_CONVERSION],
Link Here
|
591 |
# BOOST_OPTIONAL() |
874 |
# BOOST_OPTIONAL() |
592 |
# ---------------- |
875 |
# ---------------- |
593 |
# Look for Boost.Optional |
876 |
# Look for Boost.Optional |
594 |
AC_DEFUN([BOOST_OPTIONAL], |
877 |
BOOST_DEFUN([Optional], |
595 |
[BOOST_FIND_HEADER([boost/optional.hpp])]) |
878 |
[BOOST_FIND_HEADER([boost/optional.hpp])]) |
596 |
|
879 |
|
597 |
|
880 |
|
598 |
# BOOST_PREPROCESSOR() |
881 |
# BOOST_PREPROCESSOR() |
599 |
# -------------------- |
882 |
# -------------------- |
600 |
# Look for Boost.Preprocessor |
883 |
# Look for Boost.Preprocessor |
601 |
AC_DEFUN([BOOST_PREPROCESSOR], |
884 |
BOOST_DEFUN([Preprocessor], |
602 |
[BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])]) |
885 |
[BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])]) |
603 |
|
886 |
|
604 |
|
887 |
|
|
|
888 |
# BOOST_RANGE() |
889 |
# -------------------- |
890 |
# Look for Boost.Range |
891 |
BOOST_DEFUN([Range], |
892 |
[BOOST_FIND_HEADER([boost/range/adaptors.hpp])]) |
893 |
|
894 |
# BOOST_UNORDERED() |
895 |
# ----------------- |
896 |
# Look for Boost.Unordered |
897 |
BOOST_DEFUN([Unordered], |
898 |
[BOOST_FIND_HEADER([boost/unordered_map.hpp])]) |
899 |
|
900 |
|
901 |
# BOOST_UUID() |
902 |
# ------------ |
903 |
# Look for Boost.Uuid |
904 |
BOOST_DEFUN([Uuid], |
905 |
[BOOST_FIND_HEADER([boost/uuid/uuid.hpp])]) |
906 |
|
907 |
|
605 |
# BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT]) |
908 |
# BOOST_PROGRAM_OPTIONS([PREFERRED-RT-OPT]) |
606 |
# ----------------------------------------- |
909 |
# ----------------------------------------- |
607 |
# Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT, see |
910 |
# Look for Boost.Program_options. For the documentation of PREFERRED-RT-OPT, |
608 |
# the documentation of BOOST_FIND_LIB above. |
911 |
# see the documentation of BOOST_FIND_LIB above. |
609 |
AC_DEFUN([BOOST_PROGRAM_OPTIONS], |
912 |
BOOST_DEFUN([Program_Options], |
610 |
[BOOST_FIND_LIB([program_options], [$1], |
913 |
[BOOST_FIND_LIB([program_options], [$1], |
611 |
[boost/program_options.hpp], |
914 |
[boost/program_options.hpp], |
612 |
[boost::program_options::options_description d("test");]) |
915 |
[boost::program_options::options_description d("test");]) |
613 |
])# BOOST_PROGRAM_OPTIONS |
916 |
])# BOOST_PROGRAM_OPTIONS |
614 |
|
917 |
|
615 |
|
918 |
|
|
|
919 |
|
920 |
# _BOOST_PYTHON_CONFIG(VARIABLE, FLAG) |
921 |
# ------------------------------------ |
922 |
# Save VARIABLE, and define it via `python-config --FLAG`. |
923 |
# Substitute BOOST_PYTHON_VARIABLE. |
924 |
m4_define([_BOOST_PYTHON_CONFIG], |
925 |
[AC_SUBST([BOOST_PYTHON_$1], |
926 |
[`python-config --$2 2>/dev/null`])dnl |
927 |
boost_python_save_$1=$$1 |
928 |
$1="$$1 $BOOST_PYTHON_$1"]) |
929 |
|
930 |
|
931 |
# BOOST_PYTHON([PREFERRED-RT-OPT]) |
932 |
# -------------------------------- |
933 |
# Look for Boost.Python. For the documentation of PREFERRED-RT-OPT, |
934 |
# see the documentation of BOOST_FIND_LIB above. |
935 |
BOOST_DEFUN([Python], |
936 |
[_BOOST_PYTHON_CONFIG([CPPFLAGS], [includes]) |
937 |
_BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags]) |
938 |
_BOOST_PYTHON_CONFIG([LIBS], [libs]) |
939 |
m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl |
940 |
BOOST_FIND_LIBS([python], [python python3], [$1], |
941 |
[boost/python.hpp], |
942 |
[], [BOOST_PYTHON_MODULE(empty) {}]) |
943 |
CPPFLAGS=$boost_python_save_CPPFLAGS |
944 |
LDFLAGS=$boost_python_save_LDFLAGS |
945 |
LIBS=$boost_python_save_LIBS |
946 |
])# BOOST_PYTHON |
947 |
|
948 |
|
616 |
# BOOST_REF() |
949 |
# BOOST_REF() |
617 |
# ----------- |
950 |
# ----------- |
618 |
# Look for Boost.Ref |
951 |
# Look for Boost.Ref |
619 |
AC_DEFUN([BOOST_REF], |
952 |
BOOST_DEFUN([Ref], |
620 |
[BOOST_FIND_HEADER([boost/ref.hpp])]) |
953 |
[BOOST_FIND_HEADER([boost/ref.hpp])]) |
621 |
|
954 |
|
622 |
|
955 |
|
Lines 624-630
AC_DEFUN([BOOST_REF],
Link Here
|
624 |
# ------------------------------- |
957 |
# ------------------------------- |
625 |
# Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the |
958 |
# Look for Boost.Regex. For the documentation of PREFERRED-RT-OPT, see the |
626 |
# documentation of BOOST_FIND_LIB above. |
959 |
# documentation of BOOST_FIND_LIB above. |
627 |
AC_DEFUN([BOOST_REGEX], |
960 |
BOOST_DEFUN([Regex], |
628 |
[BOOST_FIND_LIB([regex], [$1], |
961 |
[BOOST_FIND_LIB([regex], [$1], |
629 |
[boost/regex.hpp], |
962 |
[boost/regex.hpp], |
630 |
[boost::regex exp("*"); boost::regex_match("foo", exp);]) |
963 |
[boost::regex exp("*"); boost::regex_match("foo", exp);]) |
Lines 635-663
AC_DEFUN([BOOST_REGEX],
Link Here
|
635 |
# --------------------------------------- |
968 |
# --------------------------------------- |
636 |
# Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see |
969 |
# Look for Boost.Serialization. For the documentation of PREFERRED-RT-OPT, see |
637 |
# the documentation of BOOST_FIND_LIB above. |
970 |
# the documentation of BOOST_FIND_LIB above. |
638 |
AC_DEFUN([BOOST_SERIALIZATION], |
971 |
BOOST_DEFUN([Serialization], |
639 |
[BOOST_FIND_LIB([serialization], [$1], |
972 |
[BOOST_FIND_LIB([serialization], [$1], |
640 |
[boost/archive/text_oarchive.hpp], |
973 |
[boost/archive/text_oarchive.hpp], |
641 |
[std::ostream* o = 0; // Cheap way to get an ostream... |
974 |
[std::ostream* o = 0; // Cheap way to get an ostream... |
642 |
boost::archive::text_oarchive t(*o);]) |
975 |
boost::archive::text_oarchive t(*o);]) |
643 |
])# BOOST_SIGNALS |
976 |
])# BOOST_SERIALIZATION |
644 |
|
977 |
|
645 |
|
978 |
|
646 |
# BOOST_SIGNALS([PREFERRED-RT-OPT]) |
979 |
# BOOST_SIGNALS([PREFERRED-RT-OPT]) |
647 |
# --------------------------------- |
980 |
# --------------------------------- |
648 |
# Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the |
981 |
# Look for Boost.Signals. For the documentation of PREFERRED-RT-OPT, see the |
649 |
# documentation of BOOST_FIND_LIB above. |
982 |
# documentation of BOOST_FIND_LIB above. |
650 |
AC_DEFUN([BOOST_SIGNALS], |
983 |
BOOST_DEFUN([Signals], |
651 |
[BOOST_FIND_LIB([signals], [$1], |
984 |
[BOOST_FIND_LIB([signals], [$1], |
652 |
[boost/signal.hpp], |
985 |
[boost/signal.hpp], |
653 |
[boost::signal<void ()> s;]) |
986 |
[boost::signal<void ()> s;]) |
654 |
])# BOOST_SIGNALS |
987 |
])# BOOST_SIGNALS |
655 |
|
988 |
|
656 |
|
989 |
|
|
|
990 |
# BOOST_SIGNALS2() |
991 |
# ---------------- |
992 |
# Look for Boost.Signals2 (new since 1.39.0). |
993 |
BOOST_DEFUN([Signals2], |
994 |
[BOOST_FIND_HEADER([boost/signals2.hpp]) |
995 |
])# BOOST_SIGNALS2 |
996 |
|
997 |
|
657 |
# BOOST_SMART_PTR() |
998 |
# BOOST_SMART_PTR() |
658 |
# ----------------- |
999 |
# ----------------- |
659 |
# Look for Boost.SmartPtr |
1000 |
# Look for Boost.SmartPtr |
660 |
AC_DEFUN([BOOST_SMART_PTR], |
1001 |
BOOST_DEFUN([Smart_Ptr], |
661 |
[BOOST_FIND_HEADER([boost/scoped_ptr.hpp]) |
1002 |
[BOOST_FIND_HEADER([boost/scoped_ptr.hpp]) |
662 |
BOOST_FIND_HEADER([boost/shared_ptr.hpp]) |
1003 |
BOOST_FIND_HEADER([boost/shared_ptr.hpp]) |
663 |
]) |
1004 |
]) |
Lines 666-679
BOOST_FIND_HEADER([boost/shared_ptr.hpp])
Link Here
|
666 |
# BOOST_STATICASSERT() |
1007 |
# BOOST_STATICASSERT() |
667 |
# -------------------- |
1008 |
# -------------------- |
668 |
# Look for Boost.StaticAssert |
1009 |
# Look for Boost.StaticAssert |
669 |
AC_DEFUN([BOOST_STATICASSERT], |
1010 |
BOOST_DEFUN([StaticAssert], |
670 |
[BOOST_FIND_HEADER([boost/static_assert.hpp])]) |
1011 |
[BOOST_FIND_HEADER([boost/static_assert.hpp])]) |
671 |
|
1012 |
|
672 |
|
1013 |
|
673 |
# BOOST_STRING_ALGO() |
1014 |
# BOOST_STRING_ALGO() |
674 |
# ------------------- |
1015 |
# ------------------- |
675 |
# Look for Boost.StringAlgo |
1016 |
# Look for Boost.StringAlgo |
676 |
AC_DEFUN([BOOST_STRING_ALGO], |
1017 |
BOOST_DEFUN([String_Algo], |
677 |
[BOOST_FIND_HEADER([boost/algorithm/string.hpp]) |
1018 |
[BOOST_FIND_HEADER([boost/algorithm/string.hpp]) |
678 |
]) |
1019 |
]) |
679 |
|
1020 |
|
Lines 683-689
AC_DEFUN([BOOST_STRING_ALGO],
Link Here
|
683 |
# Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the |
1024 |
# Look for Boost.System. For the documentation of PREFERRED-RT-OPT, see the |
684 |
# documentation of BOOST_FIND_LIB above. This library was introduced in Boost |
1025 |
# documentation of BOOST_FIND_LIB above. This library was introduced in Boost |
685 |
# 1.35.0. |
1026 |
# 1.35.0. |
686 |
AC_DEFUN([BOOST_SYSTEM], |
1027 |
BOOST_DEFUN([System], |
687 |
[BOOST_FIND_LIB([system], [$1], |
1028 |
[BOOST_FIND_LIB([system], [$1], |
688 |
[boost/system/error_code.hpp], |
1029 |
[boost/system/error_code.hpp], |
689 |
[boost::system::error_code e; e.clear();]) |
1030 |
[boost::system::error_code e; e.clear();]) |
Lines 694-700
AC_DEFUN([BOOST_SYSTEM],
Link Here
|
694 |
# ------------------------------ |
1035 |
# ------------------------------ |
695 |
# Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the |
1036 |
# Look for Boost.Test. For the documentation of PREFERRED-RT-OPT, see the |
696 |
# documentation of BOOST_FIND_LIB above. |
1037 |
# documentation of BOOST_FIND_LIB above. |
697 |
AC_DEFUN([BOOST_TEST], |
1038 |
BOOST_DEFUN([Test], |
698 |
[m4_pattern_allow([^BOOST_CHECK$])dnl |
1039 |
[m4_pattern_allow([^BOOST_CHECK$])dnl |
699 |
BOOST_FIND_LIB([unit_test_framework], [$1], |
1040 |
BOOST_FIND_LIB([unit_test_framework], [$1], |
700 |
[boost/test/unit_test.hpp], [BOOST_CHECK(2 == 2);], |
1041 |
[boost/test/unit_test.hpp], [BOOST_CHECK(2 == 2);], |
Lines 704-748
BOOST_FIND_LIB([unit_test_framework], [$1],
Link Here
|
704 |
])# BOOST_TEST |
1045 |
])# BOOST_TEST |
705 |
|
1046 |
|
706 |
|
1047 |
|
707 |
# BOOST_THREADS([PREFERRED-RT-OPT]) |
1048 |
# BOOST_THREAD([PREFERRED-RT-OPT]) |
708 |
# --------------------------------- |
1049 |
# --------------------------------- |
709 |
# Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the |
1050 |
# Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the |
710 |
# documentation of BOOST_FIND_LIB above. |
1051 |
# documentation of BOOST_FIND_LIB above. |
711 |
# FIXME: Provide an alias "BOOST_THREAD". |
1052 |
BOOST_DEFUN([Thread], |
712 |
AC_DEFUN([BOOST_THREADS], |
|
|
713 |
[dnl Having the pthread flag is required at least on GCC3 where |
1053 |
[dnl Having the pthread flag is required at least on GCC3 where |
714 |
dnl boost/thread.hpp would complain if we try to compile without |
1054 |
dnl boost/thread.hpp would complain if we try to compile without |
715 |
dnl -pthread on GNU/Linux. |
1055 |
dnl -pthread on GNU/Linux. |
716 |
AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl |
1056 |
AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl |
717 |
boost_threads_save_LIBS=$LIBS |
1057 |
boost_thread_save_LIBS=$LIBS |
718 |
boost_threads_save_CPPFLAGS=$CPPFLAGS |
1058 |
boost_thread_save_LDFLAGS=$LDFLAGS |
719 |
LIBS="$LIBS $boost_cv_pthread_flag" |
1059 |
boost_thread_save_CPPFLAGS=$CPPFLAGS |
720 |
# Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, |
1060 |
# Link-time dependency from thread to system was added as of 1.49.0. |
721 |
# boost/thread.hpp will trigger a #error if -pthread isn't used: |
1061 |
if test $boost_major_version -ge 149; then |
722 |
# boost/config/requires_threads.hpp:47:5: #error "Compiler threading support |
1062 |
BOOST_SYSTEM([$1]) |
723 |
# is not turned on. Please set the correct command line options for |
1063 |
fi # end of the Boost.System check. |
724 |
# threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" |
1064 |
m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl |
|
|
1065 |
LIBS="$LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" |
1066 |
LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" |
725 |
CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" |
1067 |
CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" |
726 |
BOOST_FIND_LIB([thread], [$1], |
1068 |
|
|
|
1069 |
# When compiling for the Windows platform, the threads library is named |
1070 |
# differently. |
1071 |
case $host_os in |
1072 |
(*mingw*) boost_thread_lib_ext=_win32;; |
1073 |
esac |
1074 |
BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext], |
1075 |
[$1], |
727 |
[boost/thread.hpp], [boost::thread t; boost::mutex m;]) |
1076 |
[boost/thread.hpp], [boost::thread t; boost::mutex m;]) |
728 |
BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $boost_cv_pthread_flag" |
1077 |
|
|
|
1078 |
BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" |
1079 |
BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS" |
729 |
BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" |
1080 |
BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" |
730 |
LIBS=$boost_threads_save_LIBS |
1081 |
LIBS=$boost_thread_save_LIBS |
731 |
CPPFLAGS=$boost_threads_save_CPPFLAGS |
1082 |
LDFLAGS=$boost_thread_save_LDFLAGS |
732 |
])# BOOST_THREADS |
1083 |
CPPFLAGS=$boost_thread_save_CPPFLAGS |
|
|
1084 |
])# BOOST_THREAD |
1085 |
|
1086 |
AU_ALIAS([BOOST_THREADS], [BOOST_THREAD]) |
733 |
|
1087 |
|
734 |
|
1088 |
|
735 |
# BOOST_TOKENIZER() |
1089 |
# BOOST_TOKENIZER() |
736 |
# ----------------- |
1090 |
# ----------------- |
737 |
# Look for Boost.Tokenizer |
1091 |
# Look for Boost.Tokenizer |
738 |
AC_DEFUN([BOOST_TOKENIZER], |
1092 |
BOOST_DEFUN([Tokenizer], |
739 |
[BOOST_FIND_HEADER([boost/tokenizer.hpp])]) |
1093 |
[BOOST_FIND_HEADER([boost/tokenizer.hpp])]) |
740 |
|
1094 |
|
741 |
|
1095 |
|
742 |
# BOOST_TRIBOOL() |
1096 |
# BOOST_TRIBOOL() |
743 |
# --------------- |
1097 |
# --------------- |
744 |
# Look for Boost.Tribool |
1098 |
# Look for Boost.Tribool |
745 |
AC_DEFUN([BOOST_TRIBOOL], |
1099 |
BOOST_DEFUN([Tribool], |
746 |
[BOOST_FIND_HEADER([boost/logic/tribool_fwd.hpp]) |
1100 |
[BOOST_FIND_HEADER([boost/logic/tribool_fwd.hpp]) |
747 |
BOOST_FIND_HEADER([boost/logic/tribool.hpp]) |
1101 |
BOOST_FIND_HEADER([boost/logic/tribool.hpp]) |
748 |
]) |
1102 |
]) |
Lines 751-815
BOOST_FIND_HEADER([boost/logic/tribool.hpp])
Link Here
|
751 |
# BOOST_TUPLE() |
1105 |
# BOOST_TUPLE() |
752 |
# ------------- |
1106 |
# ------------- |
753 |
# Look for Boost.Tuple |
1107 |
# Look for Boost.Tuple |
754 |
AC_DEFUN([BOOST_TUPLE], |
1108 |
BOOST_DEFUN([Tuple], |
755 |
[BOOST_FIND_HEADER([boost/tuple/tuple.hpp])]) |
1109 |
[BOOST_FIND_HEADER([boost/tuple/tuple.hpp])]) |
756 |
|
1110 |
|
757 |
|
1111 |
|
758 |
# BOOST_TYPETRAITS() |
1112 |
# BOOST_TYPETRAITS() |
759 |
# -------------------- |
1113 |
# -------------------- |
760 |
# Look for Boost.TypeTraits |
1114 |
# Look for Boost.TypeTraits |
761 |
AC_DEFUN([BOOST_TYPETRAITS], |
1115 |
BOOST_DEFUN([TypeTraits], |
762 |
[BOOST_FIND_HEADER([boost/type_traits.hpp])]) |
1116 |
[BOOST_FIND_HEADER([boost/type_traits.hpp])]) |
763 |
|
1117 |
|
764 |
# BOOST_UNORDERED() |
|
|
765 |
# --------------- |
766 |
# Look for Boost.Unordered (unordered_map, unordered_set |
767 |
# etc.) |
768 |
AC_DEFUN([BOOST_UNORDERED], |
769 |
[BOOST_FIND_HEADER([boost/unordered_map.hpp]) |
770 |
BOOST_FIND_HEADER([boost/unordered_set.hpp])]) |
771 |
|
1118 |
|
772 |
# BOOST_UTILITY() |
1119 |
# BOOST_UTILITY() |
773 |
# --------------- |
1120 |
# --------------- |
774 |
# Look for Boost.Utility (noncopyable, result_of, base-from-member idiom, |
1121 |
# Look for Boost.Utility (noncopyable, result_of, base-from-member idiom, |
775 |
# etc.) |
1122 |
# etc.) |
776 |
AC_DEFUN([BOOST_UTILITY], |
1123 |
BOOST_DEFUN([Utility], |
777 |
[BOOST_FIND_HEADER([boost/utility.hpp])]) |
1124 |
[BOOST_FIND_HEADER([boost/utility.hpp])]) |
778 |
|
1125 |
|
779 |
# BOOST_UUID() |
|
|
780 |
# ----------------- |
781 |
# Look for Boost.Uuid |
782 |
AC_DEFUN([BOOST_UUID], |
783 |
[BOOST_FIND_HEADER([boost/uuid/uuid.hpp]) |
784 |
BOOST_FIND_HEADER([boost/uuid/uuid_generators.hpp]) |
785 |
BOOST_FIND_HEADER([boost/uuid/uuid_io.hpp]) |
786 |
BOOST_FIND_HEADER([boost/uuid/uuid_serialize.hpp]) |
787 |
]) |
788 |
|
789 |
|
1126 |
|
790 |
# BOOST_VARIANT() |
1127 |
# BOOST_VARIANT() |
791 |
# --------------- |
1128 |
# --------------- |
792 |
# Look for Boost.Variant. |
1129 |
# Look for Boost.Variant. |
793 |
AC_DEFUN([BOOST_VARIANT], |
1130 |
BOOST_DEFUN([Variant], |
794 |
[BOOST_FIND_HEADER([boost/variant/variant_fwd.hpp]) |
1131 |
[BOOST_FIND_HEADER([boost/variant/variant_fwd.hpp]) |
795 |
BOOST_FIND_HEADER([boost/variant.hpp])]) |
1132 |
BOOST_FIND_HEADER([boost/variant.hpp])]) |
796 |
|
1133 |
|
797 |
|
1134 |
|
|
|
1135 |
# BOOST_POINTER_CONTAINER() |
1136 |
# ------------------------ |
1137 |
# Look for Boost.PointerContainer |
1138 |
BOOST_DEFUN([Pointer_Container], |
1139 |
[BOOST_FIND_HEADER([boost/ptr_container/ptr_deque.hpp]) |
1140 |
BOOST_FIND_HEADER([boost/ptr_container/ptr_list.hpp]) |
1141 |
BOOST_FIND_HEADER([boost/ptr_container/ptr_vector.hpp]) |
1142 |
BOOST_FIND_HEADER([boost/ptr_container/ptr_array.hpp]) |
1143 |
BOOST_FIND_HEADER([boost/ptr_container/ptr_set.hpp]) |
1144 |
BOOST_FIND_HEADER([boost/ptr_container/ptr_map.hpp]) |
1145 |
])# BOOST_POINTER_CONTAINER |
1146 |
|
1147 |
|
798 |
# BOOST_WAVE([PREFERRED-RT-OPT]) |
1148 |
# BOOST_WAVE([PREFERRED-RT-OPT]) |
799 |
# ------------------------------ |
1149 |
# ------------------------------ |
800 |
# NOTE: If you intend to use Wave/Spirit with thread support, make sure you |
1150 |
# NOTE: If you intend to use Wave/Spirit with thread support, make sure you |
801 |
# call BOOST_THREADS first. |
1151 |
# call BOOST_THREAD first. |
802 |
# Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the |
1152 |
# Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the |
803 |
# documentation of BOOST_FIND_LIB above. |
1153 |
# documentation of BOOST_FIND_LIB above. |
804 |
AC_DEFUN([BOOST_WAVE], |
1154 |
BOOST_DEFUN([Wave], |
805 |
[AC_REQUIRE([BOOST_FILESYSTEM])dnl |
1155 |
[AC_REQUIRE([BOOST_FILESYSTEM])dnl |
806 |
AC_REQUIRE([BOOST_DATE_TIME])dnl |
1156 |
AC_REQUIRE([BOOST_DATE_TIME])dnl |
807 |
boost_wave_save_LIBS=$LIBS |
1157 |
boost_wave_save_LIBS=$LIBS |
808 |
boost_wave_save_LDFLAGS=$LDFLAGS |
1158 |
boost_wave_save_LDFLAGS=$LDFLAGS |
809 |
m4_pattern_allow([^BOOST_((FILE)?SYSTEM|DATE_TIME|THREAD)_(LIBS|LDFLAGS)$])dnl |
1159 |
m4_pattern_allow([^BOOST_((FILE)?SYSTEM|DATE_TIME|THREAD)_(LIBS|LDFLAGS)$])dnl |
810 |
LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS\ |
1160 |
LIBS="$LIBS $BOOST_SYSTEM_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_DATE_TIME_LIBS \ |
811 |
$BOOST_THREAD_LIBS" |
1161 |
$BOOST_THREAD_LIBS" |
812 |
LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS\ |
1162 |
LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS \ |
813 |
$BOOST_DATE_TIME_LDFLAGS $BOOST_THREAD_LDFLAGS" |
1163 |
$BOOST_DATE_TIME_LDFLAGS $BOOST_THREAD_LDFLAGS" |
814 |
BOOST_FIND_LIB([wave], [$1], |
1164 |
BOOST_FIND_LIB([wave], [$1], |
815 |
[boost/wave.hpp], |
1165 |
[boost/wave.hpp], |
Lines 822-828
LDFLAGS=$boost_wave_save_LDFLAGS
Link Here
|
822 |
# BOOST_XPRESSIVE() |
1172 |
# BOOST_XPRESSIVE() |
823 |
# ----------------- |
1173 |
# ----------------- |
824 |
# Look for Boost.Xpressive (new since 1.36.0). |
1174 |
# Look for Boost.Xpressive (new since 1.36.0). |
825 |
AC_DEFUN([BOOST_XPRESSIVE], |
1175 |
BOOST_DEFUN([Xpressive], |
826 |
[BOOST_FIND_HEADER([boost/xpressive/xpressive.hpp])]) |
1176 |
[BOOST_FIND_HEADER([boost/xpressive/xpressive.hpp])]) |
827 |
|
1177 |
|
828 |
|
1178 |
|
Lines 833-840
AC_DEFUN([BOOST_XPRESSIVE],
Link Here
|
833 |
|
1183 |
|
834 |
# _BOOST_PTHREAD_FLAG() |
1184 |
# _BOOST_PTHREAD_FLAG() |
835 |
# --------------------- |
1185 |
# --------------------- |
836 |
# Internal helper for BOOST_THREADS. Based on ACX_PTHREAD: |
1186 |
# Internal helper for BOOST_THREAD. Computes boost_cv_pthread_flag |
837 |
# http://autoconf-archive.cryp.to/acx_pthread.html |
1187 |
# which must be used in CPPFLAGS and LIBS. |
|
|
1188 |
# |
1189 |
# Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, |
1190 |
# boost/thread.hpp will trigger a #error if -pthread isn't used: |
1191 |
# boost/config/requires_threads.hpp:47:5: #error "Compiler threading support |
1192 |
# is not turned on. Please set the correct command line options for |
1193 |
# threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" |
1194 |
# |
1195 |
# Based on ACX_PTHREAD: http://autoconf-archive.cryp.to/acx_pthread.html |
838 |
AC_DEFUN([_BOOST_PTHREAD_FLAG], |
1196 |
AC_DEFUN([_BOOST_PTHREAD_FLAG], |
839 |
[AC_REQUIRE([AC_PROG_CXX])dnl |
1197 |
[AC_REQUIRE([AC_PROG_CXX])dnl |
840 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
1198 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
Lines 902-907
AC_LANG_POP([C++])dnl
Link Here
|
902 |
m4_define([_BOOST_gcc_test], |
1260 |
m4_define([_BOOST_gcc_test], |
903 |
["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl |
1261 |
["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl |
904 |
|
1262 |
|
|
|
1263 |
# _BOOST_mingw_test(MAJOR, MINOR) |
1264 |
# ----------------------------- |
1265 |
# Internal helper for _BOOST_FIND_COMPILER_TAG. |
1266 |
m4_define([_BOOST_mingw_test], |
1267 |
["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC && \ |
1268 |
(defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ |
1269 |
|| defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw$1$2"])dnl |
1270 |
|
905 |
|
1271 |
|
906 |
# _BOOST_FIND_COMPILER_TAG() |
1272 |
# _BOOST_FIND_COMPILER_TAG() |
907 |
# -------------------------- |
1273 |
# -------------------------- |
Lines 911-917
m4_define([_BOOST_gcc_test],
Link Here
|
911 |
AC_DEFUN([_BOOST_FIND_COMPILER_TAG], |
1277 |
AC_DEFUN([_BOOST_FIND_COMPILER_TAG], |
912 |
[AC_REQUIRE([AC_PROG_CXX])dnl |
1278 |
[AC_REQUIRE([AC_PROG_CXX])dnl |
913 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
1279 |
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
914 |
AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag], |
1280 |
AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], |
|
|
1281 |
[boost_cv_lib_tag], |
915 |
[boost_cv_lib_tag=unknown |
1282 |
[boost_cv_lib_tag=unknown |
916 |
if test x$boost_cv_inc_path != xno; then |
1283 |
if test x$boost_cv_inc_path != xno; then |
917 |
AC_LANG_PUSH([C++])dnl |
1284 |
AC_LANG_PUSH([C++])dnl |
Lines 928-938
if test x$boost_cv_inc_path != xno; then
Link Here
|
928 |
# como, edg, kcc, bck, mp, sw, tru, xlc |
1295 |
# como, edg, kcc, bck, mp, sw, tru, xlc |
929 |
# I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines |
1296 |
# I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines |
930 |
# the same defines as GCC's). |
1297 |
# the same defines as GCC's). |
931 |
# TODO: Move the test on GCC 4.4 up once it's released. |
|
|
932 |
for i in \ |
1298 |
for i in \ |
|
|
1299 |
_BOOST_mingw_test(5, 1) \ |
1300 |
_BOOST_gcc_test(5, 1) \ |
1301 |
_BOOST_mingw_test(5, 0) \ |
1302 |
_BOOST_gcc_test(5, 0) \ |
1303 |
_BOOST_mingw_test(4, 10) \ |
1304 |
_BOOST_gcc_test(4, 10) \ |
1305 |
_BOOST_mingw_test(4, 9) \ |
1306 |
_BOOST_gcc_test(4, 9) \ |
1307 |
_BOOST_mingw_test(4, 8) \ |
1308 |
_BOOST_gcc_test(4, 8) \ |
1309 |
_BOOST_mingw_test(4, 7) \ |
1310 |
_BOOST_gcc_test(4, 7) \ |
1311 |
_BOOST_mingw_test(4, 6) \ |
1312 |
_BOOST_gcc_test(4, 6) \ |
1313 |
_BOOST_mingw_test(4, 5) \ |
1314 |
_BOOST_gcc_test(4, 5) \ |
1315 |
_BOOST_mingw_test(4, 4) \ |
1316 |
_BOOST_gcc_test(4, 4) \ |
1317 |
_BOOST_mingw_test(4, 3) \ |
933 |
_BOOST_gcc_test(4, 3) \ |
1318 |
_BOOST_gcc_test(4, 3) \ |
|
|
1319 |
_BOOST_mingw_test(4, 2) \ |
934 |
_BOOST_gcc_test(4, 2) \ |
1320 |
_BOOST_gcc_test(4, 2) \ |
|
|
1321 |
_BOOST_mingw_test(4, 1) \ |
935 |
_BOOST_gcc_test(4, 1) \ |
1322 |
_BOOST_gcc_test(4, 1) \ |
|
|
1323 |
_BOOST_mingw_test(4, 0) \ |
936 |
_BOOST_gcc_test(4, 0) \ |
1324 |
_BOOST_gcc_test(4, 0) \ |
937 |
"defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ |
1325 |
"defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ |
938 |
&& (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ |
1326 |
&& (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ |
Lines 949-955
if test x$boost_cv_inc_path != xno; then
Link Here
|
949 |
"defined __ICC && (defined __unix || defined __unix__) @ il" \ |
1335 |
"defined __ICC && (defined __unix || defined __unix__) @ il" \ |
950 |
"defined __ICL @ iw" \ |
1336 |
"defined __ICL @ iw" \ |
951 |
"defined _MSC_VER && _MSC_VER == 1300 @ vc7" \ |
1337 |
"defined _MSC_VER && _MSC_VER == 1300 @ vc7" \ |
952 |
_BOOST_gcc_test(4, 4) \ |
|
|
953 |
_BOOST_gcc_test(2, 95) \ |
1338 |
_BOOST_gcc_test(2, 95) \ |
954 |
"defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \ |
1339 |
"defined __MWERKS__ && __MWERKS__ <= 0x32FF @ cw9" \ |
955 |
"defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \ |
1340 |
"defined _MSC_VER && _MSC_VER < 1300 && !defined UNDER_CE @ vc6" \ |
Lines 999-1004
fi])dnl end of AC_CACHE_CHECK
Link Here
|
999 |
# Thread) flavors of Boost. Sets boost_guess_use_mt accordingly. |
1384 |
# Thread) flavors of Boost. Sets boost_guess_use_mt accordingly. |
1000 |
AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT], |
1385 |
AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT], |
1001 |
[# Check whether we do better use `mt' even though we weren't ask to. |
1386 |
[# Check whether we do better use `mt' even though we weren't ask to. |
|
|
1387 |
AC_LANG_PUSH([C++])dnl |
1002 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1388 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1003 |
#if defined _REENTRANT || defined _MT || defined __MT__ |
1389 |
#if defined _REENTRANT || defined _MT || defined __MT__ |
1004 |
/* use -mt */ |
1390 |
/* use -mt */ |
Lines 1006-1011
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
Link Here
|
1006 |
# error MT not needed |
1392 |
# error MT not needed |
1007 |
#endif |
1393 |
#endif |
1008 |
]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false]) |
1394 |
]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false]) |
|
|
1395 |
AC_LANG_POP([C++])dnl |
1009 |
]) |
1396 |
]) |
1010 |
|
1397 |
|
1011 |
# _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) |
1398 |
# _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) |
Lines 1029-1039
boost_use_source=:
Link Here
|
1029 |
test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && |
1416 |
test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && |
1030 |
_AS_ECHO_LOG([re-using the existing conftest.$ac_objext]) |
1417 |
_AS_ECHO_LOG([re-using the existing conftest.$ac_objext]) |
1031 |
AS_IF([_AC_DO_STDERR($ac_link) && { |
1418 |
AS_IF([_AC_DO_STDERR($ac_link) && { |
1032 |
test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || |
1419 |
test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || |
1033 |
test ! -s conftest.err |
1420 |
test ! -s conftest.err |
1034 |
} && test -s conftest$ac_exeext && { |
1421 |
} && test -s conftest$ac_exeext && { |
1035 |
test "$cross_compiling" = yes || |
1422 |
test "$cross_compiling" = yes || |
1036 |
$as_executable_p conftest$ac_exeext |
1423 |
$as_executable_p conftest$ac_exeext |
1037 |
dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough. |
1424 |
dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough. |
1038 |
}], |
1425 |
}], |
1039 |
[$2], |
1426 |
[$2], |
1040 |
- |
|
|