--- trunk/xvidcore/build/generic/configure.in 2003/02/11 12:45:52 829 +++ trunk/xvidcore/build/generic/configure.in 2003/02/11 21:56:31 830 @@ -6,7 +6,7 @@ dnl dnl ========================================================================== -AC_INIT([XviD], [0.9.1 (wip)], [xvid-devel@xvid.org]) +AC_INIT([XviD], [0.9.1 RC1], [xvid-devel@xvid.org]) AC_CONFIG_SRCDIR(configure.in) dnl NASM version requirement @@ -16,7 +16,6 @@ dnl Default CFLAGS -- Big impact on overall speed our_cflags_defaults="-Wall" our_cflags_defaults="$our_cflags_defaults -O2" -our_cflags_defaults="$our_cflags_defaults -fPIC" our_cflags_defaults="$our_cflags_defaults -fomit-frame-pointer" our_cflags_defaults="$our_cflags_defaults -ffast-math" our_cflags_defaults="$our_cflags_defaults -funroll-loops" @@ -29,6 +28,8 @@ FEATURES="" DIVX4COMPAT_SOURCES="" +DIVX4_ENCORE="" +DIVX4_DECORE="" dnl BIGLUT aka old VLC code AC_ARG_ENABLE(oldvlc, @@ -73,6 +74,8 @@ [Enable DivX4 compatibility API]), [if test "$enable_divx4compat" = "yes" ; then DIVX4COMPAT_SOURCES="SRC_DIVX4COMPAT" + DIVX4_ENCORE="encore;" + DIVX4_DECORE="decore;" fi]) @@ -99,7 +102,6 @@ AC_MSG_CHECKING(whether to use default CFLAGS) if test x"$CFLAGS" = x"" ; then force_default_cc_options="yes" - CFLAGS="$our_cflags_defaults" AC_MSG_RESULT([yes]) else force_default_cc_options="no" @@ -116,6 +118,12 @@ AC_PROG_INSTALL dnl ========================================================================== +dnl Check for the ranlib program to generate static library index +dnl ========================================================================== + +AC_PROG_RANLIB + +dnl ========================================================================== dnl dnl This part looks for: dnl @@ -234,29 +242,33 @@ esac AC_MSG_CHECKING(for platform specific LDFLAGS/CFLAGS) -OS_LDFLAGS="" +SPECIFIC_LDFLAGS="" +SPECIFIC_CFLAGS="" case "$target_os" in *bsd*|linux*|irix*|solaris*) AC_MSG_RESULT([-shared -lc -lm]) - OS_LDFLAGS="-shared -lc -lm" + SPECIFIC_LDFLAGS="-shared -lc -lm" + SPECIFIC_CFLAGS="-fPIC" ;; [[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]|mingw32|mks) AC_MSG_RESULT([-shared -Wl,--dll,--out-implib,\$@.a]) - OS_LDFLAGS="-shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def" - CFLAGS="$CFLAGS -mno-cygwin" + SPECIFIC_LDFLAGS="-shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def" + SPECIFIC_CFLAGS="-mno-cygwin" ;; darwin*|raphsody*) - AC_MSG_RESULT([-dynamiclib]) - OS_LDFLAGS="-dynamiclib -flat_namespace" - CFLAGS="$CFLAGS -fno-common" + AC_MSG_RESULT([-dynamiclib -flat_namespace]) + SPECIFIC_LDFLAGS="-dynamiclib -flat_namespace" + SPECIFIC_CFLAGS="-fPIC -fno-common" ;; beos) AC_MSG_RESULT([-nostart]) - OS_LDFLAGS="-nostart" + SPECIFIC_LDFLAGS="-nostart" + SPECIFIC_CFLAGS="-fPIC" ;; *) AC_MSG_RESULT([Unknown OS - -shared -lc -lm]) - OS_LDFLAGS="" + SPECIFIC_LDFLAGS="" + SPECIFIC_CFLAGS="" ;; esac @@ -342,7 +354,7 @@ EOF if $CC -c conftest.S 2>/dev/null 1>/dev/null ; then AC_MSG_RESULT(yes) - CFLAGS="$CFLAGS -DARCH_IS_PPC_ALTIVEC" + SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DARCH_IS_PPC_ALTIVEC" ASSEMBLY_SOURCES="SRC_ALTIVEC" else AC_MSG_RESULT(no) @@ -359,6 +371,22 @@ AFLAGS="-c" ASSEMBLY_EXTENSION="s" ASSEMBLY_SOURCES="SRC_IA64" + + case `basename $CC` in + *ecc*) + DCT_IA64_SOURCES="idct_ia64_ecc.s" + + dnl If the compiler is ecc, then i don't know its options + dnl fallback to "no options" + if test "$force_default_cc_options" = "yes" ; then + our_cflags_defaults="" + fi + ;; + *) + DCT_IA64_SOURCES="idct_ia64_gcc.s" + ;; + esac + fi dnl ========================================================================== @@ -374,6 +402,16 @@ dnl ========================================================================== dnl +dnl Now we can set CFLAGS if needed +dnl +dnl ========================================================================== + +if test "$force_default_cc_options" = "yes" ; then + CFLAGS="$our_cflags_defaults" +fi + +dnl ========================================================================== +dnl dnl Substitions dnl dnl ========================================================================== @@ -393,8 +431,13 @@ AC_SUBST(ASSEMBLY_SOURCES) AC_SUBST(CC) AC_SUBST(CFLAGS) -AC_SUBST(OS_LDFLAGS) +AC_SUBST(SPECIFIC_LDFLAGS) +AC_SUBST(SPECIFIC_CFLAGS) AC_SUBST(DIVX4COMPAT_SOURCES) +AC_SUBST(DCT_IA64_SOURCES) +AC_SUBST(DIVX4_ENCORE) +AC_SUBST(DIVX4_DECORE) +AC_SUBST(RANLIB) dnl ========================================================================== dnl @@ -403,5 +446,6 @@ dnl ========================================================================== AC_CONFIG_FILES(platform.inc) +AC_CONFIG_FILES(libxvidcore.def) AC_OUTPUT