Skip to content

Commit a106a86

Browse files
committed
Merge bitcoin/bitcoin#27696: build: Do not define ENABLE_ZMQ when ZMQ is not available
fa5831b 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: - bitcoin/bitcoin#16419 - bitcoin/bitcoin#25302 ACKs for top commit: TheCharlatan: ACK fa5831b jarolrod: ACK fa5831b Tree-SHA512: 5e72ff0d34c4b33205338daea0aae8d7aa0e48fd633e21af01af32b7ddb0532ef68dd3dd74deb2c1d2599691929617e8c09676bcbaaf7d669b88816f866f1db2
2 parents f998eb7 + fa5831b commit a106a86

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
@@ -1632,12 +1632,9 @@ dnl ZMQ check
16321632

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

16431640
if test "$use_zmq" = "yes"; then
@@ -1649,6 +1646,8 @@ if test "$use_zmq" = "yes"; then
16491646
esac
16501647
fi
16511648

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

16541653
libmultiprocess_found=no
@@ -1843,8 +1842,6 @@ if test "$bitcoin_enable_qt" != "no"; then
18431842
fi
18441843
fi
18451844

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

0 commit comments

Comments
 (0)