Hi, I wonder why this des not work: $ pkg-config --cflags htslib $ In contrary, this works: $ pkg-config --cflags cairo -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 $ I do not see anything wrong in the file: $ cat /usr/lib64/pkgconfig/htslib.pc includedir=/usr/include libdir=/usr/lib64 Name: htslib Description: C library for high-throughput sequencing data formats Version: 1.3.1 Cflags: -I${includedir} Libs: -L${libdir} -lhts Libs.private: -L${libdir} -lhts -lm -lpthread Requires.private: zlib $ Thank you
# pkg-config htslib --print-variables includedir libdir pcfiledir # pkg-config htslib --variable=libdir /usr/lib64 # pkg-config htslib --variable=includedir /usr/include # So why do not those two above propagate to 'pkg-config --cflags' and 'pkg-config --libs'?
Because /usr/include is the standard header location that should be ignored. http://dev.gentoo.org/~mgorny/pkg-config-spec.html#flag-mangling-rules
Hi Martin, responding to your comments in https://github.com/gentoo/sci/issues/709, when the include dir is the standard /usr/include, pkg-config chooses to ignore it. The same applies to library dir, which defaults to /usr/lib64.