diff options
Diffstat (limited to 'driver/xf86-video-cirrus/configure.ac')
-rw-r--r-- | driver/xf86-video-cirrus/configure.ac | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/driver/xf86-video-cirrus/configure.ac b/driver/xf86-video-cirrus/configure.ac index dddf9efa6..89a2e812c 100644 --- a/driver/xf86-video-cirrus/configure.ac +++ b/driver/xf86-video-cirrus/configure.ac @@ -90,6 +90,46 @@ AC_MSG_CHECKING([whether to include XAA support]) AM_CONDITIONAL(XAA, test "x$XAA" = xyes) AC_MSG_RESULT([$XAA]) +AC_ARG_ENABLE(exa, AS_HELP_STRING([--disable-exa], + [Disable EXA support [[default=enabled]]]), + [EXA="$enableval"], + [EXA=yes]) +SAVE_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" +# 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 +AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes) + if test "x$XSERVER_LIBPCIACCESS" = xyes; then PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" |