X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=a3fdbfff0df23b16be238783b3e060d760b56421;hb=125ea3ee06c4d71082bee3fc03c65d7c8c10d68c;hp=3ad73df84278d7f57f8d8f00a69c9db91940644b;hpb=e2cc3311246376e902f0defc6c57bd554babcf39;p=ffmpeg diff --git a/configure b/configure index 3ad73df8427..a3fdbfff0df 100755 --- a/configure +++ b/configure @@ -76,17 +76,20 @@ Configuration options: --enable-shared build shared libraries [no] --enable-gpl allow use of GPL code, the resulting libs and binaries will be under GPL [no] + --enable-version2 force GPL version 2 [no] --enable-version3 upgrade (L)GPL to version 3 [no] --enable-nonfree allow use of nonfree code, the resulting libs and binaries will be unredistributable [no] --disable-doc do not build documentation --disable-ffmpeg disable ffmpeg build + --disable-avconv disable avconv 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] @@ -162,9 +165,11 @@ External library support: --enable-bzlib enable bzlib [autodetect] --enable-libcelt enable CELT/Opus decoding via libcelt [no] --enable-frei0r enable frei0r video filtering + --enable-libaacplus enable AAC+ encoding via libaacplus [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-libcdio enable audio CD grabbing with libcdio --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [no] --enable-libdirac enable Dirac support via libdirac [no] @@ -177,7 +182,8 @@ External library support: --enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no] --enable-librtmp enable RTMP[E] support via librtmp [no] --enable-libschroedinger enable Dirac support via libschroedinger [no] - --enable-libspeex enable Speex decoding via libspeex [no] + --enable-libspeex enable Speex encoding and decoding via libspeex [no] + --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no] --enable-libtheora enable Theora encoding via libtheora [no] --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] @@ -204,16 +210,19 @@ Advanced options (experts only): --ar=AR use archive tool AR [$ar_default] --as=AS use assembler AS [$as_default] --cc=CC use C compiler CC [$cc_default] + --cxx=CXX use C compiler CXX [$cxx_default] --ld=LD use linker LD --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 [] --build-suffix=SUFFIX library name suffix [] + --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) @@ -580,6 +589,10 @@ add_cflags(){ append CFLAGS $($filter_cflags "$@") } +add_cxxflags(){ + append CXXFLAGS $($filter_cflags "$@") +} + add_asflags(){ append ASFLAGS $($filter_asflags "$@") } @@ -604,6 +617,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 @@ -639,12 +659,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 } @@ -664,9 +686,17 @@ int x; EOF } +check_cxxflags(){ + log check_cxxflags "$@" + set -- $($filter_cflags "$@") + check_cxx "$@" < float foo(float f) { return $func(f); } -int main(void){ return 0; } +int main(void){ return (int) foo; } EOF } @@ -723,7 +753,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(){ @@ -755,6 +804,14 @@ 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" @@ -770,7 +827,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(){ @@ -850,6 +907,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" @@ -917,6 +982,7 @@ CONFIG_LIST=" dxva2 fastdiv ffmpeg + avconv ffplay ffprobe ffserver @@ -929,6 +995,8 @@ CONFIG_LIST=" h264pred hardcoded_tables huffman + libaacplus + libcdio libcelt libdc1394 libdirac @@ -944,6 +1012,7 @@ CONFIG_LIST=" librtmp libschroedinger libspeex + libstagefright_h264 libtheora libvo_aacenc libvo_amrwbenc @@ -971,11 +1040,13 @@ CONFIG_LIST=" small sram static + swresample swscale swscale_alpha thumb vaapi vdpau + version2 version3 x11grab zlib @@ -1098,6 +1169,7 @@ HAVE_LIST=" memalign mkstemp mmap + PeekNamedPipe posix_memalign round roundf @@ -1141,6 +1213,7 @@ HAVE_LIST=" CONFIG_EXTRA=" avutil gplv3 + gplv2 lgplv3 " @@ -1175,9 +1248,11 @@ CMDLINE_SET=" arch as build_suffix + progs_suffix cc cpu cross_prefix + cxx dep_cc extra_version host_cc @@ -1203,6 +1278,7 @@ CMDLINE_SET=" CMDLINE_APPEND=" extra_cflags + extra_cxxflags " # code dependency declarations @@ -1341,6 +1417,7 @@ nellymoser_decoder_select="mdct sinewin" nellymoser_encoder_select="mdct sinewin" png_decoder_select="zlib" png_encoder_select="zlib" +prores_gpl_decoder_deps="version2 gpl" qcelp_decoder_select="lsp" qdm2_decoder_select="mdct rdft mpegaudiodsp" ra_144_encoder_select="lpc" @@ -1368,10 +1445,11 @@ tscc_decoder_select="zlib" twinvq_decoder_select="mdct lsp sinewin" vc1_decoder_select="h263_decoder" vc1_crystalhd_decoder_select="crystalhd" -vc1_dxva2_hwaccel_deps="dxva2api_h DXVA_PictureParameters_wDecodedPictureIndex" +vc1_dxva2_hwaccel_deps="dxva2api_h" vc1_dxva2_hwaccel_select="dxva2 vc1_decoder" vc1_vaapi_hwaccel_select="vaapi vc1_decoder" vc1_vdpau_decoder_select="vdpau vc1_decoder" +vc1image_decoder_select="vc1_decoder" vorbis_decoder_select="mdct" vorbis_encoder_select="mdct" vp6_decoder_select="huffman" @@ -1393,6 +1471,7 @@ 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" +wmv3image_decoder_select="wmv3_decoder" zlib_decoder_select="zlib" zlib_encoder_select="zlib" zmbv_decoder_select="zlib" @@ -1406,6 +1485,7 @@ 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" libdirac_decoder_deps="libdirac !libschroedinger" libdirac_encoder_deps="libdirac" @@ -1422,6 +1502,8 @@ libopenjpeg_decoder_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" @@ -1472,6 +1554,8 @@ 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 sem_timedwait" +lavfi_indev_deps="avfilter" +libcdio_indev_deps="libcdio" libdc1394_indev_deps="libdc1394" openal_indev_deps="openal" oss_indev_deps_any="soundcard_h sys_soundcard_h" @@ -1498,15 +1582,21 @@ tcp_protocol_deps="network" udp_protocol_deps="network" # filters +abuffer_filter_deps="strtok_r" +aconvert_filter_deps="strtok_r" +aformat_filter_deps="strtok_r" +amovie_filter_deps="avcodec avformat" blackframe_filter_deps="gpl" boxblur_filter_deps="gpl" cropdetect_filter_deps="gpl" +delogo_filter_deps="gpl" drawtext_filter_deps="libfreetype" frei0r_filter_deps="frei0r dlopen strtok_r" frei0r_src_filter_deps="frei0r dlopen strtok_r" hqdn3d_filter_deps="gpl" movie_filter_deps="avcodec avformat" mp_filter_deps="gpl avcodec" +mptestsrc_filter_deps="gpl" negate_filter_deps="lut_filter" ocv_filter_deps="libopencv" scale_filter_deps="swscale" @@ -1518,8 +1608,10 @@ avformat_deps="avcodec" postproc_deps="gpl" # programs -ffmpeg_deps="avcodec avformat swscale" +ffmpeg_deps="avcodec avformat swscale swresample" ffmpeg_select="buffer_filter buffersink_filter" +avconv_deps="avcodec avformat swscale" +avconv_select="buffer_filter" ffplay_deps="avcodec avformat swscale sdl" ffplay_select="buffersink_filter rdft" ffprobe_deps="avcodec avformat" @@ -1538,11 +1630,14 @@ test_deps(){ dep=${v%=*} tests=${v#*=} for name in ${tests}; do - eval ${name}_test_deps="'${dep}$suf1 ${dep}$suf2'" + append ${name}_test_deps ${dep}$suf1 ${dep}$suf2 done done } +mxf_d10_test_deps="avfilter" +seek_lavf_mxf_d10_test_deps="mxf_d10_test" + test_deps _encoder _decoder \ adpcm_g726=g726 \ adpcm_ima_qt \ @@ -1635,6 +1730,7 @@ shlibdir_default="$libdir_default" # toolchain ar_default="ar" cc_default="gcc" +cxx_default="g++" cc_version=\"unknown\" host_cc_default="gcc" install="install" @@ -1668,6 +1764,7 @@ enable debug enable doc enable fastdiv enable ffmpeg +enable avconv enable ffplay enable ffprobe enable ffserver @@ -1677,6 +1774,7 @@ enable postproc enable protocols enable static enable stripping +enable swresample enable swscale enable swscale_alpha @@ -1698,6 +1796,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' @@ -1850,6 +1949,7 @@ set_default arch target_os 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}" @@ -1857,7 +1957,7 @@ strip_default="${cross_prefix}${strip_default}" sysinclude_default="${sysroot}/usr/include" -set_default cc nm pkg_config strip sysinclude +set_default cc cxx nm pkg_config strip sysinclude enabled cross_compile || host_cc_default=$cc set_default host_cc @@ -1899,6 +1999,7 @@ tmpfile(){ trap 'rm -f -- $TMPFILES' EXIT tmpfile TMPC .c +tmpfile TMPCPP .cpp tmpfile TMPE $EXESUF tmpfile TMPH .h tmpfile TMPO .o @@ -2116,9 +2217,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 @@ -2173,13 +2276,9 @@ case "$arch" in arch="parisc" subarch="parisc64" ;; - "Power Macintosh"|ppc|powerpc) + "Power Macintosh"|ppc|powerpc|ppc64|powerpc64) arch="ppc" ;; - ppc64|powerpc64) - arch="ppc" - subarch="ppc64" - ;; s390|s390x) arch="s390" ;; @@ -2353,6 +2452,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 < @@ -2377,6 +2477,11 @@ EOF spic=$shared fi ;; + ppc) + check_cc < mapfile && add_ldflags -Wl,-M,mapfile nm_opts='-P -g' ;; netbsd) @@ -2530,6 +2641,7 @@ case $target_os in add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE ;; gnu) + add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 ;; qnx) add_cppflags -D_QNX_SOURCE @@ -2575,11 +2687,13 @@ die_license_disabled() { enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; } } +die_license_disabled gpl libcdio 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 version3 libopencore_amrnb @@ -2587,7 +2701,11 @@ die_license_disabled version3 libopencore_amrwb die_license_disabled version3 libvo_aacenc die_license_disabled version3 libvo_amrwbenc +! enabled gpl && enabled version2 && die "LGPLv2 mode is unsupported" +enabled version3 && enabled version2 && ! enabled nonfree && die "GPLv2 (not v2+) and GPLv3 without --enable-nonfree" + enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; } +enabled version2 && enabled gpl && enable gplv2 disabled optimizations || check_cflags -fomit-frame-pointer @@ -2644,7 +2762,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 <= 2.0.0" aacplus.h aacplusEncOpen -laacplus enabled libdc1394 && require_pkg_config libdc1394-2 dc1394/dc1394.h dc1394_new enabled libdirac && require_pkg_config dirac \ "libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h" \ @@ -2914,6 +3032,9 @@ enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg 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 enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg 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 @@ -2992,6 +3113,9 @@ 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 libcdio && + check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open "-lcdio_paranoia -lcdio_cdda -lcdio" + enabled x11grab && check_header X11/Xlib.h && check_header X11/extensions/XShm.h && @@ -3036,7 +3160,7 @@ enabled extra_warnings && check_cflags -Winline # add some linker flags check_ldflags -Wl,--warn-common -check_ldflags -Wl,-rpath-link=libpostproc:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil +check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic echo "X{};" > $TMPV @@ -3063,6 +3187,10 @@ else fi check_cflags -fno-math-errno check_cflags -fno-signed-zeros +check_cc -mno-red-zone < $TMPH <