--- trunk/xvidcore/build/generic/configure.in 2008/11/26 02:17:50 1797 +++ trunk/xvidcore/build/generic/configure.in 2008/12/05 10:18:52 1847 @@ -8,17 +8,19 @@ AC_PREREQ([2.50]) -AC_INIT([Xvid], [1.2.0], [xvid-devel@xvid.org]) +AC_INIT([Xvid], [1.3.0], [xvid-devel@xvid.org]) AC_CONFIG_SRCDIR(configure.in) dnl Do not forget to increase that when needed. API_MAJOR="4" -API_MINOR="1" +API_MINOR="3" -dnl NASM version requirement +dnl NASM/YASM version requirement +minimum_yasm_minor_version=7 minimum_nasm_minor_version=0 minimum_nasm_major_version=2 nasm_prog="nasm" +yasm_prog="yasm" dnl Default CFLAGS -- Big impact on overall speed our_cflags_defaults="-Wall" @@ -345,6 +347,29 @@ found_nasm_comp_prog="no" chosen_asm_prog="" + dnl Check for yasm first + AC_CHECK_PROG([ac_yasm], [$yasm_prog], [yes], [no], , [yes]) + if test "$ac_yasm" = "yes" ; then + dnl + dnl Checking yasm version + dnl + AC_MSG_CHECKING([for yasm version]) + yasm_minor=`$yasm_prog --version | cut -d '.' -f 2 | cut -d ' ' -f 1` + if test -z $yasm_minor ; then + yasm_minor=-1 + fi + AC_MSG_RESULT([$yasm_minor]) + + dnl Actually, yasm >= 0.6.2 should be ok + dnl But I'm too lazy to check also the patch version... + if test "$yasm_minor" -lt "$minimum_yasm_minor_version" ; then + AC_MSG_WARN([yasm version is too old]) + else + found_nasm_comp_prog="yes" + chosen_asm_prog="$yasm_prog" + fi + fi + dnl Check for nasm (not buggy version) if test "$found_nasm_comp_prog" = "no" ; then AC_CHECK_PROG([ac_nasm], [$nasm_prog], [yes], [no], , [yes]) @@ -430,7 +455,7 @@ dnl and GNU gcc with very slight changes to code which can be sumed up by: dnl dnl Apple: -dnl - compile with the option -faltivec +dnl - compile with the option -arch ppc -faltivec dnl - define vectors with parentheses vec = (0,0,0,0) dnl GNU dnl - compile with -maltivec -mabi=altivec @@ -455,7 +480,7 @@ #include int main() { return(0); } EOF - if $CC -faltivec -c conftest.c 2>/dev/null 1>/dev/null || \ + if $CC -arch ppc -faltivec -c conftest.c 2>/dev/null 1>/dev/null || \ $CC -maltivec -mabi=altivec -c conftest.c 2>/dev/null 1>/dev/null ; then AC_MSG_RESULT(yes) SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_ALTIVEC_H" @@ -479,9 +504,9 @@ return(0); } EOF - if $CC $TEMP_ALTIVEC -faltivec -c conftest.c 2>/dev/null 1>/dev/null ; then + if $CC $TEMP_ALTIVEC -arch ppc -faltivec -c conftest.c 2>/dev/null 1>/dev/null ; then AC_MSG_RESULT([yes (Apple)]) - SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -faltivec -DHAVE_ALTIVEC_PARENTHESES_DECL $TEMP_ALTIVEC" + SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -arch ppc -faltivec -DHAVE_ALTIVEC_PARENTHESES_DECL $TEMP_ALTIVEC" PPC_ALTIVEC_SOURCES="SRC_PPC_ALTIVEC" else cat > conftest.c << EOF