egl/wayland: libdrm is a hard requirement, treat it as such
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 10 Jul 2015 10:01:55 +0000 (11:01 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 1 Aug 2015 14:41:23 +0000 (15:41 +0100)
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@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
configure.ac
src/egl/drivers/dri2/egl_dri2.c

index 6636ee4769f7c894105685409f1892cb8982bc90..bfe7f80fe6f16d2deadffd7197d0d56cb29849c6 100644 (file)
@@ -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
index 4f6db58a322ddeb7d58e9199fe2ad8df781f203b..47f52a5e6d8faac1a1f42909a7176b18063fd65b 100644 (file)
@@ -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,