|
|
@ -1231,57 +1231,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
LIBS="$TEMP_LIBS"
|
|
|
|
LIBS="$TEMP_LIBS"
|
|
|
|
CPPFLAGS="$TEMP_CPPFLAGS"
|
|
|
|
CPPFLAGS="$TEMP_CPPFLAGS"
|
|
|
|
|
|
|
|
|
|
|
|
dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
|
|
|
|
|
|
|
|
dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if
|
|
|
|
|
|
|
|
dnl a working version is available, else fall back to sleep. sleep was removed
|
|
|
|
|
|
|
|
dnl after 1.56.
|
|
|
|
|
|
|
|
dnl If neither is available, abort.
|
|
|
|
|
|
|
|
TEMP_LIBS="$LIBS"
|
|
|
|
|
|
|
|
LIBS="$BOOST_LIBS $LIBS"
|
|
|
|
|
|
|
|
TEMP_CPPFLAGS="$CPPFLAGS"
|
|
|
|
|
|
|
|
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
|
|
|
|
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
|
|
|
|
#include <boost/thread/thread.hpp>
|
|
|
|
|
|
|
|
#include <boost/version.hpp>
|
|
|
|
|
|
|
|
]],[[
|
|
|
|
|
|
|
|
#if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200)
|
|
|
|
|
|
|
|
boost::this_thread::sleep_for(boost::chrono::milliseconds(0));
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
choke me
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
]])],
|
|
|
|
|
|
|
|
[boost_sleep=yes;
|
|
|
|
|
|
|
|
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
|
|
|
|
|
|
|
|
[boost_sleep=no])
|
|
|
|
|
|
|
|
LIBS="$TEMP_LIBS"
|
|
|
|
|
|
|
|
CPPFLAGS="$TEMP_CPPFLAGS"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if test x$boost_sleep != xyes; then
|
|
|
|
|
|
|
|
TEMP_LIBS="$LIBS"
|
|
|
|
|
|
|
|
LIBS="$BOOST_LIBS $LIBS"
|
|
|
|
|
|
|
|
TEMP_CPPFLAGS="$CPPFLAGS"
|
|
|
|
|
|
|
|
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
|
|
|
|
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
|
|
|
|
#include <boost/version.hpp>
|
|
|
|
|
|
|
|
#include <boost/thread.hpp>
|
|
|
|
|
|
|
|
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
|
|
|
|
|
|
|
]],[[
|
|
|
|
|
|
|
|
#if BOOST_VERSION <= 105600
|
|
|
|
|
|
|
|
boost::this_thread::sleep(boost::posix_time::milliseconds(0));
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
choke me
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
]])],
|
|
|
|
|
|
|
|
[boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
|
|
|
|
|
|
|
|
[boost_sleep=no])
|
|
|
|
|
|
|
|
LIBS="$TEMP_LIBS"
|
|
|
|
|
|
|
|
CPPFLAGS="$TEMP_CPPFLAGS"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if test x$boost_sleep != xyes; then
|
|
|
|
|
|
|
|
AC_MSG_ERROR(No working boost sleep implementation found.)
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if test x$use_pkgconfig = xyes; then
|
|
|
|
if test x$use_pkgconfig = xyes; then
|
|
|
|