opengl: fix configure test

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJVB/3MAAoJEEy22O7T6HE48kAQAL1ZjnCQhd8cxPoHbwO5w+P+
 TW5hBGsScx8CPuxfJym8dR2w8VsrU68dLc8j7G4djX38cSzajlGm2yycNykkjiQ9
 m2lZ7URKMvjT9bNcdpHe3cETqg+OGgIP9XxCP+5ogCfBCl37PhEU2BqaGYpgr3vA
 z60NTgWQivNZkWXDfrgvSVtXPINxxbtxMFCYVr7rF+mTksthyE1XaqYfLbC4l6/n
 vHawU29jntJCdTLtPevmGWCX0Xc2dMwwLfNf1lPM4MbWVB4kzAODKn3Xh7hjoDSg
 +Hg4UCr/a16r0wIWx4o+fwRTYbAD3CgkeH9O1otuOieEY+BwPsxQ3xS6FzsKmWnz
 HikWRUrh1Wpk95ksEVce4abeAS2xZlOxBhRyJHPx2nE9e+5prAGwqPCZ/eBkbvaA
 LI8guxVRm6N3JBVSxYLqUa0ooD+cqUcO3Os372s9K8p9XmqHjl86jxhX984i7H2U
 PQY+8f1wV3f5mUySLz51tcHc9Di5NpbH0eefOuNFN+xKDGqU18lEj115uANU4DSY
 ZZyteG1z52RIc2SVTHHsMOrS9IpEQ0+TzlJXd+8mW8J8I744jk+r+AnUY9o0cwTa
 /HztcYFqkn9quPMJ6nXFNQS82JhNQlc0w2uus+FtV8dN6Yq/UDFK4k9eJdQb2D6I
 wf/qa+qJqYfYuwWq+RQE
 =h4VK
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
Peter Maydell 2015-03-17 10:26:09 +00:00
commit 494a864e05
1 changed files with 17 additions and 2 deletions

19
configure vendored
View File

@ -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