autoconf: stop exporting internal wayland details
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 28 Jun 2018 14:06:09 +0000 (15:06 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 7 Aug 2018 16:23:17 +0000 (17:23 +0100)
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: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
configure.ac
src/egl/Makefile.am
src/egl/wayland/wayland-drm/Makefile.am
src/vulkan/Makefile.am

index ecc55a11f6473b086b7f9e7790e5896a2e46d379..0d67a3499a52faa1798927e228f4fe0b6b26f4d4 100644 (file)
@@ -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
index b43805d991a4a5b7683025a794f87c62af2121c2..d16a2b86177d2af3255b00a2f862b18774822bc6 100644 (file)
@@ -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)
index 0404c79e7fa7197f8e00d1589032ccb592f421bc..40174c6acdd80ed3465112297568be14d6ce0d29 100644 (file)
@@ -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 $< $@
index ce1a79d0c480fcf65034b83a7a4dc48145a7ecba..db3831229e98b9f525c25576de290008cdca9723 100644 (file)
@@ -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)