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(这一步得否必须,有待确定)(不加这个,也可以正常操作)
特别提醒:修改platform.inc文件, 要在./configure 操作之后
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.