Honor --with-boost when checking for Boost headers

This commit is contained in:
Moritz Bunkus 2011-08-08 15:11:13 +02:00
parent c86c66e70e
commit 068ebf0df2
2 changed files with 15 additions and 4 deletions

View File

@ -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"
])

View File

@ -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