diff options
author | Tomas Popela <tpopela@redhat.com> | 2018-04-17 11:20:20 +0200 |
---|---|---|
committer | Tomas Popela <tpopela@redhat.com> | 2018-04-18 08:20:04 +0200 |
commit | 8bcab0afa22617edc37915add7c710e73adc0038 (patch) | |
tree | 17a303db7b0d524bb3c79df3f2c01ca2b569e7c3 /meson.build | |
parent | 964e13057e577820f9557df7fa7ced99c8a62c82 (diff) | |
download | libsoup-8bcab0afa22617edc37915add7c710e73adc0038.tar.gz |
meson: Better use the output of get_apache_module_dirs.py
* Use join_paths() for appending to path
* Avoid creating a local variables for directories by saving the script
output that is split by the separator
Suggested by Iñigo Martínez.
https://bugzilla.gnome.org/show_bug.cgi?id=795324
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/meson.build b/meson.build index ec2dce68..a77579f6 100644 --- a/meson.build +++ b/meson.build @@ -121,18 +121,17 @@ if apache_httpd2.found() endif if have_apache - apache_module_dirs = run_command('get_apache_module_dirs.py', apache_httpd2.path()) - have_apache = (apache_module_dirs.returncode() == 0) + apache_module_dirs_out = run_command('get_apache_module_dirs.py', apache_httpd2.path()) + have_apache = (apache_module_dirs_out.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) - 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') + 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_DIR', apache_module_dirs[2]) + apache_mod_unixd = run_command('test', '-f', join_paths(apache_module_dirs[0], 'mod_unixd.so')) cdata.set('IF_HAVE_MOD_UNIXD', apache_mod_unixd.returncode() == 0 ? '' : '#') + cdata.set('HAVE_APACHE', have_apache) endif endif |