[PATCH v4] configure.ac: Change in build system to use the path from pkg-config for wayland-scanner.
Srivardhan Hebbar
sri.hebbar at samsung.com
Mon May 19 02:54:00 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>
---
Makefile.am | 6 +++---
configure.ac | 13 ++++++++-----
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 343adc6..a22fd8d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -997,10 +997,10 @@ CLEANFILES += $(man_MANS)
protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
- $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(WAYLAND_SCANNER) code < $< > $@
protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
- $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(WAYLAND_SCANNER) server-header < $< > $@
protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
- $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(WAYLAND_SCANNER) client-header < $< > $@
diff --git a/configure.ac b/configure.ac
index 031a26f..9cc3907 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,13 @@ 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_CONFIG_FILES([Makefile src/version.h src/weston.pc])
--
1.7.9.5
More information about the wayland-devel
mailing list