From 2db8c7c50f7c9dee2e0e0d2c99de1a4e93116a14 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 25 Jun 2026 15:37:40 +0700 Subject: [PATCH 1/2] fix in-tree builds with apcu --- config.m4 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.m4 b/config.m4 index a962ee2..50ed40a 100644 --- a/config.m4 +++ b/config.m4 @@ -110,6 +110,9 @@ fi dnl APCu if test "$PHP_APCU" != "no"; then AC_MSG_CHECKING([for APCu includes]) + if test ! -f "$phpincludedir/ext/apcu/apc_serializer.h" && test -f "$abs_srcdir/ext/apcu/apc_serializer.h"; then + phpincludedir="$abs_srcdir" + fi if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then apc_inc_path="$phpincludedir" AC_MSG_RESULT([APCu in $apc_inc_path]) From ab85c7ca2e2ca75cdfcc219916545ab8f4ff9198 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 25 Jun 2026 16:03:12 +0700 Subject: [PATCH 2/2] move php_apcu check into if-zstd-enabled block --- config.m4 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/config.m4 b/config.m4 index 50ed40a..87a5a13 100644 --- a/config.m4 +++ b/config.m4 @@ -105,23 +105,23 @@ if test "$PHP_ZSTD" != "no"; then ], [ PHP_ADD_MAKEFILE_FRAGMENT ]) -fi -dnl APCu -if test "$PHP_APCU" != "no"; then - AC_MSG_CHECKING([for APCu includes]) - if test ! -f "$phpincludedir/ext/apcu/apc_serializer.h" && test -f "$abs_srcdir/ext/apcu/apc_serializer.h"; then - phpincludedir="$abs_srcdir" - fi - 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 - if test "$PHP_APCU" != "auto"; then - AC_MSG_ERROR([apc_serializer.h header not found]) + dnl APCu + if test "$PHP_APCU" != "no"; then + AC_MSG_CHECKING([for APCu includes]) + if test ! -f "$phpincludedir/ext/apcu/apc_serializer.h" && test -f "$abs_srcdir/ext/apcu/apc_serializer.h"; then + phpincludedir="$abs_srcdir" + fi + 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 + if test "$PHP_APCU" != "auto"; then + AC_MSG_ERROR([apc_serializer.h header not found]) + fi + AC_MSG_RESULT([not found]) fi - AC_MSG_RESULT([not found]) fi fi