diff options
author | Mart Raudsepp <leio@gentoo.org> | 2012-07-26 10:28:22 +0300 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2012-07-26 10:31:01 +0300 |
commit | 86a879a1ec9771c45b0bffb18f7fd13854b1e84a (patch) | |
tree | f8fcb22dce5ecd87f90251ad36748979a19b7cb5 | |
parent | a83fcb6f84995dc50b8adffc27e264a663fbd606 (diff) |
configure: Make the new XAA checks work, and other improvements
commit 68646c31 added XAA checks were too early, when XORG_CFLAGS isn't
declared yet, so it got never enabled. Move the block after xorg-server
pkg-config checks, which declare XORG_CFLAGS.
Change configure to fail if --enable-xaa is explicitly requested, but
XAA headers are not found.
Other tweaks for more autoconf-ism.
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
-rw-r--r-- | configure.ac | 45 |
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" |