[libsoup] build: Check php-xmlrpc in a more robust way
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] build: Check php-xmlrpc in a more robust way
- Date: Tue, 17 Apr 2018 08:50:18 +0000 (UTC)
commit 4d9a148148b331278574947fee342fed102fc4a5
Author: Jan Alexander Steffens (heftig) <jan steffens gmail com>
Date: Fri Apr 13 21:32:56 2018 +0200
build: Check php-xmlrpc in a more robust way
The old way was dependent on parsing PHP's output, which might depend on
the locale (but does not seem to at this time).
The check was completely broken in meson, which was missing the output
parsing.
https://bugzilla.gnome.org/show_bug.cgi?id=782410
configure.ac | 6 +++---
meson.build | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index fe3ab28..f1e5f70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -276,11 +276,11 @@ if test "$have_apache" = 1; then
if test "$have_php" = yes; then
AC_MSG_CHECKING([for php-xmlrpc])
- if $PHP --rf xmlrpc_server_create | grep -q "does not exist"; then
- have_php_xmlrpc=no
- else
+ if $PHP -r 'exit(function_exists("xmlrpc_server_create")?0:1);'; then
have_php_xmlrpc=yes
AC_DEFINE(HAVE_PHP_XMLRPC, 1, [Have php-xmlrpc])
+ else
+ have_php_xmlrpc=no
fi
AC_MSG_RESULT($have_php_xmlrpc)
fi
diff --git a/meson.build b/meson.build
index 5a26179..53b50db 100644
--- a/meson.build
+++ b/meson.build
@@ -142,7 +142,7 @@ if have_apache
apache_php_module = run_command('test', '-d', cdata.get('APACHE_PHP_MODULE_DIR'))
if apache_php_module.returncode() == 0
have_php = true
- php_xmlrpc = run_command(php, '--rf', 'xmlrpc_server_create')
+ php_xmlrpc = run_command(php, '-r', 'exit(function_exists("xmlrpc_server_create")?0:1);')
if php_xmlrpc.returncode() == 0
message('php-xmlrpc found')
cdata.set('HAVE_PHP_XMLRPC', '1')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]