summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac48
1 files changed, 46 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index ec8a5ca..8cddbac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-mga],
- 1.4.1,
+ 1.4.2,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-mga)
@@ -51,6 +51,11 @@ AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri],
[Disable DRI support [[default=auto]]]),
[DRI="$enableval"],
[DRI=auto])
+AC_ARG_ENABLE(exa,
+ AC_HELP_STRING([--disable-exa],
+ [Disable EXA support [[default enabled]]]),
+ [EXA="$enableval"],
+ [EXA=yes])
# Checks for extensions
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -59,7 +64,7 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.1.0 xproto fontsproto $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for libraries.
@@ -95,6 +100,45 @@ if test "x$DRI" = xyes; then
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
fi
+AM_CONDITIONAL(USE_XAA, true)
+AC_DEFINE(USE_XAA, 1, [Build support for XAA])
+
+# Properly handle EXA.
+AC_MSG_CHECKING([whether to enable EXA support])
+if test "x$EXA" = xyes; then
+ AC_MSG_RESULT(yes)
+
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+ AC_CHECK_HEADER(exa.h,
+ [have_exa_h="yes"], [have_exa_h="no"])
+ CPPFLAGS="$SAVE_CPPFLAGS"
+else
+ AC_MSG_RESULT(no)
+fi
+
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+if test "x$have_exa_h" = xyes; then
+ AC_MSG_CHECKING([whether EXA version is at least 2.0.0])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include "exa.h"
+#if EXA_VERSION_MAJOR < 2
+#error OLD EXA!
+#endif
+ ]])],
+ [USE_EXA=yes],
+ [USE_EXA=no])
+ AC_MSG_RESULT($USE_EXA)
+
+ if test "x$USE_EXA" = xyes; then
+ AC_DEFINE(USE_EXA, 1, [Build support for Exa])
+ fi
+fi
+CPPFLAGS="$SAVE_CPPFLAGS"
+
+AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes)
+
AC_SUBST([DRI_CFLAGS])
AC_SUBST([XORG_CFLAGS])
AC_SUBST([moduledir])