From 068ebf0df2b91c42adf221f6f7ccfc299202847c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 8 Aug 2011 15:11:13 +0200 Subject: [PATCH] Honor --with-boost when checking for Boost headers --- ac/ax_boost_others.m4 | 15 +++++++++++++-- ac/boost.m4 | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ac/ax_boost_others.m4 b/ac/ax_boost_others.m4 index c85209600..0da9bdefd 100644 --- a/ac/ax_boost_others.m4 +++ b/ac/ax_boost_others.m4 @@ -1,5 +1,16 @@ -AC_DEFUN([AX_BOOST_ALGORITHM_STRING],[ +AC_DEFUN([AX_BOOST_CHECK_HEADERS],[ + CPPFLAGS_SAVED="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" + export CPPFLAGS + + LDFLAGS_SAVED="$LDFLAGS" + LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" + export LDFLAGS + AC_LANG_PUSH(C++) - AC_CHECK_HEADERS(boost/algorithm/string.hpp, , ax_cv_boost_algorithm_string=no) + AC_CHECK_HEADERS([$1]) AC_LANG_POP() + + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" ]) diff --git a/ac/boost.m4 b/ac/boost.m4 index 5745d17db..06b727cff 100644 --- a/ac/boost.m4 +++ b/ac/boost.m4 @@ -48,7 +48,7 @@ if test x"$ax_cv_boost_property_tree" = "xincluded"; then fi # boost::algorithm::string must be present -AX_BOOST_ALGORITHM_STRING() -if test x"$ax_cv_boost_algorithm_string" = xno ; then +AX_BOOST_CHECK_HEADERS(boost/algorithm/string.hpp) +if test x"$ac_cv_header_boost_algorithm_string_hpp" != xyes ; then AC_MSG_ERROR(The Boost String Algorithm Library was not found.) fi