"pkg-config --cflags" incorrectly omits -I flags
With pkg-config 0.29.2 under Debian,
pkg-config --cflags incorrectly omits
-I flags, potentially yielding errors, or even incorrect builds because a wrong
.h file could be included. This happens when a
C_INCLUDE_PATH environment variable has the include directory in question.
zira% pkg-config --cflags fplll
zira% CPATH=/home/vinc17/opt/fplll/include pkg-config --cflags fplll
zira% C_INCLUDE_PATH=/home/vinc17/opt/fplll/include pkg-config --cflags fplll
At least with
C_INCLUDE_PATH, this is incorrect because this environment variable is ignored by
Not sure about
CPATH, but it would be safer to ignore it as well in case it would be unset or it would not be taken into account by some compiler (it is not specified by POSIX).
Bug also reported in the Debian BTS: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984504