aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-05-22 09:59:20 +0100
committerfanquake <fanquake@gmail.com>2023-05-22 10:00:15 +0100
commita106a86c46ce9dca7cbe0644e702c05fc680387f (patch)
treeb85eb66d489edfe16374e0dffccbf4948a0d084c /configure.ac
parentf998eb766227d55a7a6da876971fd2a28374eee8 (diff)
parentfa5831bd6f940c4afb43ff625ba4fa6c641e999a (diff)
Merge bitcoin/bitcoin#27696: build: Do not define `ENABLE_ZMQ` when ZMQ is not available
fa5831bd6f940c4afb43ff625ba4fa6c641e999a build: Do not define `ENABLE_ZMQ` when ZMQ is not available (Hennadii Stepanov) Pull request description: A new behavior is consistent with the other optional dependencies. The source code contains `#if ENABLE_ZMQ` lines only: ``` $ git grep ENABLE_ZMQ -- src/*.cpp src/init.cpp:#if ENABLE_ZMQ src/init.cpp:#if ENABLE_ZMQ src/init.cpp:#if ENABLE_ZMQ src/init.cpp:#if ENABLE_ZMQ src/init.cpp:#if ENABLE_ZMQ ``` Change in description line -- "Define to 1..." --> "Define this symbol.." -- is motivated by the fact that the actual value of the defined `ENABLE_ZMQ` macro does not matter at all. Related to: - https://github.com/bitcoin/bitcoin/issues/16419 - https://github.com/bitcoin/bitcoin/pull/25302 ACKs for top commit: TheCharlatan: ACK fa5831bd6f940c4afb43ff625ba4fa6c641e999a jarolrod: ACK fa5831bd6f940c4afb43ff625ba4fa6c641e999a Tree-SHA512: 5e72ff0d34c4b33205338daea0aae8d7aa0e48fd633e21af01af32b7ddb0532ef68dd3dd74deb2c1d2599691929617e8c09676bcbaaf7d669b88816f866f1db2
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 4 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 97b970161c..e3b0ca3e2d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1632,12 +1632,9 @@ dnl ZMQ check
if test "$use_zmq" = "yes"; then
PKG_CHECK_MODULES([ZMQ], [libzmq >= 4],
- 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 version 4.x or greater not found, disabling])
+ AC_DEFINE([ENABLE_ZMQ], [1], [Define this symbol to enable ZMQ functions]),
+ [AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
use_zmq=no])
-else
- AC_DEFINE_UNQUOTED([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions])
fi
if test "$use_zmq" = "yes"; then
@@ -1649,6 +1646,8 @@ if test "$use_zmq" = "yes"; then
esac
fi
+AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
+
dnl libmultiprocess library check
libmultiprocess_found=no
@@ -1843,8 +1842,6 @@ if test "$bitcoin_enable_qt" != "no"; then
fi
fi
-AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
-
AC_MSG_CHECKING([whether to build test_bitcoin])
if test "$use_tests" = "yes"; then
if test "$enable_fuzz" = "yes"; then