[libsoup] meson: Move one of the have_apache check to get_apache_module_dirs script



commit 1e1b4c19d848d026bf0b6d196ad68c9e8aa3b405
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Apr 17 11:15:06 2018 +0200

    meson: Move one of the have_apache check to get_apache_module_dirs script
    
    Fail already in get_apache_module_dirs.py when it failed to found
    Apache module directory or Apache mod_ssl directory.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795324

 get_apache_module_dirs.py |    4 ++++
 meson.build               |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/get_apache_module_dirs.py b/get_apache_module_dirs.py
index 30dea6c..1da64fe 100755
--- a/get_apache_module_dirs.py
+++ b/get_apache_module_dirs.py
@@ -69,6 +69,10 @@ def main():
                     if os.path.isfile(modules_path + 'libphp7.so'):
                         apache_php_module_dir = modules_path
 
+    # These two are mandatory for having properly configured Apache
+    if apache_module_dir == '' or apache_ssl_module_dir == '':
+        sys.exit(1)
+
     print(apache_module_dir.rstrip('/') + ":" + apache_ssl_module_dir.rstrip('/') + ":" + 
apache_php_module_dir.rstrip('/'), end='')
 
 if __name__ == "__main__":
diff --git a/meson.build b/meson.build
index 51ba351..ec2dce6 100644
--- a/meson.build
+++ b/meson.build
@@ -122,13 +122,13 @@ endif
 
 if have_apache
   apache_module_dirs = run_command('get_apache_module_dirs.py', apache_httpd2.path())
-  if apache_module_dirs.returncode() == 0
+  have_apache = (apache_module_dirs.returncode() == 0)
+  if have_apache
     message('Apache module directory: ' + apache_module_dirs.stdout().split(':')[0])
     apache_module_dir = apache_module_dirs.stdout().split(':')[0]
     cdata.set('APACHE_MODULE_DIR', apache_module_dir)
     apache_ssl_module_dir = apache_module_dirs.stdout().split(':')[1]
     cdata.set('APACHE_SSL_MODULE_DIR', apache_ssl_module_dir)
-    have_apache = apache_module_dir != '' and apache_ssl_module_dir != ''
     cdata.set('HAVE_APACHE', have_apache)
     cdata.set('APACHE_PHP_MODULE_DIR', apache_module_dirs.stdout().split(':')[2])
     apache_mod_unixd = run_command('test', '-f', cdata.get('APACHE_MODULE_DIR') + '/mod_unixd.so')


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