[PATCH weston 6/9] clients/simple-dmabuf-drm: add freedreno support alongside intel
Daniel Stone
daniel at fooishbar.org
Mon Nov 21 20:17:38 UTC 2016
Hi Varad,
On 17 November 2016 at 11:56, Varad Gautam <varadgautam at gmail.com> wrote:
> diff --git a/configure.ac b/configure.ac
> index d084d32..b959637 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -392,12 +392,21 @@ AC_ARG_ENABLE(simple-dmabuf-drm-client,
> [do not build the simple dmabuf drm client]),,
> enable_simple_dmabuf_drm_client="auto")
> if ! test "x$enable_simple_dmabuf_drm_client" = "xno"; then
> - PKG_CHECK_MODULES(SIMPLE_DMABUF_DRM_CLIENT, [wayland-client libdrm libdrm_intel],
> - have_simple_dmabuf_drm_client=yes, have_simple_dmabuf_drm_client=no)
> - if test "x$have_simple_dmabuf_drm_client" = "xno" -a "x$enable_simple_dmabuf_drm_client" = "xyes"; then
> - AC_MSG_ERROR([DRM dmabuf client explicitly enabled, but libdrm_intel couldn't be found])
> + PKG_CHECK_MODULES(SIMPLE_DMABUF_DRM_CLIENT, [wayland-client libdrm],
> + [PKG_CHECK_MODULES(LIBDRM_PLATFORM, [libdrm_freedreno],
> + AC_DEFINE([HAVE_LIBDRM_FREEDRENO], [1], [Build freedreno dmabuf client]) have_simple_dmabuf_drm_client=freedreno,
> + [PKG_CHECK_MODULES(LIBDRM_PLATFORM, [libdrm_intel],
> + AC_DEFINE([HAVE_LIBDRM_INTEL], [1], [Build intel dmabuf client]) have_simple_dmabuf_drm_client=intel,
> + have_simple_dmabuf_drm_client=unsupported)])],
> + have_simple_dmabuf_drm_client=unsupported)
> +
> + if test "x$have_simple_dmabuf_drm_client" = "xunsupported" -a "x$enable_simple_dmabuf_drm_client" = "xyes"; then
> + AC_MSG_ERROR([DRM dmabuf client explicitly enabled, but libdrm_intel or libdrm_freedreno not found])
> + fi
> +
> + if test "x$have_simple_dmabuf_drm_client" = "xfreedreno" -o "x$have_simple_dmabuf_drm_client" = "xintel"; then
> + enable_simple_dmabuf_drm_client="yes"
> fi
> - enable_simple_dmabuf_drm_client="$have_simple_dmabuf_drm_client"
> fi
> AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_DRM_CLIENT, test "x$enable_simple_dmabuf_drm_client" = "xyes")
This conditional ladder pains my eys, but I can't think of anything
better at this point.
Acked-by: Daniel Stone <daniels at collabora.com>
Cheers,
Daniel
More information about the wayland-devel
mailing list