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.
So we can either:
- require pkg-config 0.28 with PKG_PREREQ(0.28)
- redefine the PKG_CHECK_VAR macro like in
https://www.varnish-cache.org/lists/pipermail/varnish-commit/2016-September/016445.html
, but that seems overkill
- add custom support for a WAYLAND_PROTOCOLS_DATADIR variable with
AC_ARG_VAR
- forget about this patch
--
Olivier Blin - SoftAtHome
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel