Bug 22296

Summary: --define-variable clashes with --atleast-version
Product: pkg-config Reporter: Andreas Kotes <count-linux>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Andreas Kotes 2009-06-15 10:03:10 UTC
$ pkg-config --atleast-pkgconfig-version 0.20
$ echo $?
0

but

$ pkg-config --define-variable=prefix=foo --atleast-pkgconfig-version 0.20
$ echo $?
1

.. so using PKG_CONFIG to override a prefix doesn't work with configures that test pkg-config's version this way.

Moo.
Comment 1 Tollef Fog Heen 2009-06-29 18:26:57 UTC
As a workaround, if you use the same sort of options (with or without =), it works better:

: tfheen@qurzaw ~ > pkg-config --define-variable=prefix=foo  --atleast-pkgconfig-version=0.20
: tfheen@qurzaw ~ > echo $?
0
: tfheen@qurzaw ~ > pkg-config --define-variable prefix=foo  --atleast-pkgconfig-version 0.20
: tfheen@qurzaw ~ > echo $?
0


I agree it looks like a bug in the popt option parsing library, it ought to allow you to mix a bit more freely.
Comment 2 Dan Nicholson 2012-05-10 05:46:58 UTC

*** This bug has been marked as a duplicate of bug 9584 ***

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.