summaryrefslogtreecommitdiffstats
path: root/48d54026ef6e448bc91949b279103a313a5b053f.patch
blob: 64654e4b54b52c5af90c0a731f7862bccef22671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 48d54026ef6e448bc91949b279103a313a5b053f Mon Sep 17 00:00:00 2001
From: Timandes White <timands@gmail.com>
Date: Thu, 19 Jul 2018 10:12:23 +0800
Subject: [PATCH] Try to fix 'undefined symbol: zoo_wgetconfig' (#22)

---
 config.m4 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/config.m4 b/config.m4
index d7fed5a..5465685 100644
--- a/config.m4
+++ b/config.m4
@@ -106,9 +106,15 @@ if test "$PHP_ZOOKEEPER" != "no"; then
         AC_DEFINE(HAVE_PTHREAD,1,[ ])
     ])
 
-    AC_DEFINE(THREADED,1,[Must define this constant after zookeeper-3.5.0 to use multi-threaded library])
+    ZOO_MINOR_VERSION=$(cat ${PHP_LIBZOOKEEPER_INCDIR}/zookeeper/zookeeper_version.h |grep ZOO_MINOR_VERSION|awk '{print $3}')
+    PHP_ZOOKEEPER_CONFIG_FILES=""
+    if test ${ZOO_MINOR_VERSION} -eq 5; then
+      PHP_ZOOKEEPER_CONFIG_FILES="php_zookeeper_config_class.c"
+      AC_DEFINE(THREADED,1,[Must define this constant after zookeeper-3.5.0 to use multi-threaded library])
+    fi
+
     PHP_SUBST(ZOOKEEPER_SHARED_LIBADD)
-    PHP_NEW_EXTENSION(zookeeper, php_zookeeper.c zoo_lock.c $SESSION_EXTRA_FILES php_zookeeper_exceptions.c php_zookeeper_config_class.c php_zookeeper_stat.c php_zookeeper_callback.c php_zookeeper_log.c, $ext_shared,,$SESSION_INCLUDES)
+    PHP_NEW_EXTENSION(zookeeper, php_zookeeper.c zoo_lock.c $SESSION_EXTRA_FILES php_zookeeper_exceptions.c ${PHP_ZOOKEEPER_CONFIG_FILES} php_zookeeper_stat.c php_zookeeper_callback.c php_zookeeper_log.c, $ext_shared,,$SESSION_INCLUDES)
 
   fi