]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - configure
WMA: extend exponent range to 95
[frescor/ffmpeg.git] / configure
index 96be39a64ba35a3ab4ba43df4807b91e074a03e4..13e53d136cb443ba7bceae2434f17d4dd289867b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1131,6 +1131,8 @@ mpeg2_vaapi_hwaccel_deps="va_va_h"
 mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder"
 mpeg4_vaapi_hwaccel_deps="va_va_h"
 mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder"
+mpeg4_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
+mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder"
 mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
 mpeg_xvmc_decoder_select="mpegvideo_decoder"
 msmpeg4v1_encoder_select="h263_encoder"
@@ -1617,8 +1619,43 @@ elif $cc -v 2>&1 | grep -q clang; then
 elif $cc -V 2>&1 | grep -q Sun; then
     cc_type=suncc
     cc_version="AV_STRINGIFY(__SUNPRO_C)"
-    DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\\\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
+    DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
     DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
+    filter_cflags=suncc_flags
+    suncc_flags(){
+        for flag; do
+            case $flag in
+                -march=*|-mcpu=*)
+                    case "${flag#*=}" in
+                        native)                   echo -xtarget=native       ;;
+                        v9)                       echo -xarch=sparc          ;;
+                        ultrasparc)               echo -xarch=sparcvis       ;;
+                        ultrasparc3|niagara*)     echo -xarch=sparcvis2      ;;
+                        i586|pentium)             echo -xchip=pentium        ;;
+                        i686|pentiumpro|pentium2) echo -xtarget=pentium_pro  ;;
+                        pentium3*|c3-2)           echo -xtarget=pentium3     ;;
+                        pentium-m)          echo -xarch=sse2 -xchip=pentium3 ;;
+                        pentium4*)          echo -xtarget=pentium4           ;;
+                        prescott|nocona)    echo -xarch=sse3 -xchip=pentium4 ;;
+                        *-sse3)             echo -xarch=sse3                 ;;
+                        core2)              echo -xarch=ssse3 -xchip=core2   ;;
+                        amdfam10|barcelona)       echo -xarch=sse4_1         ;;
+                        athlon-4|athlon-[mx]p)    echo -xarch=ssea           ;;
+                        k8|opteron|athlon64|athlon-fx)
+                                                  echo -xarch=sse2a          ;;
+                        athlon*)                  echo -xarch=pentium_proa   ;;
+                    esac
+                    ;;
+                -std=c99)             echo -xc99              ;;
+                -fomit-frame-pointer) echo -xregs=frameptr    ;;
+                -fPIC)                echo -KPIC -xcode=pic32 ;;
+                -Os)                  echo -O5 -xspace        ;;
+                -W*,*)                echo $flag              ;;
+                -f*-*|-W*)                                    ;;
+                *)                    echo $flag              ;;
+            esac
+        done
+    }
 fi
 
 test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"
@@ -1807,7 +1844,7 @@ case "$arch" in
         enable fast_64bit
         spic=$shared
         # HACK: currently fails to build if .bss is > 4MB and shared libs are built
-        enabled shared && enable hardcoded_tables
+        enabled shared && enable_weak hardcoded_tables
     ;;
     m68k)
         arch="m68k"
@@ -1862,7 +1899,7 @@ case "$arch" in
         subarch="x86_32"
         enable fast_unaligned
         check_cc <<EOF && enable fast_64bit && subarch="x86_64" && spic=$shared
-        int test[sizeof(char*) - 7];
+        int test[(int)sizeof(char*) - 7];
 EOF
         if test "$subarch" = "x86_64"; then
             enable cmov
@@ -1876,14 +1913,12 @@ esac
 
 enable $arch $subarch
 enabled spic && enable pic
+check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
 
 # OS specific
 case $target_os in
     beos|haiku|zeta)
         prefix_default="$HOME/config"
-        # helps building libavcodec
-        add_cppflags -DPIC
-        add_cflags -fomit-frame-pointer
         # 3 gcc releases known for BeOS, each with ugly bugs
         gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
         case "$gcc_version" in
@@ -1919,6 +1954,11 @@ case $target_os in
         ;;
     openbsd)
         enable malloc_aligned
+        # On OpenBSD 4.5. the compiler does not use PIC unless
+        # explicitly using -fPIC. FFmpeg builds fine without PIC,
+        # however the generated executable will not do anything
+        # (simply quits with exit-code 1, no crash, no output).
+        # Thus explicitly enable PIC here.
         enable pic
         SHFLAGS='-shared'
         oss_indev_extralibs="-lossaudio"
@@ -2163,7 +2203,7 @@ elif enabled ppc; then
 
     check_asm dcbzl     '"dcbzl 0, 1"'
     check_asm ppc4xx    '"maclhw r10, r11, r12"'
-    check_asm xform_asm '"lwzx 0, %y0" :: "Z"(*(int*)0)'
+    check_asm xform_asm '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)'
 
     # AltiVec flags: The FSF version of GCC differs from the Apple version
     if enabled altivec; then
@@ -2231,11 +2271,10 @@ EOF
 
     YASMFLAGS="-f $objformat -DARCH_$(toupper $subarch)"
     enabled     x86_64        && append YASMFLAGS "-m amd64"
-    enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
+    enabled     pic           && append YASMFLAGS "-DPIC"
+    test -n "$extern_prefix"  && append YASMFLAGS "-DPREFIX"
     case "$objformat" in
         elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
-        macho64)              append YASMFLAGS "-DPIC -DPREFIX" ;;
-        *)                    append YASMFLAGS "-DPREFIX"  ;;
     esac
     disabled yasm || { check_yasm "pabsw xmm0, xmm0" && enable yasm; }
 
@@ -2336,7 +2375,7 @@ enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
 enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) &&
                            require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0)
 enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex
-enabled libtheora  && require  libtheora theora/theora.h theora_info_init -ltheora -logg
+enabled libtheora  && require  libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
 enabled libvorbis  && require  libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
 enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 -lm &&
                       { check_cpp_condition x264.h "X264_BUILD >= 78" ||
@@ -2469,6 +2508,8 @@ elif enabled optimizations; then
     if enabled xlc; then
         add_cflags  -O5
         add_ldflags -O5
+    elif enabled suncc; then
+        add_cflags -O5
     elif enabled ccc; then
         add_cflags -fast
     else
@@ -2753,6 +2794,7 @@ cat > $TMPH <<EOF
 #ifndef FFMPEG_CONFIG_H
 #define FFMPEG_CONFIG_H
 #define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
+#define FFMPEG_LICENSE "$(c_escape $license)"
 #define FFMPEG_DATADIR "$(eval c_escape $datadir)"
 #define CC_TYPE "$cc_type"
 #define CC_VERSION $cc_version