From cdbe3c68b1f6f9824fa56895f281e4a49d9d61e9 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 3 Oct 2024 17:22:43 +0100 Subject: [PATCH] meson: set ENABLE_{LOGGING,DEBUG} only as needed With the introduction of the meson build, both ENABLE_LOGGING and ENABLE_DEBUG have always been set - 1 or 0. Whereas the code relies on them being set or unset. Adjust the build accordingly. Fixes: 370141c1 ("meson: introduce meson, covering libkmod.so") Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/173 Signed-off-by: Lucas De Marchi --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 0da69bd5..1f28c65a 100644 --- a/meson.build +++ b/meson.build @@ -18,8 +18,12 @@ cdata = configuration_data() cdata.set_quoted('PACKAGE', meson.project_name()) cdata.set_quoted('VERSION', meson.project_version()) -cdata.set10('ENABLE_LOGGING', get_option('logging')) -cdata.set10('ENABLE_DEBUG', get_option('debug-messages')) +if get_option('logging') + cdata.set('ENABLE_LOGGING', true) +endif +if get_option('debug-messages') + cdata.set('ENABLE_DEBUG', true) +endif pkg = import('pkgconfig') cc = meson.get_compiler('c') -- 2.47.3