Skip to content

Commit bb2c549

Browse files
committed
Only enable socket monitor with libzmq 4.x
1 parent d618120 commit bb2c549

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: php
22
php:
3+
- 7.0
34
- 5.6
45
- 5.5
56
- 5.4
6-
- 7.0
77

88
env:
99
- LIBZMQ_VERSION=2.2.0

config.m4

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,15 @@ if test "$PHP_ZMQ" != "no"; then
5353
CFLAGS="$CFLAGS $PHP_ZMQ_CFLAGS"
5454
LDFLAGS="$LDFLAGS $PHP_ZMQ_LIBS"
5555

56-
AC_CHECK_LIB(
57-
[zmq], [zmq_socket_monitor],
58-
[AC_DEFINE(
59-
[PHP_ZMQ_HAVE_SOCKET_MONITOR], [1], [Whether zmq_socket_monitor function is available]
60-
)]
61-
)
56+
$PKG_CONFIG libzmq --atleast-version 4.0.0
57+
if test $? = 0; then
58+
AC_CHECK_LIB(
59+
[zmq], [zmq_socket_monitor],
60+
[AC_DEFINE(
61+
[PHP_ZMQ_HAVE_SOCKET_MONITOR], [1], [Whether zmq_socket_monitor function is available]
62+
)]
63+
)
64+
fi
6265

6366
AC_CHECK_LIB(
6467
[zmq], [zmq_proxy_steerable],

0 commit comments

Comments
 (0)