aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2014-11-20 20:45:24 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2014-11-20 21:23:34 +0000
commiteef747bba81e66b2d551a3670a659bbe9dd4a8ce (patch)
tree925267c63dfc0ec438af55ecd0ff9ce7a0d04088
parent5c4dffd188bf82c1965871bdf013b18a61e3d7d0 (diff)
libbitcoinconsensus: Add pkg-config support
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac1
-rw-r--r--libbitcoinconsensus.pc.in11
3 files changed, 17 insertions, 0 deletions
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