Add pkgconfig to Thrift C++ libraries
authorMark Slee <mcslee@apache.org>
Wed, 28 Nov 2007 05:54:33 +0000 (05:54 +0000)
committerMark Slee <mcslee@apache.org>
Wed, 28 Nov 2007 05:54:33 +0000 (05:54 +0000)
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

lib/cpp/Makefile.am
lib/cpp/cleanup.sh
lib/cpp/configure.ac
lib/cpp/thrift-nb.pc.in [new file with mode: 0644]
lib/cpp/thrift-z.pc.in [new file with mode: 0644]
lib/cpp/thrift.pc.in [new file with mode: 0644]

index 6df9ab4..69ee5a6 100644 (file)
@@ -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 @@ include_concurrency_HEADERS = \
                          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_LDADD = libthrift.la
 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
index 687b376..b4cc4c6 100755 (executable)
@@ -29,4 +29,7 @@ ltmain.sh \
 Makefile.in \
 missing \
 config.hin~ \
-stamp-h1
+stamp-h1 \
+thrift.pc \
+thrift-nb.pc \
+thrift-z.pc
index 25b6152..54ea400 100644 (file)
@@ -1,6 +1,6 @@
 AC_PREREQ(2.59)
 
-AC_INIT(thriftcpp, 1.0)
+AC_INIT(thriftcpp, [20070917])
 
 AC_CONFIG_SRCDIR(src/Thrift.h)
 
@@ -120,4 +120,9 @@ AC_PROG_LIBTOOL
 
 AC_PROG_MAKE_SET
 
-AC_OUTPUT(Makefile)
+AC_OUTPUT([
+        Makefile
+        thrift-nb.pc
+        thrift.pc
+        thrift-z.pc
+])
diff --git a/lib/cpp/thrift-nb.pc.in b/lib/cpp/thrift-nb.pc.in
new file mode 100644 (file)
index 0000000..4d2d6c0
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Thrift
+Description: Thrift Nonblocking API
+Version: @VERSION@
+Requires: thrift = @VERSION@
+Libs: -L${libdir} -lthriftnb
+Cflags: -I${includedir}/thrift
diff --git a/lib/cpp/thrift-z.pc.in b/lib/cpp/thrift-z.pc.in
new file mode 100644 (file)
index 0000000..66a16ee
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Thrift
+Description: Thrift Zlib API
+Version: @VERSION@
+Requires: thrift = @VERSION@
+Libs: -L${libdir} -lthriftz
+Cflags: -I${includedir}/thrift
diff --git a/lib/cpp/thrift.pc.in b/lib/cpp/thrift.pc.in
new file mode 100644 (file)
index 0000000..48c5ee2
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Thrift
+Description: Thrift C++ API
+Version: @VERSION@
+Libs: -L${libdir} -lthrift
+Cflags: -I${includedir}/thrift