Bug 2992 - AC_RUN_LOG() usage in pkg.m4 breaks things (0.17)
Summary: AC_RUN_LOG() usage in pkg.m4 breaks things (0.17)
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high critical
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-12 07:35 UTC by James Henstridge
Modified: 2005-04-11 21:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
pkg-config-acrunlog.patch (536 bytes, patch)
2005-04-12 07:44 UTC, James Henstridge
Details | Splinter Review

Description James Henstridge 2005-04-12 07:35:29 UTC
On IRC I suggested using AC_RUN_LOG() to include a bit more info in the
config.log output, but it looks like the way you added it effectively makes
every PKG_CHECK_MODULES() invocation fail.

In the _PKG_CONFIG module, you have:
        AC_RUN_LOG([
        if $PKG_CONFIG --exists "$3" >/dev/null 2>&1; then
                pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
        else
                pkg_failed=yes
        fi
        ])

The AC_RUN_LOG() command sets up a subshell, so none of these variables are seen
by the caller, and you end up with empty *_CFLAGS and *_LIBS lists.

Also, by putting the whole if block inside the AC_RUN_LOG(), you don't get as
useful config.log output -- it always tells you the return value of the block is 0.

I'll attach a patch with fixed AC_RUN_LOG() usage.
Comment 1 James Henstridge 2005-04-12 07:44:28 UTC
Created attachment 2401 [details] [review]
pkg-config-acrunlog.patch

narrows the AC_RUN_LOG() usage to give useful results, and not set variables in
a subshell.
Comment 2 James Henstridge 2005-04-12 07:46:23 UTC
Bumping severity to critical, since it essentially breaks any configure script
using PKG_CHECK_MODULES that is generated with the 0.17 pkg.m4.
Comment 3 Tollef Fog Heen 2005-04-12 14:18:28 UTC
Fixed 0.17.1 with this patch applied released.  Thanks a lot.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.