aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2014-11-18 12:06:32 -0500
committerJoão Barbosa <joao@bitreserve.org>2015-09-16 11:01:35 +0100
commite6a14b64d665eb1fafd03a6bbc8d14597ce1c83c (patch)
treebfefc581188fb56413c6d29cde625b0395faebc5 /configure.ac
parent1136879df8af2358efb706c5af886778fbd94989 (diff)
downloadbitcoin-e6a14b64d665eb1fafd03a6bbc8d14597ce1c83c.tar.xz
Add ZeroMQ support. Notify blocks and transactions via ZeroMQ
Continues Johnathan Corgan's work. Publishing multipart messages Bugfix: Add missing zmq header includes Bugfix: Adjust build system to link ZeroMQ code for Qt binaries
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 07ee28f84e..9955ab9bf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,12 @@ AC_ARG_ENABLE([glibc-back-compat],
[use_glibc_compat=$enableval],
[use_glibc_compat=no])
+AC_ARG_ENABLE([zmq],
+ [AC_HELP_STRING([--disable-zmq],
+ [Disable ZMQ notifications])],
+ [use_zmq=$enableval],
+ [use_zmq=yes])
+
AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
# Enable debug
@@ -833,6 +839,22 @@ if test x$bitcoin_enable_qt != xno; then
fi
fi
+# conditional search for and use libzmq
+AC_MSG_CHECKING([whether to build ZMQ support])
+if test "x$use_zmq" = "xyes"; then
+ AC_MSG_RESULT([yes])
+ PKG_CHECK_MODULES([ZMQ],[libzmq],
+ [AC_DEFINE([ENABLE_ZMQ],[1],[Define to 1 to enable ZMQ functions])],
+ [AC_DEFINE([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
+ AC_MSG_WARN([libzmq not found, disabling])
+ use_zmq=no])
+else
+ AC_MSG_RESULT([no, --disable-zmq used])
+ AC_DEFINE_UNQUOTED([ENABLE_ZMQ],[0],[Define to 1 to enable ZMQ functions])
+fi
+
+AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])
+
AC_MSG_CHECKING([whether to build test_bitcoin])
if test x$use_tests = xyes; then
AC_MSG_RESULT([yes])