summaryrefslogtreecommitdiff
path: root/aclocal
diff options
context:
space:
mode:
authorChristian Lavoie <clavoie@apache.org>2010-11-04 18:51:42 +0000
committerChristian Lavoie <clavoie@apache.org>2010-11-04 18:51:42 +0000
commit4f42ef7aa593b20fa17ad542f53c296032955fb7 (patch)
treebcb1217771ff0bc22c18c0462be2a88ec728a944 /aclocal
parent5aaa02166e335d6399c7345bbd8f3d83d4e481fa (diff)
downloadthrift-4f42ef7aa593b20fa17ad542f53c296032955fb7.tar.gz
THRIFT-953: Fix compilation of TransportTest.cpp on Mac (actual tests still fail) and fix boost m4 macros for Mac.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1031148 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'aclocal')
-rw-r--r--aclocal/ax_boost_base.m48
1 files changed, 8 insertions, 0 deletions
diff --git a/aclocal/ax_boost_base.m4 b/aclocal/ax_boost_base.m4
index c96d1b662..5894d0cab 100644
--- a/aclocal/ax_boost_base.m4
+++ b/aclocal/ax_boost_base.m4
@@ -70,11 +70,13 @@ if test "x$want_boost" = "xyes"; then
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
+ BOOST_ROOT_PATH="$ac_boost_path"
else
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
+ BOOST_ROOT_PATH="$ac_boost_path_tmp"
break;
fi
done
@@ -88,6 +90,8 @@ if test "x$want_boost" = "xyes"; then
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
+ export BOOST_ROOT_PATH
+
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
@@ -141,6 +145,7 @@ if test "x$want_boost" = "xyes"; then
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
+ BOOST_ROOT_PATH="$best_path"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
@@ -152,6 +157,7 @@ if test "x$want_boost" = "xyes"; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
+ BOOST_ROOT_PATH="$BOOST_ROOT"
fi
fi
fi
@@ -161,6 +167,7 @@ if test "x$want_boost" = "xyes"; then
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
+ export BOOST_ROOT_PATH
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -189,6 +196,7 @@ if test "x$want_boost" = "xyes"; then
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
+ AC_SUBST(BOOST_ROOT_PATH)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi