Commit 1e1b4c19 authored by Tomas Popela's avatar Tomas Popela

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
parent 7db5ebb4
......@@ -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__":
......
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment