[PATCH] Allow to specify wayland-protocols datadir

Marius Vlad marius-cristian.vlad at nxp.com
Tue Dec 12 21:10:18 UTC 2017


This is particularly useful when cross-compiling and we need to specify a custom
datadir path for wayland-protocols. Cross-compilation toolchain is usually
immutable, and in this way we can modify wayland-protocols independently from
what the toolchain provides.

Signed-off-by: Marius Vlad <marius-cristian.vlad at nxp.com>
---
 configure.ac | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d1b5f47..11ebc21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,7 +213,13 @@ 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)
+AC_ARG_WITH(wayland-protocols-datadir-path,
+               AS_HELP_STRING([--with-wayland-protocols-datadir-path=PATH],
+               [Path to wayland-protocols]),
+               [WAYLAND_PROTOCOLS_DATADIR="$withval"],
+               [WAYLAND_PROTOCOLS_DATADIR="$ac_wayland_protocols_pkgdatadir"])
+
+AC_SUBST([WAYLAND_PROTOCOLS_DATADIR])
 
 AC_ARG_ENABLE(wayland-compositor, [  --enable-wayland-compositor],,
 	      enable_wayland_compositor=yes)
-- 
2.9.3



More information about the wayland-devel mailing list