From f5601296c571639de99e08ad41493c6d5be06a9a Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 9 Mar 2009 09:03:15 +0100 Subject: [PATCH] Configure option to specify Boost toolset. A new option, --with-boost-toolset, allows Boost toolset to be given. --- boost.m4 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/boost.m4 b/boost.m4 index 0bbcdbd..5b6f109 100644 --- a/boost.m4 +++ b/boost.m4 @@ -23,7 +23,7 @@ AC_DEFUN([ID_BOOST], BOOST_REQ_VERSION=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 100 + [$]3;}'` CPPFLAGS="$CPPFLAGS -DBOOST_REQ_VERSION=${BOOST_REQ_VERSION}" - AC_ARG_WITH([boost],[[ --with-boost=DIR use Boost in prefix DIR]]) + AC_ARG_WITH([boost],[ --with-boost=DIR use Boost in prefix DIR]) if test "$with_boost" = "yes" -o -z "$with_boost"; then BOOST_CPPFLAGS="" BOOST_LIB="" @@ -36,6 +36,12 @@ AC_DEFUN([ID_BOOST], done fi fi + AC_ARG_WITH([boost-toolset],[ --with-boost-toolset=x use Boost toolset (eg gcc43)]) + if test "$with_boost_toolset" = "yes" -o -z "$with_boost_toolset"; then + BOOST_TOOLSET="" + else + BOOST_TOOLSET="-${with_boost_toolset}" + fi if test "${with_boost}" = "no"; then AC_MSG_RESULT([disabled]) else @@ -62,7 +68,7 @@ version_is:BOOST_VERSION AC_SUBST([BOOST_THREAD_LIB]) saveLIBS="${LIBS}" BOOST_THREAD_LIB="" - for l in boost_thread-mt boost_thread; do + for l in boost_thread${BOOST_TOOLSET}-mt boost_thread${BOOST_TOOLSET}; do LIBS="${saveLIBS} -l${l}" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include @@ -84,7 +90,7 @@ int x = BOOST_VERSION; saveLIBS="${LIBS}" AC_SUBST([BOOST_TEST_LIB]) BOOST_TEST_LIB="" - for l in boost_unit_test_framework-mt boost_unit_test_framework; do + for l in boost_unit_test_framework${BOOST_TOOLSET}-mt boost_unit_test_framework${BOOST_TOOLSET}; do LIBS="${saveLIBS} -l${l}" AC_LINK_IFELSE([AC_LANG_SOURCE([[ #define BOOST_TEST_DYN_LINK -- 1.7.10.4