X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=6760c0ee430e01b66d276e7c1599755e51effe2d;hb=abc4376b31b672f8f38c30851cbe1acd016b6e18;hp=fbb71b6e16b9dae7278b6416e954c4bde757610d;hpb=19be0f3ca61bf36dcf145ba8241a449ff5acdeba;p=ffmpeg diff --git a/configure b/configure index fbb71b6e16b..6760c0ee430 100755 --- a/configure +++ b/configure @@ -166,27 +166,28 @@ External library support: --enable-bzlib enable bzlib [autodetect] --enable-frei0r enable frei0r video filtering --enable-gnutls enable gnutls [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-libfaac enable FAAC support via libfaac [no] + --enable-libfaac enable AAC encoding via libfaac [no] + --enable-libfdk-aac enable AAC encoding via libfdk-aac [no] --enable-libfreetype enable libfreetype [no] - --enable-libgsm enable GSM support via libgsm [no] + --enable-libgsm enable GSM de/encoding via libgsm [no] + --enable-libilbc enable iLBC de/encoding via libilbc [no] --enable-libmp3lame enable MP3 encoding via libmp3lame [no] - --enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [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 de/encoding 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-libschroedinger enable Dirac de/encoding via libschroedinger [no] + --enable-libspeex enable Speex de/encoding via libspeex [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] - --enable-libvorbis enable Vorbis encoding via libvorbis, - native implementation exists [no] - --enable-libvpx enable VP8 support via libvpx [no] + --enable-libvorbis enable Vorbis encoding via libvorbis [no] + --enable-libvpx enable VP8 de/encoding 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, @@ -659,6 +660,20 @@ check_ld(){ check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $libs $extralibs } +check_code(){ + log check_code "$@" + check=$1 + headers=$2 + code=$3 + shift 3 + { + for hdr in $headers; do + echo "#include <$hdr>" + done + echo "int main(void) { $code; return 0; }" + } | check_$check "$@" +} + check_cppflags(){ log check_cppflags "$@" set -- $($filter_cppflags "$@") @@ -816,15 +831,7 @@ check_type(){ type=$2 shift 2 disable_safe "$type" - incs="" - for hdr in $headers; do - incs="$incs -#include <$hdr>" - done - check_cc "$@" <$member; -EOF + check_code cc "$headers" "const void *p = &(($struct *)0)->$member" "$@" && + enable_safe "${struct}_${member}" } require(){ @@ -943,8 +943,10 @@ CONFIG_LIST=" libcdio libdc1394 libfaac + libfdk_aac libfreetype libgsm + libilbc libmp3lame libopencore_amrnb libopencore_amrwb @@ -1049,6 +1051,7 @@ HAVE_LIST=" $ARCH_EXT_LIST $HAVE_LIST_PUB $THREADS_LIST + aligned_malloc aligned_stack alsa_asoundlib_h altivec_h @@ -1056,8 +1059,10 @@ HAVE_LIST=" asm_mod_y attribute_may_alias attribute_packed + cbrtf closesocket cmov + cpuid dcbzl dev_bktr_ioctl_bt848_h dev_bktr_ioctl_meteor_h @@ -1067,6 +1072,7 @@ HAVE_LIST=" dlfcn_h dlopen dos_paths + dxva_h ebp_available ebx_available exp2 @@ -1078,15 +1084,22 @@ HAVE_LIST=" fork getaddrinfo gethrtime + getopt GetProcessAffinityMask GetProcessMemoryInfo GetProcessTimes + GetSystemTimeAsFileTime getrusage + gettimeofday gnu_as ibm_asm inet_aton inline_asm + io_h isatty + isinf + isnan + jack_port_get_latency_range ldbrx libdc1394_1 libdc1394_2 @@ -1106,17 +1119,23 @@ HAVE_LIST=" MapViewOfFile memalign mkstemp + mm_empty mmap + nanosleep netinet_sctp_h poll_h posix_memalign + rdtsc + rint round roundf + rweflags sched_getaffinity sdl sdl_video_size setmode setrlimit + Sleep sndio_h socklen_t soundcard_h @@ -1124,7 +1143,10 @@ HAVE_LIST=" strptime strtok_r struct_addrinfo + struct_group_source_req + struct_ip_mreq_source struct_ipv6_mreq + struct_pollfd struct_rusage_ru_maxrss struct_sockaddr_in6 struct_sockaddr_sa_len @@ -1140,14 +1162,19 @@ HAVE_LIST=" sys_resource_h sys_select_h sys_soundcard_h + sys_time_h sys_videoio_h threads trunc truncf + unistd_h + usleep vfp_args VirtualAlloc + windows_h winsock2_h xform_asm + xgetbv xmm_clobbers yasm " @@ -1165,6 +1192,7 @@ CONFIG_EXTRA=" huffman lgplv3 lpc + vp3dsp " CMDLINE_SELECT=" @@ -1388,7 +1416,9 @@ vc1_vdpau_decoder_select="vdpau vc1_decoder" vc1image_decoder_select="vc1_decoder" vorbis_decoder_select="mdct" vorbis_encoder_select="mdct" -vp6_decoder_select="huffman" +vp3_decoder_select="vp3dsp" +vp5_decoder_select="vp3dsp" +vp6_decoder_select="huffman vp3dsp" vp6a_decoder_select="vp6_decoder" vp6f_decoder_select="vp6_decoder" vp8_decoder_select="h264pred h264qpel" @@ -1422,15 +1452,19 @@ h264_parser_select="golomb h264dsp h264pred" # external libraries libfaac_encoder_deps="libfaac" +libfdk_aac_encoder_deps="libfdk_aac" libgsm_decoder_deps="libgsm" libgsm_encoder_deps="libgsm" libgsm_ms_decoder_deps="libgsm" libgsm_ms_encoder_deps="libgsm" +libilbc_decoder_deps="libilbc" +libilbc_encoder_deps="libilbc" 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" @@ -1495,6 +1529,8 @@ vfwcap_indev_extralibs="-lavicap32" x11_grab_device_indev_deps="x11grab XShmCreateImage" # protocols +ffrtmphttp_protocol_deps="!librtmp_protocol" +ffrtmphttp_protocol_select="http_protocol" gopher_protocol_deps="network" httpproxy_protocol_deps="network" httpproxy_protocol_select="tcp_protocol" @@ -1510,6 +1546,12 @@ mmsh_protocol_select="http_protocol" mmst_protocol_deps="network" rtmp_protocol_deps="!librtmp_protocol" rtmp_protocol_select="tcp_protocol" +rtmps_protocol_deps="!librtmp_protocol" +rtmps_protocol_select="tls_protocol" +rtmpt_protocol_deps="!librtmp_protocol" +rtmpt_protocol_select="ffrtmphttp_protocol" +rtmpts_protocol_deps="!librtmp_protocol" +rtmpts_protocol_select="ffrtmphttp_protocol" rtp_protocol_select="udp_protocol" sctp_protocol_deps="network netinet_sctp_h" tcp_protocol_deps="network" @@ -1530,16 +1572,17 @@ frei0r_src_filter_extralibs='$ldl' hqdn3d_filter_deps="gpl" resample_filter_deps="avresample" ocv_filter_deps="libopencv" +scale_filter_deps="swscale" yadif_filter_deps="gpl" # libraries avdevice_deps="avcodec avformat" -avfilter_deps="swscale" avformat_deps="avcodec" # programs -avconv_deps="avcodec avfilter avformat avresample swscale format_filter - setpts_filter" +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" @@ -1563,7 +1606,6 @@ test_deps(){ done } -mxf_d10_test_deps="avfilter" seek_lavf_mxf_d10_test_deps="mxf_d10_test" test_deps _muxer _demuxer \ @@ -1609,7 +1651,6 @@ shlibdir_default="$libdir_default" # toolchain ar_default="ar" cc_default="gcc" -cc_version=\"unknown\" host_cc_default="gcc" ln_s="ln -sf" nm_default="nm" @@ -1669,7 +1710,7 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' AS_O='-o $@' CC_O='-o $@' -host_cflags='-D_ISOC99_SOURCE -O3 -g' +host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g' host_libs='-lm' target_path='$(CURDIR)' @@ -1911,7 +1952,6 @@ filter_cppflags=echo if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then cc_type=llvm_gcc - cc_version=__VERSION__ gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)') cc_ident="llvm-gcc $($cc -dumpversion) $gcc_extra_ver" CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' @@ -1920,7 +1960,6 @@ if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then size_cflags='-Os' elif $cc -v 2>&1 | grep -qi ^gcc; then cc_type=gcc - cc_version=__VERSION__ gcc_version=$($cc --version | head -n1) gcc_basever=$($cc -dumpversion) gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)') @@ -1934,7 +1973,6 @@ elif $cc -v 2>&1 | grep -qi ^gcc; then size_cflags='-Os' elif $cc --version 2>/dev/null | grep -q Intel; then cc_type=icc - cc_version="AV_STRINGIFY(__INTEL_COMPILER)" cc_ident=$($cc --version | head -n1) icc_version=$($cc -dumpversion) CC_DEPFLAGS='-MMD' @@ -1944,13 +1982,11 @@ elif $cc --version 2>/dev/null | grep -q Intel; then noopt_cflags='-O1' elif $cc -v 2>&1 | grep -q xlc; then cc_type=xlc - cc_version="AV_STRINGIFY(__IBMC__)" cc_ident=$($cc -qversion 2>/dev/null | head -n1) speed_cflags='-O5' size_cflags='-O5 -qcompact' elif $cc -V 2>/dev/null | grep -q Compaq; then cc_type=ccc - cc_version="AV_STRINGIFY(__DECC_VER)" cc_ident=$($cc -V | head -n1 | cut -d' ' -f1-3) DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -M' debuglevel=3 @@ -1960,7 +1996,6 @@ elif $cc -V 2>/dev/null | grep -q Compaq; then elif $cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then test -d "$sysroot" || die "No valid sysroot specified." cc_type=armcc - cc_version="AV_STRINGIFY(__ARMCC_VERSION)" cc_ident=$($cc --vsn | head -n1) armcc_conf="$PWD/armcc.conf" $cc --arm_linux_configure \ @@ -1978,7 +2013,6 @@ elif $cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then filter_asflags="filter_out -W${armcc_opt}*" elif $cc -version 2>/dev/null | grep -q TMS470; then cc_type=tms470 - cc_version="AV_STRINGIFY(__TI_COMPILER_VERSION__)" cc_ident=$($cc -version | head -n1 | tr -s ' ') cc="$cc --gcc --abi=eabi -eo=.o -mc -me" CC_O='-fr=$(@D)' @@ -2018,8 +2052,6 @@ elif $cc -version 2>/dev/null | grep -q TMS470; then } elif $cc -v 2>&1 | grep -q clang; then cc_type=clang - $cc -dM -E $TMPC | grep -q __clang_version__ && - cc_version=__clang_version__ || cc_version=__VERSION__ cc_ident=$($cc --version | head -n1) CC_DEPFLAGS='-MMD' AS_DEPFLAGS='-MMD' @@ -2027,7 +2059,6 @@ elif $cc -v 2>&1 | grep -q clang; then size_cflags='-Os' elif $cc -V 2>&1 | grep -q Sun; then cc_type=suncc - cc_version="AV_STRINGIFY(__SUNPRO_C)" cc_ident=$($cc -V 2>&1 | head -n1 | cut -d' ' -f 2-) DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)' DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1' @@ -2070,7 +2101,6 @@ elif $cc -V 2>&1 | grep -q Sun; then } elif $cc -v 2>&1 | grep -q 'PathScale\|Path64'; then cc_type=pathscale - cc_version=__PATHSCALE__ cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :) CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' @@ -2079,7 +2109,6 @@ elif $cc -v 2>&1 | grep -q 'PathScale\|Path64'; then filter_cflags='filter_out -Wdisabled-optimization' elif $cc -v 2>&1 | grep -q Open64; then cc_type=open64 - cc_version=__OPEN64__ cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :) CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' @@ -2088,7 +2117,6 @@ elif $cc -v 2>&1 | grep -q Open64; then filter_cflags='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros' elif $cc -V 2>&1 | grep -q Portland; then cc_type=pgi - cc_version='AV_STRINGIFY(__PGIC__.__PGIC_MINOR__.__PGIC_PATCHLEVEL__)' cc_ident="PGI $($cc -V 2>&1 | awk '/^pgcc/ { print $2; exit }')" opt_common='-alias=ansi -Mlre -Mpre' speed_cflags="-O3 -Mautoinline -Munroll=c:4 $opt_common" @@ -2372,9 +2400,7 @@ case "$arch" in ;; x86) subarch="x86_32" - check_cc <= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame 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 @@ -2982,7 +3041,8 @@ 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 jack_port_get_latency_range -ljack enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio @@ -3031,7 +3091,7 @@ check_ldflags -Wl,--warn-common check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic -enabled xmm_clobber_test && \ +enabled xmm_clobber_test && check_ldflags -Wl,--wrap,avcodec_open2 \ -Wl,--wrap,avcodec_decode_audio4 \ -Wl,--wrap,avcodec_decode_video2 \ @@ -3039,7 +3099,7 @@ enabled xmm_clobber_test && \ -Wl,--wrap,avcodec_encode_audio2 \ -Wl,--wrap,avcodec_encode_video \ -Wl,--wrap,avcodec_encode_subtitle \ - -Wl,--wrap,sws_scale || \ + -Wl,--wrap,sws_scale || disable xmm_clobber_test echo "X{};" > $TMPV @@ -3086,8 +3146,8 @@ if enabled icc; then # icc 11.0 and 11.1 work with ebp_available, but don't pass the test enable ebp_available if enabled x86_32; then - test ${icc_version%%.*} -ge 11 && \ - check_cflags -falign-stack=maintain-16-byte || \ + test ${icc_version%%.*} -ge 11 && + check_cflags -falign-stack=maintain-16-byte || disable aligned_stack fi elif enabled ccc; then @@ -3132,7 +3192,7 @@ check_deps $CONFIG_LIST \ enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } -! enabled_any memalign posix_memalign && +! enabled_any memalign posix_memalign aligned_malloc && enabled_any $need_memalign && enable memalign_hack echo "install prefix $prefix" @@ -3198,7 +3258,9 @@ echo "gnutls enabled ${gnutls-no}" echo "libcdio support ${libcdio-no}" echo "libdc1394 support ${libdc1394-no}" echo "libfaac enabled ${libfaac-no}" +echo "libfdk-aac enabled ${libfdk_aac-no}" echo "libgsm enabled ${libgsm-no}" +echo "libilbc enabled ${libilbc-no}" echo "libmp3lame enabled ${libmp3lame-no}" echo "libopencore-amrnb support ${libopencore_amrnb-no}" echo "libopencore-amrwb support ${libopencore_amrwb-no}" @@ -3319,22 +3381,22 @@ SAMPLES:=${samples:-\$(LIBAV_SAMPLES)} EOF get_version(){ - name=$1 - file=$source_path/$2 + lcname=$1 + name=$(toupper $lcname) + file=$source_path/$lcname/version.h eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }') eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO - lcname=$(tolower $name) eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak } -get_version LIBAVCODEC libavcodec/version.h -get_version LIBAVDEVICE libavdevice/avdevice.h -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 LIBSWSCALE libswscale/swscale.h +get_version libavcodec +get_version libavdevice +get_version libavfilter +get_version libavformat +get_version libavresample +get_version libavutil +get_version libswscale cat > $TMPH < $TMPH <>$TMPH -if enabled small || disabled optimizations; then - echo "#undef av_always_inline" >> $TMPH - if enabled small; then - echo "#define av_always_inline inline" >> $TMPH - else - echo "#define av_always_inline av_unused" >> $TMPH - fi -fi - if enabled yasm; then append config_files $TMPASM printf '' >$TMPASM