Mercurial > mplayer.hg
comparison configure @ 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 | 0ba024eac67c |
children | 106374d8ceb7 |
comparison
equal
deleted
inserted
replaced
29596:5d00f377f0ea | 29597:ab9cec67f2a9 |
---|---|
4429 _novomodules="3dfx $_novomodules" | 4429 _novomodules="3dfx $_novomodules" |
4430 fi | 4430 fi |
4431 echores "$_3dfx" | 4431 echores "$_3dfx" |
4432 | 4432 |
4433 | 4433 |
4434 echocheck "OpenGL" | |
4435 #Note: this test is run even with --enable-gl since we autodetect linker flags | |
4436 if (test "$_x11" = yes || win32) && test "$_gl" != no ; then | |
4437 cat > $TMPC << EOF | |
4438 #ifdef GL_WIN32 | |
4439 #include <windows.h> | |
4440 #include <GL/gl.h> | |
4441 #else | |
4442 #include <GL/gl.h> | |
4443 #include <X11/Xlib.h> | |
4444 #include <GL/glx.h> | |
4445 #endif | |
4446 int main(void) { | |
4447 #ifdef GL_WIN32 | |
4448 HDC dc; | |
4449 wglCreateContext(dc); | |
4450 #else | |
4451 glXCreateContext(NULL, NULL, NULL, True); | |
4452 #endif | |
4453 glFinish(); | |
4454 return 0; | |
4455 } | |
4456 EOF | |
4457 _gl=no | |
4458 if cc_check -lGL $_ld_lm ; then | |
4459 _gl=yes | |
4460 libs_mplayer="$libs_mplayer -lGL $_ld_dl" | |
4461 elif cc_check -lGL $_ld_lm $_ld_pthread ; then | |
4462 _gl=yes | |
4463 libs_mplayer="$libs_mplayer -lGL $_ld_pthread $_ld_dl" | |
4464 elif cc_check -DGL_WIN32 -lopengl32 ; then | |
4465 _gl=yes | |
4466 _gl_win32=yes | |
4467 libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" | |
4468 fi | |
4469 else | |
4470 _gl=no | |
4471 fi | |
4472 if test "$_gl" = yes ; then | |
4473 def_gl='#define CONFIG_GL 1' | |
4474 if test "$_gl_win32" = yes ; then | |
4475 def_gl_win32='#define GL_WIN32 1' | |
4476 _res_comment="win32 version" | |
4477 fi | |
4478 _vomodules="opengl $_vomodules" | |
4479 else | |
4480 def_gl='#undef CONFIG_GL' | |
4481 def_gl_win32='#undef GL_WIN32' | |
4482 _novomodules="opengl $_novomodules" | |
4483 fi | |
4484 echores "$_gl" | |
4485 | |
4486 | |
4487 echocheck "VIDIX" | 4434 echocheck "VIDIX" |
4488 def_vidix='#undef CONFIG_VIDIX' | 4435 def_vidix='#undef CONFIG_VIDIX' |
4489 def_vidix_drv_cyberblade='#undef CONFIG_VIDIX_DRV_CYBERBLADE' | 4436 def_vidix_drv_cyberblade='#undef CONFIG_VIDIX_DRV_CYBERBLADE' |
4490 _vidix_drv_cyberblade=no | 4437 _vidix_drv_cyberblade=no |
4491 def_vidix_drv_ivtv='#undef CONFIG_VIDIX_DRV_IVTV' | 4438 def_vidix_drv_ivtv='#undef CONFIG_VIDIX_DRV_IVTV' |
4863 def_corevideo='#undef CONFIG_COREVIDEO' | 4810 def_corevideo='#undef CONFIG_COREVIDEO' |
4864 fi | 4811 fi |
4865 echores "$_corevideo" | 4812 echores "$_corevideo" |
4866 | 4813 |
4867 fi #if darwin | 4814 fi #if darwin |
4815 | |
4816 | |
4817 # make sure this stays below CoreVideo to avoid issues due to namespace | |
4818 # conflicts between -lGL and -framework OpenGL | |
4819 echocheck "OpenGL" | |
4820 #Note: this test is run even with --enable-gl since we autodetect linker flags | |
4821 if (test "$_x11" = yes || win32) && test "$_gl" != no ; then | |
4822 cat > $TMPC << EOF | |
4823 #ifdef GL_WIN32 | |
4824 #include <windows.h> | |
4825 #include <GL/gl.h> | |
4826 #else | |
4827 #include <GL/gl.h> | |
4828 #include <X11/Xlib.h> | |
4829 #include <GL/glx.h> | |
4830 #endif | |
4831 int main(void) { | |
4832 #ifdef GL_WIN32 | |
4833 HDC dc; | |
4834 wglCreateContext(dc); | |
4835 #else | |
4836 glXCreateContext(NULL, NULL, NULL, True); | |
4837 #endif | |
4838 glFinish(); | |
4839 return 0; | |
4840 } | |
4841 EOF | |
4842 _gl=no | |
4843 if cc_check -lGL $_ld_lm ; then | |
4844 _gl=yes | |
4845 libs_mplayer="$libs_mplayer -lGL $_ld_dl" | |
4846 elif cc_check -lGL $_ld_lm $_ld_pthread ; then | |
4847 _gl=yes | |
4848 libs_mplayer="$libs_mplayer -lGL $_ld_pthread $_ld_dl" | |
4849 elif cc_check -DGL_WIN32 -lopengl32 ; then | |
4850 _gl=yes | |
4851 _gl_win32=yes | |
4852 libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" | |
4853 fi | |
4854 else | |
4855 _gl=no | |
4856 fi | |
4857 if test "$_gl" = yes ; then | |
4858 def_gl='#define CONFIG_GL 1' | |
4859 if test "$_gl_win32" = yes ; then | |
4860 def_gl_win32='#define GL_WIN32 1' | |
4861 _res_comment="win32 version" | |
4862 fi | |
4863 _vomodules="opengl $_vomodules" | |
4864 else | |
4865 def_gl='#undef CONFIG_GL' | |
4866 def_gl_win32='#undef GL_WIN32' | |
4867 _novomodules="opengl $_novomodules" | |
4868 fi | |
4869 echores "$_gl" | |
4868 | 4870 |
4869 | 4871 |
4870 echocheck "PNG support" | 4872 echocheck "PNG support" |
4871 if test "$_png" = auto ; then | 4873 if test "$_png" = auto ; then |
4872 _png=no | 4874 _png=no |