From: Adam Dickmeiss Date: Mon, 21 Apr 2008 08:16:15 +0000 (+0200) Subject: Check for Boost libs ending with suffix "-mt" and without. X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=b5276fbb202d7e84f4bb8f30e2eed80490db6b8a;p=m4-moved-to-github.git Check for Boost libs ending with suffix "-mt" and without. --- diff --git a/boost.m4 b/boost.m4 index bd0ca60..f3dd675 100644 --- a/boost.m4 +++ b/boost.m4 @@ -54,7 +54,16 @@ version_is:BOOST_VERSION case $c in thread) AC_SUBST([BOOST_THREAD_LIB]) - BOOST_THREAD_LIB="-lboost_thread-mt" + BOOST_THREAD_LIB="" + for l in boost_thread-mt boost_thread; do + AC_CHECK_LIB([${l}],[main],[ + BOOST_THREAD_LIB="-l${l}" + break + ],[]) + done + if test -z "${BOOST_THREAD_LIB}"; then + AC_MSG_ERROR([Boost thread libs not found]) + fi LIBS="${LIBS} ${BOOST_THREAD_LIB}" AC_MSG_CHECKING([Boost threads]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ @@ -69,8 +78,17 @@ AC_MSG_ERROR([Boost thread libraries required]) ;; test) AC_SUBST([BOOST_TEST_LIB]) + BOOST_TEST_LIB="" + for l in boost_unit_test_framework-mt boost_unit_test_framework; do + AC_CHECK_LIB([${l}],[main],[ + BOOST_TEST_LIB="-l${l}" + break + ],[]) + done + if test -z "${BOOST_TEST_LIB}"; then + AC_MSG_ERROR([Boost unit test libs not found]) + fi saveLIBS="${LIBS}" - BOOST_TEST_LIB="-lboost_unit_test_framework-mt" LIBS="${LIBS} ${BOOST_TEST_LIB}" AC_MSG_CHECKING([Boost unit test framework]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[