# HG changeset patch # User reimar # Date 1252051026 0 # Node ID ab9cec67f2a9b501d88009ba3268a5126e5dbc90 # Parent 5d00f377f0eae73f5a916a48d1d76e2b2217a5df Move OpenGL test below CoreVideo. This ensures -lGL will come after -framework OpenGL which resolves vo_corevideo crashes due to namespace conflicts (e.g. glEnable, glBegin, ...). diff -r 5d00f377f0ea -r ab9cec67f2a9 configure --- a/configure Thu Sep 03 06:59:14 2009 +0000 +++ b/configure Fri Sep 04 07:57:06 2009 +0000 @@ -4431,59 +4431,6 @@ echores "$_3dfx" -echocheck "OpenGL" -#Note: this test is run even with --enable-gl since we autodetect linker flags -if (test "$_x11" = yes || win32) && test "$_gl" != no ; then - cat > $TMPC << EOF -#ifdef GL_WIN32 -#include -#include -#else -#include -#include -#include -#endif -int main(void) { -#ifdef GL_WIN32 - HDC dc; - wglCreateContext(dc); -#else - glXCreateContext(NULL, NULL, NULL, True); -#endif - glFinish(); - return 0; -} -EOF - _gl=no - if cc_check -lGL $_ld_lm ; then - _gl=yes - libs_mplayer="$libs_mplayer -lGL $_ld_dl" - elif cc_check -lGL $_ld_lm $_ld_pthread ; then - _gl=yes - libs_mplayer="$libs_mplayer -lGL $_ld_pthread $_ld_dl" - elif cc_check -DGL_WIN32 -lopengl32 ; then - _gl=yes - _gl_win32=yes - libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" - fi -else - _gl=no -fi -if test "$_gl" = yes ; then - def_gl='#define CONFIG_GL 1' - if test "$_gl_win32" = yes ; then - def_gl_win32='#define GL_WIN32 1' - _res_comment="win32 version" - fi - _vomodules="opengl $_vomodules" -else - def_gl='#undef CONFIG_GL' - def_gl_win32='#undef GL_WIN32' - _novomodules="opengl $_novomodules" -fi -echores "$_gl" - - echocheck "VIDIX" def_vidix='#undef CONFIG_VIDIX' def_vidix_drv_cyberblade='#undef CONFIG_VIDIX_DRV_CYBERBLADE' @@ -4867,6 +4814,61 @@ fi #if darwin +# make sure this stays below CoreVideo to avoid issues due to namespace +# conflicts between -lGL and -framework OpenGL +echocheck "OpenGL" +#Note: this test is run even with --enable-gl since we autodetect linker flags +if (test "$_x11" = yes || win32) && test "$_gl" != no ; then + cat > $TMPC << EOF +#ifdef GL_WIN32 +#include +#include +#else +#include +#include +#include +#endif +int main(void) { +#ifdef GL_WIN32 + HDC dc; + wglCreateContext(dc); +#else + glXCreateContext(NULL, NULL, NULL, True); +#endif + glFinish(); + return 0; +} +EOF + _gl=no + if cc_check -lGL $_ld_lm ; then + _gl=yes + libs_mplayer="$libs_mplayer -lGL $_ld_dl" + elif cc_check -lGL $_ld_lm $_ld_pthread ; then + _gl=yes + libs_mplayer="$libs_mplayer -lGL $_ld_pthread $_ld_dl" + elif cc_check -DGL_WIN32 -lopengl32 ; then + _gl=yes + _gl_win32=yes + libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" + fi +else + _gl=no +fi +if test "$_gl" = yes ; then + def_gl='#define CONFIG_GL 1' + if test "$_gl_win32" = yes ; then + def_gl_win32='#define GL_WIN32 1' + _res_comment="win32 version" + fi + _vomodules="opengl $_vomodules" +else + def_gl='#undef CONFIG_GL' + def_gl_win32='#undef GL_WIN32' + _novomodules="opengl $_novomodules" +fi +echores "$_gl" + + echocheck "PNG support" if test "$_png" = auto ; then _png=no