--- branches/release-1_3-branch/xvidcore/build/generic/configure.in 2011/01/06 14:12:29 1942 +++ branches/release-1_3-branch/xvidcore/build/generic/configure.in 2011/07/28 07:48:49 2026 @@ -8,7 +8,7 @@ AC_PREREQ([2.50]) -AC_INIT([Xvid], [1.3.0], [xvid-devel@xvid.org]) +AC_INIT([Xvid], [1.3.2], [xvid-devel@xvid.org]) AC_CONFIG_SRCDIR(configure.in) dnl Do not forget to increase that when needed. @@ -74,6 +74,19 @@ fi], [assembly="yes"]) +dnl pthread code +AC_ARG_ENABLE(pthread, + AC_HELP_STRING([--disable-pthread], + [Disable pthread dependent code]), + [if test "$enable_pthread" = "no" ; then + pthread="no" + else + if test "$enable_pthread" = "yes" ; then + pthread="yes" + fi + fi], + [pthread="yes"]) + dnl Build as a module not a shared lib on darwin AC_ARG_ENABLE(macosx_module, AC_HELP_STRING([--enable-macosx_module], @@ -128,6 +141,7 @@ dnl ========================================================================== AC_PROG_RANLIB +AC_CHECK_TOOL([AR], [ar], [ar-not-found]) dnl ========================================================================== dnl @@ -223,7 +237,7 @@ STATIC_EXTENSION="" OBJECT_EXTENSION="" case "$target_os" in - *bsd*|linux*|beos|irix*|solaris*) + *bsd*|linux*|beos|irix*|solaris*|gnu*) AC_MSG_RESULT([.so .a .o]) STATIC_EXTENSION="a" SHARED_EXTENSION="so" @@ -267,7 +281,7 @@ ALTIVEC_CFLAGS="" PRE_SHARED_LIB="" case "$target_os" in - linux*|solaris*) + linux*|solaris*|gnu*) AC_MSG_RESULT([ok]) STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\$(API_MINOR)" @@ -405,7 +419,7 @@ if test "$found_nasm_comp_prog" = "yes" ; then AC_MSG_CHECKING([for asm object format]) case "$target_os" in - *bsd*|linux*|beos|irix*|solaris*) + *bsd*|linux*|beos|irix*|solaris*|gnu*) if test "$ARCHITECTURE" = "X86_64" ; then AC_MSG_RESULT([elf64]) NASM_FORMAT="elf64" @@ -591,15 +605,19 @@ dnl dnl ========================================================================== -AC_CHECK_HEADER( - pthread.h, - AC_CHECK_LIB( - pthread, - pthread_create, - SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_PTHREAD" - SPECIFIC_LDFLAGS="$SPECIFIC_LDFLAGS -lpthread", - AC_MSG_WARN(Pthread not supported. No SMP support)), +if test x"$pthread" = x"yes" ; then + AC_CHECK_HEADER( + [pthread.h], + [AC_CHECK_LIB( + [pthread], + [pthread_create], + [SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_PTHREAD" + SPECIFIC_LDFLAGS="$SPECIFIC_LDFLAGS -lpthread"], + AC_MSG_WARN(Pthread not supported. No SMP support))], AC_MSG_WARN(Pthread not supported. No SMP support)) +else + AC_MSG_WARN(Pthread support disabled. No SMP support) +fi dnl ========================================================================== dnl @@ -694,6 +712,7 @@ AC_SUBST(DCT_IA64_SOURCES) AC_SUBST(PPC_ALTIVEC_SOURCES) AC_SUBST(RANLIB) +AC_SUBST(AR) AC_SUBST(API_MAJOR) AC_SUBST(API_MINOR) AC_SUBST(STATIC_LIB)