summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac63
1 files changed, 56 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 373fd76..a7cdd10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,9 +22,18 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-ati],
- 6.5.8.0,
+ 6.6.2,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-ati)
+AC_DEFINE_UNQUOTED([ATI_VERSION_MAJOR],
+ [$(echo $PACKAGE_VERSION | sed -e 's/^\([[0-9]]\)\.[[0-9]]\.[[0-9]]/\1/')],
+ [Major version])
+AC_DEFINE_UNQUOTED([ATI_VERSION_MINOR],
+ [$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]\.\([[0-9]]\)\.[[0-9]]/\1/')],
+ [Minor version])
+AC_DEFINE_UNQUOTED([ATI_VERSION_PATCH],
+ [$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]\.[[0-9]]\.\([[0-9]]\)/\1/')],
+ [Patch version])
AC_CONFIG_SRCDIR([Makefile.am])
AM_CONFIG_HEADER([config.h])
@@ -52,6 +61,11 @@ AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri],
[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(XINERAMA, xineramaproto)
@@ -121,7 +135,7 @@ case $host_cpu in
ATIMISC_TV_OUT=yes
ATIMISC_CPIO=yes
;;
- x86_64|amd64|alpha)
+ x86_64|amd64|alpha|ia64)
ATIMISC_CPIO=yes
;;
sparc)
@@ -137,19 +151,19 @@ esac
AC_MSG_CHECKING([whether to include PIO support])
AM_CONDITIONAL(ATIMISC_CPIO, test "x$ATIMISC_CPIO" = xyes)
if test "x$ATIMISC_CPIO" = xyes; then
- echo "yes, PIO"
+ AC_MSG_RESULT([yes, PIO])
else
AC_DEFINE(AVOID_CPIO, 1, [Avoid PIO and use MMIO for atimisc.])
- echo "no, MMIO"
+ AC_MSG_RESULT([no, MMIO])
fi
AC_MSG_CHECKING([whether to include support for non-PCI devices])
AM_CONDITIONAL(ATIMISC_NON_PCI, test "x$ATIMISC_NON_PCI" = xyes)
if test "x$ATI_AVOID_NON_PCI" = xyes; then
- echo "yes, PCI and ISA"
+ AC_MSG_RESULT([yes, PCI and ISA])
else
AC_DEFINE(AVOID_NON_PCI, 1, [Only probe PCI cards; do not probe ISA.])
- echo "no, PCI only"
+ AC_MSG_RESULT([no, PCI only])
fi
AC_MSG_CHECKING([whether to include DGA support])
@@ -167,7 +181,42 @@ if test "x$ATIMISC_TV_OUT" = xyes; then
fi
AC_DEFINE(USE_XAA, 1, [Build support for XAA])
-AC_DEFINE(USE_EXA, 1, [Build support for Exa])
+
+# 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([XORG_CFLAGS])
AC_SUBST([DRI_CFLAGS])