From d59c3208115c4c29e53ff02d29f1198f6a941a5c Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Fri, 18 Oct 2019 16:18:19 +0200 Subject: [PATCH] [926-configure-failed-since-cannot-find-stdlib-h] Use -isystem only with -Werror --- m4macros/ax_boost_for_kea.m4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/m4macros/ax_boost_for_kea.m4 b/m4macros/ax_boost_for_kea.m4 index f5d307260a..10f25561de 100644 --- a/m4macros/ax_boost_for_kea.m4 +++ b/m4macros/ax_boost_for_kea.m4 @@ -71,7 +71,13 @@ fi # Check the path with some specific headers. CPPFLAGS_SAVED="$CPPFLAGS" if test "${boost_include_path}" ; then - BOOST_INCLUDES="-isystem ${boost_include_path}" + # -isystem silents warnings for boost headers but messes the include + # order too so uses it when all warnings are made into errors. + if test "$with_werror" = 1; then + BOOST_INCLUDES="-isystem ${boost_include_path}" + else + BOOST_INCLUDES="-I${boost_include_path}" + fi CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES" fi AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp boost/interprocess/sync/interprocess_upgradable_mutex.hpp boost/date_time/posix_time/posix_time_types.hpp boost/bind.hpp boost/function.hpp boost/asio.hpp boost/asio/ip/address.hpp boost/system/error_code.hpp boost/atomic.hpp boost/circular_buffer.hpp],, -- 2.47.2