qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] configure: Do not require GBM for OpenGL
@ 2021-02-19 11:31 Akihiko Odaki
  2021-02-22 10:28 ` Gerd Hoffmann
  0 siblings, 1 reply; 7+ messages in thread
From: Akihiko Odaki @ 2021-02-19 11:31 UTC (permalink / raw)
  Cc: qemu-devel, Akihiko Odaki, Gerd Hoffmann

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
---
 configure                | 11 +++++------
 include/ui/egl-helpers.h |  2 ++
 ui/meson.build           |  1 +
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 9f016b06b54..bd96929d7b4 100755
--- a/configure
+++ b/configure
@@ -3576,14 +3576,13 @@ if $pkg_config gbm; then
 fi
 
 if test "$opengl" != "no" ; then
-  opengl_pkgs="epoxy gbm"
-  if $pkg_config $opengl_pkgs; then
-    opengl_cflags="$($pkg_config --cflags $opengl_pkgs)"
-    opengl_libs="$($pkg_config --libs $opengl_pkgs)"
+  if $pkg_config epoxy; then
+    opengl_cflags="$($pkg_config --cflags epoxy)"
+    opengl_libs="$($pkg_config --libs epoxy)"
     opengl=yes
   else
     if test "$opengl" = "yes" ; then
-      feature_not_found "opengl" "Please install opengl (mesa) devel pkgs: $opengl_pkgs"
+      feature_not_found "opengl" "Please install epoxy"
     fi
     opengl_cflags=""
     opengl_libs=""
@@ -3591,7 +3590,7 @@ if test "$opengl" != "no" ; then
   fi
 fi
 
-if test "$opengl" = "yes"; then
+if test "$gbm" = "yes" && test "$opengl" = "yes"; then
   cat > $TMPC << EOF
 #include <epoxy/egl.h>
 #ifndef EGL_MESA_image_dma_buf_export
diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h
index 94a4b3e6f3b..cc12761c53b 100644
--- a/include/ui/egl-helpers.h
+++ b/include/ui/egl-helpers.h
@@ -3,7 +3,9 @@
 
 #include <epoxy/gl.h>
 #include <epoxy/egl.h>
+#ifdef CONFIG_OPENGL_DMABUF
 #include <gbm.h>
+#endif
 #include "ui/console.h"
 #include "ui/shader.h"
 
diff --git a/ui/meson.build b/ui/meson.build
index 634fabab0d5..33aa514cad0 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -45,6 +45,7 @@ endif
 
 if config_host.has_key('CONFIG_OPENGL')
   opengl_ss = ss.source_set()
+  opengl_ss.add(gbm)
   opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'],
                if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c', 'egl-context.c'))
   ui_modules += {'opengl' : opengl_ss}
-- 
2.24.3 (Apple Git-128)



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-11 15:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-19 11:31 [PATCH] configure: Do not require GBM for OpenGL Akihiko Odaki
2021-02-22 10:28 ` Gerd Hoffmann
2021-02-23  4:31   ` [PATCH v2] configure: Improve OpenGL dependency detections Akihiko Odaki
2021-02-23  5:58     ` [PATCH v3] " Akihiko Odaki
2021-02-23  6:03       ` [PATCH v4] " Akihiko Odaki
2021-03-11 12:44         ` Gerd Hoffmann
2021-03-11 15:19           ` Akihiko Odaki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).