aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-05-18 10:48:48 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-05-18 10:48:48 +0100
commitfa5831bd6f940c4afb43ff625ba4fa6c641e999a (patch)
treeb2ac29d8bf01ce33b70eff1938c97e88cb499fae /configure.ac
parent4e8a7654f623fc0dad933b3d93dc54d8206c605d (diff)
downloadbitcoin-fa5831bd6f940c4afb43ff625ba4fa6c641e999a.tar.xz
build: Do not define `ENABLE_ZMQ` when ZMQ is not available
A new behavior is consistent with the other optional dependencies. The source code contains `#if ENABLE_ZMQ` lines only.
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 8e73213c78..475eaa75ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1633,12 +1633,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
@@ -1650,6 +1647,8 @@ if test "$use_zmq" = "yes"; then
esac
fi
+AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
+
dnl libmultiprocess library check
libmultiprocess_found=no
@@ -1844,8 +1843,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