diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-03-17 10:26:09 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-03-17 10:26:09 +0000 |
commit | 494a864e055b565182dcdd3807c1f09a211d0fc5 (patch) | |
tree | d733cbf0de81df9a6e4f36d91779bae13ee22f39 | |
parent | 3521f767067feedd06ef6d2efd24c1190c68638c (diff) | |
parent | b1546f3210d89662dca3e88e1021a0089f003551 (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-gl-20150317-1' into staging
opengl: fix configure test
# gpg: Signature made Tue Mar 17 10:11:24 2015 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-gl-20150317-1:
opengl: fix configure test
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rwxr-xr-x | configure | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -3119,9 +3119,24 @@ libs_softmmu="$libs_softmmu $fdt_libs" ########################################## # opengl probe (for sdl2, milkymist-tmu2) + +# GLX probe, used by milkymist-tmu2 +# this is temporary, code will be switched to egl mid-term. +cat > $TMPC << EOF +#include <X11/Xlib.h> +#include <GL/gl.h> +#include <GL/glx.h> +int main(void) { glBegin(0); glXQueryVersion(0,0,0); return 0; } +EOF +if compile_prog "" "-lGL -lX11" ; then + have_glx=yes +else + have_glx=no +fi + if test "$opengl" != "no" ; then - opengl_pkgs="gl glx" - if $pkg_config $opengl_pkgs x11; then + opengl_pkgs="gl" + if $pkg_config $opengl_pkgs x11 && test "$have_glx" = "yes"; then opengl_cflags="$($pkg_config --cflags $opengl_pkgs) $x11_cflags" opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs" opengl=yes |