From ef5e81b1acdc6e0091c8bc9170bff1e83c7e990e Mon Sep 17 00:00:00 2001 From: David Reiss Date: Tue, 31 Aug 2010 16:51:28 +0000 Subject: [PATCH] THRIFT-507. Only use Boost for building the C++ library - Make AX_BOOST_BASE warn instead of fataling if Boost is not found. - If Boost is not found, disable compilation of the C++ library. - Do not use CPPFLAGS or LDFLAGS from Boost when building the compiler. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991253 13f79535-47bb-0310-9956-ffa450edef68 --- aclocal/ax_boost_base.m4 | 5 +++-- compiler/cpp/Makefile.am | 4 ++-- configure.ac | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/aclocal/ax_boost_base.m4 b/aclocal/ax_boost_base.m4 index e56bb738..c96d1b66 100644 --- a/aclocal/ax_boost_base.m4 +++ b/aclocal/ax_boost_base.m4 @@ -24,6 +24,7 @@ # LAST MODIFICATION # # 2007-07-28 +# Modified for use in Thrift # # COPYLEFT # @@ -181,9 +182,9 @@ if test "x$want_boost" = "xyes"; then if test "$succeeded" != "yes" ; then if test "$_version" = "0" ; then - AC_MSG_ERROR([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) + AC_MSG_WARN([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) else - AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) + AC_MSG_WARN([Your boost libraries seems to old (version $_version).]) fi else AC_SUBST(BOOST_CPPFLAGS) diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am index 4e7b9c04..6d0d409d 100644 --- a/compiler/cpp/Makefile.am +++ b/compiler/cpp/Makefile.am @@ -108,8 +108,8 @@ if THRIFT_GEN_js thrift_SOURCES += src/generate/t_js_generator.cc endif -thrift_CXXFLAGS = -Wall -I$(srcdir)/src $(BOOST_CPPFLAGS) -thrift_LDFLAGS = -Wall $(BOOST_LDFLAGS) +thrift_CXXFLAGS = -Wall -I$(srcdir)/src +thrift_LDFLAGS = -Wall thrift_LDADD = @LEXLIB@ diff --git a/configure.ac b/configure.ac index 838aa94c..bee025f1 100644 --- a/configure.ac +++ b/configure.ac @@ -74,14 +74,14 @@ AC_PROG_LN_S AC_PROG_MKDIR_P AC_LANG([C++]) -AX_BOOST_BASE([1.33.1]) AX_THRIFT_LIB(cpp, [C++], yes) have_cpp=no if test "$with_cpp" = "yes"; then - # Just set this to yes for now, since there is no way - # to get through configure without the C++ requirements. - have_cpp="yes" + AX_BOOST_BASE([1.33.1]) + if test "x$succeeded" == "xyes" ; then + have_cpp="yes" + fi AX_LIB_EVENT([1.0]) have_libevent=$success -- 2.17.1