Skip to content

Commit 3e35f34

Browse files
committed
feat: add --enable-apcu option to toggle APCu support
1 parent 5cd25a6 commit 3e35f34

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

config.m4

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ PHP_ARG_ENABLE(brotli, whether to enable brotli support,
2424
PHP_ARG_WITH(libbrotli, whether to use system brotli library,
2525
[ --with-libbrotli Use libbrotli], no, no)
2626

27+
PHP_ARG_ENABLE(apcu, whether to enable APCu support,
28+
[ --enable-apcu Enable APCu support], auto, no)
29+
2730
if test "$PHP_BROTLI" != "no"; then
2831

2932
BROTLI_MIN_VERSION=0.6
@@ -132,12 +135,14 @@ if test "$PHP_BROTLI" != "no"; then
132135
PHP_ADD_BUILD_DIR($ext_builddir/brotli/c/enc)
133136
fi
134137

135-
AC_MSG_CHECKING([for APCu includes])
136-
if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then
137-
apc_inc_path="$phpincludedir"
138-
AC_MSG_RESULT([APCu in $apc_inc_path])
139-
AC_DEFINE(HAVE_APCU_SUPPORT, 1, [Whether to enable APCu support])
140-
else
141-
AC_MSG_RESULT([not found])
138+
if test "$PHP_APCU" != "no"; then
139+
AC_MSG_CHECKING([for APCu includes])
140+
if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then
141+
apc_inc_path="$phpincludedir"
142+
AC_MSG_RESULT([APCu in $apc_inc_path])
143+
AC_DEFINE(HAVE_APCU_SUPPORT, 1, [Whether to enable APCu support])
144+
else
145+
AC_MSG_RESULT([not found])
146+
fi
142147
fi
143148
fi

0 commit comments

Comments
 (0)