Thrift: Revamp build to use a single configure.ac.

Summary:
Ben Maurer suggested that it would make sense for Thrift to build as
a single project, with one configure.ac and multiple Makefile.am.
He was also kind enough to do the heavy lifting, and this commit
is the application of his patch (with minor modifications).
The most significant visible change from this diff is that
in order to buidl one of the thrift sub-projects (i.e.: the compiler,
the C++ library, or the Python library) you must run bootstrap.sh
and configure in the Thrift root, then make in the specific project.
Users who want to build and install the Python library but
can't run configure because they don't have Boost can simply
run setup.py directly.

Reviewed By: mcslee

Test Plan: Built Thrift from scratch.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665409 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/COPYING b/lib/cpp/COPYING
deleted file mode 100644
index 039f21e..0000000
--- a/lib/cpp/COPYING
+++ /dev/null
@@ -1,24 +0,0 @@
-Thrift Software License
-Copyright (c) 2006- Facebook, Inc. 
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
diff --git a/lib/cpp/LICENSE b/lib/cpp/LICENSE
deleted file mode 100644
index 039f21e..0000000
--- a/lib/cpp/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-Thrift Software License
-Copyright (c) 2006- Facebook, Inc. 
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index 69ee5a6..92ccf99 100644
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -61,7 +61,7 @@
 
 include_thriftdir = $(includedir)/thrift
 include_thrift_HEADERS = \
-                         config.h \
+                         $(top_srcdir)/config.h \
                          src/Thrift.h \
 												 src/TReflectionLocal.h \
                          src/reflection_limited_types.h \
@@ -126,10 +126,8 @@
 concurrency_test_CXXFLAGS =  $(common_cxxflags)
 concurrency_test_LDFLAGS =  $(common_ldflags)
 
-EXTRA_DIST =
-	bootstrap.sh \
-	cleanup.sh \
-	LICENSE \
+EXTRA_DIST = \
+	README \
 	thrift-nb.pc.in \
 	thrift.pc.in \
 	thrift-z.pc.in
diff --git a/lib/cpp/aclocal/ax_boost_base.m4 b/lib/cpp/aclocal/ax_boost_base.m4
deleted file mode 100644
index f225bff..0000000
--- a/lib/cpp/aclocal/ax_boost_base.m4
+++ /dev/null
@@ -1,186 +0,0 @@
-dnl @synopsis AX_BOOST([MINIMUM-VERSION])
-dnl
-dnl Test for the Boost C++ libraries of a particular version (or newer)
-dnl
-dnl If no path to the installed boost library is given the macro
-dnl searchs under /usr, /usr/local, and /opt, and evaluates the
-dnl $BOOST_ROOT environment variable. Further documentation is
-dnl available at <http://randspringer.de/boost/index.html>.
-dnl
-dnl This macro calls:
-dnl
-dnl   AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
-dnl
-dnl And sets:
-dnl
-dnl   HAVE_BOOST
-dnl
-dnl @category InstalledPackages
-dnl @category Cxx
-dnl @author Thomas Porschberg <thomas@randspringer.de>
-dnl @version 2006-06-15
-dnl @license AllPermissive
-
-AC_DEFUN([AX_BOOST_BASE],
-[
-AC_ARG_WITH([boost],
-	AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is yes) - it is possible to specify an alternate root directory for boost]),
-	[
-    if test "$withval" = "no"; then
-		want_boost="no"
-    elif test "$withval" = "yes"; then
-        want_boost="yes"
-        ac_boost_path=""
-    else
-        want_boost="yes"
-        ac_boost_path="$withval"
-	fi
-    ],
-    [want_boost="yes"])
-
-if test "x$want_boost" = "xyes"; then
-	boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
-	boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
-	boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
-	boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
-	boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
-	if test "x$boost_lib_version_req_sub_minor" = "x" ; then
-		boost_lib_version_req_sub_minor="0"
-    	fi
-	WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+  $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
-	AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
-	succeeded=no
-
-	dnl first we check the system location for boost libraries
-	dnl this location ist chosen if boost libraries are installed with the --layout=system option
-	dnl or if you install boost with RPM
-	if test "$ac_boost_path" != ""; then
-		BOOST_LDFLAGS="-L$ac_boost_path/lib"
-		BOOST_CPPFLAGS="-I$ac_boost_path/include"
-	else
-		for ac_boost_path_tmp in /usr /usr/local /opt ; 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"
-				break;
-			fi
-		done
-	fi
-
-	CPPFLAGS_SAVED="$CPPFLAGS"
-	CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-	export CPPFLAGS
-
-	LDFLAGS_SAVED="$LDFLAGS"
-	LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
-	export LDFLAGS
-
-	AC_LANG_PUSH(C++)
-     	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-	@%:@include <boost/version.hpp>
-	]], [[
-	#if BOOST_VERSION >= $WANT_BOOST_VERSION
-	// Everything is okay
-	#else
-	#  error Boost version is too old
-	#endif
-	]])],[
-        AC_MSG_RESULT(yes)
-	succeeded=yes
-	found_system=yes
-       	],[
-       	])
-	AC_LANG_POP([C++])
-
-
-
-	dnl if we found no boost with system layout we search for boost libraries
-	dnl built and installed without the --layout=system option or for a staged(not installed) version
-	if test "x$succeeded" != "xyes"; then
-		_version=0
-		if test "$ac_boost_path" != ""; then
-               		BOOST_LDFLAGS="-L$ac_boost_path/lib"
-			if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
-				for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
-					_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
-					V_CHECK=`expr $_version_tmp \> $_version`
-					if test "$V_CHECK" = "1" ; then
-						_version=$_version_tmp
-					fi
-					VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
-					BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
-				done
-			fi
-		else
-			for ac_boost_path in /usr /usr/local /opt ; do
-				if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
-					for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
-						_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
-						V_CHECK=`expr $_version_tmp \> $_version`
-						if test "$V_CHECK" = "1" ; then
-							_version=$_version_tmp
-	               					best_path=$ac_boost_path
-						fi
-					done
-				fi
-			done
-
-			VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
-			BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
-			BOOST_LDFLAGS="-L$best_path/lib"
-
-	    		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
-					version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
-					stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
-			        	stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
-					V_CHECK=`expr $stage_version_shorten \>\= $_version`
-				        if test "$V_CHECK" = "1" ; 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"
-					fi
-				fi
-	    		fi
-		fi
-
-		CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-		export CPPFLAGS
-		LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
-		export LDFLAGS
-
-		AC_LANG_PUSH(C++)
-	     	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-		@%:@include <boost/version.hpp>
-		]], [[
-		#if BOOST_VERSION >= $WANT_BOOST_VERSION
-		// Everything is okay
-		#else
-		#  error Boost version is too old
-		#endif
-		]])],[
-        	AC_MSG_RESULT(yes)
-		succeeded=yes
-		found_system=yes
-       		],[
-	       	])
-		AC_LANG_POP([C++])
-	fi
-
-	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.]])
-		else
-			AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
-		fi
-	else
-		AC_SUBST(BOOST_CPPFLAGS)
-		AC_SUBST(BOOST_LDFLAGS)
-		AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
-	fi
-
-        CPPFLAGS="$CPPFLAGS_SAVED"
-       	LDFLAGS="$LDFLAGS_SAVED"
-fi
-
-])
diff --git a/lib/cpp/aclocal/ax_lib_event.m4 b/lib/cpp/aclocal/ax_lib_event.m4
deleted file mode 100644
index 9266df4..0000000
--- a/lib/cpp/aclocal/ax_lib_event.m4
+++ /dev/null
@@ -1,169 +0,0 @@
-dnl @synopsis AX_LIB_EVENT([MINIMUM-VERSION])
-dnl
-dnl Test for the libevent library of a particular version (or newer).
-dnl
-dnl If no path to the installed libevent is given, the macro will first try
-dnl using no -I or -L flags, then searches under /usr, /usr/local, /opt,
-dnl and /opt/libevent.
-dnl If these all fail, it will try the $LIBEVENT_ROOT environment variable.
-dnl
-dnl This macro requires that #include <sys/types.h> works and defines u_char.
-dnl
-dnl This macro calls:
-dnl   AC_SUBST(LIBEVENT_CPPFLAGS)
-dnl   AC_SUBST(LIBEVENT_LDFLAGS)
-dnl   AC_SUBST(LIBEVENT_LIBS)
-dnl
-dnl And (if libevent is found):
-dnl   AC_DEFINE(HAVE_LIBEVENT)
-dnl
-dnl It also leaves the shell variables "success" and "ax_have_libevent"
-dnl set to "yes" or "no".
-dnl
-dnl NOTE: This macro does not currently work for cross-compiling,
-dnl       but it can be easily modified to allow it.  (grep "cross").
-dnl
-dnl @category InstalledPackages
-dnl @category C
-dnl @author David Reiss <dreiss@facebook.com>
-dnl @version 2007-09-12
-dnl @license AllPermissive
-
-dnl Input: ax_libevent_path, WANT_LIBEVENT_VERSION
-dnl Output: success=yes/no
-AC_DEFUN([AX_LIB_EVENT_DO_CHECK],
-         [
-          # Save our flags.
-          CPPFLAGS_SAVED="$CPPFLAGS"
-          LDFLAGS_SAVED="$LDFLAGS"
-          LIBS_SAVED="$LIBS"
-          LD_LIBRARY_PATH_SAVED="$LD_LIBRARY_PATH"
-
-          # Set our flags if we are checking a specific directory.
-          if test -n "$ax_libevent_path" ; then
-            LIBEVENT_CPPFLAGS="-I$ax_libevent_path/include"
-            LIBEVENT_LDFLAGS="-L$ax_libevent_path/lib"
-            LD_LIBRARY_PATH="$ax_libevent_path/lib:$LD_LIBRARY_PATH"
-          else
-            LIBEVENT_CPPFLAGS=""
-            LIBEVENT_LDFLAGS=""
-          fi
-
-          # Required flag for libevent.
-          LIBEVENT_LIBS="-levent"
-
-          # Prepare the environment for compilation.
-          CPPFLAGS="$CPPFLAGS $LIBEVENT_CPPFLAGS"
-          LDFLAGS="$LDFLAGS $LIBEVENT_LDFLAGS"
-          LIBS="$LIBS $LIBEVENT_LIBS"
-          export CPPFLAGS
-          export LDFLAGS
-          export LIBS
-          export LD_LIBRARY_PATH
-
-          success=no
-
-          # Compile, link, and run the program.  This checks:
-          # - event.h is available for including.
-          # - event_get_version() is available for linking.
-          # - The event version string is lexicographically greater
-          #   than the required version.
-          AC_LANG_PUSH([C])
-          dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling,
-          dnl but then the version cannot be checked.
-          AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-          #include <sys/types.h>
-          #include <event.h>
-          ]], [[
-          const char* lib_version = event_get_version();
-          const char* wnt_version = "$WANT_LIBEVENT_VERSION";
-          for (;;) {
-            /* If we reached the end of the want version.  We have it. */
-            if (*wnt_version == '\0') {
-              return 0;
-            }
-            /* If the want version continues but the lib version does not, */
-            /* we are missing a letter.  We don't have it. */
-            if (*lib_version == '\0') {
-              return 1;
-            }
-            /* If we have greater than what we want.  We have it. */
-            if (*lib_version > *wnt_version) {
-              return 0;
-            }
-            /* If we have less, we don't. */
-            if (*lib_version < *wnt_version) {
-              return 1;
-            }
-            lib_version++;
-            wnt_version++;
-          }
-          return 0;
-          ]])], [
-          success=yes
-          ])
-          AC_LANG_POP([C])
-
-          # Restore flags.
-          CPPFLAGS="$CPPFLAGS_SAVED"
-          LDFLAGS="$LDFLAGS_SAVED"
-          LIBS="$LIBS_SAVED"
-          LD_LIBRARY_PATH="$LD_LIBRARY_PATH_SAVED"
-         ])
-
-
-AC_DEFUN([AX_LIB_EVENT],
-         [
-
-          dnl Allow search path to be overridden on the command line.
-          AC_ARG_WITH([libevent],
-                      AS_HELP_STRING([--with-libevent@<:@=DIR@:>@], [use libevent (default is yes) - it is possible to specify an alternate root directory for libevent]),
-                      [
-                       if test "x$withval" = "xno"; then
-                         want_libevent="no"
-                       elif test "x$withval" = "xyes"; then
-                         want_libevent="yes"
-                         ax_libevent_path=""
-                       else
-                         want_libevent="yes"
-                         ax_libevent_path="$withval"
-                       fi
-                       ],
-                       [ want_libevent="yes" ; ax_libevent_path="" ])
-
-
-          if test "$want_libevent" = "yes"; then
-            WANT_LIBEVENT_VERSION=ifelse([$1], ,1.2,$1)
-
-            AC_MSG_CHECKING(for libevent >= $WANT_LIBEVENT_VERSION)
-
-            # Run tests.
-            if test -n "$ax_libevent_path"; then
-              AX_LIB_EVENT_DO_CHECK
-            else
-              for ax_libevent_path in "" /usr /usr/local /opt /opt/libevent "$LIBEVENT_ROOT" ; do
-                AX_LIB_EVENT_DO_CHECK
-                if test "$success" = "yes"; then
-                  break;
-                fi
-              done
-            fi
-
-            if test "$success" != "yes" ; then
-              AC_MSG_RESULT(no)
-              LIBEVENT_CPPFLAGS=""
-              LIBEVENT_LDFLAGS=""
-              LIBEVENT_LIBS=""
-            else
-              AC_MSG_RESULT(yes)
-              AC_DEFINE(HAVE_LIBEVENT,,[define if libevent is available])
-            fi
-
-            ax_have_libevent="$success"
-
-            AC_SUBST(LIBEVENT_CPPFLAGS)
-            AC_SUBST(LIBEVENT_LDFLAGS)
-            AC_SUBST(LIBEVENT_LIBS)
-          fi
-
-          ])
diff --git a/lib/cpp/aclocal/ax_lib_zlib.m4 b/lib/cpp/aclocal/ax_lib_zlib.m4
deleted file mode 100644
index 40e96df..0000000
--- a/lib/cpp/aclocal/ax_lib_zlib.m4
+++ /dev/null
@@ -1,169 +0,0 @@
-dnl @synopsis AX_LIB_ZLIB([MINIMUM-VERSION])
-dnl
-dnl Test for the libz library of a particular version (or newer).
-dnl
-dnl If no path to the installed zlib is given, the macro will first try
-dnl using no -I or -L flags, then searches under /usr, /usr/local, /opt,
-dnl and /opt/zlib.
-dnl If these all fail, it will try the $ZLIB_ROOT environment variable.
-dnl
-dnl This macro calls:
-dnl   AC_SUBST(ZLIB_CPPFLAGS)
-dnl   AC_SUBST(ZLIB_LDFLAGS)
-dnl   AC_SUBST(ZLIB_LIBS)
-dnl
-dnl And (if zlib is found):
-dnl   AC_DEFINE(HAVE_ZLIB)
-dnl
-dnl It also leaves the shell variables "success" and "ax_have_zlib"
-dnl set to "yes" or "no".
-dnl
-dnl NOTE: This macro does not currently work for cross-compiling,
-dnl       but it can be easily modified to allow it.  (grep "cross").
-dnl
-dnl @category InstalledPackages
-dnl @category C
-dnl @author David Reiss <dreiss@facebook.com>
-dnl @version 2007-09-12
-dnl @license AllPermissive
-
-dnl Input: ax_zlib_path, WANT_ZLIB_VERSION
-dnl Output: success=yes/no
-AC_DEFUN([AX_LIB_ZLIB_DO_CHECK],
-         [
-          # Save our flags.
-          CPPFLAGS_SAVED="$CPPFLAGS"
-          LDFLAGS_SAVED="$LDFLAGS"
-          LIBS_SAVED="$LIBS"
-          LD_LIBRARY_PATH_SAVED="$LD_LIBRARY_PATH"
-
-          # Set our flags if we are checking a specific directory.
-          if test -n "$ax_zlib_path" ; then
-            ZLIB_CPPFLAGS="-I$ax_zlib_path/include"
-            ZLIB_LDFLAGS="-L$ax_zlib_path/lib"
-            LD_LIBRARY_PATH="$ax_zlib_path/lib:$LD_LIBRARY_PATH"
-          else
-            ZLIB_CPPFLAGS=""
-            ZLIB_LDFLAGS=""
-          fi
-
-          # Required flag for zlib.
-          ZLIB_LIBS="-lz"
-
-          # Prepare the environment for compilation.
-          CPPFLAGS="$CPPFLAGS $ZLIB_CPPFLAGS"
-          LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
-          LIBS="$LIBS $ZLIB_LIBS"
-          export CPPFLAGS
-          export LDFLAGS
-          export LIBS
-          export LD_LIBRARY_PATH
-
-          success=no
-
-          # Compile, link, and run the program.  This checks:
-          # - zlib.h is available for including.
-          # - zlibVersion() is available for linking.
-          # - ZLIB_VERNUM is greater than or equal to the desired version.
-          # - ZLIB_VERSION (defined in zlib.h) matches zlibVersion()
-          #   (defined in the library).
-          AC_LANG_PUSH([C])
-          dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling.
-          AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-          #include <zlib.h>
-          #if ZLIB_VERNUM >= 0x$WANT_ZLIB_VERSION
-          #else
-          # error zlib is too old
-          #endif
-          ]], [[
-          const char* lib_version = zlibVersion();
-          const char* hdr_version = ZLIB_VERSION;
-          for (;;) {
-            if (*lib_version != *hdr_version) {
-              /* If this happens, your zlib header doesn't match your zlib */
-              /* library.  That is really bad. */
-              return 1;
-            }
-            if (*lib_version == '\0') {
-              break;
-            }
-            lib_version++;
-            hdr_version++;
-          }
-          return 0;
-          ]])], [
-          success=yes
-          ])
-          AC_LANG_POP([C])
-
-          # Restore flags.
-          CPPFLAGS="$CPPFLAGS_SAVED"
-          LDFLAGS="$LDFLAGS_SAVED"
-          LIBS="$LIBS_SAVED"
-          LD_LIBRARY_PATH="$LD_LIBRARY_PATH_SAVED"
-         ])
-
-
-AC_DEFUN([AX_LIB_ZLIB],
-         [
-
-          dnl Allow search path to be overridden on the command line.
-          AC_ARG_WITH([zlib],
-                      AS_HELP_STRING([--with-zlib@<:@=DIR@:>@], [use zlib (default is yes) - it is possible to specify an alternate root directory for zlib]),
-                      [
-                       if test "$withval" = "xno"; then
-                         want_zlib="no"
-                       elif test "$withval" = "xyes"; then
-                         want_zlib="yes"
-                         ax_zlib_path=""
-                       else
-                         want_zlib="yes"
-                         ax_zlib_path="$withval"
-                       fi
-                       ],
-                       [want_zlib="yes" ; ax_zlib_path="" ])
-
-
-          if test "$want_zlib" = "yes"; then
-            # Parse out the version.
-            zlib_version_req=ifelse([$1], ,1.2.3,$1)
-            zlib_version_req_major=`expr $zlib_version_req : '\([[0-9]]*\)'`
-            zlib_version_req_minor=`expr $zlib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
-            zlib_version_req_patch=`expr $zlib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
-            if test -z "$zlib_version_req_patch" ; then
-              zlib_version_req_patch="0"
-            fi
-            WANT_ZLIB_VERSION=`expr $zlib_version_req_major \* 1000 \+  $zlib_version_req_minor \* 100 \+ $zlib_version_req_patch \* 10`
-
-            AC_MSG_CHECKING(for zlib >= $zlib_version_req)
-
-            # Run tests.
-            if test -n "$ax_zlib_path"; then
-              AX_LIB_ZLIB_DO_CHECK
-            else
-              for ax_zlib_path in "" /usr /usr/local /opt /opt/zlib "$ZLIB_ROOT" ; do
-                AX_LIB_ZLIB_DO_CHECK
-                if test "$success" = "yes"; then
-                  break;
-                fi
-              done
-            fi
-
-            if test "$success" != "yes" ; then
-              AC_MSG_RESULT(no)
-              ZLIB_CPPFLAGS=""
-              ZLIB_LDFLAGS=""
-              ZLIB_LIBS=""
-            else
-              AC_MSG_RESULT(yes)
-              AC_DEFINE(HAVE_ZLIB,,[define if zlib is available])
-            fi
-
-            ax_have_zlib="$success"
-
-            AC_SUBST(ZLIB_CPPFLAGS)
-            AC_SUBST(ZLIB_LDFLAGS)
-            AC_SUBST(ZLIB_LIBS)
-          fi
-
-          ])
diff --git a/lib/cpp/bootstrap.sh b/lib/cpp/bootstrap.sh
deleted file mode 100755
index 4c59d14..0000000
--- a/lib/cpp/bootstrap.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-./cleanup.sh
-autoscan
-autoheader
-aclocal -I ./aclocal
-if libtoolize --version 1 >/dev/null 2>/dev/null; then
-  libtoolize --automake
-elif glibtoolize --version 1 >/dev/null 2>/dev/null; then
-  glibtoolize --automake
-fi
-touch NEWS README AUTHORS ChangeLog
-autoconf
-automake -ac
diff --git a/lib/cpp/cleanup.sh b/lib/cpp/cleanup.sh
deleted file mode 100755
index b4cc4c6..0000000
--- a/lib/cpp/cleanup.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-make clean 1>/dev/null 2>/dev/null
-rm -rf \
-AUTHORS \
-ChangeLog \
-INSTALL \
-Makefile \
-Makefile.in \
-Makefile.orig \
-NEWS \
-aclocal.m4 \
-autom4te.cache \
-autoscan.log \
-config.guess \
-config.h \
-config.hin \
-config.log \
-config.status \
-config.sub \
-configure \
-configure.scan \
-depcomp \
-.deps \
-install-sh \
-.libs \
-libtool \
-ltmain.sh \
-Makefile.in \
-missing \
-config.hin~ \
-stamp-h1 \
-thrift.pc \
-thrift-nb.pc \
-thrift-z.pc
diff --git a/lib/cpp/configure.ac b/lib/cpp/configure.ac
deleted file mode 100644
index 54ea400..0000000
--- a/lib/cpp/configure.ac
+++ /dev/null
@@ -1,128 +0,0 @@
-AC_PREREQ(2.59)
-
-AC_INIT(thriftcpp, [20070917])
-
-AC_CONFIG_SRCDIR(src/Thrift.h)
-
-AC_PROG_CC
-
-AC_PROG_CXX
-
-AC_LANG([C++])
-
-AM_INIT_AUTOMAKE
-
-AC_FUNC_MALLOC
-
-AC_FUNC_MEMCMP
-
-AC_FUNC_REALLOC
-
-AC_FUNC_SELECT_ARGTYPES
-
-AC_FUNC_STRERROR_R
-
-AC_CHECK_FUNCS([bzero])
-
-AC_CHECK_FUNCS([gethostbyname])
-
-AC_CHECK_FUNCS([gettimeofday])
-
-AC_CHECK_FUNCS([memset])
-
-AC_CHECK_FUNCS([select])
-
-AC_CHECK_FUNCS([socket])
-
-AC_CHECK_FUNCS([strtol])
-
-AC_CHECK_FUNCS([strtoul])
-
-AC_CHECK_FUNCS([memmove])
-
-AC_CHECK_FUNCS([strstr])
-
-AC_CHECK_FUNCS([strchr])
-
-AC_CHECK_HEADERS([arpa/inet.h])
-
-AC_CHECK_HEADERS([fcntl.h])
-
-AC_CHECK_HEADERS([inttypes.h])
-
-AC_CHECK_HEADERS([netdb.h])
-
-AC_CHECK_HEADERS([netinet/in.h])
-
-AC_CHECK_HEADERS([pthread.h])
-
-AC_CHECK_HEADERS([stddef.h])
-
-AC_CHECK_HEADERS([sys/socket.h])
-
-AC_CHECK_HEADERS([sys/time.h])
-
-AC_CHECK_HEADERS([unistd.h])
-
-AC_CHECK_HEADERS([endian.h])
-
-AC_C_INLINE
-
-AX_BOOST_BASE([1.33.1])
-
-AX_LIB_EVENT([1.0])
-AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$success" = "yes"])
-
-AX_LIB_ZLIB([1.2.3])
-AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$success" = "yes"])
-
-AC_CHECK_LIB(pthread, pthread_create)
-
-AC_CHECK_LIB(rt, sched_get_priority_min)
-
-AC_CHECK_FUNCS([clock_gettime])
-
-AC_C_CONST
-
-AC_C_VOLATILE
-
-AC_HEADER_STDBOOL
-
-AC_HEADER_STDC
-
-AC_HEADER_TIME
-
-AC_TYPE_OFF_T
-
-AC_TYPE_MODE_T
-
-AC_TYPE_SIZE_T
-
-AC_TYPE_INT16_T
-
-AC_TYPE_INT32_T
-
-AC_TYPE_INT64_T
-
-AC_TYPE_UINT16_T
-
-AC_TYPE_UINT32_T
-
-AC_TYPE_UINT64_T
-
-AC_TYPE_UINT8_T
-
-AC_CONFIG_HEADERS(config.h:config.hin)
-
-AC_PROG_INSTALL
-
-AC_PROG_LIBTOOL
-
-AC_PROG_MAKE_SET
-
-AC_OUTPUT([
-        Makefile
-        thrift-nb.pc
-        thrift.pc
-        thrift-z.pc
-])