[vlc-commits] Build system support for wayland-scanner
Rémi Denis-Courmont
git at videolan.org
Sat Sep 27 17:53:51 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Sep 27 11:45:07 2014 +0300| [fa446c65542bbc6387fb4b333de93f205255faab] | committer: Rémi Denis-Courmont
Build system support for wayland-scanner
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fa446c65542bbc6387fb4b333de93f205255faab
---
configure.ac | 12 ++++++++++++
modules/.gitignore | 2 ++
modules/Makefile.am | 12 ++++++++++++
3 files changed, 26 insertions(+)
diff --git a/configure.ac b/configure.ac
index eff4995..eaf4dcf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3182,7 +3182,19 @@ dnl
AC_ARG_ENABLE(wayland,
[AS_HELP_STRING([--enable-wayland], [Wayland support (default auto)])])
have_wayland="no"
+AC_ARG_VAR([WAYLAND_SCANNER], [Wayland scanner utility])
+
AS_IF([test "${enable_wayland}" != "no"], [
+ AC_MSG_CHECKING([for the Wayland scanner])
+ AS_IF([test -z "$WAYLAND_SCANNER"], [
+ PKG_CHECK_EXISTS([wayland-scanner], [
+ WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
+ ], [
+ WAYLAND_SCANNER="wayland-scanner"
+ ])
+ ])
+ AC_MSG_RESULT([$WAYLAND_SCANNER])
+
PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= 1.5.91], [
have_wayland="yes"
], [
diff --git a/modules/.gitignore b/modules/.gitignore
index 87bac2f..8497dd8 100644
--- a/modules/.gitignore
+++ b/modules/.gitignore
@@ -1,3 +1,5 @@
+*-client-protocol.h
+*-protocol.c
plugins.dat
srtp-test-aes
srtp-test-recv
diff --git a/modules/Makefile.am b/modules/Makefile.am
index 005c150..486e71e 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -1,6 +1,7 @@
noinst_LTLIBRARIES =
noinst_HEADERS =
check_PROGRAMS =
+EXTRA_DIST =
BASE_SUBDIRS = \
audio_filter \
@@ -72,3 +73,14 @@ module.rc.lo: module.rc
-i $< -o $@
echo HELLO
endif
+
+# Wayland
+SUFFIXES += -client-protocol.h -protocol.c .xml
+
+.xml-client-protocol.h:
+ $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < "$^" > "$@.tmp"
+ $(AM_V_at)mv -f -- "$@.tmp" "$@"
+
+.xml-protocol.c:
+ $(AM_V_GEN)$(WAYLAND_SCANNER) code < "$^" > "$@.tmp"
+ $(AM_V_at)mv -f -- "$@.tmp" "$@"
More information about the vlc-commits
mailing list