summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 11 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 47f7fe23..e6a2f6fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,12 +85,17 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+drm_cflags=$(pkg-config --cflags libdrm)
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
+save_CFLAGS="$CFLAGS"
+CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $drm_cflags"
+CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $drm_cflags"
+AC_MSG_CHECKING([whether to include DRI support])
if test x$DRI != xno; then
AC_CHECK_FILE([${sdkdir}/dri.h],
[have_dri_h="yes"], [have_dri_h="no"])
@@ -100,6 +105,12 @@ if test x$DRI != xno; then
[have_dristruct_h="yes"], [have_dristruct_h="no"])
AC_CHECK_FILE([${sdkdir}/damage.h],
[have_damage_h="yes"], [have_damage_h="no"])
+ AC_CHECK_HEADER(xf86drmMode.h,
+ [DRM_MODE=yes],[DRM_MODE=no]
+ [#include "stdint.h"])
+ if test "x$DRM_MODE" = xyes; then
+ AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
+ fi
fi
AC_MSG_CHECKING([whether to include DRI support])
if test x$DRI = xauto; then
@@ -113,8 +124,6 @@ if test x$DRI = xauto; then
fi
AC_MSG_RESULT([$DRI])
-save_CFLAGS="$CFLAGS"
-CFLAGS="$XORG_CFLAGS"
AC_CHECK_HEADER(xf86Modes.h,[XMODES=yes],[XMODES=no],[#include "xorg-server.h"])
AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
[XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],