From eef747bba81e66b2d551a3670a659bbe9dd4a8ce Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 20 Nov 2014 20:45:24 +0000 Subject: [PATCH] libbitcoinconsensus: Add pkg-config support --- Makefile.am | 5 +++++ configure.ac | 1 + libbitcoinconsensus.pc.in | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 libbitcoinconsensus.pc.in diff --git a/Makefile.am b/Makefile.am index 6bc0044313..9b4d52c63c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,11 @@ SUBDIRS = src GZIP_ENV="-9n" +if BUILD_BITCOIN_LIBS +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libbitcoinconsensus.pc +endif + BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT) BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT) BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT) diff --git a/configure.ac b/configure.ac index 6784521d81..86c7cc948f 100644 --- a/configure.ac +++ b/configure.ac @@ -680,6 +680,7 @@ AC_MSG_CHECKING([whether to build libraries]) AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes]) if test x$build_bitcoin_libs = xyes; then AC_DEFINE(HAVE_CONSENSUS_LIB, 1, [Define this symbol if the consensus lib has been built]) + AC_CONFIG_FILES([libbitcoinconsensus.pc:libbitcoinconsensus.pc.in]) fi AC_MSG_RESULT($build_bitcoin_libs) diff --git a/libbitcoinconsensus.pc.in b/libbitcoinconsensus.pc.in new file mode 100644 index 0000000000..3ca1696a31 --- /dev/null +++ b/libbitcoinconsensus.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: Bitcoin Core consensus library +Description: Library for the Bitcoin consensus protocol. +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -lbitcoinconsensus +Cflags: -I${includedir} +Requires.private: libcrypto