Mesa (master): egl/wayland: libdrm is a hard requirement, treat it as such

Emil Velikov evelikov at kemper.freedesktop.org
Sat Aug 1 14:56:45 UTC 2015


Module: Mesa
Branch: master
Commit: fa109d02dda118f756903b663879375c06353ae7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa109d02dda118f756903b663879375c06353ae7

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Fri Jul 10 11:01:55 2015 +0100

egl/wayland: libdrm is a hard requirement, treat it as such

Prompt at configure time if it's missing otherwise we'll fail later on
in the build. Remove ambiguous HAVE_LIBDRM guard.

Cc: 10.6 <mesa-stable at lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 configure.ac                    |    3 +++
 src/egl/drivers/dri2/egl_dri2.c |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6636ee4..bfe7f80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1740,6 +1740,9 @@ egl_platforms=`IFS=', '; echo $with_egl_platforms`
 for plat in $egl_platforms; do
 	case "$plat" in
 	wayland)
+		test "x$have_libdrm" != xyes &&
+			AC_MSG_ERROR([EGL platform wayland requires libdrm >= $LIBDRM_REQUIRED])
+
 		PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
 
 		if test "x$WAYLAND_SCANNER" = x; then
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 4f6db58..47f52a5 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2216,13 +2216,11 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
    wl_drm_callbacks.authenticate =
       (int(*)(void *, uint32_t)) dri2_dpy->vtbl->authenticate;
 
-#ifdef HAVE_LIBDRM
    if (drmGetCap(dri2_dpy->fd, DRM_CAP_PRIME, &cap) == 0 &&
        cap == (DRM_PRIME_CAP_IMPORT | DRM_PRIME_CAP_EXPORT) &&
        dri2_dpy->image->base.version >= 7 &&
        dri2_dpy->image->createImageFromFds != NULL)
       flags |= WAYLAND_DRM_PRIME;
-#endif
 
    dri2_dpy->wl_server_drm =
 	   wayland_drm_init(wl_dpy, dri2_dpy->device_name,




More information about the mesa-commit mailing list