From 325ddf2f4b19a9084dedd3d458f7d02f5b854dec Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 20 Mar 2017 06:48:28 -0500 Subject: man: Document PKG_PROG_PKG_CONFIG conditional issue there The issue of PKG_PROG_PKG_CONFIG being run first from a conditional affects more than PKG_CHECK_MODULES and PKG_CHECK_EXISTS since PKG_PROG_PKG_CONFIG is AC_REQUIRE'd from many other macros. Describe the issue completely in the PKG_PROG_PKG_CONFIG section. --- pkg-config.1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg-config.1 b/pkg-config.1 index e4bc757..c8cec84 100644 --- a/pkg-config.1 +++ b/pkg-config.1 @@ -468,7 +468,15 @@ macro will be available. Defines the PKG_CONFIG variable to the best pkg-config available, useful if you need pkg-config but don't want to use PKG_CHECK_MODULES. -.\" + +If the first call to PKG_PROG_PKG_CONFIG is conditional, then it will +not work correctly in all cases. Since many of the other macros such as +PKG_CHECK_MODULES require PKG_PROG_PKG_CONFIG to know which pkg-config +program to run, PKG_PROG_PKG_CONFIG may be run for the first time from a +conditional from one of these macros. Therefore, if any of the +pkg-config macros will be used under a conditional, it's best to run +PKG_PROG_PKG_CONFIG before any of the other macros are used. + .TP .I "PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])" Enables static linking through --static prior to calling -- cgit v1.2.1