build: use allowed over enabled or not-disabled
Meson feature options are typically in a tri-state of enabled, disabled,
or auto. The enabled and disabled functions on an option (from
`get_option`) no longer return true for auto features. Instead, the
expectation is to use `allowed()` which is true for both enabled and
auto.
Switch all uses of `enabled` to `allowed`.
Switch all uses of `not disabled` to `allowed`.
Change-Id: I2b784efb6f698a2dacee8c840d3586aa941f88e0
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index e1ee4f1..f36a671 100644
--- a/meson.build
+++ b/meson.build
@@ -12,8 +12,8 @@
)
conf_data = configuration_data()
-conf_data.set('RMCP_PING', get_option('rmcp_ping').enabled())
-conf_data.set('PAM_AUTHENTICATE', get_option('pam_authenticate').enabled())
+conf_data.set('RMCP_PING', get_option('rmcp_ping').allowed())
+conf_data.set('PAM_AUTHENTICATE', get_option('pam_authenticate').allowed())
configure_file(output: 'config.h',
configuration: conf_data
@@ -108,6 +108,6 @@
install_dir: systemd_system_unit_dir)
build_tests = get_option('tests')
-if not build_tests.disabled()
+if build_tests.allowed()
subdir('test')
endif