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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Robert Foss <robert.foss@xxxxxxxxxxxxx>

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

Signed-off-by: Robert Foss <robert.foss@xxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux