summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-08-31 11:05:57 -0700
committerIan Romanick <idr@us.ibm.com>2007-08-31 11:05:57 -0700
commit923176f5aad777b4023003a457bb77da21373389 (patch)
treec5d50681090ba9f529c8e55a87d6d727abf6eb6a /configure.ac
parent90beb8c27b4206b593898d346bf37ab49e75b975 (diff)
Use XSERVER_LIBPCIACCESS to detect pci-rework.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 12 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 7d37153..1605dee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,11 +60,6 @@ AC_ARG_ENABLE(exa,
[Disable EXA support [[default=enabled]]]),
[EXA="$enableval"],
[EXA=yes])
-AC_ARG_ENABLE(pciaccess,
- AS_HELP_STRING([--enable-pciaccess],
- [Enable use of libpciaccess (default: disabled)]),
- [PCIACCESS=$enableval],
- [PCIACCESS=no])
# Checks for extensions
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -76,13 +71,6 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.1.0 xproto fontsproto $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
-AM_CONDITIONAL(PCIACCESS, [test "x$PCIACCESS" = xyes])
-if test "x$PCIACCESS" = xyes; then
- AC_DEFINE(PCIACCESS, 1, [Use libpciaccess])
- PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.7.0])
- XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
-fi
-
# Checks for libraries.
# Checks for header files.
@@ -116,6 +104,18 @@ if test "x$DRI" = xyes; then
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
fi
+save_CFLAGS="$CFLAGS"
+CFLAGS="$XORG_CFLAGS"
+AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
+ [XSERVER_LIBPCIACCESS=yes], [XSERVER_LIBPCIACCESS=no],
+ [#include "xorg-server.h"])
+CFLAGS="$save_CFLAGS"
+
+if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+ PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+fi
+AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
AM_CONDITIONAL(USE_XAA, true)
AC_DEFINE(USE_XAA, 1, [Build support for XAA])