diff --git a/config.m4 b/config.m4 index 2740ce9..0d658f4 100644 --- a/config.m4 +++ b/config.m4 @@ -24,6 +24,9 @@ PHP_ARG_ENABLE(brotli, whether to enable brotli support, PHP_ARG_WITH(libbrotli, whether to use system brotli library, [ --with-libbrotli Use libbrotli], no, no) +PHP_ARG_ENABLE(apcu, whether to enable APCu support, +[ --enable-apcu Enable APCu support], auto, no) + if test "$PHP_BROTLI" != "no"; then BROTLI_MIN_VERSION=0.6 @@ -132,12 +135,14 @@ if test "$PHP_BROTLI" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/brotli/c/enc) fi - AC_MSG_CHECKING([for APCu includes]) - if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then - apc_inc_path="$phpincludedir" - AC_MSG_RESULT([APCu in $apc_inc_path]) - AC_DEFINE(HAVE_APCU_SUPPORT, 1, [Whether to enable APCu support]) - else - AC_MSG_RESULT([not found]) + if test "$PHP_APCU" != "no"; then + AC_MSG_CHECKING([for APCu includes]) + if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then + apc_inc_path="$phpincludedir" + AC_MSG_RESULT([APCu in $apc_inc_path]) + AC_DEFINE(HAVE_APCU_SUPPORT, 1, [Whether to enable APCu support]) + else + AC_MSG_RESULT([not found]) + fi fi fi