diff options
author | Tilman Sauerbeck <tilman@code-monkey.de> | 2006-08-10 19:49:22 +0200 |
---|---|---|
committer | Tilman Sauerbeck <tilman@code-monkey.de> | 2006-08-10 19:49:22 +0200 |
commit | 84ec0db961de3b10ac02ec5ae6adcec5cc439069 (patch) | |
tree | fa2042098a15cf61f8d6044cf143b442931d1e59 /configure.ac | |
parent | bde592047cd62194d7ef67520a9fdbaf269a8b90 (diff) |
Initial commit of the Exa bits.
Based on ajax' mga-exa-2.patch with some straight forward fixes
by myself.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1ea6ce1..d2df13a 100644 --- a/configure.ac +++ b/configure.ac @@ -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) @@ -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]) |