mirror of https://github.com/mpv-player/mpv
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, ...). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29639 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
39ed8ed063
commit
4338a8d7f4
|
@ -4431,59 +4431,6 @@ fi
|
||||||
echores "$_3dfx"
|
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"
|
echocheck "VIDIX"
|
||||||
def_vidix='#undef CONFIG_VIDIX'
|
def_vidix='#undef CONFIG_VIDIX'
|
||||||
def_vidix_drv_cyberblade='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
|
def_vidix_drv_cyberblade='#undef CONFIG_VIDIX_DRV_CYBERBLADE'
|
||||||
|
@ -4867,6 +4814,61 @@ echores "$_corevideo"
|
||||||
fi #if darwin
|
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"
|
echocheck "PNG support"
|
||||||
if test "$_png" = auto ; then
|
if test "$_png" = auto ; then
|
||||||
_png=no
|
_png=no
|
||||||
|
|
Loading…
Reference in New Issue