[Mesa-dev] [PATCH] configure.ac: simplify EGL requirements for drivers dependent on EGL

Marek Olšák maraeo at gmail.com
Tue Oct 25 15:21:25 UTC 2016


From: Marek Olšák <marek.olsak at amd.com>

---
 configure.ac | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index 30817d8..588d11d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2289,36 +2289,35 @@ dnl Gallium helper functions
 dnl
 gallium_require_llvm() {
     if test "x$MESA_LLVM" = x0; then
         case "$host" in *gnux32) return;; esac
         case "$host_cpu" in
         i*86|x86_64|amd64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);;
         esac
     fi
 }
 
-dnl This is for Glamor. Skip this if OpenGL is disabled.
-require_egl_drm() {
-    if test "x$enable_opengl" = xno; then
-        return 0
-    fi
-
+dnl
+dnl DRM is needed by X, Wayland, and offscreen rendering.
+dnl Surfaceless is an alternative to the last one.
+dnl
+require_basic_egl() {
     case "$with_egl_platforms" in
-        *drm*)
+        *drm*|*surfaceless*)
             ;;
-         *)
-            AC_MSG_ERROR([--with-egl-platforms=drm is required to build the $1 driver.])
+        *)
+            AC_MSG_ERROR([$1 requires one of these:
+                  1) --with-egl-platforms=drm (X, Wayland, offscreen rendering based on DRM)
+                  2) --with-egl-platforms=surfaceless (offscreen only)
+                  Recommended options: drm,x11])
             ;;
     esac
-    if test "x$enable_gbm" != xyes; then
-            AC_MSG_ERROR([--enable-gbm is required to build the $1 driver.])
-    fi
 }
 
 radeon_llvm_check() {
     if test ${LLVM_VERSION_INT} -lt 307; then
         amdgpu_llvm_target_name='r600'
     else
         amdgpu_llvm_target_name='amdgpu'
     fi
     llvm_check_version_for $2 $3 $4 $1
     if test true && $LLVM_CONFIG --targets-built | grep -iqvw $amdgpu_llvm_target_name ; then
@@ -2420,21 +2419,21 @@ if test -n "$with_gallium_drivers"; then
                 radeon_gallium_llvm_check "r600g" "3" "6" "0"
                 LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
             fi
             ;;
         xradeonsi)
             HAVE_GALLIUM_RADEONSI=yes
             PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED])
             PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
             require_libdrm "radeonsi"
             radeon_gallium_llvm_check "radeonsi" "3" "6" "0"
-            require_egl_drm "radeonsi"
+            require_basic_egl "radeonsi"
             ;;
         xnouveau)
             HAVE_GALLIUM_NOUVEAU=yes
             PKG_CHECK_MODULES([NOUVEAU], [libdrm_nouveau >= $LIBDRM_NOUVEAU_REQUIRED])
             require_libdrm "nouveau"
             ;;
         xfreedreno)
             HAVE_GALLIUM_FREEDRENO=yes
             PKG_CHECK_MODULES([FREEDRENO], [libdrm_freedreno >= $LIBDRM_FREEDRENO_REQUIRED])
             require_libdrm "freedreno"
@@ -2471,21 +2470,21 @@ if test -n "$with_gallium_drivers"; then
             require_libdrm "vc4"
 
             PKG_CHECK_MODULES([SIMPENROSE], [simpenrose],
                               [USE_VC4_SIMULATOR=yes;
                                DEFINES="$DEFINES -DUSE_VC4_SIMULATOR"],
                               [USE_VC4_SIMULATOR=no])
             ;;
         xvirgl)
             HAVE_GALLIUM_VIRGL=yes
             require_libdrm "virgl"
-            require_egl_drm "virgl"
+            require_basic_egl "virgl"
             ;;
         *)
             AC_MSG_ERROR([Unknown Gallium driver: $driver])
             ;;
         esac
     done
 fi
 
 if test "x$HAVE_RADEON_VULKAN" = "xyes"; then
     radeon_llvm_check "radv" "3" "9" "0"
-- 
2.7.4



More information about the mesa-dev mailing list