@@ -101,7 +101,6 @@ fi
AC_SUBST(ASSEMBLER_WARN_CFLAGS)
PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.64 libdrm])
-PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
case "$target_cpu" in
x86*)
@@ -175,6 +174,18 @@ if test "x$VC4" = xyes; then
fi
AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
+AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--disable-pciaccess],
+ [Enable use of pci bus access using libpciaccess (default: auto)]),
+ [PCIACCESS=$enableval], [PCIACCESS=auto])
+if test "x$PCIACCESS" = xauto; then
+ PKG_CHECK_EXISTS([pciaccess], [PCIACCESS=yes], [PCIACCESS=no])
+fi
+if test "x$PCIACCESS" = xyes; then
+ PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
+ AC_DEFINE(HAVE_LIBPCIACCESS, 1, [Have libpciaccess support])
+fi
+AM_CONDITIONAL(HAVE_LIBPCIACCESS, [test "x$PCIACCESS" = xyes])
+
# Define a configure option for the shader debugger
AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger],
[Enable shader debugging support [autodetected]]),