diff configure @ 10880:ba9557e864c0

vo_gl2 port to win32 patch by Tristan Seligmann <mithrandi-mplayer-dev-eng at mithrandi.za.net>
author faust3
date Fri, 19 Sep 2003 14:33:51 +0000
parents 5e5f230b102d
children 5977670f744e
line wrap: on
line diff
--- a/configure	Wed Sep 17 09:42:25 2003 +0000
+++ b/configure	Fri Sep 19 14:33:51 2003 +0000
@@ -2940,7 +2940,7 @@
 echocheck "OpenGL"
 cygwin && _gl=no
 #Note: this test is run even with --enable-gl since we autodetect $_ld_gl
-if test "$_x11" = yes && test "$_gl" != no ; then
+if (test "$_x11" = yes || mingw32) && test "$_gl" != no ; then
   cat > $TMPC << EOF
 #include <GL/gl.h>
 int main(void) { return 0; }
@@ -2952,16 +2952,26 @@
   elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then
     _gl=yes
     _ld_gl="-lGL $_ld_pthread"
+  elif cc_check -lopengl32 ; then
+    _gl=yes
+    _gl_win32=yes
+    _ld_gl="-lopengl32 -lgdi32"
   fi
 else
   _gl=no
 fi
 if test "$_gl" = yes ; then
   _def_gl='#define HAVE_GL 1'
-  _vosrc="$_vosrc vo_gl.c vo_gl2.c"
+  if test "$_gl_win32" = yes ; then
+    _def_gl_win32='#define GL_WIN32 1' 
+    _vosrc="$_vosrc vo_gl2.c w32_common.c"
+  else
+    _vosrc="$_vosrc vo_gl.c vo_gl2.c"
+  fi
   _vomodules="opengl $_vomodules"
 else
   _def_gl='#undef HAVE_GL'
+  _def_gl_win32='#undef GL_WIN32'
   _novomodules="opengl $_novomodules"
 fi
 echores "$_gl"
@@ -6100,6 +6110,7 @@
 $_def_vm
 $_def_xinerama
 $_def_gl
+$_def_gl_win32
 $_def_dga
 $_def_dga2
 $_def_sdl