Skip to content

Commit fa5831b

Browse files
committed
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.
1 parent 4e8a765 commit fa5831b

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

build_msvc/bitcoin_config.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/* Define to 1 to enable SQLite wallet */
3939
#define USE_SQLITE 1
4040

41-
/* Define to 1 to enable ZMQ functions */
41+
/* Define this symbol to enable ZMQ functions */
4242
#define ENABLE_ZMQ 1
4343

4444
/* define if external signer support is enabled (requires Boost::Process) */

configure.ac

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,12 +1633,9 @@ dnl ZMQ check
16331633

16341634
if test "$use_zmq" = "yes"; then
16351635
PKG_CHECK_MODULES([ZMQ], [libzmq >= 4],
1636-
AC_DEFINE([ENABLE_ZMQ], [1], [Define to 1 to enable ZMQ functions]),
1637-
[AC_DEFINE([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions])
1638-
AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
1636+
AC_DEFINE([ENABLE_ZMQ], [1], [Define this symbol to enable ZMQ functions]),
1637+
[AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
16391638
use_zmq=no])
1640-
else
1641-
AC_DEFINE_UNQUOTED([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions])
16421639
fi
16431640

16441641
if test "$use_zmq" = "yes"; then
@@ -1650,6 +1647,8 @@ if test "$use_zmq" = "yes"; then
16501647
esac
16511648
fi
16521649

1650+
AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
1651+
16531652
dnl libmultiprocess library check
16541653

16551654
libmultiprocess_found=no
@@ -1844,8 +1843,6 @@ if test "$bitcoin_enable_qt" != "no"; then
18441843
fi
18451844
fi
18461845

1847-
AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
1848-
18491846
AC_MSG_CHECKING([whether to build test_bitcoin])
18501847
if test "$use_tests" = "yes"; then
18511848
if test "$enable_fuzz" = "yes"; then

0 commit comments

Comments
 (0)