[Mesa-dev] [PATCH 2/8] vulkan: autotools: build Wayland part conditionally
Eric Engestrom
eric.engestrom at imgtec.com
Tue Mar 20 13:58:10 UTC 2018
On Monday, 2018-03-19 18:49:05 +0100, Juan A. Suarez Romero wrote:
> Build vulkan/wsi/wayland if Wayland platform is enabled.
>
> 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
> ---
> 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..7f6858633b0 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 -n "$WAYLAND_SCANNER")
Isn't that always going to be true? $WAYLAND_SCANNER is `:` in the
fallback case, so maybe this should be
test "$WAYLAND_SCANNER" = ":"
> +
> +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
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list