Skip to content

Commit

Permalink
Fix out of sources tree build (#5239)
Browse files Browse the repository at this point in the history
* Fix out of sources tree build

* check in CI is extension can be loaded
  • Loading branch information
remicollet authored Jan 24, 2024
1 parent 2dcfef9 commit 9c08e1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions scripts/pecl-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ pecl config-show && \
php tools/pecl-package.php && package_file="`ls | grep swoole-*tgz`" && \
echo "\n" | pecl install -f ${package_file} | tee pecl.log && \
cat pecl.log | grep "successfully" && \
php -d extension=swoole --ri swoole && \
pecl uninstall swoole && \
rm -f pecl.log

0 comments on commit 9c08e1a

Please sign in to comment.