Thrift: Zlib transport.
Summary:
Add a new transport to the C++ library: TZLibTransport.
This wraps another transport (just like TBufferedTransport),
compresses the data written to it, and uncompresses the data it reads.
Reviewed By: mcslee
Test Plan:
For ax_lib_zlib.m4
- Ran ./bootstrap.sh.
- Looked at configure.
- Ran ./configure.
- Looked at config.status
- Ran ./configure --with-zlib=/usr.
- Looked at config.status
- Changed configure.ac to AC_LIB_ZLIB(1.2.4)
- Ran ./configure.
- Watched it fail.
For TZlibTransport
- test/ZlibTest.cpp
- Code coverage (hotness) report sent with review.
- 100% line coverage for all the good stuff.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665262 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/configure.ac b/lib/cpp/configure.ac
index 0208f1b..6d0e59d 100644
--- a/lib/cpp/configure.ac
+++ b/lib/cpp/configure.ac
@@ -70,6 +70,19 @@
AX_EVENT_BASE([1.2.0])
+AX_LIB_ZLIB([1.2.3])
+if test "$success" = "no"; then
+ AC_MSG_ERROR([
+ Thrift currently requires zlib 1.2.3 or greater in order to build.
+ You should use your system's package management software to install
+ zlib. (Make sure to install the development package.) If that
+ doesn't work, you can get zlib from http://www.zlib.net/. If you
+ already have zlib installed somewhere other than /usr, /usr/local,
+ /opt, or /opt/zlib, you can run configure with the --with-zlib=DIR
+ argument to specify its location for the configure script.
+ ])
+fi
+
AC_CHECK_LIB(pthread, pthread_create)
AC_CHECK_LIB(rt, sched_get_priority_min)