Add pkgconfig to Thrift C++ libraries

Reviewed By: mcslee

Other Notes: Submitted by Ben Maurer


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665377 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/Makefile.am b/lib/cpp/Makefile.am
index 6df9ab4..69ee5a6 100644
--- a/lib/cpp/Makefile.am
+++ b/lib/cpp/Makefile.am
@@ -1,13 +1,19 @@
 ACLOCAL_AMFLAGS = -I ./aclocal
 
+pkgconfigdir = $(libdir)/pkgconfig
+
 lib_LTLIBRARIES = libthrift.la
+pkgconfig_DATA = thrift.pc
+
 ## We only build the extra libraries if we have the dependencies,
 ## but we install all of the headers unconditionally.
 if AMX_HAVE_LIBEVENT
 lib_LTLIBRARIES += libthriftnb.la
+pkgconfig_DATA += thrift-nb.pc
 endif
 if AMX_HAVE_ZLIB
 lib_LTLIBRARIES += libthriftz.la
+pkgconfig_DATA += thrift-z.pc
 endif
 
 common_cxxflags = -Wall -Isrc $(BOOST_CPPFLAGS)
@@ -71,7 +77,7 @@
                          src/concurrency/Thread.h \
                          src/concurrency/ThreadManager.h \
                          src/concurrency/TimerManager.h \
-                         src/concurrency/Util.h 
+                         src/concurrency/Util.h
 
 include_protocoldir = $(include_thriftdir)/protocol
 include_protocol_HEADERS = \
@@ -120,4 +126,10 @@
 concurrency_test_CXXFLAGS =  $(common_cxxflags)
 concurrency_test_LDFLAGS =  $(common_ldflags)
 
-EXTRA_DIST = bootstrap.sh cleanup.sh LICENSE
+EXTRA_DIST =
+	bootstrap.sh \
+	cleanup.sh \
+	LICENSE \
+	thrift-nb.pc.in \
+	thrift.pc.in \
+	thrift-z.pc.in