8 |
|
|
9 |
AC_PREREQ([2.50]) |
AC_PREREQ([2.50]) |
10 |
|
|
11 |
AC_INIT([Xvid], [1.2.0], [xvid-devel@xvid.org]) |
AC_INIT([Xvid], [1.2.2], [xvid-devel@xvid.org]) |
12 |
AC_CONFIG_SRCDIR(configure.in) |
AC_CONFIG_SRCDIR(configure.in) |
13 |
|
|
14 |
dnl Do not forget to increase that when needed. |
dnl Do not forget to increase that when needed. |
15 |
API_MAJOR="4" |
API_MAJOR="4" |
16 |
API_MINOR="1" |
API_MINOR="2" |
17 |
|
|
18 |
dnl NASM version requirement |
dnl NASM/YASM version requirement |
19 |
|
minimum_yasm_minor_version=8 |
20 |
minimum_nasm_minor_version=0 |
minimum_nasm_minor_version=0 |
21 |
minimum_nasm_major_version=2 |
minimum_nasm_major_version=2 |
22 |
nasm_prog="nasm" |
nasm_prog="nasm" |
23 |
|
yasm_prog="yasm" |
24 |
|
|
25 |
dnl Default CFLAGS -- Big impact on overall speed |
dnl Default CFLAGS -- Big impact on overall speed |
26 |
our_cflags_defaults="-Wall" |
our_cflags_defaults="-Wall" |
293 |
if test x"$macosx_module" = x"no"; then |
if test x"$macosx_module" = x"no"; then |
294 |
AC_MSG_RESULT([dylib options]) |
AC_MSG_RESULT([dylib options]) |
295 |
SHARED_LIB="libxvidcore.\$(API_MAJOR).\$(SHARED_EXTENSION)" |
SHARED_LIB="libxvidcore.\$(API_MAJOR).\$(SHARED_EXTENSION)" |
296 |
SPECIFIC_LDFLAGS="-dynamiclib -flat_namespace -compatibility_version \$(API_MAJOR) -current_version \$(API_MAJOR).\$(API_MINOR) -install_name \$(libdir)/\$(SHARED_LIB)" |
SPECIFIC_LDFLAGS="-Wl,-read_only_relocs,suppress -dynamiclib -flat_namespace -compatibility_version \$(API_MAJOR) -current_version \$(API_MAJOR).\$(API_MINOR) -install_name \$(libdir)/\$(SHARED_LIB)" |
297 |
else |
else |
298 |
AC_MSG_RESULT([module options]) |
AC_MSG_RESULT([module options]) |
299 |
PRE_SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)-temp.o" |
PRE_SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)-temp.o" |
347 |
found_nasm_comp_prog="no" |
found_nasm_comp_prog="no" |
348 |
chosen_asm_prog="" |
chosen_asm_prog="" |
349 |
|
|
350 |
|
dnl Check for yasm first |
351 |
|
AC_CHECK_PROG([ac_yasm], [$yasm_prog], [yes], [no], , [yes]) |
352 |
|
if test "$ac_yasm" = "yes" ; then |
353 |
|
dnl |
354 |
|
dnl Checking yasm version |
355 |
|
dnl |
356 |
|
AC_MSG_CHECKING([for yasm version]) |
357 |
|
yasm_minor=`$yasm_prog --version | cut -d '.' -f 2 | cut -d ' ' -f 1` |
358 |
|
if test -z $yasm_minor ; then |
359 |
|
yasm_minor=-1 |
360 |
|
fi |
361 |
|
AC_MSG_RESULT([$yasm_minor]) |
362 |
|
|
363 |
|
dnl Actually, yasm >= 0.7.99.2161 should be ok |
364 |
|
dnl But I'm too lazy to check also the patch version... |
365 |
|
if test "$yasm_minor" -lt "$minimum_yasm_minor_version" ; then |
366 |
|
AC_MSG_WARN([yasm version is too old]) |
367 |
|
else |
368 |
|
found_nasm_comp_prog="yes" |
369 |
|
chosen_asm_prog="$yasm_prog" |
370 |
|
fi |
371 |
|
fi |
372 |
|
|
373 |
dnl Check for nasm (not buggy version) |
dnl Check for nasm (not buggy version) |
374 |
if test "$found_nasm_comp_prog" = "no" ; then |
if test "$found_nasm_comp_prog" = "no" ; then |
375 |
AC_CHECK_PROG([ac_nasm], [$nasm_prog], [yes], [no], , [yes]) |
AC_CHECK_PROG([ac_nasm], [$nasm_prog], [yes], [no], , [yes]) |
455 |
dnl and GNU gcc with very slight changes to code which can be sumed up by: |
dnl and GNU gcc with very slight changes to code which can be sumed up by: |
456 |
dnl |
dnl |
457 |
dnl Apple: |
dnl Apple: |
458 |
dnl - compile with the option -faltivec |
dnl - compile with the option -arch ppc -faltivec |
459 |
dnl - define vectors with parentheses vec = (0,0,0,0) |
dnl - define vectors with parentheses vec = (0,0,0,0) |
460 |
dnl GNU |
dnl GNU |
461 |
dnl - compile with -maltivec -mabi=altivec |
dnl - compile with -maltivec -mabi=altivec |
480 |
#include <altivec.h> |
#include <altivec.h> |
481 |
int main() { return(0); } |
int main() { return(0); } |
482 |
EOF |
EOF |
483 |
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 || \ |
484 |
$CC -maltivec -mabi=altivec -c conftest.c 2>/dev/null 1>/dev/null ; then |
$CC -maltivec -mabi=altivec -c conftest.c 2>/dev/null 1>/dev/null ; then |
485 |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(yes) |
486 |
SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_ALTIVEC_H" |
SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_ALTIVEC_H" |
504 |
return(0); |
return(0); |
505 |
} |
} |
506 |
EOF |
EOF |
507 |
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 |
508 |
AC_MSG_RESULT([yes (Apple)]) |
AC_MSG_RESULT([yes (Apple)]) |
509 |
SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -faltivec -DHAVE_ALTIVEC_PARENTHESES_DECL $TEMP_ALTIVEC" |
SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -arch ppc -faltivec -DHAVE_ALTIVEC_PARENTHESES_DECL $TEMP_ALTIVEC" |
510 |
PPC_ALTIVEC_SOURCES="SRC_PPC_ALTIVEC" |
PPC_ALTIVEC_SOURCES="SRC_PPC_ALTIVEC" |
511 |
else |
else |
512 |
cat > conftest.c << EOF |
cat > conftest.c << EOF |