From 9fc170bda513613538a3948895e1ed8cbac91c63 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 4 Feb 2017 19:49:20 -0600 Subject: [PATCH] main: add early tracing support via PKG_CONFIG_EARLY_TRACE environment variable --- main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.c b/main.c index f200ca0..52b8056 100644 --- a/main.c +++ b/main.c @@ -705,6 +705,12 @@ main(int argc, char *argv[]) { NULL, 0, NULL, 0 } }; + if (getenv("PKG_CONFIG_EARLY_TRACE")) + { + error_msgout = stderr; + pkgconf_client_set_trace_handler(&pkg_client, error_handler, NULL); + } + pkgconf_client_init(&pkg_client, error_handler, NULL); while ((ret = pkg_getopt_long_only(argc, argv, "", options, NULL)) != -1)