Skip to content

Commit ca66717

Browse files
theunigavinandresen
authored andcommitted
build: make libboost_chrono mandatory
previously it was only used with certain boost versions. Now all versions require it.
1 parent 928b950 commit ca66717

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

configure.ac

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,17 +590,15 @@ fi
590590

591591
if test x$use_boost = xyes; then
592592

593-
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
593+
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB $BOOST_CHRONO_LIB"
594594

595595
dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
596596
dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if
597597
dnl a working version is available, else fall back to sleep. sleep was removed
598598
dnl after 1.56.
599599
dnl If neither is available, abort.
600-
dnl If sleep_for is used, boost_chrono becomes a requirement.
601-
if test x$ax_cv_boost_chrono = xyes; then
602600
TEMP_LIBS="$LIBS"
603-
LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB $LIBS"
601+
LIBS="$BOOST_LIBS $LIBS"
604602
TEMP_CPPFLAGS="$CPPFLAGS"
605603
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
606604
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
@@ -613,12 +611,11 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
613611
choke me
614612
#endif
615613
]])],
616-
[boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB";
614+
[boost_sleep=yes;
617615
AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
618616
[boost_sleep=no])
619617
LIBS="$TEMP_LIBS"
620618
CPPFLAGS="$TEMP_CPPFLAGS"
621-
fi
622619

623620
if test x$boost_sleep != xyes; then
624621
TEMP_LIBS="$LIBS"

0 commit comments

Comments
 (0)