]> git.sesse.net Git - ffmpeg/blobdiff - configure
asfdec: ignore stored duration for truncated files
[ffmpeg] / configure
index 0a63aaf54a1185f358ce3bbe1f4c76884fa718a3..cf05d2f4d9d8df309b400a90b2d3edcf2d44cc66 100755 (executable)
--- a/configure
+++ b/configure
@@ -1263,6 +1263,25 @@ HAVE_LIST_PUB='
     incompatible_fork_abi
 '
 
+MATH_FUNCS="
+    cbrtf
+    exp2
+    exp2f
+    isinf
+    isnan
+    llrint
+    llrintf
+    log2
+    log2f
+    lrint
+    lrintf
+    rint
+    round
+    roundf
+    trunc
+    truncf
+"
+
 HAVE_LIST="
     $ARCH_EXT_LIST
     $(add_suffix _external $ARCH_EXT_LIST)
@@ -1270,6 +1289,7 @@ HAVE_LIST="
     $HAVE_LIST_CMDLINE
     $HAVE_LIST_PUB
     $THREADS_LIST
+    $MATH_FUNCS
     aligned_malloc
     aligned_stack
     alsa_asoundlib_h
@@ -1280,7 +1300,6 @@ HAVE_LIST="
     asm_types_h
     attribute_may_alias
     attribute_packed
-    cbrtf
     clock_gettime
     closesocket
     cmov
@@ -1299,8 +1318,6 @@ HAVE_LIST="
     dxva_h
     ebp_available
     ebx_available
-    exp2
-    exp2f
     fast_64bit
     fast_clz
     fast_cmov
@@ -1321,23 +1338,15 @@ HAVE_LIST="
     inet_aton
     io_h
     isatty
-    isinf
-    isnan
     jack_port_get_latency_range
     kbhit
     ldbrx
     libdc1394_1
     libdc1394_2
-    llrint
-    llrintf
     local_aligned_16
     local_aligned_8
     localtime_r
-    log2
-    log2f
     loongson
-    lrint
-    lrintf
     lzo1x_999_compress
     machine_ioctl_bt848_h
     machine_ioctl_meteor_h
@@ -1358,9 +1367,6 @@ HAVE_LIST="
     posix_memalign
     pthread_cancel
     rdtsc
-    rint
-    round
-    roundf
     sched_getaffinity
     sdl
     sdl_video_size
@@ -1396,8 +1402,6 @@ HAVE_LIST="
     termios_h
     texi2html
     threads
-    trunc
-    truncf
     unistd_h
     usleep
     vfp_args
@@ -1962,58 +1966,6 @@ htmlpages_deps="texi2html"
 txtpages_deps="makeinfo"
 doc_deps_any="manpages htmlpages podpages txtpages"
 
-# tests
-colormatrix1_test_deps="colormatrix_filter"
-colormatrix2_test_deps="colormatrix_filter"
-mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
-png_test_deps="zlib"
-pp_test_deps="mp_filter"
-pp2_test_deps="mp_filter"
-pp3_test_deps="mp_filter"
-pp4_test_deps="mp_filter"
-pp5_test_deps="mp_filter"
-pp6_test_deps="mp_filter"
-seek_flashsv_flv_test_deps="zlib"
-seek_lavf_mxf_d10_test_deps="mxf_d10_test"
-
-test_deps(){
-    suf1=$1
-    suf2=$2
-    shift 2
-    for v; do
-        dep=${v%=*}
-        tests=${v#*=}
-        for name in ${tests}; do
-            append ${name}_test_deps ${dep}$suf1 ${dep}$suf2
-        done
-    done
-}
-
-test_deps _muxer _demuxer                                               \
-    aiff                                                                \
-    pcm_alaw=alaw                                                       \
-    asf                                                                 \
-    au                                                                  \
-    avi                                                                 \
-    dv=dv_fmt                                                           \
-    ffm                                                                 \
-    flv=flv_fmt                                                         \
-    gxf                                                                 \
-    matroska=mkv                                                        \
-    mmf                                                                 \
-    mov="mov ismv"                                                      \
-    pcm_mulaw=mulaw                                                     \
-    mxf="mxf mxf_d10"                                                   \
-    nut                                                                 \
-    ogg="ogg ogg_vp3"                                                   \
-    rawvideo=pixfmt                                                     \
-    rm                                                                  \
-    swf                                                                 \
-    mpegts=ts                                                           \
-    voc                                                                 \
-    wav                                                                 \
-    yuv4mpegpipe=yuv4mpeg                                               \
-
 # default parameters
 
 logfile="config.log"
@@ -2179,24 +2131,13 @@ ALL_COMPONENTS="
     $PROTOCOL_LIST
 "
 
-find_tests(){
-    map "echo ${2}\${v}_test" $(ls "$source_path"/tests/ref/$1 | grep -v '[^-a-z0-9_]')
-}
-
-LAVF_FATE_TESTS=$(find_tests lavf-fate)
-LAVF_TESTS=$(find_tests lavf)
-LAVFI_TESTS=$(find_tests lavfi)
-SEEK_TESTS=$(find_tests seek seek_)
-
-ALL_TESTS="$LAVF_FATE_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
-
 for n in $COMPONENT_LIST; do
     v=$(toupper ${n%s})_LIST
     eval enable \$$v
     eval ${n}_if_any="\$$v"
 done
 
-enable $ARCH_EXT_LIST $ALL_TESTS
+enable $ARCH_EXT_LIST
 
 die_unknown(){
     echo "Unknown option \"$1\"."
@@ -2307,7 +2248,7 @@ if enabled cross_compile; then
         die "Must specify target arch and OS when cross-compiling"
 fi
 
-set_default arch target_os postproc_version
+set_default postproc_version
 
 # Check if we should build alternative libpostproc version instead of current
 if   test "$postproc_version" = $ALT_PP_VER; then
@@ -2345,13 +2286,14 @@ case "$toolchain" in
         ld_default="c99wrap link"
         nm_default="dumpbin -symbols"
         ar_default="lib"
+        target_os_default="win32"
     ;;
     ?*)
         die "Unknown toolchain $toolchain"
     ;;
 esac
 
-set_default cc cxx pkg_config strip sysinclude yasmexe
+set_default arch cc cxx pkg_config strip sysinclude target_os yasmexe
 enabled cross_compile || host_cc_default=$cc
 set_default host_cc
 
@@ -2362,7 +2304,7 @@ fi
 
 exesuf() {
     case $1 in
-        mingw32*|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
+        mingw32*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
     esac
 }
 
@@ -2427,7 +2369,8 @@ msvc_flags(){
             -Wall)                echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \
                                        -wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \
                                        -wd4152 -wd4324 -we4013 -wd4100 -wd4214 \
-                                       -wd4996 -wd4554 ;;
+                                       -wd4554 \
+                                       -wd4996 -wd4273 ;;
             -std=c99)             ;;
             -fno-math-errno)      ;;
             -fno-common)          ;;
@@ -3128,6 +3071,30 @@ case $target_os in
         enable dos_paths
         add_cppflags -U__STRICT_ANSI__
         ;;
+    win32|win64)
+        if enabled shared; then
+            # Link to the import library instead of the normal static library
+            # for shared libs.
+            LD_LIB='%.lib'
+            # Cannot build shared and static libraries at the same time with
+            # MSVC.
+            disable static
+        fi
+        shlibdir_default="$bindir_default"
+        SLIBPREF=""
+        SLIBSUF=".dll"
+        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
+        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
+        SLIB_CREATE_DEF_CMD='makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
+        SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
+        SLIB_INSTALL_LINKS=
+        SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
+        SLIB_INSTALL_EXTRA_LIB='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
+        SHFLAGS='-dll -def:$$(@:$(SLIBSUF)=.def) -implib:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+        objformat="win32"
+        ranlib=:
+        enable dos_paths
+        ;;
     cygwin*)
         target_os=cygwin
         shlibdir_default="$bindir_default"
@@ -3652,22 +3619,9 @@ check_lib math.h sin -lm && LIBM="-lm"
 disabled crystalhd || check_lib libcrystalhd/libcrystalhd_if.h DtsCrystalHDVersion -lcrystalhd || disable crystalhd
 enabled vaapi && require vaapi va/va.h vaInitialize -lva
 
-check_mathfunc cbrtf
-check_mathfunc exp2
-check_mathfunc exp2f
-check_mathfunc isinf
-check_mathfunc isnan
-check_mathfunc llrint
-check_mathfunc llrintf
-check_mathfunc log2
-check_mathfunc log2f
-check_mathfunc lrint
-check_mathfunc lrintf
-check_mathfunc rint
-check_mathfunc round
-check_mathfunc roundf
-check_mathfunc trunc
-check_mathfunc truncf
+for func in $MATH_FUNCS; do
+    check_mathfunc $func
+done
 
 # these are off by default, so fail if requested and not available
 enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
@@ -3678,7 +3632,7 @@ enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_c
 enabled libaacplus && require  "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
 enabled libass     && require_pkg_config libass ass/ass.h ass_library_init
 enabled libbluray  && require libbluray libbluray/bluray.h bd_open -lbluray
-enabled libcdio    && require2 libcdio "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open "-lcdio_paranoia -lcdio_cdda -lcdio"
+enabled libcdio    && require2 libcdio "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio
 enabled libcelt    && require libcelt celt/celt.h celt_decode -lcelt0 &&
                       { check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
                         die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
@@ -3811,6 +3765,7 @@ enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_fu
 
 enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
 
+
 enabled x11grab                                           &&
 require X11 X11/Xlib.h XOpenDisplay -lX11                 &&
 require Xext X11/extensions/XShm.h XShmCreateImage -lXext &&
@@ -3978,7 +3933,6 @@ check_deps $CONFIG_LIST       \
            $CONFIG_EXTRA      \
            $HAVE_LIST         \
            $ALL_COMPONENTS    \
-           $ALL_TESTS         \
 
 
 if test $target_os = "haiku"; then
@@ -4334,13 +4288,6 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST       \
                                      $CONFIG_EXTRA      \
                                      $ALL_COMPONENTS    \
 
-cat >>config.mak <<EOF
-LAVF_FATE_TESTS=$(print_enabled -n _test $LAVF_FATE_TESTS)
-LAVF_TESTS=$(print_enabled   -n _test $LAVF_TESTS)
-LAVFI_TESTS=$(print_enabled  -n _test $LAVFI_TESTS)
-SEEK_TESTS=$(print_enabled   -n _test $SEEK_TESTS)
-EOF
-
 echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
 echo "endif # FFMPEG_CONFIG_MAK" >> config.mak