Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__H264__App
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:9d18bf0192d4 |
|---|---|
| 1 # -*- Autoconf -*- | |
| 2 # Process this file with autoconf to produce a configure script. | |
| 3 | |
| 4 AC_PREREQ(2.61) | |
| 5 AC_INIT([h264_mt], [0.1], [cchi@cs.tu-berlin.de]) | |
| 6 #AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) | |
| 7 AM_INIT_AUTOMAKE([-Wall -Werror foreign]) | |
| 8 | |
| 9 AC_CONFIG_SRCDIR([h264dec.c]) | |
| 10 AC_PROG_RANLIB | |
| 11 | |
| 12 # Checks for programs. | |
| 13 AC_GNU_SOURCE | |
| 14 AC_PROG_CC | |
| 15 AM_CONDITIONAL([HAVE_OMPSS], [test $CC = "sscc"]) | |
| 16 AC_DEFINE([OMPSS], [0], [Define to 1 on when using the OmpSs compiler sscc]) | |
| 17 if test $CC = "sscc";then | |
| 18 AC_DEFINE([OMPSS], [1], [Define to 1 on when using the OmpSs compiler sscc]) | |
| 19 fi | |
| 20 | |
| 21 #if [ test -n "${CFLAGS+x}" ] ; then | |
| 22 # CFLAGS="-O3 -g" | |
| 23 #fi | |
| 24 | |
| 25 # Checks for libraries. | |
| 26 AC_CHECK_LIB([pthread], [pthread_yield]) | |
| 27 AC_CHECK_LIB([spe2], [spe_image_open]) | |
| 28 AC_CHECK_LIB([sync], [mutex_init]) | |
| 29 AC_CHECK_LIB([rt], [clock_gettime]) | |
| 30 | |
| 31 AC_ARG_ENABLE([sdl2], AS_HELP_STRING([--enable-sdl2], [Enable SDL2 playback])) | |
| 32 if test "$enable_sdl2" = "yes"; then | |
| 33 AC_CHECK_LIB([SDL2], [SDL_CreateWindow], [], [echo "Error! libSDL2 required for playback." exit -1]) | |
| 34 fi | |
| 35 | |
| 36 if test "$enable_sdl2" = "yes"; then | |
| 37 AC_CHECK_LIB([X11], [XInitThreads], [], [echo "Error! libX11 currently required for SDL2 workaround." exit -1]) | |
| 38 fi | |
| 39 | |
| 40 AC_ARG_ENABLE([sdl_ttf], AS_HELP_STRING([--enable-sdl_ttf], [Enable SDL_ttf for overlaying fonts])) | |
| 41 if test "$enable_sdl_ttf" = "yes"; then | |
| 42 AC_CHECK_LIB([SDL_ttf], [TTF_Init], [], [echo "Error! libSDL_ttf required for font rendering." exit -1]) | |
| 43 fi | |
| 44 | |
| 45 | |
| 46 | |
| 47 AC_ARG_ENABLE([opencl], AS_HELP_STRING([--enable-opencl], [Enable GPU decoder])) | |
| 48 if test "$enable_opencl" = "yes"; then | |
| 49 AC_CHECK_LIB([OpenCL], [clGetPlatformIDs], [], [echo "Error! libOpenCL required for GPU functionality." exit -1]) | |
| 50 fi | |
| 51 AM_CONDITIONAL([HAVE_OPENCL], [test "$enable_opencl" = "yes"]) | |
| 52 | |
| 53 | |
| 54 # Checks for header files. | |
| 55 AC_HEADER_STDC | |
| 56 AC_CHECK_HEADERS([stdint.h stdlib.h string.h unistd.h]) | |
| 57 | |
| 58 # Checks for typedefs, structures, and compiler characteristics. | |
| 59 AC_C_CONST | |
| 60 AC_TYPE_UINT32_T | |
| 61 AC_TYPE_UINT64_T | |
| 62 AC_TYPE_UINT8_T | |
| 63 AC_C_VOLATILE | |
| 64 AC_C_BIGENDIAN | |
| 65 | |
| 66 # Checks for library functions. | |
| 67 AC_CHECK_FUNCS([malloc realloc memalign posix_memalign memmove memset]) | |
| 68 | |
| 69 AC_CANONICAL_HOST | |
| 70 AC_CANONICAL_BUILD | |
| 71 | |
| 72 AC_MSG_CHECKING([for architecture]) | |
| 73 | |
| 74 AC_DEFINE([ARCH_ARM], [0], [Define to 1 on arm architectures.]) | |
| 75 AC_DEFINE([ARCH_X86_32], [0], [Define to 1 on x86 architectures.]) | |
| 76 AC_DEFINE([ARCH_X86_64], [0], [Define to 1 on x86_64 architectures.]) | |
| 77 AC_DEFINE([ARCH_X86], [ARCH_X86_32 ||ARCH_X86_64], [True on x86]) | |
| 78 AC_DEFINE([ARCH_PPC], [0], [Define to 1 on ppc architectures.]) | |
| 79 AC_DEFINE([ARCH_PPC64], [0], [Define to 1 on ppc64 architectures.]) | |
| 80 AC_DEFINE([ARCH_CELL], [0], [Define to 1 on cell architectures.]) | |
| 81 | |
| 82 if test "$enable_optimizations" != "no"; then | |
| 83 case $build_cpu in | |
| 84 arm ) | |
| 85 arch="arm" | |
| 86 AC_MSG_RESULT([arm]) | |
| 87 AC_DEFINE([ARCH_ARM], [1], [Define to 1 on arm architectures.]) | |
| 88 ;; | |
| 89 i686 ) | |
| 90 arch="x86" | |
| 91 AC_MSG_RESULT([x86]) | |
| 92 AC_DEFINE([ARCH_X86_32], [1], [Define to 1 on x86 architectures.]) | |
| 93 ;; | |
| 94 x86_64 ) | |
| 95 arch="x86_64" | |
| 96 AC_MSG_RESULT([x86_64]) | |
| 97 AC_DEFINE([ARCH_X86_64], [1], [Define to 1 on x86 architectures.]) | |
| 98 ;; | |
| 99 powerpc64 ) | |
| 100 AC_DEFINE([HAVE_BIGENDIAN], [1], [Define to 1 on bigendian architectures.]) | |
| 101 if grep -E ^cpu /proc/cpuinfo | grep -q Cell ; then | |
| 102 arch="cell" | |
| 103 AC_MSG_RESULT([cell]) | |
| 104 AC_DEFINE([ARCH_CELL], [1], [Define to 1 on cell architectures.]) | |
| 105 else | |
| 106 arch="powerpc64" | |
| 107 AC_MSG_RESULT([ppc64]) | |
| 108 AC_DEFINE([ARCH_PPC64], [1], [Define to 1 on ppc64 architectures.]) | |
| 109 fi | |
| 110 ;; | |
| 111 * ) | |
| 112 AC_MSG_RESULT([default (little endian).]) | |
| 113 ;; | |
| 114 esac | |
| 115 fi | |
| 116 | |
| 117 AM_CONDITIONAL([HAVE_CELL], [test $arch = "cell"]) | |
| 118 | |
| 119 # Additional options | |
| 120 AC_ARG_ENABLE([optimizations], AS_HELP_STRING([--disable-optimizations], [Disable all architecture specific optimizations. Compiler optimizations are not disabled.])) | |
| 121 | |
| 122 AC_DEFINE([HAVE_SSE], [0], [Define to 1 to enable sse optimizations.]) | |
| 123 AC_DEFINE([HAVE_MMX], [0], [Define to 1 to enable mmx optimizations.]) | |
| 124 AC_DEFINE([HAVE_MMX2], [0], [Define to 1 to enable mmx2 optimizations.]) | |
| 125 AC_DEFINE([HAVE_SSSE3], [0], [Define to 1 to enable ssse3 optimizations.]) | |
| 126 AC_DEFINE([HAVE_ALTIVEC], [0], [Define to 1 to enable altivec optimizations.]) | |
| 127 AC_DEFINE([HAVE_NEON], [0], [Define to 1 to enable neon optimizations.]) | |
| 128 | |
| 129 AC_ARG_ENABLE([ssse3], AS_HELP_STRING([--enable-ssse3], [Enable ssse3 optimizations])) | |
| 130 if test "$enable_ssse3" = "yes"; then | |
| 131 AC_DEFINE([HAVE_SSSE3], [1], [Define to 1 to enable ssse3 optimizations.]) | |
| 132 AC_DEFINE([HAVE_SSE], [1], [Define to 1 to enable sse optimizations.]) | |
| 133 AC_DEFINE([HAVE_MMX], [1], [Define to 1 to enable mmx optimizations.]) | |
| 134 AC_DEFINE([HAVE_MMX2], [1], [Define to 1 to enable mmx2 optimizations.]) | |
| 135 ARCH_SUBDIR=x86 | |
| 136 fi | |
| 137 | |
| 138 AC_ARG_ENABLE([sse], AS_HELP_STRING([--enable-sse], [Enable sse optimizations])) | |
| 139 if test "$enable_sse" = "yes"; then | |
| 140 AC_DEFINE([HAVE_SSE], [1], [Define to 1 to enable sse optimizations.]) | |
| 141 AC_DEFINE([HAVE_MMX], [1], [Define to 1 to enable mmx optimizations.]) | |
| 142 AC_DEFINE([HAVE_MMX2], [1], [Define to 1 to enable mmx2 optimizations.]) | |
| 143 ARCH_SUBDIR=x86 | |
| 144 fi | |
| 145 | |
| 146 AC_ARG_ENABLE([altivec], AS_HELP_STRING([--enable-altivec], [Enable altivec optimizations])) | |
| 147 if test "$enable_altivec" = "yes"; then | |
| 148 AC_DEFINE([HAVE_ALTIVEC], [1], [Define to 1 to enable altivec optimizations.]) | |
| 149 ARCH_SUBDIR="$ARCH_SUBDIR ppc" | |
| 150 TMPCLAGS=$CFLAGS | |
| 151 CFLAGS="$CFLAGS -maltivec" | |
| 152 AC_CHECK_HEADERS(altivec.h) | |
| 153 CFLAGS=$TMPCLAGS | |
| 154 fi | |
| 155 | |
| 156 AC_ARG_ENABLE([neon], AS_HELP_STRING([--enable-neon], [Enable neon optimizations])) | |
| 157 if test "$enable_neon" = "yes"; then | |
| 158 AC_DEFINE([HAVE_NEON], [1], [Define to 1 to enable neon optimizations.]) | |
| 159 ARCH_SUBDIR=arm | |
| 160 fi | |
| 161 | |
| 162 AM_CONDITIONAL([HAVE_ARCH_SUBDIR], [test "$ARCH_SUBDIR" != ""]) | |
| 163 AC_SUBST([ARCH_SUBDIR]) | |
| 164 | |
| 165 AC_DEFINE([HAVE_NEON], [0], [Define to 1 to enable neon optimizations.]) | |
| 166 | |
| 167 AC_CONFIG_HEADER([config.h]) | |
| 168 | |
| 169 AC_CONFIG_FILES([Makefile libavutil/Makefile libavcodec/Makefile libavcodec/x86/Makefile libavcodec/ppc/Makefile libavcodec/cell/Makefile]) | |
| 170 | |
| 171 AC_OUTPUT |
