]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1223] Updated configure tools
authorFrancis Dupont <fdupont@isc.org>
Fri, 8 May 2020 11:06:17 +0000 (13:06 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 22 May 2020 17:15:20 +0000 (17:15 +0000)
configure.ac
m4macros/ax_boost_for_kea.m4

index f453c724e8fc8464b7243d5b5a8a5efb34ff0ae2..21f1d345cf6866da58d768ee58a40296b128c6a2 100755 (executable)
@@ -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 <regex>
@@ -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,
index 7090eecebe627ee4d284875f82a221930f63c13c..3b2ac8bd1d85e69bd83c8dd7d709d6b274f6b2a1 100644 (file)
@@ -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.))