[PATCH xserver] configure.ac: make use of wayland-scanner.pc

Emil Velikov emil.l.velikov at gmail.com
Wed Apr 11 17:51:16 UTC 2018


From: Emil Velikov <emil.velikov at collabora.com>

Replace the current (incorrect) assumption that wayland-scanner is
located in the wayland-client prefix. Make use of the wayland_scanner
variable in wayland-scanner.pc

It was introduced back in 2013 and we already require newer wayland bits

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
More or less the same patch has been part of weston and mesa for a few
years now.
---
 configure.ac | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 828d15e95..a851cc369 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2387,9 +2387,11 @@ if test "x$XWAYLAND" = xyes; then
 		AC_MSG_ERROR([Xwayland requires CLOCK_MONOTONIC support.])
 	fi
 
-	WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
-	AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
-		     [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
+	AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+	if test "x$WAYLAND_SCANNER" = x; then
+		PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
+		AC_SUBST(WAYLAND_SCANNER, `$PKG_CONFIG --variable=wayland_scanner wayland-scanner`)
+	fi
 
 	AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
 fi
-- 
2.16.0



More information about the xorg-devel mailing list