📄 configure.in
字号:
dnl Process this file with autoconf to produce a configure script.AC_PREREQ(2.54)AC_INITAC_CONFIG_SRCDIR([src/mpeg2dec.c])AC_CONFIG_AUX_DIR(autotools)AC_CONFIG_FILES([Makefile autotools/Makefile include/Makefile test/Makefile doc/Makefile src/Makefile libmpeg2/Makefile libmpeg2/convert/Makefile libvo/Makefile vc++/Makefile libmpeg2/libmpeg2.pc libmpeg2/convert/libmpeg2convert.pc])AM_INIT_AUTOMAKE([mpeg2dec],[0.4.1])AC_CONFIG_HEADERS([include/config.h])AM_MAINTAINER_MODEAC_CANONICAL_HOSTdnl Checks for compilerAC_PROG_CCAC_PROG_GCC_TRADITIONALdnl Checks for headers. We do this before the CC-specific section becausednl autoconf generates tests for generic headers before the first header test.AC_CHECK_HEADERS([sys/time.h time.h sys/timeb.h io.h])dnl CC-specific flagsAC_SUBST([OPT_CFLAGS])AC_SUBST([ARCH_OPT_CFLAGS])if test x"$CC" = x"checkergcc"; then enable_sdl=noelif test x"$GCC" = x"yes"; then dnl GCC-specific flags dnl -Wall dnl -Werror moved to the end to not disturb the configure script TRY_CFLAGS="$OPT_CFLAGS -Wall" AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]) dnl -O3 changequote(<<,>>) TRY_CFLAGS=`echo "$OPT_CFLAGS $CFLAGS"|sed "s/-O[0-9]*//g"` changequote([,]) TRY_CFLAGS="$TRY_CFLAGS -O3" AC_TRY_CFLAGS([$TRY_CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"; CFLAGS=""]) AC_ARG_ENABLE([debug], [ --enable-debug debug mode configuration]) if test x"$enable_debug" = x"yes"; then AC_DEFINE([DEBUG],,[debug mode configuration]) else dnl -fomit-frame-pointer TRY_CFLAGS="$OPT_CFLAGS -fomit-frame-pointer" AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]) fi dnl -fno-common TRY_CFLAGS="$OPT_CFLAGS -fno-common" AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]) dnl arch-specific flags case "$host" in i?86-* | k?-* | x86_64-* | amd64-*) AC_DEFINE([ARCH_X86],,[x86 architecture]) case "$host" in i386-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=i386";; i486-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=i486";; i586-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=pentium";; i686-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=pentiumpro";; k6-*) TRY_CFLAGS="$OPT_CFLAGS -mcpu=k6";; esac AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]);; ppc-* | powerpc-*) have_altivec=no for TRY_CFLAGS in "-mpim-altivec -force_cpusubtype_ALL" -faltivec -maltivec -fvec; do AC_TRY_CFLAGS([$OPT_CFLAGS $TRY_CFLAGS $CFLAGS], [save_CFLAGS="$CFLAGS" CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS" AC_MSG_CHECKING([if <altivec.h> is needed]) AC_TRY_COMPILE([], [typedef vector int t; vec_ld(0, (unsigned char *)0);], [have_altivec=yes; AC_MSG_RESULT(no)], [AC_TRY_COMPILE([#include <altivec.h>], [typedef vector int t; vec_ld(0, (unsigned char *)0);], [AC_DEFINE([HAVE_ALTIVEC_H],, [Define to 1 if you have the <altivec.h> header.]) have_altivec=yes; AC_MSG_RESULT(yes)], [AC_MSG_RESULT(unsupported)])]) CFLAGS="$save_CFLAGS"]) if test "$have_altivec" = "yes"; then ARCH_OPT_CFLAGS="$TRY_CFLAGS" AC_DEFINE([ARCH_PPC],,[ppc architecture]) break fi done;; sparc-* | sparc64-*) AC_DEFINE([ARCH_SPARC],,[sparc architecture]) TRY_CFLAGS="$OPT_CFLAGS -mcpu=ultrasparc -mvis" AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]);; alpha*) AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);; esacelif test x"$CC" = x"tendracc"; then dnl TenDRA portability checking compiler TENDRA=yes OPT_CFLAGS="-Xp -Yansi -f`pwd`/include/tendra.h -DELIDE_CODE" no_x=yes enable_sdl=noelif test x"$CC" = x"icc" -a x"`$CC -V 2>&1 | grep Intel`" != x""; then dnl Intel C++ compiler OPT_CFLAGS="-g -O3 -unroll -ip"; CFLAGS=""else dnl non-gcc flags - we probably need exact configuration triplets here. case "$host" in sparc-sun-solaris*) TRY_CFLAGS="$OPT_CFLAGS -xCC -fast -xO5" AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"]);; esacfidnl Checks for libtool - this must be done after we set cflagsAC_DISABLE_SHAREDAC_LIBTOOL_WIN32_DLLAC_PROG_LIBTOOLdnl Checks for libraries.dnl Checks for header files.INCLUDES='-I$(top_srcdir)/include -I$(top_builddir)/include'AC_SUBST([INCLUDES])AC_HEADER_TIMEAC_CHECK_TYPES([struct timeval], [], [], [#include <sys/time.h> #include <time.h>])AC_CHECK_GENERATE_INTTYPES([include])dnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_C_ALWAYS_INLINEAC_C_RESTRICTAC_C_BUILTIN_EXPECTAC_C_BIGENDIANAC_C_VOLATILEAC_TYPE_SIZE_TAC_TYPE_SIGNALAC_SYS_LARGEFILEdnl Checks for library functions.AC_CHECK_FUNCS([gettimeofday ftime])builtin([include],[libmpeg2/configure.incl])builtin([include],[libvo/configure.incl])AC_ARG_ENABLE([warnings], [ --enable-warnings treat warnings as errors])if test x"$enable_warnings" = x"yes" -a x"$GCC" = x"yes"; then dnl compiler warnings TRY_CFLAGS="$OPT_CFLAGS -Werror" AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])elif test x"$TENDRA" = x"yes"; then dnl TenDRA portability checking compiler OPT_CFLAGS="$OPT_CFLAGS -DTenDRA_check"fibuiltin([include],[src/configure.incl])AC_C_ATTRIBUTE_ALIGNEDAC_OUTPUT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -