From: Adam Dickmeiss Date: Mon, 29 Apr 2013 13:36:24 +0000 (+0200) Subject: For Boost thread, link with Boost.System MP-438 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=4f6aa8a41e50ad350463ee2418c28a5b3c7279ff;p=m4-moved-to-github.git For Boost thread, link with Boost.System MP-438 But only if Boost version >= 1.41.0 . --- diff --git a/boost.m4 b/boost.m4 index b667071..ff8e0f6 100644 --- a/boost.m4 +++ b/boost.m4 @@ -73,15 +73,19 @@ version_is:BOOST_VERSION AC_SUBST([BOOST_THREAD_LIB]) saveLIBS="${LIBS}" BOOST_THREAD_LIB="" - for l in boost_thread${BOOST_TOOLSET}-mt boost_thread${BOOST_TOOLSET}; do - LIBS="${saveLIBS} -l${l}" + for l in ${BOOST_TOOLSET}-mt ${BOOST_TOOLSET}; do + trylib="-lboost_thread${l}" + if test "$BOOST_GOT_VERSION" -ge 104100; then + trylib="-lboost_system${l} ${trylib}" + fi + LIBS="${saveLIBS} ${trylib}" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include ]],[[ int x = BOOST_VERSION; ]])],[ - BOOST_THREAD_LIB="-l${l}" + BOOST_THREAD_LIB="${trylib}" break],[]) done if test "${BOOST_THREAD_LIB}"; then