]> granicus.if.org Git - pdns/commitdiff
Disable boost.m4's BOOST_CONTEXT tests for Boost <= 1.51
authorAndrew Nelless <andrew@nelless.net>
Sat, 27 Feb 2016 23:20:42 +0000 (23:20 +0000)
committerAndrew Nelless <andrew@nelless.net>
Sun, 28 Feb 2016 11:10:14 +0000 (11:10 +0000)
pdns/recursordist/configure.ac

index 72753c92d2aa452c38da23da2ecd6f7c79bdcfe3..f3c61897a6254ee1231ef0dd9e66979ecfefb002 100644 (file)
@@ -33,8 +33,26 @@ AC_PROG_LIBTOOL
 
 PDNS_CHECK_OS
 
+AC_DEFUN([PDNS_SELECT_CONTEXT_IMPL], [
+    AC_MSG_CHECKING([for Boost version >= 1.52])
+    AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+#include <boost/version.hpp>
+#if BOOST_VERSION <= 105100
+#error
+#endif
+    ]])], [
+        AC_MSG_RESULT([yes])
+        AC_MSG_NOTICE([MTasker will use the Boost Context library for context switching])
+        BOOST_CONTEXT
+    ], [
+        AC_MSG_RESULT([no])
+        AC_MSG_NOTICE([MTasker will use System V contexts for context switching])
+    ])
+])
+
 BOOST_REQUIRE([1.35])
-BOOST_CONTEXT()
+PDNS_SELECT_CONTEXT_IMPL
+
 PDNS_ENABLE_REPRODUCIBLE
 
 PDNS_WITH_LUAJIT