Allow the use of X11 from a non standard location.
Signed-off-by: Jeremy White <jwhite@codeweavers.com> [ kraxel: solve opengl patch conflicts ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
da076ffed6
commit
f676c67e4b
24
configure
vendored
24
configure
vendored
@ -2084,6 +2084,15 @@ if test "$sparse" != "no" ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
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
|
# GTK probe
|
||||||
|
|
||||||
@ -2111,7 +2120,8 @@ if test "$gtk" != "no"; then
|
|||||||
gtk_cflags=`$pkg_config --cflags $gtkpackage`
|
gtk_cflags=`$pkg_config --cflags $gtkpackage`
|
||||||
gtk_libs=`$pkg_config --libs $gtkpackage`
|
gtk_libs=`$pkg_config --libs $gtkpackage`
|
||||||
if $pkg_config --exists "$gtkx11package >= $gtkversion"; then
|
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
|
fi
|
||||||
libs_softmmu="$gtk_libs $libs_softmmu"
|
libs_softmmu="$gtk_libs $libs_softmmu"
|
||||||
gtk="yes"
|
gtk="yes"
|
||||||
@ -2236,8 +2246,9 @@ if test "$sdl" = "yes" ; then
|
|||||||
#endif
|
#endif
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
EOF
|
EOF
|
||||||
if compile_prog "$sdl_cflags" "$sdl_libs" ; then
|
if compile_prog "$sdl_cflags $x11_cflags" "$sdl_libs $x11_libs" ; then
|
||||||
sdl_libs="$sdl_libs -lX11"
|
sdl_cflags="$sdl_cflags $x11_cflags"
|
||||||
|
sdl_libs="$sdl_libs $x11_libs"
|
||||||
fi
|
fi
|
||||||
libs_softmmu="$sdl_libs $libs_softmmu"
|
libs_softmmu="$sdl_libs $libs_softmmu"
|
||||||
fi
|
fi
|
||||||
@ -3110,13 +3121,15 @@ libs_softmmu="$libs_softmmu $fdt_libs"
|
|||||||
# opengl probe (for sdl2, milkymist-tmu2)
|
# opengl probe (for sdl2, milkymist-tmu2)
|
||||||
if test "$opengl" != "no" ; then
|
if test "$opengl" != "no" ; then
|
||||||
opengl_pkgs="gl glx"
|
opengl_pkgs="gl glx"
|
||||||
if $pkg_config $opengl_pkgs; then
|
if $pkg_config $opengl_pkgs x11; then
|
||||||
opengl_libs="$($pkg_config --libs $opengl_pkgs) -lX11"
|
opengl_cflags="$($pkg_config --cflags $opengl_pkgs) $x11_cflags"
|
||||||
|
opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs"
|
||||||
opengl=yes
|
opengl=yes
|
||||||
else
|
else
|
||||||
if test "$opengl" = "yes" ; then
|
if test "$opengl" = "yes" ; then
|
||||||
feature_not_found "opengl" "Install GL devel (e.g. MESA)"
|
feature_not_found "opengl" "Install GL devel (e.g. MESA)"
|
||||||
fi
|
fi
|
||||||
|
opengl_cflags=""
|
||||||
opengl_libs=""
|
opengl_libs=""
|
||||||
opengl=no
|
opengl=no
|
||||||
fi
|
fi
|
||||||
@ -4753,6 +4766,7 @@ fi
|
|||||||
|
|
||||||
if test "$opengl" = "yes" ; then
|
if test "$opengl" = "yes" ; then
|
||||||
echo "CONFIG_OPENGL=y" >> $config_host_mak
|
echo "CONFIG_OPENGL=y" >> $config_host_mak
|
||||||
|
echo "OPENGL_CFLAGS=$opengl_cflags" >> $config_host_mak
|
||||||
echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
|
echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ common-obj-$(CONFIG_ZAURUS) += tc6393xb.o
|
|||||||
|
|
||||||
ifeq ($(CONFIG_MILKYMIST_TMU2),y)
|
ifeq ($(CONFIG_MILKYMIST_TMU2),y)
|
||||||
common-obj-y += milkymist-tmu2.o
|
common-obj-y += milkymist-tmu2.o
|
||||||
|
milkymist-tmu2.o-cflags := $(OPENGL_CFLAGS)
|
||||||
libs_softmmu += $(OPENGL_LIBS)
|
libs_softmmu += $(OPENGL_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user