summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 27 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 7d9ead7..94740e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,24 +78,6 @@ AC_ARG_ENABLE(ztv,
[ztv=$enableval],
[ztv=auto])
-AC_ARG_ENABLE(xaa,
- AS_HELP_STRING([--enable-xaa],
- [Enable legacy X Acceleration Architecture (XAA) [default=auto]]),
- [XAA="$enableval"],
- [XAA=auto])
-if test "x$XAA" != xno; then
- save_CFLAGS=$CFLAGS
- save_CPPFLAGS=$CPPFLAGS
- CFLAGS=$XORG_CFLAGS
- CPPFLAGS="$XORG_CFLAGS"
- AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no)
- CFLAGS=$save_CFLAGS
- CPPFLAGS=$save_CPPFLAGS
-fi
-AC_MSG_CHECKING([whether to include XAA support])
-AM_CONDITIONAL(XAA, test "x$XAA" = xyes)
-AC_MSG_RESULT([$XAA])
-
# Check for Video4Linux Version 2 (V4L2) availability
AC_CHECK_HEADERS([linux/videodev2.h],[v4l2=yes],[v4l2=no])
if test "x$ztv" != "xno" ; then
@@ -146,6 +128,33 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
HAVE_XEXTPROTO_71="no")
+# Define a configure option to enable/disable XAA support;
+# handles unavailability of XAA since xserver-1.13
+AC_ARG_ENABLE(xaa,
+ AS_HELP_STRING([--enable-xaa],
+ [Enable legacy X Acceleration Architecture (XAA) [default=auto]]))
+
+AS_IF([test "x$enable_xaa" != "xno"],
+ [
+ save_CFLAGS=$CFLAGS
+ save_CPPFLAGS=$CPPFLAGS
+ CFLAGS=$XORG_CFLAGS
+ CPPFLAGS="$XORG_CFLAGS"
+ AC_CHECK_HEADERS([xaa.h], have_XAA=yes, have_XAA=no)
+ CFLAGS=$save_CFLAGS
+ CPPFLAGS=$save_CPPFLAGS
+])
+
+AC_MSG_CHECKING([whether to include XAA support])
+
+AS_IF([test "x$have_XAA" = "xyes"],
+ [AC_MSG_RESULT([yes])],
+ [AS_IF([test "x$enable_xaa" = "xyes"],
+ [AC_MSG_ERROR([XAA requested but not found (perhaps building against xserver-1.13 or newer?)])],
+ [AC_MSG_RESULT([no])
+ ])
+])
+
# Checks for libpciaccess support.
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"