[libsoup] meson: Fix the php detection



commit b2d7488566b7243bbdb78f502e30d2295f1788e3
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Aug 31 10:01:42 2018 +0200

    meson: Fix the php detection
    
    We should check if the php program was found before calling it. And
    don't test again if the PHP module file exists as this is already checked
    in the get_apache_module_dirs.py script. Just check if the check there
    succeeded.

 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 52aebcda..0af59869 100644
--- a/meson.build
+++ b/meson.build
@@ -143,8 +143,8 @@ have_php = false
 have_php_xmlrpc = false
 if have_apache
   php = find_program('php', required : false)
-  apache_php_module = run_command('test', '-f', cdata.get('APACHE_PHP_MODULE_FILE'))
-  if apache_php_module.returncode() == 0
+  message(cdata.get('APACHE_PHP_MODULE_FILE'))
+  if php.found() and cdata.get('APACHE_PHP_MODULE_FILE') != ''
     have_php = true
     php_xmlrpc = run_command(php, '-d', 'extension=xmlrpc', '-r', 
'exit(function_exists("xmlrpc_server_create")?0:1);')
     if php_xmlrpc.returncode() == 0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]