[Mplayer-cvslog] CVS: 0_90 Makefile,1.249,1.250 configure,1.661,1.662

Arpi of Ize arpi at mplayerhq.hu
Mon Mar 10 17:21:20 CET 2003


Update of /cvsroot/mplayer/0_90
In directory mail:/var/tmp.root/cvs-serv8136

Modified Files:
	Makefile configure 
Log Message:
backport: macosx support, better lib(un)gif support, better faad version
detection, win32 loader detection changed, win32 path moved to #define, etc


Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/0_90/Makefile,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -r1.249 -r1.250
--- Makefile	7 Feb 2003 22:25:17 -0000	1.249
+++ Makefile	10 Mar 2003 16:21:18 -0000	1.250
@@ -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 $(PP_LIB) postproc/libswscale.a linux/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 $(PP_LIB) postproc/libswscale.a linux/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
 
@@ -312,6 +312,7 @@
 	-rm -f *~ $(PRG) $(PRG_FIBMAP) $(PRG_MENCODER) $(PRG_CFG) $(OBJS)
 	-rm -f *.o *.a .depend configure.log codecs.conf.h
 	@for a in $(PARTS); do $(MAKE) -C $$a distclean; done
+	$(MAKE) -C libavcodec distclean LIBPREF=lib LIBSUF=.a
 
 strip:
 	strip -s $(ALL_PRG)

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/0_90/configure,v
retrieving revision 1.661
retrieving revision 1.662
diff -u -r1.661 -r1.662
--- configure	21 Feb 2003 19:45:36 -0000	1.661
+++ configure	10 Mar 2003 16:21:18 -0000	1.662
@@ -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]
@@ -458,6 +459,9 @@
       cc_verc_fail=yes
       ;;
     2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9])
+      _cc_major=`echo $cc_version | cut -d '.' -f 1`
+      _cc_minor=`echo $cc_version | cut -d '.' -f 2`
+      _cc_mini=`echo $cc_version | cut -d '.' -f 3`
       cc_version="$cc_version, ok"
       cc_verc_fail=no
       ;;
@@ -1055,6 +1059,7 @@
 _new_conf=yes
 _menu=no
 _qtx_codecs=auto
+_macosx=auto
 _sortsub=yes
 _freetypeconfig='freetype-config'
 
@@ -1256,6 +1261,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 ;;
 
@@ -1497,6 +1505,7 @@
   _vidix=no
   # should check for x86 systems supporting VIDIX (does QNX have VIDIX?)
   x86 && _vidix=yes
+  ppc && linux && _vidix=yes
   cygwin && _vidix=no
   qnx && _vidix=no
   sunos && _vidix=no
@@ -2254,6 +2263,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 <<EOF
+#include <Carbon/Carbon.h>
+#include <Cocoa/Cocoa.h>
+#include <QuickTime/QuickTime.h>
+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 #
 #########
@@ -2911,18 +2953,18 @@
   return 0;
 }
 EOF
-  if cc_check -lgif && "$TMPO" >> "$TMPLOG" ; then
-    _gif=yes
-    _ld_gif="-lgif"
-  elif cc_check -lungif && "$TMPO" >> "$TMPLOG" ; then
+  if cc_check -lungif && "$TMPO" >> "$TMPLOG" ; then
     _gif=yes
     _ld_gif="-lungif"
-  elif cc_check -lgif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
-    _gif=yes
-    _ld_gif="-lgif $_ld_x11"
   elif cc_check -lungif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
     _gif=yes
     _ld_gif="-lungif $_ld_x11"
+  elif cc_check -lgif && "$TMPO" >> "$TMPLOG" ; then
+    _gif=yes
+    _ld_gif="-lgif"
+  elif cc_check -lgif $_ld_x11 && "$TMPO" >> "$TMPLOG" ; then
+    _gif=yes
+    _ld_gif="-lgif $_ld_x11"
   fi
 fi
 
@@ -2960,7 +3002,7 @@
 echores "$_gif"
 
 
-if test "$_gif" = yes ; then
+case "$_gif" in yes*)
   echocheck "broken giflib workaround"
   _def_gif_tvt_hack='#define HAVE_GIF_TVT_HACK 1'
 
@@ -2978,7 +3020,8 @@
   else
     echores "enabled"
   fi
-fi
+  ;;
+esac
 
 
 if test "$_vesa" != no ; then
@@ -3454,7 +3497,7 @@
  fi
 fi
 if test "$_dvdkit" = yes ; then
-  if test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || test "$_dvdio" = yes || test "$_bsdi_dvd" = yes || darwin || cygwin ; then
+  if test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || test "$_dvdio" = yes || test "$_bsdi_dvd" = yes || test "$_hpux_scsi_h" = yes || darwin || cygwin ; then
    if test -f "./libmpdvdkit2/Makefile" ; then
     _inputmodules="mpdvdkit2 $_inputmodules"
     _dvdread=libmpdvdkit2
@@ -3820,7 +3863,7 @@
 EOF
   if cc_check $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then
     _faad_version=`"$TMPO"`
-    _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]*\)\.\([0-9]*\).*/\1\2/'`
+    _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'`
     _def_faad_version="#define FAADVERSION $_faad_tempversion"
     echores "yes ($_faad_version)"
   else
@@ -3860,13 +3903,7 @@
 fi
 if test "$_win32" = yes ; then
   _def_win32='#define USE_WIN32DLL 1'
-  _ld_win32='loader/libloader.a'
-  _dep_win32='loader/libloader.a'
-  _codecmodules="win32 $_codecmodules"
   echores "yes"
-  if openbsd ; then
-    x86 && _ld_win32="$_ld_win32 -li386"
-  fi
 else
   _def_win32='#undef USE_WIN32DLL'
   _nocodecmodules="win32 $_nocodecmodules"
@@ -3874,6 +3911,23 @@
   echores "no"
 fi
 
+if test "$_win32" != no ; then
+  _def_win32_loader='#undef WIN32_LOADER'
+  echocheck "Win32 loader support"
+  if not cygwin ; then
+    _ld_win32='loader/libloader.a'
+    _dep_win32='loader/libloader.a'
+    _codecmodules="win32 $_codecmodules"
+    if openbsd ; then
+      x86 && _ld_win32="$_ld_win32 -li386"
+    fi
+    _def_win32_loader='#define WIN32_LOADER 1'
+    echores "yes"
+  else
+    echores "no (using native windows)"
+  fi
+fi
+
 echocheck "DirectShow"
 if false ; then
 
@@ -3965,7 +4019,8 @@
 echocheck "RealPlayer DLL"
 if test "$_real" = auto ; then
   _real=no
-  if test "$_dl" = yes ; then
+  if test "$_dl" = yes || test "$_win32" = yes ; then
+#  if test "$_dl" = yes  ; then
     if linux || freebsd || netbsd || cygwin ; then
       _real=yes
     else
@@ -3974,7 +4029,8 @@
     if test "$_real" = yes ; then
       if test -z "$_reallibdir" ; then
 	for I in $_libdir/real /usr/lib/real /usr/lib/RealPlayer*/Codecs \
-          /usr/local/RealPlayer*/Codecs /usr/local/lib/RealPlayer*/Codecs; do
+          /usr/local/RealPlayer*/Codecs /usr/local/lib/RealPlayer*/Codecs \
+          /opt/RealPlayer*/Codecs; do
           if test -d "$I" ; then
             _reallibdir="$I"
             break;
@@ -4835,7 +4891,6 @@
 # OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu -pipe -fomit-frame-pointer -ffast-math
 OPTFLAGS = $CFLAGS
 EXTRA_INC = $_inc_extra $_inc_gtk
-WIN32_PATH = -DWIN32_PATH=\\"$_win32libdir\\"
 STRIPBINARIES = $_stripbinaries
 
 $_live_libs_def
@@ -4930,6 +4985,8 @@
 FAAD_LIB = $_ld_faad
 XMMS_PLUGINS = $_xmms
 XMMS_LIB = $_xmms_lib
+MACOSX = $_macosx
+MACOSX_FRAMEWORKS = $_macosx_frameworks
 
 # --- Some stuff for autoconfigure ----
 $_target_arch
@@ -5150,10 +5207,17 @@
 
 /* Win32 DLL support */
 $_def_win32
+#define WIN32_PATH "$_win32libdir"
 
 /* DirectShow support */
 $_def_dshow
 
+/* Mac OS X specific features */
+$_def_macosx
+
+/* Build our Win32-loader */
+$_def_win32_loader
+
 /* ffmpeg's libavcodec support (requires libavcodec source) */
 $_def_libavcodec
 $_def_libavcodecso
@@ -5259,6 +5323,9 @@
 #elif defined(WIN32)
 #define DEFAULT_CDROM_DEVICE    "D:"
 #define DEFAULT_DVD_DEVICE	"D:"
+#elif defined(SYS_DARWIN)
+#define DEFAULT_CDROM_DEVICE    "/dev/rdiskN"
+#define DEFAULT_DVD_DEVICE	DEFAULT_CDROM_DEVICE
 #else
 #define DEFAULT_CDROM_DEVICE    "/dev/cdrom"
 #define DEFAULT_DVD_DEVICE	"/dev/dvd"



More information about the MPlayer-cvslog mailing list