From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVydf-0004pD-7T for qemu-devel@nongnu.org; Thu, 12 Mar 2015 04:38:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVyda-0004gE-4n for qemu-devel@nongnu.org; Thu, 12 Mar 2015 04:38:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVydZ-0004g7-U3 for qemu-devel@nongnu.org; Thu, 12 Mar 2015 04:38:38 -0400 From: Gerd Hoffmann Date: Thu, 12 Mar 2015 09:38:15 +0100 Message-Id: <1426149496-6043-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1426149496-6043-1-git-send-email-kraxel@redhat.com> References: <1426149496-6043-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL v2 4/5] Allow the use of X11 from a non standard location. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jeremy White , Gerd Hoffmann From: Jeremy White Signed-off-by: Jeremy White [ kraxel: solve opengl patch conflicts ] Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- configure | 24 +++++++++++++++++++----- hw/display/Makefile.objs | 1 + 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/configure b/configure index ecd7893..fef9c95 100755 --- a/configure +++ b/configure @@ -2085,6 +2085,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 @@ -2111,7 +2120,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" @@ -2236,8 +2246,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 @@ -3110,13 +3121,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 --cflags $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 @@ -4753,6 +4766,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