[BRLTTY] cannot install brltty 5.4 latest git on gentoo
Chris Brannon
chris at the-brannons.com
Sat Jul 23 17:30:10 EDT 2016
Dave Mielke <dave at mielke.cc> writes:
> So, in fact, Speech Dispatcher's own .pc file isn't specifying the new include
> subdirectory.
There seems to be some disagreement about how to do pkg-config files for
libraries.
Some libraries do not add the library-specific subdirectory to the
include path, and you are supposed to use it in the #include directive.
A few quick examples that I find while looking around on my system are
libao, gnutls, and libcurl.
For instance, the relevant bits from libcurl's .pc file:
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
*SNIP*
Cflags: -I${includedir}
You're expected to use
#include <curl/curl.h>
Same goes for libao and gnutls.
But the other convention includes the library-specific subdirectory in
the include path. An example is GLib:
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
*SNIP*
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
And you can just #include <glib.h>.
I don't know which is standard. The first seems to be better, because
it gives you namespaces for header names. My libfoo/types.h won't
conflict with your libbar/types.h.
With the 0.8 series of Speech Dispatcher, all of the headers moved down
into /usr/include/speech-dispatcher.
This is also when the pkg-config file was added.
The first convention was adopted, either implicitly or explicitly.
With version 0.8.4, they added the library-specific subdirectory back to
the include path, so you could do
#include <libspeechd.h>
once again, just like you could do in versions 0.7.x and prior, when
there was only one header and it was under /usr/include.
-- Chris
More information about the BRLTTY
mailing list