This repository has been archived by the owner on Apr 20, 2022. It is now read-only.
forked from couchbaselabs/php-ext-couchbase
-
Notifications
You must be signed in to change notification settings - Fork 32
/
config.m4
66 lines (59 loc) · 2.29 KB
/
config.m4
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
PHP_ARG_WITH([couchbase], [for Couchbase support],
[ --with-couchbase Include Couchbase support])
if test "$PHP_COUCHBASE" != "no"; then
dnl PCBC-180 Add support for igbinary.
dnl The PHP include directories is not searched by default, so
dnl we need to add $INCLUDES to $CPPFLAGS
saved_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $INCLUDES"
AC_CHECK_HEADERS([libcouchbase/couchbase.h zlib.h ext/igbinary/igbinary.h])
dnl Reset the CPPFLAGS
CPPFLAGS="$saved_cppflags"
AS_IF([test "x$ac_cv_header_libcouchbase_couchbase" = "xno"], [
AC_MSG_ERROR([The Couchbase extension require libcouchbase])])
PHP_ADD_LIBRARY(couchbase, 1, COUCHBASE_SHARED_LIBADD)
AS_IF([test "x$ac_cv_header_zlib_h" = "xyes"], [
AC_DEFINE(HAVE_COMPRESSION_ZLIB,1,[Whether zlib lib is available])
PHP_ADD_LIBRARY(z, 1, COUCHBASE_SHARED_LIBADD)])
AS_IF([test "x$ac_cv_header_ext_igbinary_igbinary_h" = "xyes"], [
PHP_ADD_EXTENSION_DEP(couchbase, igbinary)
])
PHP_SUBST(COUCHBASE_SHARED_LIBADD)
PHP_NEW_EXTENSION([couchbase],
[ \
apidecl.c \
arithmetic.c \
ccache.c \
compress.c \
convert.c \
couchbase.c \
create.c \
designdoc.c \
error.c \
exceptions.c \
fastlz/fastlz.c \
flush.c \
get.c \
ht.c \
management/buckets.c \
management/instance.c \
management/management.c \
misc.c \
observe.c \
options.c \
remove.c \
replica.c \
resmgr.c \
simple_observe.c \
stat.c \
store.c \
timeout.c \
touch.c \
unlock.c \
version.c \
viewopts.c \
views.c \
], [$ext_shared])
PHP_ADD_BUILD_DIR($ext_builddir/fastlz, 1)
PHP_ADD_BUILD_DIR($ext_builddir/management, 1)
fi