Commit 6b8657af authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

autoconf: stop exporting internal wayland details

With version v1.15 the "code" option was deprecated in favour of
"private-code" or "public-code".

Before the interface symbol generated was exported (which is a bad idea
since it's internal implementation detail) and others may misuse it.

That was the case with libva approx. 1 year ago. Since then libva was
fixed, so we can finally hide it by using "private-code"

Inspired by similar xserver patch by Adam Jackson.
Signed-off-by: 's avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: 's avatarDylan Baker <dylan@pnwbakers.com>
Reviewed-by: 's avatarEric Engestrom <eric.engestrom@intel.com>
parent 2f1d9e6c
......@@ -1811,6 +1811,10 @@ for plat in $platforms; do
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
......
......@@ -72,7 +72,7 @@ WL_DMABUF_XML = $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-
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)
......
......@@ -28,7 +28,7 @@ CLEANFILES = \
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 $< $@
......
......@@ -76,7 +76,7 @@ WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml
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)
......@@ -86,7 +86,7 @@ WL_DMABUF_XML = $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment