tree-wide: check if necessary cflags dependencies are set

This makes each `foo_cflags` dependency define a `SYSTEMD_CFLAGS_MARKER_FOO`
macro, and checks if the macro is set when headers provided by external
libraries are included.

With this, we can fail fast at compile time if necessary `_cflags`
dependencies are omitted in meson.build. Missing dependencies found by this
mechanism have been added across the tree.
This commit is contained in:
Yu Watanabe
2026-07-03 21:50:45 +09:00
parent 4c5cbc970a
commit 5280cd7bdb
66 changed files with 476 additions and 69 deletions
+4
View File
@@ -7,6 +7,10 @@
#include "shared-forward.h"
#if HAVE_LIBCRYPTSETUP
#ifndef SYSTEMD_CFLAGS_MARKER_LIBCRYPTSETUP
# error "missing libcryptsetup_cflags in meson dependency."
#endif
#include <libcryptsetup.h> /* IWYU pragma: export */
/* Available since libcryptsetup 2.7. Always redeclare so DLSYM_PROTOTYPE's typeof() resolves on older