[Libva] [Libva-intel-driver][PATCH] Don't check WAYLAND_SCANNER if wayland isn't used or found

Emil Velikov emil.l.velikov at gmail.com
Thu May 5 01:00:03 UTC 2016


Hi Haihao,

On 4 May 2016 at 18:48, Xiang, Haihao <haihao.xiang at intel.com> wrote:
> checking for WAYLAND... no
> checking for LIBVA_WAYLAND_DEPS... no
> checking for pkg-config... (cached) /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for WAYLAND_SCANNER... no
> configure: error: Package requirements (wayland-scanner) were not met:
>
> No package 'wayland-scanner' found
>
Am I seeing correct and this is the intel-driver equivalent of the
libva commit from a while back ?

> Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
> ---
>  configure.ac                      | 19 +++++++++++--------
>  src/Makefile.am                   |  7 +++++--
>  src/{wayland => }/wayland-drm.xml |  0
>  src/wayland/Makefile.am           | 28 ----------------------------
>  4 files changed, 16 insertions(+), 38 deletions(-)
>  rename src/{wayland => }/wayland-drm.xml (100%)
>  delete mode 100644 src/wayland/Makefile.am
>
> diff --git a/configure.ac b/configure.ac
> index c32d579..a6ce360 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -173,17 +173,21 @@ AM_CONDITIONAL(USE_EGL, test "$USE_EGL" = "yes")
>  # Check for Wayland
>  USE_WAYLAND="no"
>  if test "$enable_wayland" = "yes"; then
> -    PKG_CHECK_MODULES([WAYLAND], [wayland-client], [USE_WAYLAND="yes"], [:])
>      PKG_CHECK_MODULES([LIBVA_WAYLAND_DEPS], [libva-wayland],
> -        [AC_DEFINE([HAVE_VA_WAYLAND], [1], [Defined to 1 if VA/Wayland API is enabled])],
> -        [USE_WAYLAND="no"])
> +        [USE_WAYLAND="yes"], [:])
> +
> +    if test "$USE_WAYLAND" = "yes"; then
> +
> +        WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
> +        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
> +                     [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
> +
> +        AC_DEFINE([HAVE_VA_WAYLAND], [1],
> +                  [Defined to 1 if VA/Wayland API is enabled])
> +    fi
>  fi
>  AM_CONDITIONAL(USE_WAYLAND, test "$USE_WAYLAND" = "yes")
>
> -m4_ifdef([WAYLAND_SCANNER_RULES],
> -    [WAYLAND_SCANNER_RULES(['$(top_builddir)/src/wayland'])],
> -    [wayland_scanner_rules=""; AC_SUBST(wayland_scanner_rules)])
> -
>  AC_OUTPUT([
>      Makefile
>      debian.upstream/Makefile
> @@ -203,7 +207,6 @@ AC_OUTPUT([
>      src/shaders/render/Makefile
>      src/shaders/utils/Makefile
>      src/shaders/vme/Makefile
> -    src/wayland/Makefile
>  ])
>
>  dnl Print summary
> diff --git a/src/Makefile.am b/src/Makefile.am
> index ad96102..8d1fc25 100755
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -199,9 +199,12 @@ EXTRA_DIST += Android.mk intel_version.h.in $(PKG_VERSION_FILE)
>  # Wayland protocol
>  protocol_source_h = wayland-drm-client-protocol.h
>  i965_output_wayland.c: $(protocol_source_h)
> - at wayland_scanner_rules@
> +%-client-protocol.h : %.xml
> +       $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
>
As you have a single source here, I'd suggest manually expanding % and
$<. This also has the side effect of being compatible with wider
selection of make implementations ;-) Afaict libva could use a similar
cleanup.

Regards,
Emil


More information about the Libva mailing list