Commit 0d86b87b authored by Tomas Popela's avatar Tomas Popela

meson: Rename variables and the Apache script for clarification

We are checking for multiple modules in multiple directories.
parent 23f21cda
......@@ -65,7 +65,7 @@ def main():
mpm_regex = re.compile(r'\nServer MPM:[\s]+([\w]+)\n')
mpm = mpm_regex.search(apache_httpd_output.stdout.decode('utf-8')).group(1).lower()
apache_module_dir = ''
apache_modules_dir = ''
apache_ssl_module_dir = ''
apache_php_module_file = ''
apache_mod_unixd_module_file = ''
......@@ -76,7 +76,7 @@ def main():
for modules_dir in ['', 'modules']:
modules_path = os.path.join(apache_prefix, lib_dir, httpd_dir + mpm_suffix, modules_dir)
if check_module(modules_path, 'mod_auth_digest.so'):
apache_module_dir = modules_path
apache_modules_dir = modules_path
if check_module(modules_path, 'mod_ssl.so'):
apache_ssl_module_dir = modules_path
php_module = check_php_module(modules_path)
......@@ -86,10 +86,10 @@ def main():
apache_mod_unixd_module_file = modules_path
# These two are mandatory for having properly configured Apache
if apache_module_dir == '' or apache_ssl_module_dir == '':
if apache_modules_dir == '' or apache_ssl_module_dir == '':
sys.exit(1)
print(apache_module_dir + ":" +
print(apache_modules_dir + ":" +
apache_ssl_module_dir + ":" +
apache_php_module_file + ":" +
apache_mod_unixd_module_file, end='')
......
......@@ -125,15 +125,15 @@ if apache_httpd2.found()
endif
if have_apache
apache_module_dirs_out = run_command('get_apache_module_dirs.py', apache_httpd2.path())
have_apache = (apache_module_dirs_out.returncode() == 0)
apache_modules_dirs_out = run_command('get_apache_modules_dirs.py', apache_httpd2.path())
have_apache = (apache_modules_dirs_out.returncode() == 0)
if have_apache
apache_module_dirs = apache_module_dirs_out.stdout().split(':')
message('Apache module directory: ' + apache_module_dirs[0])
cdata.set('APACHE_MODULE_DIR', apache_module_dirs[0])
cdata.set('APACHE_SSL_MODULE_DIR', apache_module_dirs[1])
cdata.set('APACHE_PHP_MODULE_FILE', apache_module_dirs[2])
cdata.set('IF_HAVE_MOD_UNIXD', apache_module_dirs[3] != '' ? '' : '#')
apache_modules_dirs = apache_modules_dirs_out.stdout().split(':')
message('Apache modules directory: ' + apache_modules_dirs[0])
cdata.set('APACHE_MODULE_DIR', apache_modules_dirs[0])
cdata.set('APACHE_SSL_MODULE_DIR', apache_modules_dirs[1])
cdata.set('APACHE_PHP_MODULE_FILE', apache_modules_dirs[2])
cdata.set('IF_HAVE_MOD_UNIXD', apache_modules_dirs[3] != '' ? '' : '#')
cdata.set('HAVE_APACHE', have_apache)
endif
endif
......
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