From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jeremy White <jwhite@codeweavers.com>,
Gerd Hoffmann <kraxel@redhat.com>, Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH v2 2/7] Allow the use of X11 from a non standard location.
Date: Mon, 19 Jan 2015 14:36:38 +0100 [thread overview]
Message-ID: <1421674603-31575-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1421674603-31575-1-git-send-email-kraxel@redhat.com>
From: Jeremy White <jwhite@codeweavers.com>
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
[ kraxel: solve opengl patch conflicts ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
configure | 24 +++++++++++++++++++-----
hw/display/Makefile.objs | 1 +
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index 8216410..6d673c1 100755
--- a/configure
+++ b/configure
@@ -2034,6 +2034,15 @@ if test "$sparse" != "no" ; then
fi
##########################################
+# X11 probe
+x11_cflags=
+x11_libs=-lX11
+if $pkg_config --exists "x11"; then
+ x11_cflags=`$pkg_config --cflags x11`
+ x11_libs=`$pkg_config --libs x11`
+fi
+
+##########################################
# GTK probe
if test "$gtkabi" = ""; then
@@ -2060,7 +2069,8 @@ if test "$gtk" != "no"; then
gtk_cflags=`$pkg_config --cflags $gtkpackage`
gtk_libs=`$pkg_config --libs $gtkpackage`
if $pkg_config --exists "$gtkx11package >= $gtkversion"; then
- gtk_libs="$gtk_libs -lX11"
+ gtk_cflags="$gtk_cflags $x11_cflags"
+ gtk_libs="$gtk_libs $x11_libs"
fi
libs_softmmu="$gtk_libs $libs_softmmu"
gtk="yes"
@@ -2185,8 +2195,9 @@ if test "$sdl" = "yes" ; then
#endif
int main(void) { return 0; }
EOF
- if compile_prog "$sdl_cflags" "$sdl_libs" ; then
- sdl_libs="$sdl_libs -lX11"
+ if compile_prog "$sdl_cflags $x11_cflags" "$sdl_libs $x11_libs" ; then
+ sdl_cflags="$sdl_cflags $x11_cflags"
+ sdl_libs="$sdl_libs $x11_libs"
fi
libs_softmmu="$sdl_libs $libs_softmmu"
fi
@@ -3059,13 +3070,15 @@ libs_softmmu="$libs_softmmu $fdt_libs"
# opengl probe (for sdl2, milkymist-tmu2)
if test "$opengl" != "no" ; then
opengl_pkgs="gl"
- if $pkg_config $opengl_pkgs; then
- opengl_libs="$($pkg_config --libs $opengl_pkgs) -lX11"
+ if $pkg_config $opengl_pkgs x11; then
+ opengl_cflags="$($pkg_config --libs $opengl_pkgs) $x11_cflags"
+ opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs"
opengl=yes
else
if test "$opengl" = "yes" ; then
feature_not_found "opengl" "Install GL devel (e.g. MESA)"
fi
+ opengl_cflags=""
opengl_libs=""
opengl=no
fi
@@ -4679,6 +4692,7 @@ fi
if test "$opengl" = "yes" ; then
echo "CONFIG_OPENGL=y" >> $config_host_mak
+ echo "OPENGL_CFLAGS=$opengl_cflags" >> $config_host_mak
echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
fi
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
index e18ea57..e73cb7d 100644
--- a/hw/display/Makefile.objs
+++ b/hw/display/Makefile.objs
@@ -20,6 +20,7 @@ common-obj-$(CONFIG_ZAURUS) += tc6393xb.o
ifeq ($(CONFIG_MILKYMIST_TMU2),y)
common-obj-y += milkymist-tmu2.o
+milkymist-tmu2.o-cflags := $(OPENGL_CFLAGS)
libs_softmmu += $(OPENGL_LIBS)
endif
--
1.8.3.1
next prev parent reply other threads:[~2015-01-19 13:37 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 13:36 [Qemu-devel] [PATCH v2 0/7] sdl2: add opengl rendering support Gerd Hoffmann
2015-01-19 13:36 ` [Qemu-devel] [PATCH v2 1/7] configure: opengl overhaul Gerd Hoffmann
2015-01-19 14:43 ` Max Reitz
2015-01-19 13:36 ` Gerd Hoffmann [this message]
2015-01-19 14:50 ` [Qemu-devel] [PATCH v2 2/7] Allow the use of X11 from a non standard location Max Reitz
2015-01-19 13:36 ` [Qemu-devel] [PATCH v2 3/7] pixman: add a bunch of PIXMAN_BE_* defines for 32bpp Gerd Hoffmann
2015-01-19 14:54 ` Max Reitz
2015-01-19 13:36 ` [Qemu-devel] [PATCH v2 4/7] console-gl: add opengl rendering helper functions Gerd Hoffmann
2015-01-19 16:05 ` Max Reitz
2015-01-20 11:00 ` Gerd Hoffmann
2015-01-20 13:54 ` Max Reitz
2015-01-20 14:44 ` Gerd Hoffmann
2015-01-20 14:52 ` Max Reitz
2015-01-19 13:36 ` [Qemu-devel] [PATCH v2 5/7] console-gl: externalize shader programs Gerd Hoffmann
2015-01-19 16:15 ` Max Reitz
2015-01-19 13:36 ` [Qemu-devel] [PATCH v2 6/7] sdl2: move SDL_* includes to sdl2.h Gerd Hoffmann
2015-01-19 16:16 ` Max Reitz
2015-01-19 13:36 ` [Qemu-devel] [PATCH v2 7/7] sdl2: add support for display rendering using opengl Gerd Hoffmann
2015-01-19 16:22 ` Max Reitz
2015-01-20 11:13 ` Gerd Hoffmann
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=1421674603-31575-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=jwhite@codeweavers.com \
--cc=mreitz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.