[Mesa-dev] [PATCH 2/4] configure/r600: Only require libdrm_amdgpu if CL is enabled

Aaron Watry awatry at gmail.com
Mon Jun 5 20:31:32 UTC 2017


Otherwise r600g will fail to build when the amdgpu drm library is missing

Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index e0996a0004..d1c0814782 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2428,6 +2428,14 @@ if test -n "$with_gallium_drivers"; then
             HAVE_GALLIUM_R600=yes
             PKG_CHECK_MODULES([RADEON], [libdrm >= $LIBDRM_RADEON_REQUIRED libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
             require_libdrm "r600"
+            if test "x$enable_opencl" = xyes; then
+                PKG_CHECK_MODULES(
+			[AMDGPU],
+			[libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED],
+			,
+			AC_MSG_ERROR([r600 with OpenCL requires libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
+		)
+            fi
             if test "x$enable_llvm" = xyes; then
                 radeon_llvm_check $LLVM_REQUIRED_R600 "r600"
 
-- 
2.11.0



More information about the mesa-dev mailing list