Upstream-Status: backport [hg] Signed-off-by: Andreas Oberritter From 36ebb6865e420014bf039ea63f2259af14e2e941 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 27 Jan 2017 17:54:34 -0800 Subject: [PATCH] Make sure we can link with OpenGL libraries in the OpenGL configure test --- configure.in | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 9b36e15..9db85a6 100644 --- a/configure.in +++ b/configure.in @@ -164,14 +164,17 @@ case "$host" in esac AC_MSG_CHECKING(for OpenGL support) have_opengl=no -AC_TRY_COMPILE([ +save_LIBS="$LIBS" +LIBS="$LIBS $SYS_GL_LIBS" +AC_TRY_LINK([ #include "SDL_opengl.h" ],[ - GLuint texture; + glOrtho( -2.0, 2.0, -2.0, 2.0, -20.0, 20.0 ); ],[ have_opengl=yes ]) AC_MSG_RESULT($have_opengl) +LIBS="$save_LIBS" if test x$have_opengl = xyes; then CFLAGS="$CFLAGS -DHAVE_OPENGL" GL_LIBS="$SYS_GL_LIBS" -- 2.7.4