From a276c0b4a89576601083914fa89a8a2c440be9ba Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 5 Aug 2024 13:22:05 -0700 Subject: [PATCH] main: add --exists-cflags command-line option --- cli/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/main.c b/cli/main.c index 0ddcb8d..d206f75 100644 --- a/cli/main.c +++ b/cli/main.c @@ -72,6 +72,7 @@ #define PKG_SHARED (((uint64_t) 1) << 44) #define PKG_DUMP_LICENSE (((uint64_t) 1) << 45) #define PKG_SOLUTION (((uint64_t) 1) << 46) +#define PKG_EXISTS_CFLAGS (((uint64_t) 1) << 47) static pkgconf_client_t pkg_client; static const pkgconf_fragment_render_ops_t *want_render_ops = NULL; @@ -798,6 +799,7 @@ usage(void) printf(" --modversion print the specified module's version to stdout\n"); printf(" --internal-cflags do not filter 'internal' cflags from output\n"); printf(" --license print the specified module's license to stdout if known\n"); + printf(" --exists-cflags add -DHAVE_FOO fragments to cflags for each found module\n"); printf("\nfiltering output:\n\n"); #ifndef PKGCONF_LITE @@ -993,6 +995,7 @@ main(int argc, char *argv[]) #endif { "license", no_argument, &want_flags, PKG_DUMP_LICENSE }, { "verbose", no_argument, NULL, 55 }, + { "exists-cflags", no_argument, &want_flags, PKG_EXISTS_CFLAGS }, { NULL, 0, NULL, 0 } };