[Intel-gfx] [RFC i-g-t 1/2] configure.ac: Add support for configure flag --disable-pciaccess.

robert.foss at collabora.com robert.foss at collabora.com
Wed May 25 18:43:58 UTC 2016


From: Robert Foss <robert.foss at collabora.com>

Add support for configure flag --disable-pciaccess and the associated
automake define HAVE_PCIACCESS.

Signed-off-by: Robert Foss <robert.foss at collabora.com>
---
 configure.ac | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 11b1d46..e46bbd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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]]),
-- 
2.7.4



More information about the Intel-gfx mailing list