main: add early tracing support via PKG_CONFIG_EARLY_TRACE environment variable

feature/tap-sh
William Pitcock 2017-02-04 19:49:20 -06:00
parent 276e36fe28
commit 9fc170bda5
1 changed files with 6 additions and 0 deletions

6
main.c
View File

@ -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)