summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2018-04-17 11:15:06 +0200
committerTomas Popela <tpopela@redhat.com>2018-04-18 08:20:04 +0200
commit1e1b4c19d848d026bf0b6d196ad68c9e8aa3b405 (patch)
tree0ecd55be28ba3954cb56ee1b250908945598d4ca
parent7db5ebb406e3257db745e399e5e082a0b542e4a2 (diff)
downloadlibsoup-1e1b4c19d848d026bf0b6d196ad68c9e8aa3b405.tar.gz
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
-rwxr-xr-xget_apache_module_dirs.py4
-rw-r--r--meson.build4
2 files changed, 6 insertions, 2 deletions
diff --git a/get_apache_module_dirs.py b/get_apache_module_dirs.py
index 30dea6c1..1da64fe9 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 51ba351d..ec2dce68 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')