From 87d2b693849cae13fc86fec4c8a27ff20ea9c0cd Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Fri, 8 May 2020 13:06:17 +0200 Subject: [PATCH] [#1223] Updated configure tools --- configure.ac | 11 +++++++++-- m4macros/ax_boost_for_kea.m4 | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f453c724e8..21f1d345cf 100755 --- a/configure.ac +++ b/configure.ac @@ -555,6 +555,7 @@ AC_TRY_COMPILE([ AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if sockaddr has a sa_len member, and corresponding sin_len and sun_len])], AC_MSG_RESULT(no)) +usable_regex= AC_MSG_CHECKING(for usuable C++11 regex) AC_TRY_RUN([ #include @@ -566,8 +567,14 @@ int main() { return result ? EXIT_SUCCESS : EXIT_FAILURE; }], [AC_MSG_RESULT(yes) - AC_DEFINE(USE_REGEX, 1, [Define to 1 if C++11 regex is usable])], - AC_MSG_RESULT(no)) + usable_regex="yes"], + [AC_MSG_RESULT(no) + usable_regex="no"], + [AC_MSG_RESULT(cross compiling)]) +# Be optimistic for cross compiling. +if test "x$usable_regex" != "xno" ; then + AC_DEFINE(USE_REGEX, 1, [Define to 1 if C++11 regex is usable]) +fi # Run the gtest detection routines. This supports --with-gtest and --with-gtest-source # parameters. If specified, those will set the HAVE_GTEST, HAVE_GTEST_SOURCE, diff --git a/m4macros/ax_boost_for_kea.m4 b/m4macros/ax_boost_for_kea.m4 index 7090eecebe..3b2ac8bd1d 100644 --- a/m4macros/ax_boost_for_kea.m4 +++ b/m4macros/ax_boost_for_kea.m4 @@ -74,7 +74,7 @@ if test "${boost_include_path}" ; then BOOST_INCLUDES="-isystem ${boost_include_path}" 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],, +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/asio/signal_set.hpp boost/system/error_code.hpp boost/atomic.hpp boost/circular_buffer.hpp],, AC_MSG_ERROR([Missing required header files.])) AC_CHECK_HEADERS(boost/asio/coroutine.hpp,,AC_MSG_RESULT(not found, using built-in header.))