From: Emil Velikov Date: Thu, 3 Oct 2024 16:22:43 +0000 (+0100) Subject: meson: set ENABLE_{LOGGING,DEBUG} only as needed X-Git-Tag: v34~245 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdbe3c68b1f6f9824fa56895f281e4a49d9d61e9;p=thirdparty%2Fkmod.git 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 --- 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')