Remove some unnecessary dependencies
authorMateusz Majewski <m.majewski2@samsung.com>
Tue, 25 Mar 2025 13:13:50 +0000 (14:13 +0100)
committerMateusz Majewski <m.majewski2@samsung.com>
Tue, 25 Mar 2025 14:15:39 +0000 (15:15 +0100)
We remove all DMABUF support. We do not use it, and we cannot use it at
all, since we want to support non-Linux platforms. We also remove GBM,
as it is used only together with DMABUFs. Additionally we remove X11,
since we have no need to access it directly even on Linux.

While it would be preferable to embrace the conditional support, I could
not get this to work (building DMABUF-code resulted in immediate linker
errors for me, for example), and I felt like this is the cleanest way of
not building the code we aren't using.

Change-Id: I3afa07b2631ba81ecaca7ce9d6a3a7b9aec4e596

configure

index 0e705d309745d263085608cc349efc9f66378d92..31bd2d52b80a11e5bf9f28d623dd5adb178957ad 100755 (executable)
--- a/configure
+++ b/configure
@@ -3580,14 +3580,12 @@ libs_softmmu="$libs_softmmu $fdt_libs"
 # opengl probe (for sdl2, gtk, milkymist-tmu2)
 
 if test "$opengl" != "no" ; then
-  opengl_pkgs="epoxy gbm"
-  if $pkg_config $opengl_pkgs x11; then
-    opengl_cflags="$($pkg_config --cflags $opengl_pkgs) $x11_cflags"
-    opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs"
+  opengl_pkgs="epoxy"
+  if $pkg_config $opengl_pkgs; then
+    opengl_cflags="$($pkg_config --cflags $opengl_pkgs)"
+    opengl_libs="$($pkg_config --libs $opengl_pkgs)"
     opengl=yes
-    if test "$gtk" = "yes" && $pkg_config --exists "$gtkpackage >= 3.16"; then
-        gtk_gl="yes"
-    fi
+    opengl_dmabuf=no
   else
     if test "$opengl" = "yes" ; then
       feature_not_found "opengl" "Please install opengl (mesa) devel pkgs: $opengl_pkgs"
@@ -3595,19 +3593,7 @@ if test "$opengl" != "no" ; then
     opengl_cflags=""
     opengl_libs=""
     opengl=no
-  fi
-fi
-
-if test "$opengl" = "yes"; then
-  cat > $TMPC << EOF
-#include <epoxy/egl.h>
-#ifndef EGL_MESA_image_dma_buf_export
-# error mesa/epoxy lacks support for dmabufs (mesa 10.6+)
-#endif
-int main(void) { return 0; }
-EOF
-  if compile_prog "" "" ; then
-    opengl_dmabuf=yes
+    opengl_dmabuf=no
   fi
 fi