summary refs log tree commit diff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build22
1 files changed, 16 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 594fa63c..9fcb2f6e 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ project(
 #  - add corresponding NM_VERSION_x_y_z macros in
 #    "shared/nm-version-macros.h.in"
 #  - update number in configure.ac
-  version: '1.29.90',
+  version: '1.30.0',
   license: 'GPL2+',
   default_options: [
     'buildtype=debugoptimized',
@@ -514,12 +514,21 @@ config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_def
 
 enable_modify_system = get_option('modify_system')
 
-polkit_agent_dep = dependency('polkit-agent-1', version: '>= 0.97', required : false)
-if polkit_agent_dep.found()
-	config_h.set_quoted('POLKIT_PACKAGE_PREFIX', polkit_agent_dep.get_pkgconfig_variable('prefix'))
-else
-	config_h.set_quoted('POLKIT_PACKAGE_PREFIX', '/usr')
+polkit_agent_helper_1_path = get_option('polkit_agent_helper_1')
+foreach p : [ '/usr/libexec/polkit-agent-helper-1',
+              '/usr/lib/polkit-1/polkit-agent-helper-1',
+              '/usr/lib/policykit-1/polkit-agent-helper-1' ]
+  if polkit_agent_helper_1_path == '' and run_command('test', '-f', p).returncode() == 0
+    polkit_agent_helper_1_path = p
+  endif
+endforeach
+if polkit_agent_helper_1_path == ''
+  polkit_agent_helper_1_path = '/usr/lib/polkit-1/polkit-agent-helper-1'
+endif
+if polkit_agent_helper_1_path[0] != '/'
+  error('polkit_agent_helper_1 must be an absolute path, but is ' + polkit_agent_helper_1_path)
 endif
+config_h.set_quoted('POLKIT_AGENT_HELPER_1_PATH', polkit_agent_helper_1_path)
 
 
 crypto = get_option('crypto')
@@ -1016,6 +1025,7 @@ if enable_polkit
   output += ' modify.system)'
 endif
 output += '\n'
+output += '  polkit-agent-helper-1: ' + polkit_agent_helper_1_path + '\n'
 output += '  selinux: ' + enable_selinux.to_string() + '\n'
 output += '  systemd-journald: ' + enable_systemd_journal.to_string() + ' (default: logging.backend=' + config_logging_backend_default + ')\n'
 output += '  hostname persist: ' + hostname_persist + '\n'