@@ -17,56 +17,36 @@ int main() {
17
17
}
18
18
EOF
19
19
20
- if $( cc -o libzmq_test libzmq_test.c -lzmq > /dev/null 2>&1 ) ; then
21
- echo " * system has libzmq"
22
- if $( ./libzmq_test 2> /dev/null) ; then
23
- echo " * libzmq has DRAFT API -> linking system library"
24
- PKG_CFLAGS=" -DZMQ_BUILD_DRAFT_API=1 -fPIC -Icppzmq"
25
- PKG_LIBS=" -lzmq"
26
- USE_SYSTEM_LIBZMQ=1
20
+ if [ -z " $CLUSTERMQ_USE_SYSTEM_LIBZMQ " ]; then
21
+ if $( cc -o libzmq_test libzmq_test.c -lzmq > /dev/null 2>&1 ) ; then
22
+ echo " * system has libzmq"
23
+ if $( ./libzmq_test 2> /dev/null) ; then
24
+ echo " * libzmq has DRAFT API -> linking system library"
25
+ PKG_CFLAGS=" -DZMQ_BUILD_DRAFT_API=1 -fPIC -Icppzmq"
26
+ PKG_LIBS=" -lzmq"
27
+ CLUSTERMQ_USE_SYSTEM_LIBZMQ=1
28
+ else
29
+ echo " * no DRAFT API found -> using bundled libzmq"
30
+ CLUSTERMQ_USE_SYSTEM_LIBZMQ=0
31
+ fi
27
32
else
28
- echo " * no DRAFT API found -> using bundled libzmq"
33
+ echo " * no system libzmq found -> using bundled libzmq"
34
+ CLUSTERMQ_USE_SYSTEM_LIBZMQ=0
29
35
fi
30
- else
31
- echo " * no system libzmq found -> using bundled libzmq"
32
36
fi
33
37
34
- if [ -z " $USE_SYSTEM_LIBZMQ " ]; then
35
- if [ ! -f src/libzmq/autogen.sh ]; then
36
- # the tarball has the submodules, a fresh clone does not
37
- git submodule update --init --recursive
38
- fi
38
+ if [ " $CLUSTERMQ_USE_SYSTEM_LIBZMQ " -eq " 0" ]; then
39
+ ./src/patch_libzmq.sh
39
40
40
41
if [ ! -f src/libzmq/src/.libs/libzmq.a ]; then
41
42
cd src/libzmq
42
43
43
- if [ ! -f src/Makefile.am.orig ]; then
44
- # remove code format helper and valgrind support that CRAN complains about
45
- # sed -i does not work on macOS
46
- mv Makefile.am Makefile.am.orig
47
- sed ' /WITH_CLANG_FORMAT/,/VALGRIND_SUPPRESSIONS_FILES/d' Makefile.am.orig > Makefile.am
48
- fi
49
-
50
- if [ ! -f src/curve_client_tools.hpp.orig ]; then
51
- # remove disabled gcc check that cran complains about
52
- mv src/curve_client_tools.hpp src/curve_client_tools.hpp.orig
53
- sed ' /^#pragma/s|^|//|' src/curve_client_tools.hpp.orig > src/curve_client_tools.hpp
54
- fi
55
- if [ ! -f include/zmq_utils.h.orig ]; then
56
- mv include/zmq_utils.h include/zmq_utils.h.orig
57
- sed ' /^#pragma/s|^|//|' include/zmq_utils.h.orig > include/zmq_utils.h
58
- fi
59
-
60
- if [ ! -f Makefile.in ]; then
61
- ./autogen.sh || exit 1
62
- fi
63
-
64
44
CXX=" $CXX " CXXFLAGS=" $CXXFLAGS -fPIC" CPPFLAGS=" $CPPFLAGS " ./configure \
45
+ --enable-drafts \
65
46
--enable-static \
66
47
--disable-shared \
67
48
--disable-maintainer-mode \
68
49
--disable-Werror \
69
- --enable-drafts \
70
50
--disable-libbsd \
71
51
--disable-libunwind \
72
52
--disable-perf \
0 commit comments