[Mesa-dev] [PATCH v2] vulkan: autotools: build Wayland part conditionally
Juan A. Suarez Romero
jasuarez at igalia.com
Wed Mar 21 13:10:57 UTC 2018
Eric, can I get this R-b by you?
J.A.
On Tue, 2018-03-20 at 15:53 +0100, Juan A. Suarez Romero wrote:
> Build vulkan/wsi/wayland if Wayland platform is enabled.
>
> v2: fix comparison with default fallback (Eric)
>
> CC: Daniel Stone <daniels at collabora.com>
> Fixes: bfa22266cd4d ("vulkan/wsi/wayland: Add support for zwp_dmabuf")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105211
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
>
> squash! vulkan: autotools: build Wayland part conditionally
> ---
> configure.ac | 7 +++++--
> src/vulkan/Makefile.am | 4 ++++
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 15f315ce93c..42e6af9e889 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1790,6 +1790,11 @@ PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
> if test "x$WAYLAND_SCANNER" = x; then
> AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
> fi
> +AM_CONDITIONAL(HAVE_WAYLAND_SCANNER, test "x$WAYLAND_SCANNER" != "x:")
> +
> +WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
> +AC_SUBST([WAYLAND_PROTOCOLS_DATADIR])
> +AM_CONDITIONAL(HAVE_WAYLAND_PROTOCOLS_DATADIR, test -n "$WAYLAND_PROTOCOLS_DATADIR")
>
> # Do per platform setups and checks
> platforms=`IFS=', '; echo $with_platforms`
> @@ -1800,7 +1805,6 @@ for plat in $platforms; do
> PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED])
> PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
> PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
> - WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
>
> if test "x$WAYLAND_SCANNER" = "x:"; then
> AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
> @@ -1839,7 +1843,6 @@ for plat in $platforms; do
> ;;
> esac
> done
> -AC_SUBST([WAYLAND_PROTOCOLS_DATADIR])
>
> if test "x$enable_glx" != xno; then
> if ! echo "$platforms" | grep -q 'x11'; then
> diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
> index e6d4277f92f..7444b9907a4 100644
> --- a/src/vulkan/Makefile.am
> +++ b/src/vulkan/Makefile.am
> @@ -62,6 +62,7 @@ CLEANFILES = $(BUILT_SOURCES)
>
> WL_DRM_XML = $(top_srcdir)/src/egl/wayland/wayland-drm/wayland-drm.xml
>
> +if HAVE_WAYLAND_SCANNER
> wsi/wayland-drm-protocol.c : $(WL_DRM_XML)
> $(MKDIR_GEN)
> $(AM_V_GEN)$(WAYLAND_SCANNER) code $< $@
> @@ -70,6 +71,7 @@ wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML)
> $(MKDIR_GEN)
> $(AM_V_GEN)$(WAYLAND_SCANNER) client-header $< $@
>
> +if HAVE_WAYLAND_PROTOCOLS_DATADIR
> WL_DMABUF_XML = $(WAYLAND_PROTOCOLS_DATADIR)/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
>
> wsi/linux-dmabuf-unstable-v1-protocol.c : $(WL_DMABUF_XML)
> @@ -79,6 +81,8 @@ wsi/linux-dmabuf-unstable-v1-protocol.c : $(WL_DMABUF_XML)
> wsi/linux-dmabuf-unstable-v1-client-protocol.h : $(WL_DMABUF_XML)
> $(MKDIR_GEN)
> $(AM_V_GEN)$(WAYLAND_SCANNER) client-header $< $@
> +endif
> +endif
>
> if HAVE_PLATFORM_WAYLAND
> wsi/linux-dmabuf-unstable-v1-protocol.lo: wsi/linux-dmabuf-unstable-v1-client-protocol.h
More information about the mesa-dev
mailing list