build: make libboost_chrono mandatory
previously it was only used with certain boost versions. Now all versions require it.
This commit is contained in:
parent
928b950e3b
commit
ca66717d89
@ -590,17 +590,15 @@ fi
|
||||
|
||||
if test x$use_boost = xyes; then
|
||||
|
||||
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
|
||||
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB"
|
||||
|
||||
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.
|
||||
dnl If sleep_for is used, boost_chrono becomes a requirement.
|
||||
if test x$ax_cv_boost_chrono = xyes; then
|
||||
TEMP_LIBS="$LIBS"
|
||||
LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB $LIBS"
|
||||
LIBS="$BOOST_LIBS $LIBS"
|
||||
TEMP_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@ -613,12 +611,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
choke me
|
||||
#endif
|
||||
]])],
|
||||
[boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB";
|
||||
[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"
|
||||
fi
|
||||
|
||||
if test x$boost_sleep != xyes; then
|
||||
TEMP_LIBS="$LIBS"
|
||||
|
Loading…
Reference in New Issue
Block a user