All I tested is on Ubuntu x86_64.I have zlib.pc
file in /usr/lib/x86_64-linux-gnu/pkgconfig
, the content in this file:
prefix=/usrexec_prefix=${prefix}libdir=${prefix}/lib/x86_64-linux-gnusharedlibdir=${libdir}includedir=${prefix}/includeName: zlibDescription: zlib compression libraryVersion: 1.3Requires:Libs: -L${libdir} -L${sharedlibdir} -lzCflags: -I${includedir}
The environment VAR: PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
But when I execute:
$ pkg-config --libs --cflags zlib
I got the result:
-lz
There is no -L
and -I
.
What the fucking problem? drived me crazy. I just wanna keep the -I and -L without any other arguments like --keep-system-cflags --keep-system-libs