diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-11-05 08:15:52 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-11-05 08:15:52 +0100 |
commit | 07dc7f314c4a8082145fcf452e8b1239815dd435 (patch) | |
tree | 3551dcc0644f484ea9175f48dac0e43ab7f458b5 /couchbase-fastlz.patch | |
parent | 3a1a38726fae369aab33edb4a871a4861cef9799 (diff) |
php-pecl-couchbase2: 2.1.0
Diffstat (limited to 'couchbase-fastlz.patch')
-rw-r--r-- | couchbase-fastlz.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/couchbase-fastlz.patch b/couchbase-fastlz.patch new file mode 100644 index 0000000..1cb86a6 --- /dev/null +++ b/couchbase-fastlz.patch @@ -0,0 +1,69 @@ +From 693266afdbef09db2fb09437a47d1662ab92d8c9 Mon Sep 17 00:00:00 2001 +From: Remi Collet <fedora@famillecollet.com> +Date: Thu, 5 Nov 2015 07:58:17 +0100 +Subject: [PATCH] add --with-system-fastlz configure option + +--- + config.m4 | 23 +++++++++++++++++++++-- + couchbase.c | 2 +- + 2 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/config.m4 b/config.m4 +index c07db46..35db4c1 100644 +--- a/config.m4 ++++ b/config.m4 +@@ -1,5 +1,9 @@ + PHP_ARG_ENABLE(couchbase, whether to enable Couchbase support, +-[ --with-couchbase Include Couchbase support]) ++[ --with-couchbase Include Couchbase support]) ++ ++PHP_ARG_WITH(system-fastlz, wheter to use system FastLZ bibrary, ++[ --with-system-fastlz Use system FastLZ bibrary], no, no) ++ + if test "$PHP_COUCHBASE" = "yes"; then + AC_DEFINE(HAVE_COUCHBASE, 1, [Whether you have Couchbase]) + +@@ -9,6 +13,16 @@ if test "$PHP_COUCHBASE" = "yes"; then + + PHP_ADD_LIBRARY(couchbase, 1, COUCHBASE_SHARED_LIBADD) + ++ if test "$PHP_SYSTEM_FASTLZ" != "no"; then ++ FASTLZ="" ++ AC_CHECK_HEADERS([fastlz.h]) ++ PHP_CHECK_LIBRARY(fastlz, fastlz_compress, ++ [PHP_ADD_LIBRARY(fastlz, 1, COUCHBASE_SHARED_LIBADD)], ++ [AC_MSG_ERROR(FastLZ library not found)]) ++ else ++ FASTLZ="fastlz/fastlz.c" ++ fi ++ + ifdef([PHP_ADD_EXTENDION_DEP], [ + PHP_ADD_EXTENSION_DEP(couchbase, json) + ]) +@@ -22,6 +36,11 @@ if test "$PHP_COUCHBASE" = "yes"; then + exception.c \ + metadoc.c \ + transcoding.c \ +- fastlz/fastlz.c \ ++ $FASTLZ \ + , $ext_shared) ++ ++ if test -n "$FASTLZ" ; then ++ PHP_ADD_BUILD_DIR($ext_builddir/fastlz, 1) ++ PHP_ADD_INCLUDE([$ext_srcdir/fastlz]) ++ fi + fi +\ No newline at end of file +diff --git a/couchbase.c b/couchbase.c +index 53da789..25baaee 100644 +--- a/couchbase.c ++++ b/couchbase.c +@@ -2,7 +2,7 @@ + #include "cas.h" + #include "metadoc.h" + #include "phpstubstr.h" +-#include "fastlz/fastlz.h" ++#include <fastlz.h> + + #if HAVE_ZLIB + #include <zlib.h> |