Bug 70263 - pkg-config requires trailing slash for cflags
Summary: pkg-config requires trailing slash for cflags
Status: RESOLVED NOTABUG
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: pkg-config
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-08 00:04 UTC by peasteven
Modified: 2013-12-14 17:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description peasteven 2013-10-08 00:04:27 UTC
Cflags arguments which use a variable will not appear unless a non-whitespace character follows the variable:

Current state (egl.pc):
    "Cflags: -I${includedir}"

    $ pkg-config egl --cflags
    -I/usr/include/libdrm

Proposed state (egl.pc):
    "Cflags: -I${includedir}/"

    $ pkg-config egl --cflags
    -I/usr/include/ -I/usr/include/libdrm
Comment 1 Dan Nicholson 2013-12-14 17:13:47 UTC
(In reply to comment #0)
> Cflags arguments which use a variable will not appear unless a
> non-whitespace character follows the variable:
> 
> Current state (egl.pc):
>     "Cflags: -I${includedir}"
> 
>     $ pkg-config egl --cflags
>     -I/usr/include/libdrm

This is intentional. /usr/include is a system header location. pkg-config suppresses these on purpose since adding system paths too early in the compiler command can cause problems. You can make pkg-config print the system paths by setting the environment variables PKG_CONFIG_ALLOW_SYSTEM_CFLAGS and PKG_CONFIG_ALLOW_SYSTEM_LIBS to a non-empty value. See pkg-config(1).


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.