diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-11-23 20:47:05 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-11-23 20:47:05 +0000 |
commit | 43ab49caab4a49aa5a6656fd80d67ee8576419f1 (patch) | |
tree | 2add960e02f0bd7cf4a6397b4ec3122e7eeb6664 /driver/xf86-video-r128/configure.ac | |
parent | 31b7fbc3b125dc98d2ec6a7211f30a8da16759f0 (diff) |
Update to xf86-video-r128 6.9.1
Diffstat (limited to 'driver/xf86-video-r128/configure.ac')
-rw-r--r-- | driver/xf86-video-r128/configure.ac | 100 |
1 files changed, 99 insertions, 1 deletions
diff --git a/driver/xf86-video-r128/configure.ac b/driver/xf86-video-r128/configure.ac index e45a40201..38dc9bd58 100644 --- a/driver/xf86-video-r128/configure.ac +++ b/driver/xf86-video-r128/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-r128], - [6.8.4], + [6.9.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-r128]) AC_CONFIG_SRCDIR([Makefile.am]) @@ -63,6 +63,11 @@ AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri], [DRI="$enableval"], [DRI=auto]) +AC_ARG_ENABLE(exa, AS_HELP_STRING([--disable-exa], + [Disable EXA support [[default=enabled]]]), + [EXA="$enableval"], + [EXA=yes]) + # Store the list of server defined optional extensions in REQUIRED_MODULES XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) @@ -112,6 +117,39 @@ fi 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 + AC_CHECK_DECL(XSERVER_LIBPCIACCESS, [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], [#include "xorg-server.h"]) @@ -143,6 +181,66 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then fi AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) +# Checks for headers/macros for byte swapping +# Known variants: +# <byteswap.h> bswap_16, bswap_32, bswap_64 (glibc) +# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD) +# <sys/endian.h> bswap16, bswap32, bswap64 (other BSD's) +# and a fallback to local macros if none of the above are found + +# if <byteswap.h> is found, assume it's the correct version +AC_CHECK_HEADERS([byteswap.h]) + +# if <sys/endian.h> is found, have to check which version +AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"]) + +if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then + AC_MSG_CHECKING([for __swap16 variant of <sys/endian.h> byteswapping macros]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include <sys/types.h> +#include <sys/endian.h> + ], [ +int a = 1, b; +b = __swap16(a); + ]) +], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no']) + AC_MSG_RESULT([$SYS_ENDIAN__SWAP]) + + AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include <sys/types.h> +#include <sys/endian.h> + ], [ +int a = 1, b; +b = bswap16(a); + ]) +], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no']) + AC_MSG_RESULT([$SYS_ENDIAN_BSWAP]) + + if test "$SYS_ENDIAN_BSWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=bswap + else + if test "$SYS_ENDIAN__SWAP" = "yes" ; then + USE_SYS_ENDIAN_H=yes + BSWAP=__swap + else + USE_SYS_ENDIAN_H=no + fi + fi + + if test "$USE_SYS_ENDIAN_H" = "yes" ; then + AC_DEFINE([USE_SYS_ENDIAN_H], 1, + [Define to use byteswap macros from <sys/endian.h>]) + AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, + [Define to 16-bit byteswap macro]) + AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, + [Define to 32-bit byteswap macro]) + AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, + [Define to 64-bit byteswap macro]) + fi +fi + AC_SUBST([moduledir]) DRIVER_NAME=r128 |