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++])