⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 mpeg4代码,比较具体
💻 IN
字号:
dnl ==========================================================================dnldnl Autoconf script for XviDdnldnl Copyright(C) 2003 Edouard Gomez <ed.gomez@free.fr>dnldnl ==========================================================================AC_INIT([XviD], [0.9.2], [xvid-devel@xvid.org])AC_CONFIG_SRCDIR(configure.in)dnl Do not forget to increase that when needed.API_MAJOR="2"API_MINOR="1"dnl NASM version requirementminimum_nasm_patch_version=34nasm_prog="nasm"dnl Default CFLAGS -- Big impact on overall speedour_cflags_defaults="-Wall"our_cflags_defaults="$our_cflags_defaults -O2"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"our_cflags_defaults="$our_cflags_defaults -fschedule-insns"our_cflags_defaults="$our_cflags_defaults -fschedule-insns2"dnl ==========================================================================dnl Features - configure optionsdnl ==========================================================================FEATURES=""DIVX4COMPAT_SOURCES=""DIVX4_ENCORE=""DIVX4_DECORE=""dnl BIGLUT aka old VLC codeAC_ARG_ENABLE(oldvlc,		AC_HELP_STRING([--enable-oldvlc],				 [Enable old VLC code (Needs much more memory ~10MB)]),		[if test "$enable_oldvlc" = "yes" ; then		    FEATURES="$FEATURES -DBIGLUT"		 fi])dnl Internal DebugAC_ARG_ENABLE(idebug,		AC_HELP_STRING([--enable-idebug],				 [Enable internal debug function]),		 [if test "$enable_idebug" = "yes" ; then		     FEATURES="$FEATURES -D_DEBUG"		  fi])dnl Internal ProfileAC_ARG_ENABLE(iprofile,		AC_HELP_STRING([--enable-iprofile],				 [Enable internal profiling]),		 [if test "$enable_iprofile" = "yes" ; then		     FEATURES="$FEATURES -D_PROFILING_"		  fi])dnl Assembly codeAC_ARG_ENABLE(assembly,		AC_HELP_STRING([--disable-assembly],				 [Disable assembly code]),		 [if test "$enable_assembly" = "no" ; then		     assembly="no"		  else		     if test "$enable_assembly" = "yes" ; then			assembly="yes"		     fi		  fi],		 [assembly="yes"])dnl Build as a module not a shared lib on darwinAC_ARG_ENABLE(macosx_module,		AC_HELP_STRING([--enable-macosx_module],				 [Build as a module on MacOS X]),		 [if test "$enable_macosx_module" = "yes" ; then		     macosx_module="yes"		  else 		     macosx_module="no"		  fi])dnl Internal DebugAC_ARG_ENABLE(divx4compat,		AC_HELP_STRING([--enable-divx4compat],				 [Enable DivX4 compatibility API]),		 [if test "$enable_divx4compat" = "yes" ; then		     DIVX4COMPAT_SOURCES="SRC_DIVX4COMPAT"		     DIVX4_ENCORE="encore;"		     DIVX4_DECORE="decore;"		  fi])dnl ==========================================================================dnl Default install prefix and checks build typednl ==========================================================================AC_PREFIX_DEFAULT("/usr/local")AC_CANONICAL_BUILDAC_CANONICAL_HOSTAC_CANONICAL_TARGETdnl ==========================================================================dnl Check for the C compiler (could be passed on command line)dnl ==========================================================================dnldnl First we test if CFLAGS have been passed on command linednl I do that because autoconf defaults (-g -O2) suck and they would killdnl performance. To prevent that we define a good defult CFLAGS at the enddnl of the script if and only if CFLAGS has not been passed on the commanddnl linednlAC_MSG_CHECKING(whether to use default CFLAGS)if test  x"$CFLAGS" = x"" ; then   force_default_cc_options="yes"   AC_MSG_RESULT([yes])else   force_default_cc_options="no"   AC_MSG_RESULT([no])fidnl Now we can safely check for the C compilerAC_PROG_CCdnl ==========================================================================dnl Check for the install programdnl ==========================================================================AC_PROG_INSTALLdnl ==========================================================================dnl Check for the ranlib program to generate static library indexdnl ==========================================================================AC_PROG_RANLIBdnl ==========================================================================dnldnl This part looks for:dnldnl ARCHITECTURE : The platform architecturednl                - IA32 for mmx, mmx-ext, mmx2, sse assemblydnl                - IA64dnl                - PPC for PowerPC assembly routinesdnl                - GENERIC for plain C sources onlydnldnl BUS: Address bus size (in bits)dnl      - 32dnl      - 64dnldnl ENDIANNESS: I think you can guess what this thing means :-)dnl             - LITTLE_ENDIANdnl             - BIG_ENDIANdnldnl ==========================================================================dnldnl Looking what sources have to be compiled according to the CPU typednlARCHITECTURE=""AC_MSG_CHECKING([for whether to use assembly code])if test x"$assembly" = x"yes" ; then   AC_MSG_RESULT([yes])   AC_MSG_CHECKING([for architecture type])   case "$target_cpu" in	  i[[3456]]86)	  AC_MSG_RESULT(ia32)	  	ARCHITECTURE="IA32"		;;			powerpc)		AC_MSG_RESULT(PowerPC)		dnl ATM the ppc port is out of date 		dnl ARCHITECTURE="PPC"		ARCHITECTURE="GENERIC"		;;		ia64)		AC_MSG_RESULT(ia64)		ARCHITECTURE="IA64"		;;		*)		AC_MSG_RESULT($target_cpu)		ARCHITECTURE="GENERIC"		;;   esacelse   AC_MSG_RESULT([no])   ARCHITECTURE="GENERIC"fidnldnl Testing address bus lengthdnlBUS=""AC_CHECK_SIZEOF([int *])case "$ac_cv_sizeof_int_p" in     4)	BUS="32BIT"	;;     8)	BUS="64BIT"	;;     *)	AC_MSG_ERROR([XviD supports only 32/64 bit architectures])	;;esacdnldnl Testing endiannessdnlENDIANNESS=""AC_C_BIGENDIAN(ENDIANNESS="BIG_ENDIAN", ENDIANNESS="LITTLE_ENDIAN")dnl ==========================================================================dnldnl Check for OS specific variablesdnl    - SHARED_EXTENSION, STATIC_EXTENSION, OBJECT_EXTENSIONdnldnl ==========================================================================AC_MSG_CHECKING(for build extensions)SHARED_EXTENSION=""STATIC_EXTENSION=""OBJECT_EXTENSION=""case "$target_os" in     *bsd*|linux*|beos|irix*|solaris*)	AC_MSG_RESULT([.so .a .o])	STATIC_EXTENSION="a"	SHARED_EXTENSION="so"	OBJECT_EXTENSION="o"	;;     [[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]|mingw32|mks)	AC_MSG_RESULT([.dll .a .obj])	STATIC_EXTENSION="a"	SHARED_EXTENSION="dll"	OBJECT_EXTENSION="obj"	;;     darwin*|raphsody*)	if test x"$macosx_module" = x"yes"; then	   AC_MSG_RESULT([.so .a .o])	   SHARED_EXTENSION="so"        else	   AC_MSG_RESULT([.dynlib .a .o])	   SHARED_EXTENSION="dylib"	fi	STATIC_EXTENSION="a"	OBJECT_EXTENSION="o"	;;     *)        AC_MSG_RESULT([Unknown OS - Using .so .a .o])	STATIC_EXTENSION="a"	SHARED_EXTENSION="so"	OBJECT_EXTENSION="o"	;;esacAC_MSG_CHECKING(for platform specific LDFLAGS/CFLAGS)SPECIFIC_LDFLAGS=""SPECIFIC_CFLAGS=""case "$target_os" in     *bsd*|linux*|irix*|solaris*)	AC_MSG_RESULT([-Wl,-soname,libxvidcore.so -shared -lc -lm])	STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"	SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\$(API_MINOR)"	SPECIFIC_LDFLAGS="-Wl,-soname,libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR) -shared -lc -lm"	SPECIFIC_CFLAGS="-fPIC"	;;     [[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]|mingw32|mks)	AC_MSG_RESULT([-shared -Wl,--dll,--out-implib,\$@.a])	STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"	SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)"	SPECIFIC_LDFLAGS="-mno-cygwin -shared -Wl,--dll,--out-implib,\$@.a libxvidcore.def"	SPECIFIC_CFLAGS="-mno-cygwin"	;;     darwin*|raphsody*)	STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"	SPECIFIC_CFLAGS="-fPIC -fno-common -no-cpp-precomp"	if test x"$macosx_module" = x"no"; then	   AC_MSG_RESULT([-dynamiclib -flat_namespace])	   SHARED_LIB="libxvidcore.\$(API_MAJOR).\$(SHARED_EXTENSION)"	   SPECIFIC_LDFLAGS="-dynamiclib -flat_namespace -compatibility_version \$(API_MAJOR) -current_version \$(API_MINOR) -install_name \$(libdir)/\$(SHARED_LIB)"	else 	   AC_MSG_RESULT(["-r -keep_private_externs -nostdlib -bundle -flat_namespace -undefined suppress])	   SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)-temp.o"	   SPECIFIC_LDFLAGS="-r -keep_private_externs -nostdlib && \$(CC) \$(LDFLAGS) \$(SHARED_LIB) -o libxvidcore.\$(SHARED_EXTENSION) -bundle -flat_namespace -undefined suppress"	fi	;;     beos)	STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"	SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)"	AC_MSG_RESULT([-nostart])	SPECIFIC_LDFLAGS="-nostart"	SPECIFIC_CFLAGS="-fPIC"	;;     *)        AC_MSG_RESULT([Unknown OS - -shared -lc -lm])	STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"	SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION)"	SPECIFIC_LDFLAGS=""	SPECIFIC_CFLAGS=""	;;esacdnl ==========================================================================dnldnl Assembler stuff - AS, AFLAGS, ASSEMBLY_EXTENSION, SOURCESdnldnl ==========================================================================AS=""AFLAGS=""ASSEMBLY_EXTENSION=""GENERIC_SOURCES="SRC_GENERIC"ASSEMBLY_SOURCES=""dnldnl IA32dnlif test "$ARCHITECTURE" = "IA32" ; then   dnl   dnl Checking nasm existence   dnl   AC_CHECK_PROG([ac_nasm], [$nasm_prog], [yes], [no], , [yes])   if test "$ac_nasm" = "yes" ; then      dnl      dnl Checking nasm patch version      dnl      AC_MSG_CHECKING([for nasm patch version])      nasm_patch=`nasm -r | cut -d '.' -f 3 | cut -d ' ' -f 1`      AC_MSG_RESULT([$nasm_patch])      if test "$nasm_patch" -lt "$minimum_nasm_patch_version" ; then        AC_MSG_WARN([nasm patch version too old - Compiling generic sources only])	ARCHITECTURE="GENERIC"      else         dnl         dnl Checking nasm format - win32 or elf         dnl         AC_MSG_CHECKING([for nasm object format])         case "$target_os" in              *bsd*|linux*|beos|irix*|solaris*)                  AC_MSG_RESULT([elf])                  NASM_FORMAT="elf"		  PREFIX=""                  ;;              [[cC]][[yY]][[gG]][[wW]][[iI]][[nN]]|mingw32|mks)                  AC_MSG_RESULT([win32])                  NASM_FORMAT="win32"		  PREFIX="-DPREFIX"                  ;;          esac          AS=nasm          AFLAGS="-I\$(<D) -f $NASM_FORMAT $PREFIX"          ASSEMBLY_EXTENSION="asm"          ASSEMBLY_SOURCES="SRC_IA32"       fi   else	AC_MSG_WARN([nasm not found - Compiling generic sources only])	ARCHITECTURE="GENERIC"   fifidnldnl PPCdnlif test "$ARCHITECTURE" = "PPC" ; then   AS="\$(CC)"   AFLAGS="-c"   ASSEMBLY_EXTENSION="s"   ASSEMBLY_SOURCES="SRC_PPC"   AC_MSG_CHECKING([for Altivec support])   cat > conftest.S << EOF         .text         vxor 0,0,0EOF   if $CC -c conftest.S 2>/dev/null 1>/dev/null ; then        AC_MSG_RESULT(yes)        SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DARCH_IS_PPC_ALTIVEC"        ASSEMBLY_SOURCES="SRC_ALTIVEC"   else        AC_MSG_RESULT(no)   fi   rm -f conftest.*fidnldnl IA64dnlif test "$ARCHITECTURE" = "IA64" ; then   AS="\$(CC)"   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"		;;   esacfidnl ==========================================================================dnldnl Check for header filesdnldnl ==========================================================================AC_CHECK_HEADERS(	stdio.h \	signal.h \	, , AC_MSG_ERROR(Missing header file))dnl ==========================================================================dnldnl Now we can set CFLAGS if neededdnldnl ==========================================================================if test "$force_default_cc_options" = "yes" ; then   CFLAGS="$our_cflags_defaults"fidnl ==========================================================================dnldnl Substitionsdnldnl ==========================================================================AC_SUBST(FEATURES)AC_SUBST(ARCHITECTURE)AC_SUBST(BUS)AC_SUBST(ENDIANNESS)AC_SUBST(SHARED_EXTENSION)AC_SUBST(STATIC_EXTENSION)AC_SUBST(OBJECT_EXTENSION)AC_SUBST(NASM_FORMAT)AC_SUBST(AS)AC_SUBST(AFLAGS)AC_SUBST(ASSEMBLY_EXTENSION)AC_SUBST(GENERIC_SOURCES)AC_SUBST(ASSEMBLY_SOURCES)AC_SUBST(CC)AC_SUBST(CFLAGS)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)AC_SUBST(API_MAJOR)AC_SUBST(API_MINOR)AC_SUBST(STATIC_LIB)AC_SUBST(SHARED_LIB)dnl ==========================================================================dnldnl Output filesdnldnl ==========================================================================AC_CONFIG_FILES(platform.inc)AC_CONFIG_FILES(libxvidcore.def)AC_OUTPUT

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -