Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pkgconfig file install location & include directory #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

berrange
Copy link

No description provided.

Apps are doing #include <yajl/yajl_parse.h> to get yajl headers,
but the pkgconfig file sets includedir={prefix}/include/yajl.
This means the compiler will look for

  /usr/include/yajl/yajl/yajl_parse.h

This isn't a problem when prefix is /usr since /usr/include is
in the default search path, so the compiler will still find
/usr/include/yajl/yajl_parse.h.  If you install yajl to somewhere
else like $HOME/usr, then the broken pkgconfig file includedir
setting will prevent the compiler finding the header files
at all

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
The pkgconfig tool has two directories for installing .pc files
to

   /usr/share/pkgconfig
   /usr/lib/pkgconfig

The /usr/share/pkgconfig directory must only be used if the
.pc file refers to resources which are architecture
independant. Since yajl is a native C library, it is very
much architecture dependant and so must use /usr/lib/pkgconfig

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
@lamont-granquist
Copy link

this is a dup of #119

@berrange
Copy link
Author

The patch against #119 is wrong because it doesn't honour LIB_SUFFIX, which this patch of mine does do. Also the second patch here fixes the pkgconfig file contents which the other patch doesn't.

@artob
Copy link

artob commented Oct 29, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants