From: Mark Slee Date: Wed, 28 Nov 2007 05:54:33 +0000 (+0000) Subject: Add pkgconfig to Thrift C++ libraries X-Git-Tag: 0.2.0~1095 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=b16074d53bd7b66d1e34dc6623637d59be717db5;p=common%2Fthrift.git 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 6df9ab4e..69ee5a64 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 @@ 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 diff --git a/lib/cpp/cleanup.sh b/lib/cpp/cleanup.sh index 687b376c..b4cc4c63 100755 --- a/lib/cpp/cleanup.sh +++ b/lib/cpp/cleanup.sh @@ -29,4 +29,7 @@ ltmain.sh \ Makefile.in \ missing \ config.hin~ \ -stamp-h1 +stamp-h1 \ +thrift.pc \ +thrift-nb.pc \ +thrift-z.pc diff --git a/lib/cpp/configure.ac b/lib/cpp/configure.ac index 25b6152c..54ea4006 100644 --- a/lib/cpp/configure.ac +++ b/lib/cpp/configure.ac @@ -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 index 00000000..4d2d6c0f --- /dev/null +++ b/lib/cpp/thrift-nb.pc.in @@ -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 index 00000000..66a16ee8 --- /dev/null +++ b/lib/cpp/thrift-z.pc.in @@ -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 index 00000000..48c5ee2f --- /dev/null +++ b/lib/cpp/thrift.pc.in @@ -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