summaryrefslogtreecommitdiffstats
path: root/5239.patch
blob: 31a61c4154bed747773b8a351674a280b1c1623f (plain)
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
From e7c56d9842d17df0647d8e87251a2f70f06cde63 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
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 \