summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-12 20:32:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-12 22:13:50 +0100
commitfd15ce65ab8ce5cf571e37daa7db1ee245616cd4 (patch)
treef11e12dfc92451016b14b82fe4b87bd18129d645 /configure.ac
parent22be9988b933f33fc5247a9abc3b00a7f2e4a202 (diff)
sna: Fix build without DRI2
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 11 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 323f2835..55c12513 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,7 +168,7 @@ AC_ARG_ENABLE(xaa,
[XAA=auto])
if test "x$XAA" != xno; then
save_CFLAGS=$CFLAGS
- CFLAGS=$XSERVER_CFLAGS
+ CFLAGS=$XORG_CFLAGS
AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no)
CFLAGS=$save_CFLAGS
fi
@@ -183,8 +183,8 @@ AC_ARG_ENABLE(dga,
[DGA=auto])
if test "x$DGA" != xno; then
save_CFLAGS=$CFLAGS
- CFLAGS=$XSERVER_CFLAGS
- AC_CHECK_HEADERS([dgaproc.h], DGA=yes, DGA=no)
+ CFLAGS=$XORG_CFLAGS
+ AC_CHECK_HEADERS([dgaproc.h], DGA=yes, DGA=no, [#include <dixstruct.h>])
CFLAGS=$save_CFLAGS
fi
AC_MSG_CHECKING([whether to include DGA support])
@@ -324,10 +324,16 @@ else
AC_MSG_ERROR([DRI requested but prerequisites not found])
fi
fi
-AM_CONDITIONAL(DRI2, test x$DRI2 != xno)
+
if test "x$DRI2" != "xno"; then
- AC_DEFINE(USE_DRI2,1,[Enable DRI2 driver support])
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$XORG_CFLAGS $DRM_CFLAGS $DRI_CFLAGS $DRI2_CFLAGS"
+ AC_CHECK_HEADERS([dri2.h], DRI2=yes, DRI2=no, [#include <dixstruct.h>])
+ CFLAGS=$save_CFLAGS
fi
+AC_MSG_CHECKING([whether to include DRI2 support])
+AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
+AC_MSG_RESULT([$DRI2])
if test "$XVMC" = yes; then
PKG_CHECK_MODULES(XVMCLIB,