]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
meson: set ENABLE_{LOGGING,DEBUG} only as needed
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 3 Oct 2024 16:22:43 +0000 (17:22 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 15 Oct 2024 17:52:23 +0000 (12:52 -0500)
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 <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/173
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
meson.build

index 0da69bd5322645fb19ae5c1456baee4f82656ea7..1f28c65a127745fd3aace551229cad432ae4e91e 100644 (file)
@@ -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')