0001-fix-opengl-detection.patch 1002 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # HG changeset patch
  2. # User Sam Lantinga <slouken@libsdl.org>
  3. # Date 1485568474 28800
  4. # Node ID 3b93536d291a34183592fd29ef1df9cf1416ac09
  5. # Parent 184c34c673d479477d34194e3c0b1abe7ca5d828
  6. Make sure we can link with OpenGL libraries in the OpenGL configure test
  7. [yann.morin.1998@free.fr:
  8. - backported from upstream
  9. - drop the configure hunk for autoreconf
  10. ]
  11. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  12. diff -r 184c34c673d4 -r 3b93536d291a configure.in
  13. --- a/configure.in Sun Jan 01 18:46:38 2017 -0800
  14. +++ b/configure.in Fri Jan 27 17:54:34 2017 -0800
  15. @@ -164,14 +164,17 @@
  16. esac
  17. AC_MSG_CHECKING(for OpenGL support)
  18. have_opengl=no
  19. -AC_TRY_COMPILE([
  20. +save_LIBS="$LIBS"
  21. +LIBS="$LIBS $SYS_GL_LIBS"
  22. +AC_TRY_LINK([
  23. #include "SDL_opengl.h"
  24. ],[
  25. - GLuint texture;
  26. + glOrtho( -2.0, 2.0, -2.0, 2.0, -20.0, 20.0 );
  27. ],[
  28. have_opengl=yes
  29. ])
  30. AC_MSG_RESULT($have_opengl)
  31. +LIBS="$save_LIBS"
  32. if test x$have_opengl = xyes; then
  33. CFLAGS="$CFLAGS -DHAVE_OPENGL"
  34. GL_LIBS="$SYS_GL_LIBS"