lloyd / yajl

A fast streaming JSON parsing library in C.
http://lloyd.github.com/yajl
ISC License
2.15k stars 435 forks source link

Fix include path for pkg-config #235

Open roolebo opened 3 years ago

roolebo commented 3 years ago

yajl headers are supposed to be installed straight into $PREFIX/include/yajl and they're supposed to be included as <yajl/yajl_something.h>, according to the documentation.

However, pkg-config returns CFLAGS as $PREFIX/include/yajl and that breaks build because "#include <yajl/yajl_something.h>" can't find the header.

This is a problem if $PREFIX is different from /usr or other include directory that's used implicitly (which is a case on macOS with homebrew, where every package has its own $PREFIX).

robohack commented 3 years ago

I've fixed this on my fork: https://github.com/robohack/yajl (on the default "bsdmake" branch). There are other fixes also included in my branch, as well as a rewrite of the build system and documentation generation (to avoid the CMake disaster), as well as a full replacement for the pgksrc devel/yajl module.