From: Akihiko Odaki <akihiko.odaki@gmail.com>
Cc: qemu-devel@nongnu.org, Akihiko Odaki <akihiko.odaki@gmail.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH] configure: Do not require GBM for OpenGL
Date: Fri, 19 Feb 2021 20:31:52 +0900 [thread overview]
Message-ID: <20210219113152.35384-1-akihiko.odaki@gmail.com> (raw)
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)
next reply other threads:[~2021-02-19 11:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 11:31 Akihiko Odaki [this message]
2021-02-22 10:28 ` [PATCH] configure: Do not require GBM for OpenGL 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210219113152.35384-1-akihiko.odaki@gmail.com \
--to=akihiko.odaki@gmail.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).