On Mon, Mar 04, 2024 at 10:41:31AM -0800, Alan Coopersmith wrote: > On 3/4/24 01:49, tlaro...@kergis.com wrote: > > As written in a previous mail, I'm trying to adjust meson to provide > > the same rope as AC. > > > > For xorg-sgml-doctools, there was a small discrepancy if the user was > > not selecting the defaults. This is easy to fix (diff attached), but I > > now wonder about pkgconfig .pc files directory. > > > > In generated aclocal.m4, pkgconfigdir is said to be, by default, > > ${libdir}/pkgconfig, and supposed to be settable with > > --with-pkgconfigdir (it is not settable in fact: the option is not > > recognized). > > > > We put .pc files in ${datadir}/pkgconfig. By default, datadir == > > datarootdir, but this can be changed (with AC) so that X11 stuff is > > put in a dedicated subdir, while pkgconfig files are reachable in a > > more general dir. > > > > In fact, on my OS (NetBSD), pkgconfig files are placed in > > ${libdir}/pkgconfig and not ${datarootdir}/pkgconfig. > > > > So is there some rule about this for X11 stuff? > > X11 follows the general rules for pkg-config file installation: > ${libdir}/pkgconfig for architecture-specific stuff, > ${datarootdir}/pkgconfig for architecture-independent stuff. > > Normally this means if your pkgconfig file specifies linking against a > library, it goes in ${libdir} so it gets the settings right for whatever > library you're actually linking against (32-bit vs. 64-bit, cross-compiling > for another architecture, etc.). > > Stuff that ends up in ${datarootdir}/pkgconfig tends to be the same for > all OS'es/CPU's, things like the xorgproto header files and the > xorg-sgml-doctools XML files, and isn't used in linking binaries.
OK. In this case, the pkgconfigdir (meson) option that I have added (defaulting to ${datadir}/pkgconfig) in xorg-sgml-doctools can perhaps be suppressed (it does no harm, but is useless: setting datadir to some value distinct from datarootdir with autotools will indeed put the pc files elsewhere; and having added a 'datarootdir' option to meson, the exact same can now be achieved with meson in xorg-sgml-doctools). -- 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