# HG changeset patch # User alex # Date 1045675619 0 # Node ID 08c717b7b8866ddd60b99b18a9f2839a059748f2 # Parent 350b660ef93c2bc39e950f9c63852e339a78229c Support for native MacOSX APIs by Dan Christiansen diff -r 350b660ef93c -r 08c717b7b886 Makefile --- a/Makefile Wed Feb 19 17:22:02 2003 +0000 +++ b/Makefile Wed Feb 19 17:26:59 2003 +0000 @@ -36,7 +36,7 @@ VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB) AO_LIBS = $(ARTS_LIB) $(ESD_LIB) $(NAS_LIB) $(SGIAUDIO_LIB) CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) -COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(STREAMING_LIB) $(WIN32_LIB) $(GIF_LIB) +COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(STREAMING_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) # -Wall diff -r 350b660ef93c -r 08c717b7b886 configure --- a/configure Wed Feb 19 17:22:02 2003 +0000 +++ b/configure Wed Feb 19 17:26:59 2003 +0000 @@ -165,6 +165,7 @@ --disable-new-conf Disable new experimental config parser code [enabled] --enable-menu Enable osd menu support (needs new config) [disabled] --disable-sortsub Disable subtitles sorting [enabled] + --disable-macosx Disable Mac OS X specific features [autodetect] Codecs: --enable-gif enable gif support [autodetect] @@ -1059,6 +1060,7 @@ _new_conf=yes _menu=no _qtx_codecs=auto +_macosx=auto _sortsub=yes _freetypeconfig='freetype-config' @@ -1260,6 +1262,9 @@ --enable-qtx-codecs) _qtx_codecs=yes ;; --disable-qtx-codecs) _qtx_codecs=no ;; + --enable-macosx) _macosx=yes ;; + --disable-macosx) _macosx=no ;; + --enable-sortsub) _sortsub=yes ;; --disable-sortsub) _sortsub=no ;; @@ -2259,6 +2264,39 @@ echores "$_sys_sysinfo" +echocheck "Mac OS X APIs" +if test "$_macosx" = auto ; then + if darwin && ppc; then + _macosx=yes + else + _macosx=no + fi +fi +if test "$_macosx" = yes ; then + cat > $TMPC < +#include +#include +int main(void) { + NSApplicationLoad(); +} +EOF + if cc_check -ObjC -framework Carbon -framework Cocoa -framework QuickTime ; then + _macosx=yes + _macosx_frameworks="-framework Carbon -framework Cocoa -framework QuickTime " + else + _macosx=no + echo -n "failed to detect Mac OS X APIs, defaulting to " + fi +fi +if test "$_macosx" = yes ; then + _def_macosx='#define MACOSX 1' +else + _def_macosx='#undef MACOSX' +fi +echores "$_macosx" + + ######### # VIDEO # ######### @@ -4553,6 +4591,7 @@ fi echores "$_qtx_codecs" + echocheck "Subtitles sorting" if test "$_sortsub" = yes ; then _def_sortsub='#define USE_SORTSUB 1' @@ -4944,6 +4983,8 @@ FAAD_LIB = $_ld_faad XMMS_PLUGINS = $_xmms XMMS_LIB = $_xmms_lib +MACOSX = $_macosx +MACOSX_FRAMEWORKS = $_macosx_frameworks # --- Some stuff for autoconfigure ---- $_target_arch @@ -5169,6 +5210,9 @@ /* DirectShow support */ $_def_dshow +/* Mac OS X specific features */ +$_def_macosx + /* Build our Win32-loader */ $_def_win32_loader @@ -5277,6 +5321,9 @@ #elif defined(WIN32) #define DEFAULT_CDROM_DEVICE "D:" #define DEFAULT_DVD_DEVICE "D:" +#elif defined(MACOSX) +#define DEFAULT_CDROM_DEVICE "/dev/rdisk1" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE #else #define DEFAULT_CDROM_DEVICE "/dev/cdrom" #define DEFAULT_DVD_DEVICE "/dev/dvd"