diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-09-04 19:49:35 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-09-04 19:49:35 +0300 |
commit | 0e1b7765be878491565cf5e471f22b15e106164c (patch) | |
tree | 422e500c289335182a2a64934dcabf10b95e32dc /configure | |
parent | a9618c1c6fe9424dfaeb1677348e0382d7252554 (diff) | |
parent | dcfd043ea8d0c46929aad78596314d837c290d39 (diff) | |
download | mpv-0e1b7765be878491565cf5e471f22b15e106164c.tar.bz2 mpv-0e1b7765be878491565cf5e471f22b15e106164c.tar.xz |
Merge svn changes up to r29644
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 148 |
1 files changed, 85 insertions, 63 deletions
@@ -670,6 +670,7 @@ _maemo=auto _coreaudio=auto _corevideo=auto _quartz=auto +quicktime=auto _macosx_finder=no _macosx_bundle=auto _sortsub=yes @@ -4346,59 +4347,6 @@ fi 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' @@ -4702,23 +4650,43 @@ fi if darwin; then -echocheck "Quartz" -if test "$_quartz" = auto ; then +echocheck "QuickTime" +if test "$quicktime" = auto ; then cat > $TMPC <<EOF -#include <Carbon/Carbon.h> #include <QuickTime/QuickTime.h> int main(void) { + ImageDescription *desc; EnterMovies(); ExitMovies(); + return 0; +} +EOF + quicktime=no + cc_check -framework QuickTime && quicktime=yes +fi +if test "$quicktime" = yes ; then + extra_ldflags="$extra_ldflags -framework QuickTime" + def_quicktime='#define CONFIG_QUICKTIME 1' +else + def_quicktime='#undef CONFIG_QUICKTIME' + _quartz=no +fi +echores $quicktime + +echocheck "Quartz" +if test "$_quartz" = auto ; then + cat > $TMPC <<EOF +#include <Carbon/Carbon.h> +int main(void) { CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false); return 0; } EOF _quartz=no - cc_check -framework Carbon -framework QuickTime && _quartz=yes + cc_check -framework Carbon && _quartz=yes fi if test "$_quartz" = yes ; then - libs_mplayer="$libs_mplayer -framework Carbon -framework QuickTime" + libs_mplayer="$libs_mplayer -framework Carbon" def_quartz='#define CONFIG_QUARTZ 1' _vomodules="quartz $_vomodules" else @@ -4752,6 +4720,61 @@ echores "$_corevideo" 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 @@ -6663,12 +6686,10 @@ echores "$_real" echocheck "QuickTime codecs" _qtx_emulation=no def_qtx_win32='#undef CONFIG_QTX_CODECS_WIN32' -def_quicktime='#undef CONFIG_QUICKTIME' if test "$_qtx" = auto ; then - test "$_win32dll" = yes || darwin && _qtx=yes + test "$_win32dll" = yes || quicktime && _qtx=yes fi if test "$_qtx" = yes ; then - darwin && extra_ldflags="$extra_ldflags -framework QuickTime" && def_quicktime='#define CONFIG_QUICKTIME 1' def_qtx='#define CONFIG_QTX_CODECS 1' win32 && _qtx_codecs_win32=yes && def_qtx_win32='#define CONFIG_QTX_CODECS_WIN32 1' _codecmodules="qtx $_codecmodules" @@ -6726,7 +6747,8 @@ EOF _live=yes && break done if test "$_live" != yes ; then - if cxx_check -I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/groupsock; then + ld_tmp="-lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++" + if cxx_check -I/usr/include/liveMedia -I/usr/include/UsageEnvironment -I/usr/include/groupsock $ld_tmp; then _live_dist=yes fi fi @@ -6739,7 +6761,7 @@ elif test "$_live_dist" = yes && test "$_network" = yes; then _res_comment="using distribution version" _live="yes" def_live='#define CONFIG_LIVE555 1' - extra_ldflags="$extra_ldflags -lliveMedia -lgroupsock -lUsageEnvironment -lBasicUsageEnvironment -lstdc++" + extra_ldflags="$extra_ldflags $ld_tmp" extra_cxxflags="-I/usr/include/liveMedia -I/usr/include/UsageEnvironment \ -I/usr/include/BasicUsageEnvironment -I/usr/include/groupsock" _inputmodules="live555 $_inputmodules" |