aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAlejandro Marzini2010-08-03 03:14:35 +0000
committerAlejandro Marzini2010-08-03 03:14:35 +0000
commit6786c2a714b23d5c70e900cdcf86bdee83993283 (patch)
tree352b256e7e5e45210c23dbc479f3472778c105f3 /configure
parent498c17655dbc448ed8bdd8146b0ca1dd0dfc9463 (diff)
downloadscummvm-rg350-6786c2a714b23d5c70e900cdcf86bdee83993283.tar.gz
scummvm-rg350-6786c2a714b23d5c70e900cdcf86bdee83993283.tar.bz2
scummvm-rg350-6786c2a714b23d5c70e900cdcf86bdee83993283.zip
OPENGL: Add basic configure detection.
svn-id: r51676
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 15 insertions, 5 deletions
diff --git a/configure b/configure
index b6449e70a3..0b555fc57c 100755
--- a/configure
+++ b/configure
@@ -2310,13 +2310,23 @@ define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE'
#
# Check for OpenGL (ES)
#
+
echocheck "OpenGL (ES)"
if test "$_opengl" = auto ; then
-# TODO: This is just a quick hack until actual detection is added, which
-# will be a pain because of the various directories that OpenGL can have
-# its headers in. Maybe we should force the platforms to automatically
-# include the directory that includes gl.h?
- _opengl=yes
+ _opengl=no
+ cat > $TMPC << EOF
+#if defined(__MACOSX__)
+#include <gl.h>
+#else
+#if defined(__WIN32__)
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+#include <GL/gl.h>
+#endif
+int main(void) { return GL_VERSION_1_1; }
+EOF
+ cc_check $OPENGL_CFLAGS $OPENGL_LIBS && _opengl=yes
fi
if test "$_opengl" = yes ; then
_def_opengl='#define USE_OPENGL'