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
diff --git a/aclocal/ax_boost_base.m4 b/aclocal/ax_boost_base.m4
index e56bb73..c96d1b6 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 "$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 <boost/version.hpp>. 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 <boost/version.hpp>. 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 4e7b9c0..6d0d409 100644
--- a/compiler/cpp/Makefile.am
+++ b/compiler/cpp/Makefile.am
@@ -108,8 +108,8 @@
 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 838aa94..bee025f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,14 +74,14 @@
 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