: Re: : [MPlayer-dev-eng] [PATCH] perl_check & parse SystemVersion.plist on Mac OSX

Martin Simmons vyslnqaaxytp at spammotel.com
Mon Sep 12 01:48:00 CEST 2005


>>>>> On Sat, 10 Sep 2005 21:38:44 -0400, Nicolas Plourde <nicolas.plourde at gmail.com> said:

> On 10-Sep-05, at 7:24 PM, Martin Simmons wrote:
>> 
>> Yes, it correctly detects Mac OS X on x86 too.
>> 
>> You could also consider something based on /usr/bin/sw_vers - 
>> productName
>> (works for 10.3 and greater).
>> 

> Duh, just commited the patch, i will remove the change and use your  
> method
> which is way better IMO. Will this work on Darwin?

Sorry, no idea.  I'd hope sw_vers (if it exists) wouldn't return "Mac OS X"
though!


> Since you have access to x86 osx can you tell me if mplayer build  
> properly on it?
> I guess the cpu is not detected properly. maybe we can modify the  
> configure
> to use sysctl for that.

Without special cpu detection logic, current CVS chooses plain i586 without
any extensions:

Config files successfully generated by ./configure !

  Install prefix: /usr/local
  Data directory: /usr/local/share/mplayer
  Config direct.: /usr/local/etc/mplayer

  Byte order: little-endian
  Optimizing for: i586

  Languages:
    Messages/GUI: en
    Manual pages:  en

  Enabled optional drivers:
    Input: ftp network edl tv matroska mpdvdkit2 vcd 
    Codecs: libavcodec faad2(internal) libmpeg2 liba52 mp3lib tremor(internal) 
    Audio output: mpegpes(file) macosx 
    Video output: xvidix cvidix md5sum pnm mpegpes(file) opengl xv x11 xover tga macosx quartz 
    Audio filters: 
  Disabled optional drivers:
    Input: vstream tv-v4l2 tv-v4l tv-bsdbt848 live.com cdda dvdread dvb smb 
    Codecs: qtx opendivx x264 xvid libdv amr_wb amr_nb real xanim dshow/dmo win32 musepack libdts libtheora twolame toolame libmad liblzo gif  faac
    Audio output: sgi sun alsa jack polyp esd arts oss dxr2 nas dsound win32 sdl 
    Video output: winvidix bl zr zr2 dxr3 dxr2 directx sdl vesa gif89a jpeg png fbdev svga caca aa ggi xmga mga dga xvmc directfb tdfx_vid tdfxfb 3dfx 
    Audio filters: ladspa 


Then make fails to compile mplayer.c due to what looks like a gcc bug with
float division when targeting i586 :-(

The following patch makes cpu detection work by using TOOLS/cpuinfo.c:

------------------------------------------------------------------------
diff -u -r1.1060 configure
--- configure	11 Sep 2005 15:02:49 -0000	1.1060
+++ configure	11 Sep 2005 23:37:13 -0000
@@ -720,7 +720,7 @@
   # FreeBSD with Linux emulation /proc mounted,
   # extract CPU information from it
   _cpuinfo="cat /compat/linux/proc/cpuinfo"
-elif darwin ; then
+elif darwin && not x86 ; then
   # use hostinfo on Darwin
   _cpuinfo="hostinfo"
 elif x86; then
------------------------------------------------------------------------

It then says:

  Optimizing for: pentium4 mmx mmx2 sse sse2 mtrr

which looks better.

Running make after this allows mplayer.c to compile without errors, but
unfortunately has lots of problems in later asm code.  I think the supplied
GNU assembler is too old.  I tried --disable-mxx, but it still fails in
swscale.c.

__Martin




More information about the MPlayer-dev-eng mailing list