From d1741505b4374461b8cb5886d8aa63c0c5c2dff7 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Thu, 25 Mar 2010 12:33:47 +0100 Subject: Fix KMS test compilation. --- configure.ac | 7 +++++-- src/rhd_dri.c | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 880046b..4a8fec1 100644 --- a/configure.ac +++ b/configure.ac @@ -166,15 +166,18 @@ USE_DRI=no if test "x$DRI" = xyes; then USE_DRI="yes" AC_CHECK_DECL(XF86DRI,, [USE_DRI=no], [#include ]) + XORG_CFLAGS="$XORG_CFLAGS $DRI_CFLAGS" PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto glproto],, [USE_DRI=no]) fi AC_MSG_CHECKING([whether to enable DRI support]) AC_MSG_RESULT($USE_DRI) -test "x$USE_DRI" = xyes && AC_DEFINE(USE_DRI, 1, [Build support for DRI]) AM_CONDITIONAL(USE_DRI, test "x$USE_DRI" = xyes) -if test "x$USER_DRI" = "xyes"; then +if test "x$USE_DRI" = "xyes"; then + AC_DEFINE(USE_DRI, 1, [Build support for DRI]) + CFLAGS="$CFLAGS $DRI_CFLAGS" + CPPFLAGS="$CPPFLAGS $DRI_CFLAGS" AC_CHECK_HEADER([xf86drmMode.h], [AC_DEFINE([HAVE_XF86DRMMODE_H], [1], [Define to 1 if you have xf86drmMode.h])]) diff --git a/src/rhd_dri.c b/src/rhd_dri.c index 015da4e..c9abaea 100644 --- a/src/rhd_dri.c +++ b/src/rhd_dri.c @@ -2047,10 +2047,12 @@ RHDKMSEnabled(ScrnInfoPtr pScrn, struct pci_device *pciDev) ret = drmCheckModesettingSupported(busId); xfree(busId); - xf86DrvMsg(pScrn->scrnIdex, X_INFO, "[DRM] Kernel mode setting %s\n", + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[DRM] Kernel mode setting %s\n", ret ? "enabled" : "disabled"); return ret; #else + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "[DRM] No kernel mode setting support available during compile time - assuming it is not active\n"); return FALSE; #endif /* HAVE_XF86DRMMODE_H */ } -- cgit v1.2.3