From d63b68b35559fb882a86e819663ed37b7e329a37 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Wed, 2 Jan 2019 15:33:59 +0100 Subject: [PATCH] [380-unexpected-boost-include-capture] Added a protection against capture from extra boost in include path --- m4macros/ax_boost_for_kea.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/m4macros/ax_boost_for_kea.m4 b/m4macros/ax_boost_for_kea.m4 index 59f462a560..0d172cb238 100644 --- a/m4macros/ax_boost_for_kea.m4 +++ b/m4macros/ax_boost_for_kea.m4 @@ -79,6 +79,14 @@ AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp boost/interprocess/sync AC_CHECK_HEADERS(boost/asio/coroutine.hpp,,AC_MSG_RESULT(not found, using built-in header.)) +# Verify that the path does not capture standard headers. +AC_TRY_COMPILE([ +#include +#ifdef BOOST_RE_REGEX_H +#error "boost/regex.h" +#endif],,, +[AC_MSG_ERROR([${boost_include_path}/regex.h is used in place of /usr/include/regex.h: please remove the extra boost at the end of the include path.])]) + # clang can cause false positives with -Werror without -Qunused-arguments. # it can be triggered if used with ccache. AC_CHECK_DECL([__clang__], [CLANG_CXXFLAGS="-Qunused-arguments"], []) -- 2.47.2