From: Emil Velikov <emil.veli...@collabora.com> We'll be adding more common requirements, so there's no point in duplicating things even more.
Signed-off-by: Emil Velikov <emil.veli...@collabora.com> --- configure.ac | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index ed1f96a..997eeaf 100644 --- a/configure.ac +++ b/configure.ac @@ -1875,6 +1875,12 @@ AC_ARG_WITH([vulkan-icddir], [VULKAN_ICD_INSTALL_DIR='${datarootdir}/vulkan/icd.d']) AC_SUBST([VULKAN_ICD_INSTALL_DIR]) +require_sha1() { + if test "x$with_sha1" == "x"; then + AC_MSG_ERROR([$1 Vulkan driver requires SHA1]) + fi +} + if test -n "$with_vulkan_drivers"; then VULKAN_DRIVERS=`IFS=', '; echo $with_vulkan_drivers` for driver in $VULKAN_DRIVERS; do @@ -1883,20 +1889,15 @@ if test -n "$with_vulkan_drivers"; then if test "x$HAVE_I965_DRI" != xyes; then AC_MSG_ERROR([Intel Vulkan driver requires the i965 dri driver]) fi - if test "x$with_sha1" == "x"; then - AC_MSG_ERROR([Intel Vulkan driver requires SHA1]) - fi + require_sha1 "Intel" HAVE_INTEL_VULKAN=yes; - ;; xradeon) PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) radeon_llvm_check $LLVM_REQUIRED_RADV "radv" + require_sha1 "radv" HAVE_RADEON_VULKAN=yes; - if test "x$with_sha1" == "x"; then - AC_MSG_ERROR([radv vulkan driver requires SHA1]) - fi - ;; + ;; *) AC_MSG_ERROR([Vulkan driver '$driver' does not exist]) ;; -- 2.10.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev