Closed rkennedy closed 10 years ago
I merged this as tsuna/boost.m4@9c52a7dfd710a09dc8e1c7de90e483536bcadcc5, thanks for the change. I modified your commit slightly so that _BOOST_SED_CPP
itself does the AC_LANG_PUSH
/ AC_LANG_POP
, hope this makes sense to you too.
The default language is C, but since Boost is inherently a C++ library, it makes sense to invoke the C++ compiler for all Boost-related Autoconf tests, even if no C++ code is actually being compiled.
This change wraps the call to
_BOOST_SED_CPP
when detecting Boost's version, as well as the code for detecting the environment's multithreading status in_BOOST_GUESS_WHETHER_TO_USE_MT
.This has an added side effect, which is that when not using Libtool, there's no dependency on C at all — the
CC
,CFLAGS
, andCPP
macros don't affect the configure script. Technically, Boost.m4 depends on Libtool, but in my experience, the only thing it uses is the$libext
variable, and then only when searching for a static library to link with. I can circumvent the full Libtool dependency by simply setting$libext
directly (usually toa
, but tolib
on Windows compilers). This allows for faster configurations since we don't have to detect and test the capabilities of a C compiler that will never actually be used.Even when Libtool is used (as recommended), I think it's still better to perform the version and multithreading checks in C++ mode since they should really be testing C++ headers and C++ compiler settings, even when the analogous C values would most likely be the same.