Skip to content

Commit 79cb556

Browse files
committed
merge bitcoin#27696: Do not define ENABLE_ZMQ when ZMQ is not available
1 parent 08caf51 commit 79cb556

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

configure.ac

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

15881588
if test "$use_zmq" = "yes"; then
15891589
PKG_CHECK_MODULES([ZMQ], [libzmq >= 4],
1590-
AC_DEFINE([ENABLE_ZMQ], [1], [Define to 1 to enable ZMQ functions]),
1591-
[AC_DEFINE([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions])
1592-
AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
1590+
AC_DEFINE([ENABLE_ZMQ], [1], [Define this symbol to enable ZMQ functions]),
1591+
[AC_MSG_WARN([libzmq version 4.x or greater not found, disabling])
15931592
use_zmq=no])
1594-
else
1595-
AC_DEFINE_UNQUOTED([ENABLE_ZMQ], [0], [Define to 1 to enable ZMQ functions])
15961593
fi
15971594

15981595
if test "$use_zmq" = "yes"; then
@@ -1608,6 +1605,8 @@ dnl check if libgmp is present
16081605
AC_CHECK_HEADER([gmp.h],, AC_MSG_ERROR(libgmp headers missing))
16091606
AC_CHECK_LIB([gmp], [__gmpz_init],GMP_LIBS=-lgmp, AC_MSG_ERROR(libgmp missing))
16101607

1608+
AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
1609+
16111610
dnl libmultiprocess library check
16121611

16131612
libmultiprocess_found=no
@@ -1785,8 +1784,6 @@ if test "$bitcoin_enable_qt" != "no"; then
17851784
fi
17861785
fi
17871786

1788-
AM_CONDITIONAL([ENABLE_ZMQ], [test "$use_zmq" = "yes"])
1789-
17901787
AC_MSG_CHECKING([whether to build test_dash])
17911788
if test "$use_tests" = "yes"; then
17921789
if test "$enable_fuzz" = "yes"; then

0 commit comments

Comments
 (0)