diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 686 |
1 files changed, 580 insertions, 106 deletions
@@ -1,6 +1,6 @@ #!/bin/sh # -# Libav configure script +# FFmpeg configure script # # Copyright (c) 2000-2002 Fabrice Bellard # Copyright (c) 2005-2008 Diego Biurrun @@ -44,9 +44,9 @@ if test "$E1" != 0 || test "$E2" = 0; then echo "No compatible shell script interpreter found." echo "This configure script requires a POSIX-compatible shell" echo "such as bash or ksh." - echo "THIS IS NOT A BUG IN LIBAV, DO NOT REPORT IT AS SUCH." + echo "THIS IS NOT A BUG IN FFMPEG, DO NOT REPORT IT AS SUCH." echo "Instead, install a working POSIX-compatible shell." - echo "Disabling this configure test will create a broken Libav." + echo "Disabling this configure test will create a broken FFmpeg." if test "$BASH_VERSION" = '2.04.0(1)-release'; then echo "This bash version ($BASH_VERSION) is broken on your platform." echo "Upgrade to a later version if available." @@ -78,7 +78,7 @@ Standard options: --disable-logging do not log configure debug information --prefix=PREFIX install in PREFIX [$prefix] --bindir=DIR install binaries in DIR [PREFIX/bin] - --datadir=DIR install data files in DIR [PREFIX/share/avconv] + --datadir=DIR install data files in DIR [PREFIX/share/ffmpeg] --libdir=DIR install libs in DIR [PREFIX/lib] --shlibdir=DIR install shared libs in DIR [PREFIX/lib] --incdir=DIR install includes in DIR [PREFIX/include] @@ -101,18 +101,21 @@ Configuration options: Component options: --disable-doc do not build documentation - --disable-avconv disable avconv build - --disable-avplay disable avplay build - --disable-avprobe disable avprobe build - --disable-avserver disable avserver build + --disable-ffmpeg disable ffmpeg build + --disable-ffplay disable ffplay build + --disable-ffprobe disable ffprobe build + --disable-ffserver disable ffserver build --disable-avdevice disable libavdevice build --disable-avcodec disable libavcodec build --disable-avformat disable libavformat build + --disable-swresample disable libswresample build --disable-swscale disable libswscale build + --disable-postproc disable libpostproc build --disable-avfilter disable video filter support [no] - --disable-avresample disable libavresample build [no] + --enable-avresample enable libavresample build [no] --disable-pthreads disable pthreads [auto] --disable-w32threads disable Win32 threads [auto] + --disable-os2threads disable OS/2 threads [auto] --enable-x11grab enable X11 grabbing [no] --disable-network disable network support [no] --disable-dct disable DCT code @@ -120,9 +123,9 @@ Component options: --disable-rdft disable RDFT code --disable-fft disable FFT code --enable-dxva2 enable DXVA2 code - --enable-vaapi enable VAAPI code - --enable-vda enable VDA code - --enable-vdpau enable VDPAU code + --enable-vaapi enable VAAPI code [autodetect] + --enable-vda enable VDA code [autodetect] + --enable-vdpau enable VDPAU code [autodetect] Individual component options: --disable-everything disable all components listed below @@ -164,8 +167,13 @@ Individual component options: External library support: --enable-avisynth enable reading of AVISynth script files [no] --enable-bzlib enable bzlib [autodetect] + --enable-fontconfig enable fontconfig --enable-frei0r enable frei0r video filtering --enable-gnutls enable gnutls [no] + --enable-libaacplus enable AAC+ encoding via libaacplus [no] + --enable-libass enable libass subtitles rendering [no] + --enable-libbluray enable BluRay reading using libbluray [no] + --enable-libcelt enable CELT decoding via libcelt [no] --enable-libcdio enable audio CD grabbing with libcdio --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [no] @@ -173,25 +181,32 @@ External library support: --enable-libfreetype enable libfreetype [no] --enable-libgsm enable GSM support via libgsm [no] --enable-libilbc enable iLBC de/encoding via libilbc [no] + --enable-libmodplug enable ModPlug via libmodplug [no] --enable-libmp3lame enable MP3 encoding via libmp3lame [no] + --enable-libnut enable NUT (de)muxing via libnut, + native (de)muxer exists [no] --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no] --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] --enable-libopencv enable video filtering via libopencv [no] - --enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no] + --enable-libopenjpeg enable JPEG 2000 encoding/decoding via OpenJPEG [no] --enable-libpulse enable Pulseaudio input via libpulse [no] --enable-librtmp enable RTMP[E] support via librtmp [no] --enable-libschroedinger enable Dirac support via libschroedinger [no] --enable-libspeex enable Speex support via libspeex [no] + --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no] --enable-libtheora enable Theora encoding via libtheora [no] + --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no] + --enable-libv4l2 enable libv4l2/v4l-utils [no] --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] - --enable-libvorbis enable Vorbis encoding via libvorbis, + --enable-libvorbis enable Vorbis en/decoding via libvorbis, native implementation exists [no] --enable-libvpx enable VP8 support via libvpx [no] --enable-libx264 enable H.264 encoding via x264 [no] --enable-libxavs enable AVS encoding via xavs [no] --enable-libxvid enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists [no] + --enable-openal enable OpenAL 1.1 capture support [no] --enable-openssl enable openssl [no] --enable-zlib enable zlib [autodetect] @@ -203,22 +218,26 @@ Advanced options (experts only): --target-os=OS compiler targets OS [$target_os] --target-exec=CMD command to run executables on target --target-path=DIR path to view of build directory on target - --nm=NM use nm tool + --nm=NM use nm tool NM [$nm_default] --ar=AR use archive tool AR [$ar_default] --as=AS use assembler AS [$as_default] + --yasmexe=EXE use yasm-compatible assembler EXE [$yasmexe_default] --cc=CC use C compiler CC [$cc_default] - --ld=LD use linker LD + --cxx=CXX use C compiler CXX [$cxx_default] + --ld=LD use linker LD [$ld_default] --host-cc=HOSTCC use host C compiler HOSTCC --host-cflags=HCFLAGS use HCFLAGS when compiling for host --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host --host-libs=HLIBS use libs HLIBS when linking for host --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS] + --extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS] --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS] --extra-libs=ELIBS add ELIBS [$ELIBS] --extra-version=STRING version string suffix [] --optflags override optimization-related compiler flags --build-suffix=SUFFIX library name suffix [] --malloc-prefix=PREFIX prefix malloc and related names with PREFIX + --progs-suffix=SUFFIX program name suffix [] --arch=ARCH select architecture [$arch] --cpu=CPU select the minimum required CPU (affects instruction selection, may crash on older CPUs) @@ -250,16 +269,37 @@ Optimization options (experts only): --disable-neon disable NEON optimizations --disable-vis disable VIS optimizations --disable-yasm disable use of yasm assembler - -Developer options (useful when working on Libav itself): + --disable-mips32r2 disable MIPS32R2 optimizations + --disable-mipsdspr1 disable MIPS DSP ASE R1 optimizations + --disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations + --disable-mipsfpu disable floating point MIPS optimizations + --postproc-version=V build libpostproc version V. + Where V can be '$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO' or 'current'. [$postproc_version_default] + +Developer options (useful when working on FFmpeg itself): + --enable-coverage build with test coverage instrumentation --disable-debug disable debugging symbols --enable-debug=LEVEL set the debug level [$debuglevel] --disable-optimizations disable compiler optimizations --enable-extra-warnings enable more compiler warnings + --disable-stripping disable stripping of executables and shared libraries + --assert-level=level 0(default), 1 or 2, amount of assertion testing, + 2 causes a slowdown at runtime. + --valgrind=VALGRIND run "make fate" tests through valgrind to detect memory + leaks and errors, using the specified valgrind binary. + Cannot be combined with --target-exec --samples=PATH location of test samples for FATE, if not set use - \$LIBAV_SAMPLES at make invocation time. + \$FATE_SAMPLES at make invocation time. --enable-xmm-clobber-test check XMM registers for clobbering (Win64-only; should be used only for debugging purposes) + --enable-random randomly enable/disable components + --disable-random + --enable-random=LIST randomly enable/disable specific components or + --disable-random=LIST component groups. LIST is a comma-separated list + of NAME[:PROB] entries where NAME is a component + (group) and PROB the probability associated with + NAME (default 0.5). + --random-seed=VALUE seed value for --enable/disable-random NOTE: Object files are built at the place where configure is launched. EOF @@ -294,7 +334,7 @@ die(){ If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the -libav-user@libav.org mailing list or IRC #libav on irc.freenode.net. +ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. EOF if disabled logging; then cat <<EOF @@ -592,6 +632,10 @@ add_cflags(){ append CFLAGS $($filter_cflags "$@") } +add_cxxflags(){ + append CXXFLAGS $($filter_cflags "$@") +} + add_asflags(){ append ASFLAGS $($filter_asflags "$@") } @@ -616,6 +660,13 @@ check_cc(){ check_cmd $cc $CPPFLAGS $CFLAGS "$@" -c -o $TMPO $TMPC } +check_cxx(){ + log check_cxx "$@" + cat > $TMPCPP + log_file $TMPCPP + check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" -c -o $TMPO $TMPCPP +} + check_cpp(){ log check_cpp "$@" cat > $TMPC @@ -651,12 +702,14 @@ check_yasm(){ check_ld(){ log check_ld "$@" + type=$1 + shift 1 flags='' libs='' for f; do test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f" done - check_cc $($filter_cflags $flags) || return + check_$type $($filter_cflags $flags) || return check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $libs $extralibs } @@ -676,9 +729,17 @@ int x; EOF } +check_cxxflags(){ + log check_cxxflags "$@" + set -- $($filter_cflags "$@") + check_cxx "$@" <<EOF && append CXXFLAGS "$@" +int x; +EOF +} + test_ldflags(){ log test_ldflags "$@" - check_ld "$@" <<EOF + check_ld "cc" "$@" <<EOF int main(void){ return 0; } EOF } @@ -704,7 +765,7 @@ check_func(){ func=$1 shift disable $func - check_ld "$@" <<EOF && enable $func + check_ld "cc" "$@" <<EOF && enable $func extern int $func(); int main(void){ $func(); } EOF @@ -715,10 +776,10 @@ check_mathfunc(){ func=$1 shift disable $func - check_ld "$@" <<EOF && enable $func + check_ld "cc" "$@" <<EOF && enable $func #include <math.h> float foo(float f) { return $func(f); } -int main(void){ return 0; } +int main(void){ return (int) foo; } EOF } @@ -735,7 +796,26 @@ check_func_headers(){ echo "long check_$func(void) { return (long) $func; }" done echo "int main(void) { return 0; }" - } | check_ld "$@" && enable $funcs && enable_safe $headers + } | check_ld "cc" "$@" && enable $funcs && enable_safe $headers +} + +check_class_headers_cpp(){ + log check_class_headers_cpp "$@" + headers=$1 + classes=$2 + shift 2 + { + for hdr in $headers; do + echo "#include <$hdr>" + done + echo "int main(void) { " + i=1 + for class in $classes; do + echo "$class obj$i;" + i=$(expr $i + 1) + done + echo "return 0; }" + } | check_ld "cxx" "$@" && enable $funcs && enable_safe $headers } check_cpp_condition(){ @@ -767,13 +847,21 @@ check_lib2(){ check_func_headers "$headers" "$funcs" "$@" && add_extralibs "$@" } +check_lib_cpp(){ + log check_lib_cpp "$@" + headers="$1" + classes="$2" + shift 2 + check_class_headers_cpp "$headers" "$classes" "$@" && add_extralibs "$@" +} + check_pkg_config(){ log check_pkg_config "$@" pkg="$1" headers="$2" funcs="$3" shift 3 - $pkg_config --exists $pkg || return + $pkg_config --exists $pkg 2>/dev/null || return pkg_cflags=$($pkg_config --cflags $pkg) pkg_libs=$($pkg_config --libs $pkg) check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" && @@ -782,7 +870,7 @@ check_pkg_config(){ } check_exec(){ - check_ld "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; } + check_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; } } check_exec_crash(){ @@ -799,6 +887,10 @@ check_exec_crash(){ static void sighandler(int sig){ raise(SIGTERM); } +int func(void){ + $code +} +int (*func_ptr)(void) = func; int main(void){ signal(SIGILL, sighandler); signal(SIGFPE, sighandler); @@ -806,7 +898,7 @@ int main(void){ #ifdef SIGBUS signal(SIGBUS, sighandler); #endif - { $code } + return func_ptr(); } EOF } @@ -862,6 +954,14 @@ require2(){ check_lib2 "$headers" $func "$@" || die "ERROR: $name not found" } +require_cpp(){ + name="$1" + headers="$2" + classes="$3" + shift 3 + check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found" +} + require_pkg_config(){ pkg="$1" check_pkg_config "$@" || die "ERROR: $pkg not found" @@ -913,10 +1013,10 @@ COMPONENT_LIST=" " PROGRAM_LIST=" - avconv - avplay - avprobe - avserver + ffplay + ffprobe + ffserver + ffmpeg " CONFIG_LIST=" @@ -930,24 +1030,32 @@ CONFIG_LIST=" avresample avisynth bzlib + crystalhd dct doc dwt dxva2 fastdiv fft + fontconfig frei0r gnutls gpl gray hardcoded_tables + libaacplus + libass + libbluray libcdio + libcelt libdc1394 libfaac libfreetype libgsm libilbc + libmodplug libmp3lame + libnut libopencore_amrnb libopencore_amrwb libopencv @@ -956,7 +1064,10 @@ CONFIG_LIST=" librtmp libschroedinger libspeex + libstagefright_h264 libtheora + libutvideo + libv4l2 libvo_aacenc libvo_amrwbenc libvorbis @@ -970,8 +1081,10 @@ CONFIG_LIST=" mpegaudiodsp network nonfree + openal openssl pic + postproc rdft rtpdec runtime_cpudetect @@ -981,6 +1094,7 @@ CONFIG_LIST=" small sram static + swresample swscale swscale_alpha thumb @@ -996,6 +1110,7 @@ CONFIG_LIST=" THREADS_LIST=' pthreads w32threads + os2threads ' ARCH_LIST=' @@ -1040,6 +1155,10 @@ ARCH_EXT_LIST=' ssse3 vfpv3 vis + mipsfpu + mips32r2 + mipsdspr1 + mipsdspr2 ' HAVE_LIST_PUB=' @@ -1057,8 +1176,11 @@ HAVE_LIST=" altivec_h arpa_inet_h asm_mod_y + asm_types_h attribute_may_alias attribute_packed + cbrtf + clock_gettime closesocket cmov dcbzl @@ -1087,12 +1209,14 @@ HAVE_LIST=" GetSystemTimeAsFileTime getrusage gettimeofday + glob gnu_as ibm_asm inet_aton inline_asm isatty jack_port_get_latency_range + kbhit ldbrx libdc1394_1 libdc1394_2 @@ -1106,16 +1230,20 @@ HAVE_LIST=" loongson lrint lrintf + lzo1x_999_compress machine_ioctl_bt848_h machine_ioctl_meteor_h + makeinfo malloc_h MapViewOfFile memalign mkstemp mmap netinet_sctp_h + PeekNamedPipe poll_h posix_memalign + pthread_cancel round roundf sched_getaffinity @@ -1128,7 +1256,6 @@ HAVE_LIST=" soundcard_h strerror_r strptime - strtok_r struct_addrinfo struct_ipv6_mreq struct_rusage_ru_maxrss @@ -1147,6 +1274,7 @@ HAVE_LIST=" sys_select_h sys_soundcard_h sys_videoio_h + termios_h threads trunc truncf @@ -1178,11 +1306,13 @@ CMDLINE_SELECT=" $CONFIG_LIST $THREADS_LIST asm + coverage cross_compile debug extra_warnings logging optimizations + stripping symver yasm " @@ -1202,10 +1332,12 @@ CMDLINE_SET=" ar arch as + assert_level build_suffix cc cpu cross_prefix + cxx dep_cc extra_version host_cc @@ -1213,22 +1345,30 @@ CMDLINE_SET=" host_ldflags host_libs host_os + install ld logfile malloc_prefix nm optflags pkg_config + postproc_version + progs_suffix + random_seed samples + strip sysinclude sysroot target_exec target_os target_path + valgrind + yasmexe " CMDLINE_APPEND=" extra_cflags + extra_cxxflags " # code dependency declarations @@ -1242,6 +1382,10 @@ armvfp_deps="arm" neon_deps="arm" vfpv3_deps="armvfp" +mipsfpu_deps="mips" +mips32r2_deps="mips" +mipsdspr1_deps="mips" +mipsdspr2_deps="mips" mmi_deps="mips" altivec_deps="ppc" @@ -1284,6 +1428,7 @@ ac3_fixed_encoder_select="mdct ac3dsp" alac_encoder_select="lpc" amrnb_decoder_select="lsp" amrwb_decoder_select="lsp" +amv_encoder_select="aandct" atrac1_decoder_select="mdct sinewin" atrac3_decoder_select="mdct" binkaudio_dct_decoder_select="mdct rdft dct sinewin" @@ -1292,6 +1437,7 @@ cavs_decoder_select="golomb" cook_decoder_select="mdct sinewin" cscd_decoder_suggest="zlib" dca_decoder_select="mdct" +dirac_decoder_select="dwt golomb" dnxhd_encoder_select="aandct" dxa_decoder_select="zlib" eac3_decoder_select="ac3_decoder" @@ -1304,6 +1450,7 @@ flac_decoder_select="golomb" flac_encoder_select="golomb lpc" flashsv_decoder_select="zlib" flashsv_encoder_select="zlib" +flashsv2_encoder_select="zlib" flashsv2_decoder_select="zlib" flv_decoder_select="h263_decoder" flv_encoder_select="h263_encoder" @@ -1314,10 +1461,12 @@ h263_encoder_select="aandct" h263_vaapi_hwaccel_select="vaapi h263_decoder" h263i_decoder_select="h263_decoder" h263p_encoder_select="h263_encoder" +h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser" h264_decoder_select="golomb h264chroma h264dsp h264pred h264qpel" h264_dxva2_hwaccel_deps="dxva2api_h" h264_dxva2_hwaccel_select="dxva2 h264_decoder" h264_vaapi_hwaccel_select="vaapi h264_decoder" +h264_vda_hwaccel_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" h264_vda_hwaccel_select="vda h264_decoder" h264_vdpau_decoder_select="vdpau h264_decoder" iac_decoder_select="fft mdct sinewin" @@ -1344,15 +1493,20 @@ mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder" mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h" mpeg_xvmc_decoder_select="mpegvideo_decoder" mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder" +mpeg1_vdpau_hwaccel_select="vdpau mpeg1video_decoder" mpeg1video_encoder_select="aandct" +mpeg2_crystalhd_decoder_select="crystalhd" mpeg2_dxva2_hwaccel_deps="dxva2api_h" mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder" +mpeg2_vdpau_hwaccel_select="vdpau mpeg2video_decoder" mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder" mpeg2video_encoder_select="aandct" +mpeg4_crystalhd_decoder_select="crystalhd" mpeg4_decoder_select="h263_decoder mpeg4video_parser" mpeg4_encoder_select="h263_encoder" mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder" mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder" +msmpeg4_crystalhd_decoder_select="crystalhd" msmpeg4v1_decoder_select="h263_decoder" msmpeg4v1_encoder_select="h263_encoder" msmpeg4v2_decoder_select="h263_decoder" @@ -1377,15 +1531,18 @@ shorten_decoder_select="golomb" sipr_decoder_select="lsp" snow_decoder_select="dwt" snow_encoder_select="aandct dwt" +sonic_decoder_select="golomb" +sonic_encoder_select="golomb" +sonic_ls_encoder_select="golomb" svq1_encoder_select="aandct" svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel" svq3_decoder_suggest="zlib" theora_decoder_select="vp3_decoder" tiff_decoder_suggest="zlib" tiff_encoder_suggest="zlib" -truehd_decoder_select="mlp_decoder" tscc_decoder_select="zlib" twinvq_decoder_select="mdct lsp sinewin" +vc1_crystalhd_decoder_select="crystalhd" vc1_decoder_select="h263_decoder h264chroma h264qpel" vc1_dxva2_hwaccel_deps="dxva2api_h" vc1_dxva2_hwaccel_select="dxva2 vc1_decoder" @@ -1409,6 +1566,7 @@ wmv1_encoder_select="h263_encoder" wmv2_decoder_select="h263_decoder" wmv2_encoder_select="h263_encoder" wmv3_decoder_select="vc1_decoder" +wmv3_crystalhd_decoder_select="crystalhd" wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel" wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel" wmv3_vdpau_decoder_select="vc1_vdpau_decoder" @@ -1419,6 +1577,7 @@ zlib_encoder_select="zlib" zmbv_decoder_select="zlib" zmbv_encoder_select="zlib" +crystalhd_deps="libcrystalhd_libcrystalhd_if_h" vaapi_deps="va_va_h" vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" @@ -1427,6 +1586,8 @@ vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" h264_parser_select="golomb h264dsp h264pred" # external libraries +libaacplus_encoder_deps="libaacplus" +libcelt_decoder_deps="libcelt" libfaac_encoder_deps="libfaac" libgsm_decoder_deps="libgsm" libgsm_encoder_deps="libgsm" @@ -1434,24 +1595,31 @@ libgsm_ms_decoder_deps="libgsm" libgsm_ms_encoder_deps="libgsm" libilbc_decoder_deps="libilbc" libilbc_encoder_deps="libilbc" +libmodplug_demuxer_deps="libmodplug" libmp3lame_encoder_deps="libmp3lame" libopencore_amrnb_decoder_deps="libopencore_amrnb" libopencore_amrnb_encoder_deps="libopencore_amrnb" libopencore_amrwb_decoder_deps="libopencore_amrwb" libopenjpeg_decoder_deps="libopenjpeg" +libopenjpeg_encoder_deps="libopenjpeg" libschroedinger_decoder_deps="libschroedinger" libschroedinger_encoder_deps="libschroedinger" libspeex_decoder_deps="libspeex" libspeex_encoder_deps="libspeex" +libstagefright_h264_decoder_deps="libstagefright_h264" libtheora_encoder_deps="libtheora" libvo_aacenc_encoder_deps="libvo_aacenc" libvo_amrwbenc_encoder_deps="libvo_amrwbenc" +libvorbis_decoder_deps="libvorbis" libvorbis_encoder_deps="libvorbis" libvpx_decoder_deps="libvpx" libvpx_encoder_deps="libvpx" libx264_encoder_deps="libx264" +libx264rgb_encoder_deps="libx264" libxavs_encoder_deps="libxavs" libxvid_encoder_deps="libxvid" +libutvideo_decoder_deps="libutvideo" +libutvideo_encoder_deps="libutvideo" # demuxers / muxers ac3_demuxer_select="ac3_parser" @@ -1461,6 +1629,8 @@ dirac_demuxer_select="dirac_parser" eac3_demuxer_select="ac3_parser" flac_demuxer_select="flac_parser" ipod_muxer_select="mov_muxer" +libnut_demuxer_deps="libnut" +libnut_muxer_deps="libnut" matroska_audio_muxer_select="matroska_muxer" matroska_demuxer_suggest="zlib bzlib" mov_demuxer_suggest="zlib" @@ -1487,22 +1657,30 @@ w64_demuxer_deps="wav_demuxer" alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp" alsa_outdev_deps="alsa_asoundlib_h" bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h" +dshow_indev_deps="IBaseFilter" +dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid" dv1394_indev_deps="dv1394 dv_demuxer" fbdev_indev_deps="linux_fb_h" -jack_indev_deps="jack_jack_h" +jack_indev_deps="jack_jack_h sem_timedwait" +lavfi_indev_deps="avfilter" libcdio_indev_deps="libcdio" libdc1394_indev_deps="libdc1394" +libv4l2_indev_deps="libv4l2" +openal_indev_deps="openal" oss_indev_deps_any="soundcard_h sys_soundcard_h" oss_outdev_deps_any="soundcard_h sys_soundcard_h" pulse_indev_deps="libpulse" +sdl_outdev_deps="sdl" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" +v4l_indev_deps="linux_videodev_h" v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h" vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines" vfwcap_indev_extralibs="-lavicap32" x11_grab_device_indev_deps="x11grab XShmCreateImage" # protocols +bluray_protocol_deps="libbluray" gopher_protocol_deps="network" httpproxy_protocol_deps="network" httpproxy_protocol_select="tcp_protocol" @@ -1530,34 +1708,52 @@ tls_protocol_select="tcp_protocol" udp_protocol_deps="network" # filters +aconvert_filter_deps="swresample" +amovie_filter_deps="avcodec avformat" +aresample_filter_deps="swresample" +ass_filter_deps="libass" +asyncts_filter_deps="avresample" +atempo_filter_deps="avcodec rdft" blackframe_filter_deps="gpl" boxblur_filter_deps="gpl" +colormatrix_filter_deps="gpl" cropdetect_filter_deps="gpl" delogo_filter_deps="gpl" +deshake_filter_deps="avcodec" drawtext_filter_deps="libfreetype" -frei0r_filter_deps="frei0r dlopen strtok_r" +frei0r_filter_deps="frei0r dlopen" frei0r_filter_extralibs='$ldl' -frei0r_src_filter_deps="frei0r dlopen strtok_r" +frei0r_src_filter_deps="frei0r dlopen" frei0r_src_filter_extralibs='$ldl' hqdn3d_filter_deps="gpl" +movie_filter_deps="avcodec avformat" +mp_filter_deps="gpl avcodec swscale postproc" +mptestsrc_filter_deps="gpl" +negate_filter_deps="lut_filter" resample_filter_deps="avresample" ocv_filter_deps="libopencv" +pan_filter_deps="swresample" +removelogo_filter_deps="avcodec avformat swscale" scale_filter_deps="swscale" +select_filter_deps="avcodec" +super2xsai_filter_deps="gpl" +tinterlace_filter_deps="gpl" yadif_filter_deps="gpl" # libraries avdevice_deps="avcodec avformat" avformat_deps="avcodec" +postproc_deps="gpl" # programs -avconv_deps="avcodec avfilter avformat avresample swscale - aformat_filter asyncts_filter - format_filter fps_filter scale_filter setpts_filter" -avplay_deps="avcodec avformat swscale sdl" -avplay_select="rdft" -avprobe_deps="avcodec avformat" -avserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer !shared" -avserver_extralibs='$ldl' +ffmpeg_deps="avcodec avfilter avformat swscale swresample" +ffmpeg_select="buffersink_filter format_filter aformat_filter + setpts_filter null_filter anull_filter" +ffplay_deps="avcodec avformat swscale swresample sdl" +ffplay_select="buffersink_filter rdft" +ffprobe_deps="avcodec avformat" +ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer" +ffserver_extralibs='$ldl' doc_deps="texi2html" @@ -1591,11 +1787,11 @@ test_deps _muxer _demuxer \ gxf \ matroska=mkv \ mmf \ - mov \ + mov="mov ismv" \ pcm_mulaw=mulaw \ mxf="mxf mxf_d10" \ nut \ - ogg \ + ogg="ogg ogg_vp3" \ rawvideo=pixfmt \ rm \ swf \ @@ -1604,7 +1800,19 @@ test_deps _muxer _demuxer \ wav \ yuv4mpegpipe=yuv4mpeg \ +colormatrix1_test_deps="colormatrix_filter" +colormatrix2_test_deps="colormatrix_filter" +flashsv2_test_deps="zlib" mpg_test_deps="mpeg1system_muxer mpegps_demuxer" +mpng_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" +zlib_test_deps="zlib" +zmbv_test_deps="zlib" # default parameters @@ -1613,23 +1821,27 @@ logfile="config.log" # installation paths prefix_default="/usr/local" bindir_default='${prefix}/bin' -datadir_default='${prefix}/share/avconv' +datadir_default='${prefix}/share/ffmpeg' incdir_default='${prefix}/include' libdir_default='${prefix}/lib' mandir_default='${prefix}/share/man' shlibdir_default="$libdir_default" +postproc_version_default="current" # toolchain ar_default="ar" cc_default="gcc" +cxx_default="g++" cc_version=\"unknown\" host_cc_default="gcc" +install="install" ln_s="ln -sf" nm_default="nm" objformat="elf" pkg_config_default=pkg-config ranlib="ranlib" -yasmexe="yasm" +strip_default="strip" +yasmexe_default="yasm" nm_opts='-g' nogas=":" @@ -1642,6 +1854,12 @@ cpu="generic" target_os_default=$(tolower $(uname -s)) host_os=$target_os_default +# alternative libpostproc version +ALT_PP_VER_MAJOR=51 +ALT_PP_VER_MINOR=2 +ALT_PP_VER_MICRO=101 +ALT_PP_VER=$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO + # configurable options enable $PROGRAM_LIST @@ -1649,8 +1867,10 @@ enable avcodec enable avdevice enable avfilter enable avformat -enable avresample enable avutil +enable postproc +enable stripping +enable swresample enable swscale enable asm @@ -1665,7 +1885,7 @@ enable swscale_alpha # build settings SHFLAGS='-shared -Wl,-soname,$$(@F)' -AVSERVERLDFLAGS=-Wl,-E +FFSERVERLDFLAGS=-Wl,-E LIBPREF="lib" LIBSUF=".a" FULLNAME='$(NAME)$(BUILDSUF)' @@ -1681,6 +1901,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' AS_O='-o $@' CC_O='-o $@' +CXX_O='-o $@' host_cflags='-D_ISOC99_SOURCE -O3 -g' host_libs='-lm' @@ -1707,7 +1928,7 @@ for v in "$@"; do r=${v#*=} l=${v%"$r"} r=$(sh_quote "$r") - LIBAV_CONFIGURATION="${LIBAV_CONFIGURATION# } ${l}${r}" + FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}" done find_things(){ @@ -1747,11 +1968,12 @@ 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_TESTS $LAVFI_TESTS $SEEK_TESTS" +ALL_TESTS="$LAVF_FATE_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS" for n in $COMPONENT_LIST; do v=$(toupper ${n%s})_LIST @@ -1774,6 +1996,27 @@ show_list() { exit 0 } +rand_list(){ + IFS=', ' + set -- $* + unset IFS + for thing; do + comp=${thing%:*} + prob=${thing#$comp} + prob=${prob#:} + is_in ${comp} $COMPONENT_LIST && eval comp=\$$(toupper ${comp%s})_LIST + echo "prob ${prob:-0.5}" + printf '%s\n' $comp + done +} + +do_random(){ + action=$1 + shift + random_seed=$(awk "BEGIN { srand($random_seed); print srand() }") + $action $(rand_list "$@" | awk "BEGIN { srand($random_seed) } \$1 == \"prob\" { prob = \$2; next } rand() < prob { print }") +} + for opt do optval="${opt#*=}" case "$opt" in @@ -1788,6 +2031,14 @@ for opt do --disable-everything) map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST ;; + --enable-random|--disable-random) + action=${opt%%-random} + do_random ${action#--} $COMPONENT_LIST + ;; + --enable-random=*|--disable-random=*) + action=${opt%%-random=*} + do_random ${action#--} $optval + ;; --enable-*=*|--disable-*=*) eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/') is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt" @@ -1831,7 +2082,7 @@ done disabled logging && logfile=/dev/null -echo "# $0 $LIBAV_CONFIGURATION" > $logfile +echo "# $0 $FFMPEG_CONFIGURATION" > $logfile set >> $logfile test -n "$cross_prefix" && enable cross_compile @@ -1841,17 +2092,29 @@ if enabled cross_compile; then die "Must specify target arch and OS when cross-compiling" fi -set_default arch target_os +set_default arch target_os postproc_version + +# Check if we should build alternative libpostproc version instead of current +if test "$postproc_version" = $ALT_PP_VER; then + LIBPOSTPROC_VERSION=$ALT_PP_VER + LIBPOSTPROC_VERSION_MAJOR=$ALT_PP_VER_MAJOR + LIBPOSTPROC_VERSION_MINOR=$ALT_PP_VER_MINOR + LIBPOSTPROC_VERSION_MICRO=$ALT_PP_VER_MICRO +elif test "$postproc_version" != current; then + die "Invalid argument to --postproc-version. See --help output." +fi ar_default="${cross_prefix}${ar_default}" cc_default="${cross_prefix}${cc_default}" +cxx_default="${cross_prefix}${cxx_default}" nm_default="${cross_prefix}${nm_default}" pkg_config_default="${cross_prefix}${pkg_config_default}" ranlib="${cross_prefix}${ranlib}" +strip_default="${cross_prefix}${strip_default}" sysinclude_default="${sysroot}/usr/include" -set_default cc nm pkg_config sysinclude +set_default cc cxx nm pkg_config strip sysinclude yasmexe enabled cross_compile || host_cc_default=$cc set_default host_cc @@ -1894,6 +2157,7 @@ trap 'rm -f -- $TMPFILES' EXIT tmpfile TMPASM .asm tmpfile TMPC .c +tmpfile TMPCPP .cpp tmpfile TMPE $EXESUF tmpfile TMPH .h tmpfile TMPO .o @@ -2128,9 +2392,11 @@ test -n "$cc_type" && enable $cc_type || set_default ar as dep_cc ld test -n "$CC_DEPFLAGS" || CCDEP=$DEPEND_CMD +test -n "$CXX_DEPFLAGS" || CXXDEP=$DEPEND_CMD test -n "$AS_DEPFLAGS" || ASDEP=$DEPEND_CMD add_cflags $extra_cflags +add_cxxflags $extra_cxxflags add_asflags $extra_cflags if test -n "$sysroot"; then @@ -2168,7 +2434,7 @@ fi # Deal with common $arch aliases case "$arch" in - arm*) + arm*|iPad*) arch="arm" ;; mips|mipsel|IP*) @@ -2185,12 +2451,8 @@ case "$arch" in arch="parisc" subarch="parisc64" ;; - "Power Macintosh"|ppc|powerpc) - arch="ppc" - ;; - ppc64|powerpc64) + "Power Macintosh"|ppc|powerpc|ppc64|powerpc64) arch="ppc" - subarch="ppc64" ;; s390|s390x) arch="s390" @@ -2202,7 +2464,7 @@ case "$arch" in arch="sparc" subarch="sparc64" ;; - i[3-6]86|i86pc|BePC|x86pc|x86_64|amd64) + i[3-6]86|i86pc|BePC|x86pc|x86_64|x86_32|amd64) arch="x86" ;; esac @@ -2328,6 +2590,28 @@ elif enabled mips; then cpuflags="-march=$cpu" + case $cpu in + 24kc) + disable mipsfpu + disable mipsdspr1 + disable mipsdspr2 + ;; + 24kf*) + disable mipsdspr1 + disable mipsdspr2 + ;; + 24kec|34kc|1004kc) + disable mipsfpu + disable mipsdspr2 + ;; + 24kef*|34kf*|1004kf*) + disable mipsdspr2 + ;; + 74kc) + disable mipsfpu + ;; + esac + elif enabled avr32; then case $cpu in @@ -2368,6 +2652,7 @@ if test "$?" != 0; then fi add_cppflags -D_ISOC99_SOURCE +add_cxxflags -D__STDC_CONSTANT_MACROS check_cflags -std=c99 check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64 #include <stdlib.h> @@ -2392,6 +2677,11 @@ EOF spic=$shared fi ;; + ppc) + check_cc <<EOF && subarch="ppc64" + int test[(int)sizeof(char*) - 7]; +EOF + ;; esac enable $subarch @@ -2405,7 +2695,7 @@ case $target_os in host_libs= ;; sunos) - AVSERVERLDFLAGS="" + FFSERVERLDFLAGS="" SHFLAGS='-shared -Wl,-h,$$(@F)' enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS" network_extralibs="-lsocket -lnsl" @@ -2423,15 +2713,16 @@ case $target_os in oss_indev_extralibs="-lossaudio" oss_outdev_extralibs="-lossaudio" ;; - openbsd) + openbsd|bitrig) # On OpenBSD 4.5. the compiler does not use PIC unless - # explicitly using -fPIC. Libav builds fine without PIC, + # 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 disable symver SHFLAGS='-shared' + SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBVERSION)' oss_indev_extralibs="-lossaudio" oss_outdev_extralibs="-lossaudio" ;; @@ -2442,17 +2733,19 @@ case $target_os in ;; bsd/os) add_extralibs -lpoll -lgnugetopt + strip="strip -d" ;; darwin) gas="gas-preprocessor.pl $cc" enabled ppc && add_asflags -force_cpusubtype_ALL SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)' enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress + strip="${strip} -x" add_ldflags -Wl,-dynamic,-search_paths_first SLIBSUF=".dylib" SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)' - AVSERVERLDFLAGS=-Wl,-bind_at_load + FFSERVERLDFLAGS=-Wl,-bind_at_load objformat="macho" enabled x86_64 && objformat="macho64" enabled_any pic shared || @@ -2466,7 +2759,7 @@ case $target_os in fi LIBTARGET=i386 if enabled x86_64; then - LIBTARGET="i386:x86-64" + LIBTARGET=x64 elif enabled arm; then LIBTARGET=arm-wince fi @@ -2475,14 +2768,13 @@ case $target_os in SLIBSUF=".dll" SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)' - SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)' + SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' SLIB_INSTALL_LINKS= SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)' SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base' objformat="win32" - dlltool="${cross_prefix}dlltool" enable dos_paths check_cflags -fno-common check_cpp_condition _mingw.h "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) \ @@ -2518,12 +2810,13 @@ case $target_os in ranlib="echo ignoring ranlib" ;; os/2*) + strip="lxlite -CS" ln_s="cp -f" objformat="aout" add_cppflags -D_GNU_SOURCE add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf' - AVSERVERLDFLAGS="" + FFSERVERLDFLAGS="" LIBSUF="_s.a" SLIBPREF="" SLIBSUF=".dll" @@ -2539,6 +2832,7 @@ case $target_os in emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;' SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib' enable dos_paths + enable_weak os2threads ;; gnu/kfreebsd) add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE @@ -2573,7 +2867,7 @@ esc(){ echo "$*" | sed 's/%/%25/g;s/:/%3a/g' } -echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate +echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" >config.fate check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic @@ -2594,14 +2888,20 @@ die_license_disabled() { enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; } } +die_license_disabled_gpl() { + enabled $1 || { enabled $2 && die "$2 is incompatible with the gpl and --enable-$1 is not specified."; } +} + die_license_disabled gpl libcdio +die_license_disabled gpl libutvideo die_license_disabled gpl libx264 die_license_disabled gpl libxavs die_license_disabled gpl libxvid die_license_disabled gpl x11grab +die_license_disabled nonfree libaacplus die_license_disabled nonfree libfaac -die_license_disabled nonfree openssl +enabled gpl && die_license_disabled_gpl nonfree openssl die_license_disabled version3 libopencore_amrnb die_license_disabled version3 libopencore_amrwb @@ -2665,7 +2965,7 @@ elif enabled arm; then elif ! check_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__"; then case "${cross_prefix:-$cc}" in *hardfloat*) enable vfp_args; fpabi=vfp ;; - *) check_ld <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;; + *) check_ld "cc" <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;; __asm__ (".eabi_attribute 28, 1"); int main(void) { return 0; } EOF @@ -2688,6 +2988,15 @@ elif enabled mips; then check_asm loongson '"dmult.g $1, $2, $3"' enabled mmi && check_asm mmi '"lq $2, 0($2)"' + enabled mips32r2 && add_cflags "-mips32r2" && + check_asm mips32r2 '"rotr $t0, $t1, 1"' + enabled mipsdspr1 && add_cflags "-mdsp" && add_asflags "-mdsp" && + check_asm mipsdspr1 '"addu.qb $t0, $t1, $t2"' + enabled mipsdspr2 && add_cflags "-mdspr2" && add_asflags "-mdspr2" && + check_asm mipsdspr2 '"absq_s.qb $t0, $t1"' + enabled mipsfpu && add_cflags "-mhard-float" && + check_asm mipsfpu '"madd.d $f0, $f2, $f4, $f6"' + elif enabled ppc; then @@ -2828,6 +3137,7 @@ fi # Solaris has nanosleep in -lrt, OpenSolaris no longer needs that check_func nanosleep || { check_func nanosleep -lrt && add_extralibs -lrt; } +check_func clock_gettime || { check_func clock_gettime -lrt && add_extralibs -lrt; } check_func fcntl check_func fork check_func getaddrinfo $network_extralibs @@ -2846,40 +3156,54 @@ check_func_headers malloc.h _aligned_malloc && enable aligned_malloc check_func setrlimit check_func strerror_r check_func strptime -check_func strtok_r check_func sched_getaffinity check_func sysconf check_func sysctl +check_func_headers conio.h kbhit +check_func_headers windows.h PeekNamedPipe check_func_headers io.h setmode +check_func_headers lzo/lzo1x.h lzo1x_999_compress check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi check_func_headers windows.h GetProcessAffinityMask check_func_headers windows.h GetProcessTimes check_func_headers windows.h GetSystemTimeAsFileTime check_func_headers windows.h MapViewOfFile check_func_headers windows.h VirtualAlloc +check_func_headers glob.h glob check_header dlfcn.h -check_header dxva2api.h +check_header dxva2api.h -D_WIN32_WINNT=0x0600 +check_header libcrystalhd/libcrystalhd_if.h check_header malloc.h check_header poll.h check_header sys/mman.h check_header sys/param.h check_header sys/resource.h check_header sys/select.h +check_header termios.h check_header vdpau/vdpau.h check_header vdpau/vdpau_x11.h check_header X11/extensions/XvMClib.h +check_header asm/types.h disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib +# check for VDA header +if ! disabled vda; then + if check_header VideoDecodeAcceleration/VDADecoder.h; then + enable vda + add_extralibs -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore + fi +fi + if ! disabled w32threads && ! enabled pthreads; then check_func _beginthreadex && enable w32threads fi # check for some common methods of building with pthread support # do this before the optional library checks as some of them require pthreads -if ! disabled pthreads && ! enabled w32threads; then +if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then enable pthreads if check_func pthread_create; then : @@ -2904,9 +3228,15 @@ for thread in $THREADS_LIST; do fi done +if enabled pthreads; then + check_func pthread_cancel +fi + 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 llrint @@ -2922,35 +3252,54 @@ check_mathfunc truncf # these are off by default, so fail if requested and not available enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32 +enabled fontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; } enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init +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 libcelt && require libcelt celt/celt.h celt_decode -lcelt0 && + { check_lib celt/celt.h celt_decoder_create_custom -lcelt0 || + die "ERROR: libcelt version must be >= 0.11.0."; } enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType enabled libgsm && require libgsm gsm/gsm.h gsm_create -lgsm enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc +enabled libmodplug && require libmodplug libmodplug/modplug.h ModPlug_Load -lmodplug enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame +enabled libnut && require libnut libnut.h nut_demuxer_init -lnut enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb -enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader +enabled libopencv && require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex +enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h + media/stagefright/MediaBufferGroup.h media/stagefright/MediaDebug.h media/stagefright/MediaDefs.h + media/stagefright/OMXClient.h media/stagefright/OMXCodec.h" android::OMXClient -lstagefright -lmedia -lutils -lbinder -lgnustl_static enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg +enabled libutvideo && require_cpp utvideo "stdint.h stdlib.h utvideo/utvideo.h utvideo/Codec.h" 'CCodec*' -lutvideo -lstdc++ +enabled libv4l2 && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg enabled libvpx && { enabled libvpx_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx || die "ERROR: libvpx decoder version must be >=0.9.1"; } - enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_enc_init_ver -lvpx || - die "ERROR: libvpx encoder version must be >=0.9.1"; } } + enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VP8E_SET_MAX_INTRA_BITRATE_PCT" -lvpx || + die "ERROR: libvpx encoder version must be >=0.9.7"; } } enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 && { check_cpp_condition x264.h "X264_BUILD >= 118" || die "ERROR: libx264 version must be >= 0.118."; } enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore +enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do + check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } || + die "ERROR: openal not found"; } && + { check_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" || + die "ERROR: openal version must be 1.1 or compatible"; } enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || @@ -2965,15 +3314,28 @@ if enabled libdc1394; then die "ERROR: No version of libdc1394 found " fi +SDL_CONFIG="${cross_prefix}sdl-config" if check_pkg_config sdl SDL_events.h SDL_PollEvent; then check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && enable sdl && check_struct SDL.h SDL_VideoInfo current_w $sdl_cflags && enable sdl_video_size +else + if "${SDL_CONFIG}" --version > /dev/null 2>&1; then + sdl_cflags=$("${SDL_CONFIG}" --cflags) + sdl_libs=$("${SDL_CONFIG}" --libs) + check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs && + check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && + enable sdl && + check_struct SDL.h SDL_VideoInfo current_w $sdl_cflags && enable sdl_video_size + fi fi +enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html +makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo check_header linux/fb.h +check_header linux/videodev.h check_header linux/videodev2.h check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete @@ -2984,6 +3346,8 @@ check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extra # w32api 3.12 had it defined wrong check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines +check_type "dshow.h" IBaseFilter + # check for ioctl_meteor.h, ioctl_bt848.h and alternatives { check_header dev/bktr/ioctl_meteor.h && check_header dev/bktr/ioctl_bt848.h; } || @@ -2994,12 +3358,19 @@ check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_def check_header dev/ic/bt8xx.h check_header sndio.h -check_header sys/soundcard.h +if check_struct sys/soundcard.h audio_buf_info bytes; then + enable_safe sys/soundcard.h +else + check_cc -D__BSD_VISIBLE -D__XSI_VISIBLE <<EOF && add_cppflags -D__BSD_VISIBLE -D__XSI_VISIBLE && enable_safe sys/soundcard.h + #include <sys/soundcard.h> + audio_buf_info abc; +EOF +fi check_header soundcard.h enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound -enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && +enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_func sem_timedwait && check_func jack_port_get_latency_range -ljack enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio @@ -3012,9 +3383,11 @@ require X11 X11/Xlib.h XOpenDisplay -lX11 && require Xext X11/extensions/XShm.h XShmCreateImage -lXext && require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes -# check for VDA header -if ! disabled vda && check_header VideoDecodeAcceleration/VDADecoder.h; then - enable vda && add_extralibs -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore +if ! disabled vaapi; then + check_lib va/va.h vaInitialize -lva && { + check_cpp_condition va/va_version.h "VA_CHECK_VERSION(0,32,0)" || + warn "Please upgrade to VA-API >= 0.32 if you would like full VA-API support."; + } || disable vaapi fi if ! disabled vdpau && enabled vdpau_vdpau_h; then @@ -3025,6 +3398,8 @@ check_cpp_condition \ fi enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel" +enabled coverage && add_cflags "-fprofile-arcs -ftest-coverage" && add_ldflags "-fprofile-arcs -ftest-coverage" +test -n "$valgrind" && target_exec="$valgrind --error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp" # add some useful compiler flags if supported check_cflags -Wdeclaration-after-statement @@ -3036,17 +3411,17 @@ check_cflags -Wdisabled-optimization check_cflags -Wpointer-arith check_cflags -Wredundant-decls check_cflags -Wno-pointer-sign -check_cflags -Wcast-qual check_cflags -Wwrite-strings check_cflags -Wtype-limits check_cflags -Wundef check_cflags -Wmissing-prototypes +check_cflags -Wno-pointer-to-int-cast check_cflags -Wstrict-prototypes enabled extra_warnings && check_cflags -Winline # add some linker flags check_ldflags -Wl,--warn-common -check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample +check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic enabled xmm_clobber_test && \ @@ -3084,6 +3459,10 @@ else fi check_cflags -fno-math-errno check_cflags -fno-signed-zeros +check_cc -mno-red-zone <<EOF && noredzone_flags="-mno-red-zone" +int x; +EOF + if enabled icc; then # Just warnings, no remarks @@ -3120,7 +3499,6 @@ elif enabled gcc; then check_cflags -fno-tree-vectorize check_cflags -Werror=implicit-function-declaration check_cflags -Werror=missing-prototypes - check_cflags -Werror=declaration-after-statement elif enabled llvm_gcc; then check_cflags -mllvm -stack-alignment=16 elif enabled clang; then @@ -3150,9 +3528,41 @@ check_deps $CONFIG_LIST \ enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } +if test $target_os = "haiku"; then + disable memalign + disable posix_memalign +fi + ! enabled_any memalign posix_memalign aligned_malloc && enabled_any $need_memalign && enable memalign_hack +# add_dep lib dep +# -> enable ${lib}_deps_${dep} +# -> add $dep to ${lib}_deps only once +add_dep() { + lib=$1 + dep=$2 + enabled "${lib}_deps_${dep}" && return 0 + enable "${lib}_deps_${dep}" + prepend "${lib}_deps" $dep +} + +# merge deps lib components +# merge all ${component}_deps into ${lib}_deps and ${lib}_deps_* +merge_deps() { + lib=$1 + shift + for comp in $*; do + enabled $comp || continue + eval "dep=\"\$${comp}_deps\"" + for d in $dep; do + add_dep $lib $d + done + done +} + +merge_deps libavfilter $FILTER_LIST + echo "install prefix $prefix" echo "source path $source_path" echo "C compiler $cc" @@ -3160,6 +3570,9 @@ echo "ARCH $arch ($cpu)" if test "$build_suffix" != ""; then echo "build suffix $build_suffix" fi +if test "$progs_suffix" != ""; then + echo "progs suffix $progs_suffix" +fi if test "$extra_version" != ""; then echo "version string suffix $extra_version" fi @@ -3188,6 +3601,10 @@ if enabled arm; then fi if enabled mips; then echo "MMI enabled ${mmi-no}" + echo "MIPS FPU enabled ${mipsfpu-no}" + echo "MIPS32R2 enabled ${mips32r2-no}" + echo "MIPS DSP R1 enabled ${mipsdspr1-no}" + echo "MIPS DSP R2 enabled ${mipsdspr2-no}" fi if enabled ppc; then echo "AltiVec enabled ${altivec-no}" @@ -3198,10 +3615,12 @@ if enabled sparc; then echo "VIS enabled ${vis-no}" fi echo "debug symbols ${debug-no}" +echo "strip symbols ${stripping-no}" echo "optimize for size ${small-no}" echo "optimizations ${optimizations-no}" echo "static ${static-no}" echo "shared ${shared-no}" +echo "postprocessing support ${postproc-no}" echo "new filter support ${avfilter-no}" echo "network support ${network-no}" echo "threading support ${thread_type-no}" @@ -3213,12 +3632,17 @@ echo "libvdpau enabled ${vdpau-no}" echo "AVISynth enabled ${avisynth-no}" echo "frei0r enabled ${frei0r-no}" echo "gnutls enabled ${gnutls-no}" +echo "libaacplus enabled ${libaacplus-no}" +echo "libass enabled ${libass-no}" echo "libcdio support ${libcdio-no}" +echo "libcelt enabled ${libcelt-no}" echo "libdc1394 support ${libdc1394-no}" echo "libfaac enabled ${libfaac-no}" echo "libgsm enabled ${libgsm-no}" echo "libilbc enabled ${libilbc-no}" +echo "libmodplug enabled ${libmodplug-no}" echo "libmp3lame enabled ${libmp3lame-no}" +echo "libnut enabled ${libnut-no}" echo "libopencore-amrnb support ${libopencore_amrnb-no}" echo "libopencore-amrwb support ${libopencore_amrwb-no}" echo "libopencv support ${libopencv-no}" @@ -3227,7 +3651,10 @@ echo "libpulse enabled ${libpulse-no}" echo "librtmp enabled ${librtmp-no}" echo "libschroedinger enabled ${libschroedinger-no}" echo "libspeex enabled ${libspeex-no}" +echo "libstagefright-h264 enabled ${libstagefright_h264-no}" echo "libtheora enabled ${libtheora-no}" +echo "libutvideo enabled ${libutvideo-no}" +echo "libv4l2 enabled ${libv4l2-no}" echo "libvo-aacenc support ${libvo_aacenc-no}" echo "libvo-amrwbenc support ${libvo_amrwbenc-no}" echo "libvorbis enabled ${libvorbis-no}" @@ -3235,9 +3662,12 @@ echo "libvpx enabled ${libvpx-no}" echo "libx264 enabled ${libx264-no}" echo "libxavs enabled ${libxavs-no}" echo "libxvid enabled ${libxvid-no}" +echo "openal enabled ${openal-no}" echo "openssl enabled ${openssl-no}" echo "zlib enabled ${zlib-no}" echo "bzlib enabled ${bzlib-no}" +test -n "$random_seed" && + echo "random seed ${random_seed}" echo for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev; do @@ -3264,11 +3694,15 @@ echo "Creating config.mak and config.h..." test -e Makefile || $ln_s "$source_path/Makefile" . +enabled stripping || strip="echo skipping strip" + config_files="$TMPH config.mak" cat > config.mak <<EOF # Automatically generated by configure - do not modify! -LIBAV_CONFIGURATION=$LIBAV_CONFIGURATION +ifndef FFMPEG_CONFIG_MAK +FFMPEG_CONFIG_MAK=1 +FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION prefix=$prefix LIBDIR=\$(DESTDIR)$libdir SHLIBDIR=\$(DESTDIR)$shlibdir @@ -3277,9 +3711,13 @@ BINDIR=\$(DESTDIR)$bindir DATADIR=\$(DESTDIR)$datadir MANDIR=\$(DESTDIR)$mandir SRC_PATH=$source_path +ifndef MAIN_MAKEFILE +SRC_PATH:=\$(SRC_PATH:.%=..%) +endif CC_IDENT=$cc_ident ARCH=$arch CC=$cc +CXX=$cxx AS=$as LD=$ld DEPCC=$dep_cc @@ -3287,18 +3725,22 @@ YASM=$yasmexe YASMDEP=$yasmexe AR=$ar RANLIB=$ranlib +CP=cp -p LN_S=$ln_s +STRIP=$strip CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS +CXXFLAGS=$CXXFLAGS ASFLAGS=$ASFLAGS AS_O=$CC_O CC_O=$CC_O -DLLTOOL=$dlltool +CXX_O=$CXX_O LDFLAGS=$LDFLAGS -AVSERVERLDFLAGS=$AVSERVERLDFLAGS +FFSERVERLDFLAGS=$FFSERVERLDFLAGS SHFLAGS=$SHFLAGS YASMFLAGS=$YASMFLAGS BUILDSUF=$build_suffix +PROGSSUF=$progs_suffix FULLNAME=$FULLNAME LIBPREF=$LIBPREF LIBSUF=$LIBSUF @@ -3309,6 +3751,7 @@ EXESUF=$EXESUF EXTRA_VERSION=$extra_version DEPFLAGS=$DEPFLAGS CCDEP=$CCDEP +CXXDEP=$CXXDEP ASDEP=$ASDEP CC_DEPFLAGS=$CC_DEPFLAGS AS_DEPFLAGS=$AS_DEPFLAGS @@ -3323,7 +3766,7 @@ SDL_LIBS=$sdl_libs SDL_CFLAGS=$sdl_cflags LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD EXTRALIBS=$extralibs -INSTALL=install +INSTALL=$install LIBTARGET=${LIBTARGET} SLIBNAME=${SLIBNAME} SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION} @@ -3334,14 +3777,18 @@ SLIB_INSTALL_NAME=${SLIB_INSTALL_NAME} SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS} SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB} SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB} -SAMPLES:=${samples:-\$(LIBAV_SAMPLES)} +SAMPLES:=${samples:-\$(FATE_SAMPLES)} +NOREDZONE_FLAGS=$noredzone_flags EOF get_version(){ name=$1 file=$source_path/$2 +# This condition will be removed when we stop supporting old libpostproc versions +if ! test "$name" = LIBPOSTPROC || test "$postproc_version" = current; then eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }') eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO +fi lcname=$(tolower $name) eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak @@ -3353,23 +3800,29 @@ get_version LIBAVFILTER libavfilter/version.h get_version LIBAVFORMAT libavformat/version.h get_version LIBAVRESAMPLE libavresample/version.h get_version LIBAVUTIL libavutil/avutil.h +get_version LIBPOSTPROC libpostproc/postprocess.h +get_version LIBSWRESAMPLE libswresample/swresample.h get_version LIBSWSCALE libswscale/swscale.h cat > $TMPH <<EOF /* Automatically generated by configure - do not modify! */ -#ifndef LIBAV_CONFIG_H -#define LIBAV_CONFIG_H -#define LIBAV_CONFIGURATION "$(c_escape $LIBAV_CONFIGURATION)" -#define LIBAV_LICENSE "$(c_escape $license)" +#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 AVCONV_DATADIR "$(eval c_escape $datadir)" #define CC_TYPE "$cc_type" #define CC_VERSION $cc_version -#define restrict $_restrict +#define av_restrict $_restrict #define EXTERN_PREFIX "${extern_prefix}" #define EXTERN_ASM ${extern_prefix} #define SLIBSUF "$SLIBSUF" EOF +test -n "$assert_level" && + echo "#define ASSERT_LEVEL $assert_level" >>$TMPH + test -n "$malloc_prefix" && echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH @@ -3394,12 +3847,14 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST \ $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 /* LIBAV_CONFIG_H */" >> $TMPH +echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH +echo "endif # FFMPEG_CONFIG_MAK" >> config.mak # Do not overwrite an unchanged config.h to avoid superfluous rebuilds. cp_if_changed $TMPH config.h @@ -3413,6 +3868,12 @@ cat > $TMPH <<EOF #define AVUTIL_AVCONFIG_H EOF +test "$postproc_version" != current && cat >> $TMPH <<EOF +#define LIBPOSTPROC_VERSION_MAJOR $LIBPOSTPROC_VERSION_MAJOR +#define LIBPOSTPROC_VERSION_MINOR $LIBPOSTPROC_VERSION_MINOR +#define LIBPOSTPROC_VERSION_MICRO $LIBPOSTPROC_VERSION_MICRO +EOF + print_config AV_HAVE_ $TMPH $HAVE_LIST_PUB echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH @@ -3464,10 +3925,23 @@ Cflags: -I\${includedir} EOF } -pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM" -pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION" -pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION" -pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION" -pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" +libavfilter_pc_deps="" +enabled libavfilter_deps_avcodec && prepend libavfilter_pc_deps "libavcodec = $LIBAVCODEC_VERSION," +enabled libavfilter_deps_avformat && prepend libavfilter_pc_deps "libavformat = $LIBAVFORMAT_VERSION," +enabled libavfilter_deps_swscale && prepend libavfilter_pc_deps "libswscale = $LIBSWSCALE_VERSION," +enabled libavfilter_deps_swresample && prepend libavfilter_pc_deps "libswresample = $LIBSWRESAMPLE_VERSION," +enabled libavfilter_deps_postproc && prepend libavfilter_pc_deps "libpostproc = $LIBPOSTPROC_VERSION," +libavfilter_pc_deps=${libavfilter_pc_deps%, } + +libavdevice_pc_deps="libavformat = $LIBAVFORMAT_VERSION" +enabled lavfi_indev && prepend libavdevice_pc_deps "libavfilter = $LIBAVFILTER_VERSION," + +pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBM" +pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION" +pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION" +pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$libavdevice_pc_deps" +pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$libavfilter_pc_deps" +pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs" -pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION" +pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION" +pkgconfig_generate libswresample "FFmpeg audio rescaling library" "$LIBSWRESAMPLE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION" |