Mercurial > mplayer.hg
changeset 29597:ab9cec67f2a9
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, ...).
author | reimar |
---|---|
date | Fri, 04 Sep 2009 07:57:06 +0000 |
parents | 5d00f377f0ea |
children | 8f54d278fd50 |
files | configure |
diffstat | 1 files changed, 55 insertions(+), 53 deletions(-) [+] |
line wrap: on
line diff
--- 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 <windows.h> -#include <GL/gl.h> -#else -#include <GL/gl.h> -#include <X11/Xlib.h> -#include <GL/glx.h> -#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 <windows.h> +#include <GL/gl.h> +#else +#include <GL/gl.h> +#include <X11/Xlib.h> +#include <GL/glx.h> +#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