--- trunk/xvidcore/build/generic/configure.in 2011/02/25 13:10:18 1957 +++ trunk/xvidcore/build/generic/configure.in 2011/08/19 16:15:21 2027 @@ -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], @@ -224,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" @@ -268,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)" @@ -406,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" @@ -592,7 +605,8 @@ dnl dnl ========================================================================== -AC_CHECK_HEADER( +if test x"$pthread" = x"yes" ; then + AC_CHECK_HEADER( [pthread.h], [AC_CHECK_LIB( [pthread], @@ -601,6 +615,9 @@ 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 @@ -690,6 +707,7 @@ AC_SUBST(ASSEMBLY_SOURCES) AC_SUBST(CC) AC_SUBST(CFLAGS) +AC_SUBST(LDFLAGS) AC_SUBST(SPECIFIC_LDFLAGS) AC_SUBST(SPECIFIC_CFLAGS) AC_SUBST(DCT_IA64_SOURCES)