[PATCH weston v2] configure.ac: use PKG_CHECK_VAR for wayland-protocols

Pekka Paalanen ppaalanen at gmail.com
Tue Jul 18 13:31:25 UTC 2017


On Fri, 7 Jul 2017 10:51:16 +0200
Olivier Blin <olivier.blin at softathome.com> wrote:

> Le 06/07/2017 à 14:49, Olivier Blin a écrit :
> > This allows to override the wayland-protocols pkgdatadir with the
> > WAYLAND_PROTOCOLS_DATADIR environment variable.
> >
> > pkgconfig would return an absolute path in /usr/share/wayland-protocols
> > for the pkgdatadir value, which is not suitable for cross-compiling.
> >
> > The pkgdatadir is not affected by the PKG_CONFIG_SYSROOT_DIR environment
> > variable, since it is usually meant for directories needed at runtime,
> > not build time.
> > ---
> >   configure.ac | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 53faee34..c2aedcd8 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -208,9 +208,7 @@ fi
> >   PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
> >   PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
> >   
> > -PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.8],
> > -		  [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
> > -AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
> > +PKG_CHECK_VAR(WAYLAND_PROTOCOLS_DATADIR, wayland-protocols >= 1.8, pkgdatadir)
> >   
> >   AC_ARG_ENABLE(wayland-compositor, [  --enable-wayland-compositor],,
> >   	      enable_wayland_compositor=yes)  
> 
> Hi,
> 
> Also note that this requires a relatively new pkg-config for PKG_CHECK_VAR.
> The macro appeared in pkg-config 0.28, from January 2013.
> 
> It is for example not available in Ubuntu 14.04 LTS, which only provides 
> pkg-config 0.26.

Hi,

is anyone actually against requiring pkg-config 0.28? It sounds fine to
me, so I'll give:
Acked-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

I think the pkg-config's own version check would need bumping, and I
have a feeling the above M4 could use more quoting just in case.

If the MODULE requirement for PKG_CHECK_VAR is not satisfied, does it
fail the whole configure like we would want? The documentation does not
say.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170718/55b9808c/attachment.sig>


More information about the wayland-devel mailing list