From e7c56d9842d17df0647d8e87251a2f70f06cde63 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 24 Jan 2024 09:56:17 +0100 Subject: [PATCH] Fix out of sources tree build --- config.m4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config.m4 b/config.m4 index 2e8c166021..d68d06b6df 100644 --- a/config.m4 +++ b/config.m4 @@ -1009,14 +1009,19 @@ EOF AC_DEFINE(SW_USE_MYSQLND, 1, [use mysqlnd]) fi - if test -f "ext-src/php_swoole.cc"; then + AC_MSG_CHECKING([for sources]) + if test -f "$abs_srcdir/ext-src/php_swoole.cc"; then + swoole_source_dir=$abs_srcdir + elif test -f "ext-src/php_swoole.cc"; then swoole_source_dir=$(pwd) else swoole_source_dir="ext/swoole" fi + AC_MSG_RESULT([$swoole_source_dir]) ext_src_files=$(cd $swoole_source_dir && find ext-src/ -name *.cc) lib_src_files=$(cd $swoole_source_dir && find src/ -name *.cc) + swoole_source_file="${ext_src_files} ${lib_src_files}" swoole_source_file="$swoole_source_file \