]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[380-unexpected-boost-include-capture] Added a protection against capture from extra...
authorFrancis Dupont <fdupont@isc.org>
Wed, 2 Jan 2019 14:33:59 +0000 (15:33 +0100)
committerFrancis Dupont <fdupont@isc.org>
Tue, 12 Feb 2019 18:14:24 +0000 (13:14 -0500)
m4macros/ax_boost_for_kea.m4

index 59f462a560e44e63f7011d32bb39ada3797f54b4..0d172cb238409cb969d8777809dc0c23ec1988f5 100644 (file)
@@ -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 <regex.h>
+#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"], [])