summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2014-03-13 16:40:19 +0900
committerMichel Dänzer <michel@daenzer.net>2014-03-13 17:39:56 +0900
commitbdc412044f6ced056cd57320d1b2ee0d967c2191 (patch)
tree535161d80eb46ccbdca4e023bc2f1196ee14a392 /configure.ac
parent921a153f9964ca452e1241f76c7f7d653f42ceaf (diff)
Build against glamor in the xserver tree if available
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 16 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index e80de84d..9086bb60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,13 +104,25 @@ AC_ARG_ENABLE(glamor,
[Disable glamor, a new GL-based acceleration [default=enabled]]),
[GLAMOR="$enableval"],
[GLAMOR=yes])
-AC_MSG_RESULT([$GLAMOR])
-AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
+
if test "x$GLAMOR" != "xno"; then
- PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0])
- PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl])
+ AC_CHECK_HEADERS([glamor.h], [GLAMOR_H="yes"], [GLAMOR_H="no"], [])
+
+ if test "x$GLAMOR_H" = xyes; then
+ AC_CHECK_DECL(GLAMOR_NO_DRI3,
+ [GLAMOR_XSERVER="yes"], [GLAMOR_XSERVER="no"],
+ [#include "glamor.h"])
+ fi
+
+ if test "x$GLAMOR_XSERVER" != xyes; then
+ PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0])
+ PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl])
+ fi
AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
+else
+ AC_MSG_RESULT([$GLAMOR])
fi
+AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
AC_CHECK_HEADERS([list.h],
[have_list_h="yes"], [have_list_h="no"],