Test UnboundedBlockingQueue in ThreadPoolExecutorTest
[folly.git] / folly / m4 / ax_boost_context.m4
index f4a8b11a8a8616aa637f0977a969c90097a3267d..47f79471aa08a66c53164991e47b74fedb3d78e6 100644 (file)
@@ -69,8 +69,22 @@ AC_DEFUN([AX_BOOST_CONTEXT],
                        CXXFLAGS_SAVE=$CXXFLAGS
 
                        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                               [[@%:@include <boost/context/all.hpp>]],
-                               [[boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);]])],
+                               [[@%:@include <boost/version.hpp>
+#if BOOST_VERSION >= 106100
+#include <boost/context/detail/fcontext.hpp>
+#else
+#include <boost/context/fcontext.hpp>
+#endif
+]],
+                               [[#if BOOST_VERSION >= 106100
+  boost::context::detail::fcontext_t fc = boost::context::detail::make_fcontext(0, 0, 0);
+#elif BOOST_VERSION >= 105600
+  boost::context::fcontext_t fc = boost::context::make_fcontext(0, 0, 0);
+#else
+  boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);
+#endif
+]]
+                               )],
                                ax_cv_boost_context=yes, ax_cv_boost_context=no)
                                CXXFLAGS=$CXXFLAGS_SAVE
                        AC_LANG_POP([C++])