X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=boost.m4;h=bffcf4a89d18b62f5cf809262d10aa4f98d5c5b3;hb=666db2b922a031302d0224750337a17364ec0191;hp=0bbcdbd39dd223fd941116eb8e50bcc44e8d2dc7;hpb=67d13d0e0d554e1a5092de442dbd74a8f283af96;p=m4-moved-to-github.git diff --git a/boost.m4 b/boost.m4 index 0bbcdbd..bffcf4a 100644 --- a/boost.m4 +++ b/boost.m4 @@ -23,19 +23,29 @@ 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="" else - BOOST_LIB="-L${with_boost}/lib" + for b in ${with_boost}/lib ${with_boost}/lib64; do + if test -d "$b"; then + BOOST_LIB="-L$b" + fi + done BOOST_CPPFLAGS="-I${with_boost}/include" - if test ! -f "${with_boost}/include/version.hpp"; then + if test ! -f "${with_boost}/include/boost/version.hpp"; then for b in ${with_boost}/include/boost-*; do BOOST_CPPFLAGS="-I$b" 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 +72,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 +94,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