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

Srivardhan Hebbar sri.hebbar at samsung.com
Fri May 16 03:13:47 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 |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 031a26f..47a38cd 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],
+           [Set the name of wayland-scanner file with full path. E.g: /usr/bin/wayland-scanner. By default obtain the path from pkg-config])
 
 PKG_PROG_PKG_CONFIG()
 
@@ -498,12 +500,14 @@ 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 = x; then
-	AC_MSG_ERROR([wayland-scanner is needed to compile weston])
+if test "x$WAYLAND_SCANNER" = "x"; then
+	WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
 fi
-
-PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner)
+AC_MSG_CHECKING([for wayland-scanner])
+AS_IF(AS_EXECUTABLE_P([${WAYLAND_SCANNER}]),
+	[AC_MSG_RESULT([found])],[AC_MSG_RESULT([not found])]
+	[AC_MSG_ERROR([wayland-scanner is needed to compile weston])])
+AC_SUBST(wayland_scanner,[${WAYLAND_SCANNER}])
 
 AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
 
-- 
1.7.9.5



More information about the wayland-devel mailing list