Commit d3e8c455 authored by Niels De Graef's avatar Niels De Graef

Meson: fix preprocessor directives.

When using `#ifdef` in your code (vs `#if`), the C preprocessor doesn't
check the value of the macro, only whether it is defined at all.

By using `conf.set10()`, the macros were defined, whether the
boolean values in the meson build file were false or not. So, to fix
this, you either have to start using `#if`, or you make sure you use
`conf.set()` instead.

This fixes the flatpak build of GNOME Contacts (which turns off udev
support).
parent 854cfe77
Pipeline #30356 passed with stage
in 1 minute and 53 seconds
......@@ -78,14 +78,14 @@ conf = configuration_data()
conf.set_quoted('GETTEXT_PACKAGE', '@0@-3.0'.format(meson.project_name()))
conf.set_quoted('INSTALL_PREFIX', prefix)
conf.set10('ENABLE_SECCOMP', seccomp_dep.found())
conf.set10('HAVE_BWRAP', seccomp_dep.found())
conf.set10('_GNU_SOURCE', seccomp_dep.found())
conf.set('ENABLE_SECCOMP', seccomp_dep.found())
conf.set('HAVE_BWRAP', seccomp_dep.found())
conf.set('_GNU_SOURCE', seccomp_dep.found())
conf.set10('HAVE_UDEV', udev_dep.found())
conf.set('HAVE_UDEV', udev_dep.found())
conf.set10('HAVE_TIMERFD', cc.has_function('timerfd_create'))
conf.set10('HAVE_OPENAT', cc.has_function('openat'))
conf.set('HAVE_TIMERFD', cc.has_function('timerfd_create'))
conf.set('HAVE_OPENAT', cc.has_function('openat'))
config_h = declare_dependency(
sources: configure_file(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment