Using Apple’s nasm one can compile a working XviD binary using the x86 asm that will run on Core Duo systems. Thanks to Christoph Naegeli and Andrea Gianarro for the following information.
Enter the build/generic directory in the xvid source directory, run bootstrap.sh and (for bash) run:
./configure --enable-macosx_module
Then edit build/generic/platform.inc and ADD the flags shown below:
"-undefined suppress" to SPECIFIC_CFLAGS
"-f macho -DPREFIX" to AFLAGS (so it reads AFLAGS="AFLAGS=-I$(<D)/ -f macho -DPREFIX")
"-read_only_relocs suppress" to SPECIFIC_LDFLAGS
Here’s my platform.inc if you would like to have a look to check you’ve edited it correctly.
Then make and make install as usual.
I also change -O2 to -O3 and add “-march=prescott” to the CFLAGS and configure with –prefix=/usr/local . The CFLAGS enable some GCC optimisations. There is debate as to whether the use of -march with “pentium-m” or “prescott” is better for the Core processors. I haven’t particularly researched it all that much but the Core is supposedly a heavily reworked Pentium 3 that is a bit like a Pentium M, has the same instruction set as the Prescott and behaves more like the NetBurst architecture. As such -march=prescott is supposed to be the most appropriate choice. When I get bored someday I’ll run some benchmarks and test to see which is faster.
Pingback: How to install FFmpeg and LAME on Mac OS X Leopard using source « CrazyRails ~ Flex on Ruby on Rails