@@ -676,6 +676,16 @@ if test x$use_pkgconfig = xyes; then
676
676
PKG_CHECK_MODULES([ EVENT_PTHREADS] , [ libevent_pthreads] ,, [ AC_MSG_ERROR ( libevent_pthreads not found. ) ] )
677
677
fi
678
678
fi
679
+
680
+ if test "x$use_zmq" = "xyes"; then
681
+ PKG_CHECK_MODULES([ ZMQ] ,[ libzmq >= 4] ,
682
+ [ AC_DEFINE ( [ ENABLE_ZMQ] ,[ 1] ,[ Define to 1 to enable ZMQ functions] ) ] ,
683
+ [ AC_DEFINE ( [ ENABLE_ZMQ] ,[ 0] ,[ Define to 1 to enable ZMQ functions] )
684
+ AC_MSG_WARN ( [ libzmq version 4.x or greater not found, disabling] )
685
+ use_zmq=no] )
686
+ else
687
+ AC_DEFINE_UNQUOTED ( [ ENABLE_ZMQ] ,[ 0] ,[ Define to 1 to enable ZMQ functions] )
688
+ fi
679
689
]
680
690
)
681
691
else
@@ -693,6 +703,20 @@ else
693
703
fi
694
704
fi
695
705
706
+ if test "x$use_zmq" = "xyes"; then
707
+ AC_CHECK_HEADER ( [ zmq.h] ,
708
+ [ AC_DEFINE ( [ ENABLE_ZMQ] ,[ 1] ,[ Define to 1 to enable ZMQ functions] ) ] ,
709
+ [ AC_MSG_WARN ( [ zmq.h not found, disabling zmq support] )
710
+ use_zmq=no
711
+ AC_DEFINE ( [ ENABLE_ZMQ] ,[ 0] ,[ Define to 1 to enable ZMQ functions] ) ] )
712
+ AC_CHECK_LIB ( [ zmq] ,[ zmq_ctx_shutdown] ,ZMQ_LIBS=-lzmq ,
713
+ [ AC_MSG_WARN ( [ libzmq >= 4.0 not found, disabling zmq support] )
714
+ use_zmq=no
715
+ AC_DEFINE ( [ ENABLE_ZMQ] ,[ 0] ,[ Define to 1 to enable ZMQ functions] ) ] )
716
+ else
717
+ AC_DEFINE_UNQUOTED ( [ ENABLE_ZMQ] ,[ 0] ,[ Define to 1 to enable ZMQ functions] )
718
+ fi
719
+
696
720
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ protobuf] ,[ main] ,[ PROTOBUF_LIBS=-lprotobuf] , BITCOIN_QT_FAIL ( libprotobuf not found )) )
697
721
if test x$use_qr != xno; then
698
722
BITCOIN_QT_CHECK([ AC_CHECK_LIB ( [ qrencode] , [ main] ,[ QR_LIBS=-lqrencode] , [ have_qrencode=no] ) ] )
@@ -824,20 +848,6 @@ if test x$bitcoin_enable_qt != xno; then
824
848
fi
825
849
fi
826
850
827
- # conditional search for and use libzmq
828
- AC_MSG_CHECKING ( [ whether to build ZMQ support] )
829
- if test "x$use_zmq" = "xyes"; then
830
- AC_MSG_RESULT ( [ yes] )
831
- PKG_CHECK_MODULES([ ZMQ] ,[ libzmq >= 4] ,
832
- [ AC_DEFINE ( [ ENABLE_ZMQ] ,[ 1] ,[ Define to 1 to enable ZMQ functions] ) ] ,
833
- [ AC_DEFINE ( [ ENABLE_ZMQ] ,[ 0] ,[ Define to 1 to enable ZMQ functions] )
834
- AC_MSG_WARN ( [ libzmq version 4.x or greater not found, disabling] )
835
- use_zmq=no] )
836
- else
837
- AC_MSG_RESULT ( [ no, --disable-zmq used] )
838
- AC_DEFINE_UNQUOTED ( [ ENABLE_ZMQ] ,[ 0] ,[ Define to 1 to enable ZMQ functions] )
839
- fi
840
-
841
851
AM_CONDITIONAL([ ENABLE_ZMQ] , [ test "x$use_zmq" = "xyes"] )
842
852
843
853
AC_MSG_CHECKING ( [ whether to build test_bitcoin] )
0 commit comments