Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__H264__App
diff ffmpeg_smp/h264dec/configure.ac @ 1:11d15c47beaf
add h264 decoder code
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 27 Aug 2012 12:09:56 +0200 |
| parents | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ffmpeg_smp/h264dec/configure.ac Mon Aug 27 12:09:56 2012 +0200 1.3 @@ -0,0 +1,171 @@ 1.4 +# -*- Autoconf -*- 1.5 +# Process this file with autoconf to produce a configure script. 1.6 + 1.7 +AC_PREREQ(2.61) 1.8 +AC_INIT([h264_mt], [0.1], [cchi@cs.tu-berlin.de]) 1.9 +#AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) 1.10 +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) 1.11 + 1.12 +AC_CONFIG_SRCDIR([h264dec.c]) 1.13 +AC_PROG_RANLIB 1.14 + 1.15 +# Checks for programs. 1.16 +AC_GNU_SOURCE 1.17 +AC_PROG_CC 1.18 +AM_CONDITIONAL([HAVE_OMPSS], [test $CC = "sscc"]) 1.19 +AC_DEFINE([OMPSS], [0], [Define to 1 on when using the OmpSs compiler sscc]) 1.20 +if test $CC = "sscc";then 1.21 +AC_DEFINE([OMPSS], [1], [Define to 1 on when using the OmpSs compiler sscc]) 1.22 +fi 1.23 + 1.24 +#if [ test -n "${CFLAGS+x}" ] ; then 1.25 +# CFLAGS="-O3 -g" 1.26 +#fi 1.27 + 1.28 +# Checks for libraries. 1.29 +AC_CHECK_LIB([pthread], [pthread_yield]) 1.30 +AC_CHECK_LIB([spe2], [spe_image_open]) 1.31 +AC_CHECK_LIB([sync], [mutex_init]) 1.32 +AC_CHECK_LIB([rt], [clock_gettime]) 1.33 + 1.34 +AC_ARG_ENABLE([sdl2], AS_HELP_STRING([--enable-sdl2], [Enable SDL2 playback])) 1.35 +if test "$enable_sdl2" = "yes"; then 1.36 + AC_CHECK_LIB([SDL2], [SDL_CreateWindow], [], [echo "Error! libSDL2 required for playback." exit -1]) 1.37 +fi 1.38 + 1.39 +if test "$enable_sdl2" = "yes"; then 1.40 + AC_CHECK_LIB([X11], [XInitThreads], [], [echo "Error! libX11 currently required for SDL2 workaround." exit -1]) 1.41 +fi 1.42 + 1.43 +AC_ARG_ENABLE([sdl_ttf], AS_HELP_STRING([--enable-sdl_ttf], [Enable SDL_ttf for overlaying fonts])) 1.44 +if test "$enable_sdl_ttf" = "yes"; then 1.45 + AC_CHECK_LIB([SDL_ttf], [TTF_Init], [], [echo "Error! libSDL_ttf required for font rendering." exit -1]) 1.46 +fi 1.47 + 1.48 + 1.49 + 1.50 +AC_ARG_ENABLE([opencl], AS_HELP_STRING([--enable-opencl], [Enable GPU decoder])) 1.51 +if test "$enable_opencl" = "yes"; then 1.52 + AC_CHECK_LIB([OpenCL], [clGetPlatformIDs], [], [echo "Error! libOpenCL required for GPU functionality." exit -1]) 1.53 +fi 1.54 +AM_CONDITIONAL([HAVE_OPENCL], [test "$enable_opencl" = "yes"]) 1.55 + 1.56 + 1.57 +# Checks for header files. 1.58 +AC_HEADER_STDC 1.59 +AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h]) 1.60 + 1.61 +# Checks for typedefs, structures, and compiler characteristics. 1.62 +AC_C_CONST 1.63 +AC_TYPE_UINT32_T 1.64 +AC_TYPE_UINT64_T 1.65 +AC_TYPE_UINT8_T 1.66 +AC_C_VOLATILE 1.67 +AC_C_BIGENDIAN 1.68 + 1.69 +# Checks for library functions. 1.70 +AC_CHECK_FUNCS([malloc realloc memalign posix_memalign memmove memset]) 1.71 + 1.72 +AC_CANONICAL_HOST 1.73 +AC_CANONICAL_BUILD 1.74 + 1.75 +AC_MSG_CHECKING([for architecture]) 1.76 + 1.77 +AC_DEFINE([ARCH_ARM], [0], [Define to 1 on arm architectures.]) 1.78 +AC_DEFINE([ARCH_X86_32], [0], [Define to 1 on x86 architectures.]) 1.79 +AC_DEFINE([ARCH_X86_64], [0], [Define to 1 on x86_64 architectures.]) 1.80 +AC_DEFINE([ARCH_X86], [ARCH_X86_32 ||ARCH_X86_64], [True on x86]) 1.81 +AC_DEFINE([ARCH_PPC], [0], [Define to 1 on ppc architectures.]) 1.82 +AC_DEFINE([ARCH_PPC64], [0], [Define to 1 on ppc64 architectures.]) 1.83 +AC_DEFINE([ARCH_CELL], [0], [Define to 1 on cell architectures.]) 1.84 + 1.85 +if test "$enable_optimizations" != "no"; then 1.86 + case $build_cpu in 1.87 + arm ) 1.88 + arch="arm" 1.89 + AC_MSG_RESULT([arm]) 1.90 + AC_DEFINE([ARCH_ARM], [1], [Define to 1 on arm architectures.]) 1.91 + ;; 1.92 + i686 ) 1.93 + arch="x86" 1.94 + AC_MSG_RESULT([x86]) 1.95 + AC_DEFINE([ARCH_X86_32], [1], [Define to 1 on x86 architectures.]) 1.96 + ;; 1.97 + x86_64 ) 1.98 + arch="x86_64" 1.99 + AC_MSG_RESULT([x86_64]) 1.100 + AC_DEFINE([ARCH_X86_64], [1], [Define to 1 on x86 architectures.]) 1.101 + ;; 1.102 + powerpc64 ) 1.103 + AC_DEFINE([HAVE_BIGENDIAN], [1], [Define to 1 on bigendian architectures.]) 1.104 + if grep -E ^cpu /proc/cpuinfo | grep -q Cell ; then 1.105 + arch="cell" 1.106 + AC_MSG_RESULT([cell]) 1.107 + AC_DEFINE([ARCH_CELL], [1], [Define to 1 on cell architectures.]) 1.108 + else 1.109 + arch="powerpc64" 1.110 + AC_MSG_RESULT([ppc64]) 1.111 + AC_DEFINE([ARCH_PPC64], [1], [Define to 1 on ppc64 architectures.]) 1.112 + fi 1.113 + ;; 1.114 + * ) 1.115 + AC_MSG_RESULT([default (little endian).]) 1.116 + ;; 1.117 + esac 1.118 +fi 1.119 + 1.120 +AM_CONDITIONAL([HAVE_CELL], [test $arch = "cell"]) 1.121 + 1.122 +# Additional options 1.123 +AC_ARG_ENABLE([optimizations], AS_HELP_STRING([--disable-optimizations], [Disable all architecture specific optimizations. Compiler optimizations are not disabled.])) 1.124 + 1.125 +AC_DEFINE([HAVE_SSE], [0], [Define to 1 to enable sse optimizations.]) 1.126 +AC_DEFINE([HAVE_MMX], [0], [Define to 1 to enable mmx optimizations.]) 1.127 +AC_DEFINE([HAVE_MMX2], [0], [Define to 1 to enable mmx2 optimizations.]) 1.128 +AC_DEFINE([HAVE_SSSE3], [0], [Define to 1 to enable ssse3 optimizations.]) 1.129 +AC_DEFINE([HAVE_ALTIVEC], [0], [Define to 1 to enable altivec optimizations.]) 1.130 +AC_DEFINE([HAVE_NEON], [0], [Define to 1 to enable neon optimizations.]) 1.131 + 1.132 +AC_ARG_ENABLE([ssse3], AS_HELP_STRING([--enable-ssse3], [Enable ssse3 optimizations])) 1.133 +if test "$enable_ssse3" = "yes"; then 1.134 + AC_DEFINE([HAVE_SSSE3], [1], [Define to 1 to enable ssse3 optimizations.]) 1.135 + AC_DEFINE([HAVE_SSE], [1], [Define to 1 to enable sse optimizations.]) 1.136 + AC_DEFINE([HAVE_MMX], [1], [Define to 1 to enable mmx optimizations.]) 1.137 + AC_DEFINE([HAVE_MMX2], [1], [Define to 1 to enable mmx2 optimizations.]) 1.138 + ARCH_SUBDIR=x86 1.139 +fi 1.140 + 1.141 +AC_ARG_ENABLE([sse], AS_HELP_STRING([--enable-sse], [Enable sse optimizations])) 1.142 +if test "$enable_sse" = "yes"; then 1.143 + AC_DEFINE([HAVE_SSE], [1], [Define to 1 to enable sse optimizations.]) 1.144 + AC_DEFINE([HAVE_MMX], [1], [Define to 1 to enable mmx optimizations.]) 1.145 + AC_DEFINE([HAVE_MMX2], [1], [Define to 1 to enable mmx2 optimizations.]) 1.146 + ARCH_SUBDIR=x86 1.147 +fi 1.148 + 1.149 +AC_ARG_ENABLE([altivec], AS_HELP_STRING([--enable-altivec], [Enable altivec optimizations])) 1.150 +if test "$enable_altivec" = "yes"; then 1.151 + AC_DEFINE([HAVE_ALTIVEC], [1], [Define to 1 to enable altivec optimizations.]) 1.152 + ARCH_SUBDIR="$ARCH_SUBDIR ppc" 1.153 + TMPCLAGS=$CFLAGS 1.154 + CFLAGS="$CFLAGS -maltivec" 1.155 + AC_CHECK_HEADERS(altivec.h) 1.156 + CFLAGS=$TMPCLAGS 1.157 +fi 1.158 + 1.159 +AC_ARG_ENABLE([neon], AS_HELP_STRING([--enable-neon], [Enable neon optimizations])) 1.160 +if test "$enable_neon" = "yes"; then 1.161 + AC_DEFINE([HAVE_NEON], [1], [Define to 1 to enable neon optimizations.]) 1.162 + ARCH_SUBDIR=arm 1.163 +fi 1.164 + 1.165 +AM_CONDITIONAL([HAVE_ARCH_SUBDIR], [test "$ARCH_SUBDIR" != ""]) 1.166 +AC_SUBST([ARCH_SUBDIR]) 1.167 + 1.168 +AC_DEFINE([HAVE_NEON], [0], [Define to 1 to enable neon optimizations.]) 1.169 + 1.170 +AC_CONFIG_HEADER([config.h]) 1.171 + 1.172 +AC_CONFIG_FILES([Makefile libavutil/Makefile libavcodec/Makefile libavcodec/x86/Makefile libavcodec/ppc/Makefile libavcodec/cell/Makefile]) 1.173 + 1.174 +AC_OUTPUT
