From fce1199b53d47f2ff98a0b8f2b03f99d353f6304 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 24 May 2020 14:34:17 -0600 Subject: [PATCH] cli: add support for PKG_CONFIG_MSVC_SYNTAX env variable Patch from Dan Kegel. --- NEWS | 2 ++ cli/main.c | 2 +- man/pkgconf.1 | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 14be65d..c3a532f 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ Changes from 1.6.3 to 1.7.0: - A new --shared option and WantDefaultStatic cross-compile configuration option have been added. This allows for toolchains to specify that static linking should be used by default. + - Support for the PKG_CONFIG_MSVC_SYNTAX environment variable has + been added. Patch by Dan Kegel. Changes from 1.6.2 to 1.6.3: ---------------------------- diff --git a/cli/main.c b/cli/main.c index fc698a4..f198f3b 100644 --- a/cli/main.c +++ b/cli/main.c @@ -971,7 +971,7 @@ main(int argc, char *argv[]) pkgconf_client_init(&pkg_client, error_handler, NULL, personality); #ifndef PKGCONF_LITE - if ((want_flags & PKG_MSVC_SYNTAX) == PKG_MSVC_SYNTAX) + if ((want_flags & PKG_MSVC_SYNTAX) == PKG_MSVC_SYNTAX || getenv("PKG_CONFIG_MSVC_SYNTAX") != NULL) want_render_ops = msvc_renderer_get(); #endif diff --git a/man/pkgconf.1 b/man/pkgconf.1 index 2169639..d5488a1 100644 --- a/man/pkgconf.1 +++ b/man/pkgconf.1 @@ -211,6 +211,8 @@ If set, enables additional debug logging. The format of the debug log messages is implementation-specific. .It Va PKG_CONFIG_DONT_RELOCATE_PATHS If set, disables the path relocation feature. +.It Va PKG_CONFIG_MSVC_SYNTAX +If set, uses MSVC syntax for fragments. .El .Sh EXAMPLES Displaying the CFLAGS of a package: