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

Signed-off-by: Aaron Watry <awa...@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

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to