X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=1aae93b3d243ca192cc12eb46d8607ede8407ebe;hb=7ac6d2423e9bf0f40c67be9a0ca7600b516b0282;hp=882f43c4626a92668fab392d961387c570fa718c;hpb=d4f8cecc86ea36021b716c3f8ce76a54d7944fc7;p=ffmpeg diff --git a/configure b/configure index 882f43c4626..1aae93b3d24 100755 --- a/configure +++ b/configure @@ -100,6 +100,7 @@ Configuration options: --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary) --enable-gray enable full grayscale support (slower color) --disable-swscale-alpha disable alpha channel support in swscale + --disable-all disable building components, libraries and programs Program options: --disable-programs do not build command line programs @@ -119,15 +120,15 @@ Component options: --disable-avresample disable libavresample build [no] --disable-pthreads disable pthreads [auto] --disable-w32threads disable Win32 threads [auto] - --enable-x11grab enable X11 grabbing [no] --disable-network disable network support [no] --disable-dct disable DCT code - --disable-dwt disable DWT code --disable-lsp disable LSP code --disable-lzo disable LZO decoder code --disable-mdct disable MDCT code --disable-rdft disable RDFT code --disable-fft disable FFT code + +Hardware accelerators: --enable-dxva2 enable DXVA2 code --enable-vaapi enable VAAPI code --enable-vda enable VDA code @@ -197,12 +198,13 @@ External library support: --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 [no] - --enable-libvpx enable VP8 de/encoding via libvpx [no] + --enable-libvpx enable VP8 and VP9 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, native MPEG-4/Xvid encoder exists [no] --enable-openssl enable openssl [no] + --enable-x11grab enable X11 grabbing [no] --enable-zlib enable zlib [autodetect] Advanced options (experts only): @@ -222,6 +224,7 @@ Advanced options (experts only): --ld=LD use linker LD --host-cc=HOSTCC use host C compiler HOSTCC --host-cflags=HCFLAGS use HCFLAGS when compiling for host + --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host --host-ld=HOSTLD use host linker HOSTLD --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host --host-libs=HLIBS use libs HLIBS when linking for host @@ -646,6 +649,10 @@ add_extralibs(){ prepend extralibs $($ldflags_filter "$@") } +add_host_cppflags(){ + append host_cppflags "$@" +} + add_host_cflags(){ append host_cflags $($host_cflags_filter "$@") } @@ -960,6 +967,13 @@ check_host_cc(){ check_cmd $host_cc $host_cflags "$@" $HOSTCC_C $(hostcc_o $TMPO) $TMPC } +check_host_cppflags(){ + log check_host_cppflags "$@" + check_host_cc "$@" </dev/null | grep -q Intel; then + elif $_cc --version 2>/dev/null | grep -q ^icc; then _type=icc _ident=$($_cc --version | head -n1) _depflags='-MMD' @@ -2771,7 +2851,7 @@ check_64bit(){ } case "$arch" in - alpha|ia64) + aarch64|alpha|ia64) spic=$shared ;; mips) @@ -2828,15 +2908,9 @@ case $target_os in oss_outdev_extralibs="-lossaudio" ;; openbsd|bitrig) - # On OpenBSD 4.5. the compiler does not use PIC unless - # explicitly using -fPIC. Libav 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)' + SLIB_INSTALL_NAME='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)' SLIB_INSTALL_LINKS= oss_indev_extralibs="-lossaudio" oss_outdev_extralibs="-lossaudio" @@ -2891,7 +2965,6 @@ case $target_os in dlltool="${cross_prefix}dlltool" ranlib=: enable dos_paths - add_cppflags -U__STRICT_ANSI__ ;; win32|win64) if enabled shared; then @@ -3004,7 +3077,6 @@ case $target_os in network_extralibs='-lbsd' exeobjs=compat/plan9/main.o disable avserver - ln_s='ln -s -f' cp_f='cp' ;; none) @@ -3016,20 +3088,23 @@ esac # determine libc flavour +# uclibc defines __GLIBC__, so it needs to be checked before glibc. if check_cpp_condition features.h "defined __UCLIBC__"; then libc_type=uclibc add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 elif check_cpp_condition features.h "defined __GLIBC__"; then libc_type=glibc add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 +# MinGW headers can be installed on Cygwin, so check for newlib first. +elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then + libc_type=newlib + add_cppflags -U__STRICT_ANSI__ elif check_header _mingw.h; then libc_type=mingw check_cpp_condition _mingw.h \ "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) || \ (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" || die "ERROR: MinGW runtime version must be >= 3.15." -elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then - libc_type=newlib add_cppflags -U__STRICT_ANSI__ elif check_func_headers stdlib.h _get_doserrno; then libc_type=msvcrt @@ -3395,6 +3470,7 @@ check_header sys/time.h check_header unistd.h check_header vdpau/vdpau.h check_header vdpau/vdpau_x11.h +check_header VideoDecodeAcceleration/VDADecoder.h check_header windows.h check_header X11/extensions/XvMClib.h @@ -3450,7 +3526,9 @@ enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_in enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac 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 libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do + check_lib "${gsm_hdr}" gsm_create -lgsm && break; + done || die "ERROR: libgsm not found"; } enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc enabled libmp3lame && require "libmp3lame >= 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 @@ -3467,10 +3545,12 @@ enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -l 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 || + enabled libvpx_vp8_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 VPX_CQ" -lvpx || - die "ERROR: libvpx encoder version must be >=0.9.6"; } } + enabled libvpx_vp8_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_CQ" -lvpx || + die "ERROR: libvpx encoder version must be >=0.9.6"; } + enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; } + enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx" -lvpx || disable libvpx_vp9_encoder; } } 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."; } @@ -3534,23 +3614,18 @@ enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && 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 +if enabled libcdio; then + check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio +fi enabled x11grab && 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 -fi - -if ! disabled vdpau && enabled vdpau_vdpau_h; then +enabled vdpau && check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" || - { echolog "Please upgrade to libvdpau >= 0.2 if you would like vdpau support." && disable vdpau; } -fi + disable vdpau enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel" @@ -3641,8 +3716,6 @@ if enabled icc; then # 11030: Warning unknown option --as-needed # 10156: ignoring option '-export'; no argument required check_ldflags -wd10156,11030 - # Allow to compile with optimizations - check_ldflags -march=$cpu # icc 11.0 and 11.1 work with ebp_available, but don't pass the test enable ebp_available if enabled x86_32; then @@ -3661,6 +3734,7 @@ elif enabled gcc; then check_optflags -fno-tree-vectorize check_cflags -Werror=implicit-function-declaration check_cflags -Werror=missing-prototypes + check_cflags -Werror=return-type check_cflags -Werror=declaration-after-statement check_cflags -Werror=vla elif enabled llvm_gcc; then @@ -3670,6 +3744,7 @@ elif enabled clang; then check_cflags -Qunused-arguments check_cflags -Werror=implicit-function-declaration check_cflags -Werror=missing-prototypes + check_cflags -Werror=return-type elif enabled armcc; then # 2523: use of inline assembler is deprecated add_cflags -W${armcc_opt},--diag_suppress=2523 @@ -3759,47 +3834,18 @@ echo "network support ${network-no}" echo "threading support ${thread_type-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}" echo "SDL support ${sdl-no}" -echo "libdxva2 enabled ${dxva2-no}" -echo "libva enabled ${vaapi-no}" -echo "libvdpau enabled ${vdpau-no}" -echo "AVISynth enabled ${avisynth-no}" -echo "frei0r enabled ${frei0r-no}" -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}" -echo "libopencv support ${libopencv-no}" -echo "libopenjpeg enabled ${libopenjpeg-no}" -echo "libopus enabled ${libopus-no}" -echo "libpulse enabled ${libpulse-no}" -echo "librtmp enabled ${librtmp-no}" -echo "libschroedinger enabled ${libschroedinger-no}" -echo "libspeex enabled ${libspeex-no}" -echo "libtheora enabled ${libtheora-no}" -echo "libvo-aacenc support ${libvo_aacenc-no}" -echo "libvo-amrwbenc support ${libvo_amrwbenc-no}" -echo "libvorbis enabled ${libvorbis-no}" -echo "libvpx enabled ${libvpx-no}" -echo "libx264 enabled ${libx264-no}" -echo "libxavs enabled ${libxavs-no}" -echo "libxvid enabled ${libxvid-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 +echo "External libraries:" +print_enabled '' $EXTERNAL_LIBRARY_LIST | print_3_columns +echo + for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev; do echo "Enabled ${type}s:" eval list=\$$(toupper $type)_LIST - print_enabled '_*' $list | sort | pr -r -3 -t + print_enabled '_*' $list | print_3_columns echo done @@ -3863,7 +3909,7 @@ LD_PATH=$LD_PATH DLLTOOL=$dlltool LDFLAGS=$LDFLAGS LDFLAGS-avserver=$AVSERVERLDFLAGS -SHFLAGS=$SHFLAGS +SHFLAGS=$(echo $($ldflags_filter $SHFLAGS)) YASMFLAGS=$YASMFLAGS BUILDSUF=$build_suffix FULLNAME=$FULLNAME @@ -3883,6 +3929,7 @@ AS_DEPFLAGS=$AS_DEPFLAGS HOSTCC=$host_cc HOSTLD=$host_ld HOSTCFLAGS=$host_cflags +HOSTCPPFLAGS=$host_cppflags HOSTEXESUF=$HOSTEXESUF HOSTLDFLAGS=$host_ldflags HOSTLIBS=$host_libs @@ -3925,6 +3972,7 @@ get_version(){ eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak + eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> config.mak } map 'get_version $v' $LIBRARY_LIST