summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--src/egl/drivers/dri2/platform_x11.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 8c52535e649..91a5817b784 100644
--- a/configure.ac
+++ b/configure.ac
@@ -761,6 +761,9 @@ AC_SUBST([MESA_LLVM])
# Check for libdrm
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED],
[have_libdrm=yes], [have_libdrm=no])
+if test "x$have_libdrm" = xyes; then
+ DEFINES="$DEFINES -DHAVE_LIBDRM"
+fi
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
have_libudev=yes, have_libudev=no)
@@ -1439,6 +1442,8 @@ for plat in $egl_platforms; do
drm)
test "x$enable_gbm" = "xno" &&
AC_MSG_ERROR([EGL platform drm needs gbm])
+ test "x$have_libdrm" != xyes &&
+ AC_MSG_ERROR([EGL platform drm requires libdrm >= $LIBDRM_REQUIRED])
;;
android|fbdev|gdi|null)
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index c56a4138a64..04cb62b41d3 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -33,7 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
-#ifdef HAVE_DRM_PLATFORM
+#ifdef HAVE_LIBDRM
#include <xf86drm.h>
#endif
#include <sys/types.h>
@@ -608,7 +608,7 @@ dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id)
static EGLBoolean
dri2_authenticate(_EGLDisplay *disp)
{
-#ifdef HAVE_DRM_PLATFORM
+#ifdef HAVE_LIBDRM
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
drm_magic_t magic;
@@ -621,11 +621,8 @@ dri2_authenticate(_EGLDisplay *disp)
_eglLog(_EGL_WARNING, "DRI2: failed to authenticate");
return EGL_FALSE;
}
-
- return EGL_TRUE;
-#else
- return EGL_FALSE;
#endif
+ return EGL_TRUE;
}
static EGLBoolean