]> git.sesse.net Git - vlc/commitdiff
Build system support for wayland-scanner
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 27 Sep 2014 08:45:07 +0000 (11:45 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 27 Sep 2014 11:11:37 +0000 (14:11 +0300)
configure.ac
modules/.gitignore
modules/Makefile.am

index eff49952f952dae46e79f463ab59b06aa58d8655..eaf4dcfb3b30eacdf6e0f85a10ebb3889a07e3f7 100644 (file)
@@ -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"
   ], [
index 87bac2f094d8913b7c6c3494349e03f54f3b2203..8497dd85aaddc64d208c77b0d0d16960c89ef99d 100644 (file)
@@ -1,3 +1,5 @@
+*-client-protocol.h
+*-protocol.c
 plugins.dat
 srtp-test-aes
 srtp-test-recv
index 005c15017dce23a7ab74fe4dbc8fa7dfb0c274c2..486e71e5baa63e841221b9b7454b1e8389ec7aa4 100644 (file)
@@ -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" "$@"