Bug 70263

Summary: pkg-config requires trailing slash for cflags
Product: pkg-config Reporter: peasteven
Component: srcAssignee: pkg-config
Status: RESOLVED NOTABUG QA Contact:
Severity: minor    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

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.