X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=8fbc31550af531857f6cb3c0a8ea1c7eec2ae6cb;hb=a763b46298ab70fb0b38aec30c922a6a9ad752e2;hp=9cee2a0320050f81914188a95288949c0a0bd479;hpb=124deea1a0ccc4296cc6021231a7e6fbf336ff3a;p=ffmpeg diff --git a/configure b/configure index 9cee2a03200..8fbc31550af 100755 --- a/configure +++ b/configure @@ -76,6 +76,7 @@ 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] @@ -88,6 +89,7 @@ Configuration options: --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] @@ -163,22 +165,26 @@ 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] --enable-libfaac enable FAAC support via libfaac [no] --enable-libfreetype enable libfreetype [no] --enable-libgsm enable GSM support via libgsm [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-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] @@ -205,16 +211,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) @@ -581,6 +590,10 @@ add_cflags(){ append CFLAGS $($filter_cflags "$@") } +add_cxxflags(){ + append CXXFLAGS $($filter_cflags "$@") +} + add_asflags(){ append ASFLAGS $($filter_asflags "$@") } @@ -605,6 +618,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 @@ -640,12 +660,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 } @@ -665,9 +687,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 } @@ -724,7 +754,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(){ @@ -756,6 +805,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" @@ -771,7 +828,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(){ @@ -851,6 +908,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" @@ -931,12 +996,15 @@ CONFIG_LIST=" h264pred hardcoded_tables huffman + libaacplus + libcdio libcelt libdc1394 libdirac libfaac libfreetype libgsm + libmodplug libmp3lame libnut libopencore_amrnb @@ -946,6 +1014,7 @@ CONFIG_LIST=" librtmp libschroedinger libspeex + libstagefright_h264 libtheora libvo_aacenc libvo_amrwbenc @@ -973,11 +1042,13 @@ CONFIG_LIST=" small sram static + swresample swscale swscale_alpha thumb vaapi vdpau + version2 version3 x11grab zlib @@ -1046,6 +1117,7 @@ HAVE_LIST=" alsa_asoundlib_h altivec_h arpa_inet_h + asm_mod_y attribute_may_alias attribute_packed bswap @@ -1100,6 +1172,7 @@ HAVE_LIST=" memalign mkstemp mmap + PeekNamedPipe posix_memalign round roundf @@ -1143,6 +1216,7 @@ HAVE_LIST=" CONFIG_EXTRA=" avutil gplv3 + gplv2 lgplv3 " @@ -1177,9 +1251,11 @@ CMDLINE_SET=" arch as build_suffix + progs_suffix cc cpu cross_prefix + cxx dep_cc extra_version host_cc @@ -1205,6 +1281,7 @@ CMDLINE_SET=" CMDLINE_APPEND=" extra_cflags + extra_cxxflags " # code dependency declarations @@ -1343,6 +1420,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" @@ -1370,10 +1448,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" @@ -1395,6 +1474,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" @@ -1408,6 +1488,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" @@ -1416,6 +1497,7 @@ libgsm_decoder_deps="libgsm" libgsm_encoder_deps="libgsm" libgsm_ms_decoder_deps="libgsm" libgsm_ms_encoder_deps="libgsm" +libmodplug_demuxer_deps="libmodplug" libmp3lame_encoder_deps="libmp3lame" libopencore_amrnb_decoder_deps="libopencore_amrnb" libopencore_amrnb_encoder_deps="libopencore_amrnb" @@ -1424,6 +1506,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" @@ -1475,6 +1559,7 @@ 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" @@ -1501,8 +1586,10 @@ tcp_protocol_deps="network" udp_protocol_deps="network" # filters -abuffer="strtok_r" +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" @@ -1525,10 +1612,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" -av_deps="avcodec avformat swscale" -av_select="buffer_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" @@ -1547,11 +1634,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 \ @@ -1644,6 +1734,7 @@ shlibdir_default="$libdir_default" # toolchain ar_default="ar" cc_default="gcc" +cxx_default="g++" cc_version=\"unknown\" host_cc_default="gcc" install="install" @@ -1687,6 +1778,7 @@ enable postproc enable protocols enable static enable stripping +enable swresample enable swscale enable swscale_alpha @@ -1708,6 +1800,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' @@ -1860,6 +1953,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}" @@ -1867,7 +1961,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 @@ -1909,6 +2003,7 @@ tmpfile(){ trap 'rm -f -- $TMPFILES' EXIT tmpfile TMPC .c +tmpfile TMPCPP .cpp tmpfile TMPE $EXESUF tmpfile TMPH .h tmpfile TMPO .o @@ -2126,9 +2221,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 @@ -2183,13 +2280,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" ;; @@ -2363,6 +2456,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 < @@ -2387,6 +2481,11 @@ EOF spic=$shared fi ;; + ppc) + check_cc < mapfile && add_ldflags -Wl,-M,mapfile nm_opts='-P -g' ;; netbsd) @@ -2586,11 +2691,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 @@ -2598,7 +2705,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 @@ -2655,7 +2766,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" \ @@ -2916,6 +3029,7 @@ enabled libdirac && require_pkg_config dirac \ 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 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 @@ -2925,6 +3039,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 @@ -3003,6 +3120,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 && @@ -3047,7 +3167,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 @@ -3074,6 +3194,10 @@ else fi check_cflags -fno-math-errno check_cflags -fno-signed-zeros +check_cc -mno-red-zone <