]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[926-configure-failed-since-cannot-find-stdlib-h] Use -isystem only with -Werror 926-configure-failed-since-cannot-find-stdlib-h
authorFrancis Dupont <fdupont@isc.org>
Fri, 18 Oct 2019 14:18:19 +0000 (16:18 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 18 Oct 2019 14:18:19 +0000 (16:18 +0200)
m4macros/ax_boost_for_kea.m4

index f5d307260aea614fdbdcf5569f606618a0c20af3..10f25561deb4ce14f358cb15c029045adfe1f773 100644 (file)
@@ -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],,