From 3862d469ae7f22d10f1d51d7056c75782fec2283 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 16 Apr 2012 08:33:42 +0200 Subject: configure: OSX: check for X11 header conflict with corevideo Check that headers from ApplicationServices and X11 do not conflict before enabling X11 support on OSX. Both headers would be included in vo_corevideo.m (through QuartzCore/QuartzCore.h and gl_common.h). The conflict exists on versions of Mac OSX prior to 10.7, where ApplicationServices includes the deprecated QuickDraw framework, resulting in a clash on the Cursor type definition. --- configure | 173 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 95 insertions(+), 78 deletions(-) diff --git a/configure b/configure index 7b99766d2d..71dbecab68 100755 --- a/configure +++ b/configure @@ -3796,6 +3796,87 @@ fi echores "$_directfb" +if darwin; then + +echocheck "QuickTime" +if test "$quicktime" = auto ; then + quicktime=no + statement_check QuickTime/QuickTime.h 'ImageDescription *desc; EnterMovies(); ExitMovies()' -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' +fi +echores $quicktime + +echocheck "Cocoa" +if test "$_cocoa" = auto ; then + cat > $TMPC < +#include +int main(void) { + NSApplicationLoad(); +} +EOF + _cocoa=no + cc_check -framework Cocoa -framework OpenGL && _cocoa=yes +fi +if test "$_cocoa" = yes ; then + libs_mplayer="$libs_mplayer -framework Cocoa -framework OpenGL" + def_cocoa='#define CONFIG_COCOA 1' +else + def_cocoa='#undef CONFIG_COCOA' +fi +echores "$_cocoa" + +echocheck "CoreVideo" +if test "$_cocoa" = yes && test "$_corevideo" = auto ; then + cat > $TMPC < +int main(void) { return 0; } +EOF + _corevideo=no + cc_check -framework Cocoa -framework QuartzCore -framework OpenGL && _corevideo=yes +fi +if test "$_corevideo" = yes ; then + vomodules="corevideo $vomodules" + libs_mplayer="$libs_mplayer -framework QuartzCore" + def_corevideo='#define CONFIG_COREVIDEO 1' +else + novomodules="corevideo $novomodules" + def_corevideo='#undef CONFIG_COREVIDEO' +fi +echores "$_corevideo" + +echocheck "SharedBuffer" +if test "$_sharedbuffer" = auto ; then + cat > $TMPC < $TMPC < -#include -int main(void) { - NSApplicationLoad(); -} -EOF - _cocoa=no - cc_check -framework Cocoa -framework OpenGL && _cocoa=yes -fi -if test "$_cocoa" = yes ; then - libs_mplayer="$libs_mplayer -framework Cocoa -framework OpenGL" - def_cocoa='#define CONFIG_COCOA 1' -else - def_cocoa='#undef CONFIG_COCOA' -fi -echores "$_cocoa" - -echocheck "CoreVideo" -if test "$_cocoa" = yes && test "$_corevideo" = auto ; then - cat > $TMPC < -int main(void) { return 0; } -EOF - _corevideo=no - cc_check -framework Cocoa -framework QuartzCore -framework OpenGL && _corevideo=yes -fi -if test "$_corevideo" = yes ; then - vomodules="corevideo $vomodules" - libs_mplayer="$libs_mplayer -framework QuartzCore" - def_corevideo='#define CONFIG_COREVIDEO 1' -else - novomodules="corevideo $novomodules" - def_corevideo='#undef CONFIG_COREVIDEO' -fi -echores "$_corevideo" - -echocheck "SharedBuffer" -if test "$_sharedbuffer" = auto ; then - cat > $TMPC <