PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
WAYLAND_SCANNER='')
+ PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
+ AC_SUBST(SCANNER_ARG, 'private-code'),
+ AC_SUBST(SCANNER_ARG, 'code'))
+
if test "x$WAYLAND_SCANNER" = x; then
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
fi
drivers/dri2/linux-dmabuf-unstable-v1-protocol.c: $(WL_DMABUF_XML)
$(MKDIR_GEN)
- $(AM_V_GEN)$(WAYLAND_SCANNER) code $< $@
+ $(AM_V_GEN)$(WAYLAND_SCANNER) $(SCANNER_ARG) $< $@
drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h: $(WL_DMABUF_XML)
$(MKDIR_GEN)
wayland-drm-server-protocol.h
%-protocol.c : %.xml
- $(AM_V_GEN)$(WAYLAND_SCANNER) code $< $@
+ $(AM_V_GEN)$(WAYLAND_SCANNER) $(SCANNER_ARG) $< $@
%-server-protocol.h : %.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) server-header $< $@
wsi/wayland-drm-protocol.c : $(WL_DRM_XML)
$(MKDIR_GEN)
- $(AM_V_GEN)$(WAYLAND_SCANNER) code $< $@
+ $(AM_V_GEN)$(WAYLAND_SCANNER) $(SCANNER_ARG) $< $@
wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML)
$(MKDIR_GEN)
wsi/linux-dmabuf-unstable-v1-protocol.c : $(WL_DMABUF_XML)
$(MKDIR_GEN)
- $(AM_V_GEN)$(WAYLAND_SCANNER) code $< $@
+ $(AM_V_GEN)$(WAYLAND_SCANNER) $(SCANNER_ARG) $< $@
wsi/linux-dmabuf-unstable-v1-client-protocol.h : $(WL_DMABUF_XML)
$(MKDIR_GEN)