summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-02-17 11:59:32 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-02-17 11:59:32 +0100
commit93c69637ffc878d02fa860079804465d2684d794 (patch)
treec6c23039476cff909cf2d593afc7b3a98b9cc304 /configure.ac
parentbe9bf4801bc157ec1bf522500772222de914a212 (diff)
Improve configure support for --with-system-boost --with-boost=...
...by doing the Boost header checks (are they necessary at all, or does AX_BOOST_BASE cover them anyway?) with BOOST_CPPFLAGS already set. Change-Id: I341043fc514cf286c1ca295e69ff6cd4d3e7974c
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 11 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 5b08534159dc..d8e1abd9f47a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8240,20 +8240,28 @@ AC_MSG_CHECKING([which boost to use])
if test "$with_system_boost" = "yes"; then
AC_MSG_RESULT([external])
SYSTEM_BOOST=YES
+ AX_BOOST_BASE
+ AX_BOOST_DATE_TIME
+ mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
+ libo_MINGW_TRY_DLL([BOOST_DATE_TIME], [$mingw_boost_date_time_dll])
+ if test -z "$MINGW_BOOST_DATE_TIME_DLL"; then
+ # if not found, try again with 'lib' prefix
+ libo_MINGW_CHECK_DLL([BOOST_DATE_TIME],
+ [lib$mingw_boost_date_time_dll])
+ fi
AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS"
AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
[AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
[AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
AC_CHECK_HEADER(boost/function.hpp, [],
[AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
-
- save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -fno-exceptions"
AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/function.hpp>
]], [[]])],[ac_cv_cxx_boost_no_exceptions_broken=no],[ac_cv_cxx_boost_no_exceptions_broken=yes])
-
if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then
AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131])
else
@@ -8261,16 +8269,6 @@ if test "$with_system_boost" = "yes"; then
fi
CXXFLAGS=$save_CXXFLAGS
AC_LANG_POP([C++])
-
- AX_BOOST_BASE
- AX_BOOST_DATE_TIME
- mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
- libo_MINGW_TRY_DLL([BOOST_DATE_TIME], [$mingw_boost_date_time_dll])
- if test -z "$MINGW_BOOST_DATE_TIME_DLL"; then
- # if not found, try again with 'lib' prefix
- libo_MINGW_CHECK_DLL([BOOST_DATE_TIME],
- [lib$mingw_boost_date_time_dll])
- fi
else
AC_MSG_RESULT([internal])
BUILD_TYPE="$BUILD_TYPE BOOST"