Again: pkgconfig vs datadir and datarootdir

tlaronde at kergis.com tlaronde at kergis.com
Tue Mar 5 16:02:04 UTC 2024


Alan Coopersmith has answered concerning ${libdir}/pkgconfig vs
${datadir}/pkgconfig and this makes perfect sense.

But remains a discrepancy:

In xorg-sgml-doctools/Makefile.am we have:

pkgconfigdir = $(datadir)/pkgconfig

In xcb-proto/Makefile.am we have:

pkgconfigdir = $(datarootdir)/pkgconfig

(xcb-proto is Machine Independent for the most---xml, xls---and even
.py; the byte-compiled python version of the module being another
distinct problem).

But datadir and datarootdir can be set independently via autotools
(configure) and this makes some sense, specially for the vast corpus
of X11, to put the "data" (X11 proper stuff) somewhere (say in
/usr/X11R{6,7}/) while pkgconfig pc files are put in a general
subdirectory (/usr/share/pkgconfig/ for example) precisely to be
generally reachable.

So there is use for both datadir and datarootdir, datadir for meson
being a built-in option (always settable) while datarootdir is not
(both are equals in autotools by default, but can be set with
differing values).

So for M.I. pkgconfig stuff: datadir or datarootdir? My take is:
datadir for pkgconfig pc files for M.I. stuff; datarootdir for proper
data.

Do others agree on this? Have I missed another subtlety?

BTW: I have corrected my fork of xorg-sgml-doctools to suppress the
undue pkgconfigdir meson option, and improved the comments in
meson.build. OK for merge.
-- 
        Thierry Laronde <tlaronde +AT+ kergis +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


More information about the xorg-devel mailing list