[PATCH v2] configure.ac: Change in build system to use the path from pkg-config for wayland-scanner.

Srivardhan Hebbar sri.hebbar at samsung.com
Thu May 15 01:55:34 PDT 2014


This is a fix to the bug https://bugs.freedesktop.org/show_bug.cgi?id=78688.

Signed-off-by: Srivardhan Hebbar <sri.hebbar at samsung.com>
---
 configure.ac |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 031a26f..2a0cf2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,8 @@ AC_ARG_VAR([WESTON_NATIVE_BACKEND],
            [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@])
 AC_ARG_VAR([WESTON_SHELL_CLIENT],
            [Set the default desktop shell client to load if none is specified in weston.ini. @<:@default=weston-desktop-shell@:>@])
+AC_ARG_VAR([WAYLAND_SCANNER_PATH],
+           [Set the path of wayland-scanner. By default obtain the path from pkg-config])
 
 PKG_PROG_PKG_CONFIG()
 
@@ -498,7 +500,12 @@ if test "x$have_lcms" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
 
-AC_PATH_PROG([wayland_scanner], [wayland-scanner])
+if test "x$WAYLAND_SCANNER_PATH" = "x"; then
+	WAYLAND_SCANNER_PATH=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
+	WAYLAND_SCANNER_PATH=`AS_DIRNAME($WAYLAND_SCANNER_PATH)`
+fi
+AC_PATH_PROG([wayland_scanner], [wayland-scanner],,
+		[${WAYLAND_SCANNER_PATH}])
 if test x$wayland_scanner = x; then
 	AC_MSG_ERROR([wayland-scanner is needed to compile weston])
 fi
-- 
1.7.9.5



More information about the wayland-devel mailing list