[FFmpeg-cvslog] Merge commit '25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56'
James Almer
git at videolan.org
Sun Sep 2 23:25:54 EEST 2018
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Sep 2 16:56:27 2018 -0300| [73d193d1d0ff62a029a905d1404c0fd357f4c880] | committer: James Almer
Merge commit '25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56'
* commit '25c2a27c9ec0150210d75ee5ac8ed1bfa14c1a56':
configure: Make require_cc() and require_cpp_condition() functions consistent
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=73d193d1d0ff62a029a905d1404c0fd357f4c880
---
configure | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 9d10912120..7e8795ea88 100755
--- a/configure
+++ b/configure
@@ -1484,8 +1484,7 @@ require(){
require_cc(){
log require_cc "$@"
name="$1"
- shift
- test_code cc "$@" || die "ERROR: $name failed"
+ check_cc "$@" || die "ERROR: $name failed"
}
require_cpp(){
@@ -1504,8 +1503,8 @@ require_header(){
require_cpp_condition(){
log require_cpp_condition "$@"
- condition="$2"
- test_cpp_condition "$@" || die "ERROR: $condition not satisfied"
+ condition="$3"
+ check_cpp_condition "$@" || die "ERROR: $condition not satisfied"
}
require_pkg_config(){
@@ -6161,10 +6160,10 @@ enabled libwebp && {
enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode ||
{ require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" &&
warn "using libx264 without pkg-config"; } } &&
- require_cpp_condition x264.h "X264_BUILD >= 118" &&
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
check_cpp_condition libx262 x264.h "X264_MPEG2"
enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
- require_cpp_condition x265.h "X265_BUILD >= 68"
+ require_cpp_condition libx265 x265.h "X265_BUILD >= 68"
enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version
======================================================================
diff --cc configure
index 9d10912120,fad0ae1e87..7e8795ea88
--- a/configure
+++ b/configure
@@@ -1484,18 -1172,9 +1484,17 @@@ require()
require_cc(){
log require_cc "$@"
name="$1"
- shift
- test_code cc "$@" || die "ERROR: $name failed"
+ check_cc "$@" || die "ERROR: $name failed"
}
+require_cpp(){
+ name="$1"
+ headers="$2"
+ classes="$3"
+ shift 3
+ check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
+}
+
require_header(){
log require_header "$@"
headers="$1"
@@@ -1504,8 -1183,8 +1503,8 @@@
require_cpp_condition(){
log require_cpp_condition "$@"
-- condition="$2"
- test_cpp_condition "$@" || die "ERROR: $condition not satisfied"
++ condition="$3"
+ check_cpp_condition "$@" || die "ERROR: $condition not satisfied"
}
require_pkg_config(){
@@@ -6025,159 -4647,69 +6024,159 @@@ for func in $MATH_FUNCS; d
eval check_mathfunc $func \${${func}_args:-1} $libm_extralibs
done
+for func in $COMPLEX_FUNCS; do
+ eval check_complexfunc $func \${${func}_args:-1}
+done
+
# these are off by default, so fail if requested and not available
-enabled amf && require_cpp_condition amf AMF/core/Version.h "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400040001"
-enabled avisynth && require_header avisynth/avisynth_c.h
-enabled avxsynth && require_header avxsynth/avxsynth_c.h
-enabled cuda && require cuda cuda.h cuInit -lcuda
-enabled cuvid && require cuvid cuviddec.h cuvidCreateDecoder -lnvcuvid
+enabled cuda_sdk && require cuda_sdk cuda.h cuCtxCreate -lcuda
+enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
+enabled decklink && { require_header DeckLinkAPI.h &&
+ { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a060100" || die "ERROR: Decklink API version must be >= 10.6.1."; } }
+enabled libndi_newtek && require_header Processing.NDI.Lib.h
enabled frei0r && require_header frei0r.h
-enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init &&
- check_lib gmp gmp.h mpz_export -lgmp
-enabled libaom && require_pkg_config libaom "aom >= 0.1.0" aom/aom_codec.h aom_codec_version
+enabled gmp && require gmp gmp.h mpz_export -lgmp
+enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
+enabled jni && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads || die "ERROR: jni not found"; }
+enabled ladspa && require_header ladspa.h
+enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version
+enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new
+enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
+enabled libass && require_pkg_config libass libass ass/ass.h ass_library_init
+enabled libbluray && require_pkg_config libbluray libbluray libbluray/bluray.h bd_open
enabled libbs2b && require_pkg_config libbs2b libbs2b bs2b.h bs2b_open
+enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
+ { check_lib libcelt celt/celt.h celt_decoder_create_custom -lcelt0 ||
+ die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
+enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
+enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2
+enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.5.115" davs2.h davs2_decoder_open
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
-enabled libdcadec && require libdcadec libdcadec/dca_context.h dcadec_context_create -ldcadec
-enabled libfaac && require libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
-enabled libfdk_aac && require_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen
+enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
+enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
+ { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
+ warn "using libfdk without pkg-config"; } }
+flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
+enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
+enabled fontconfig && enable libfontconfig
enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit
enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
-enabled libgsm && require libgsm gsm.h gsm_create -lgsm
-enabled libhdcd && require_pkg_config libhdcd libhdcd "hdcd/hdcd_simple.h" hdcd_new
-enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
+enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info
+enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
+ require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
+enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
+ check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break;
+ done || die "ERROR: libgsm not found"; }
+enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc $pthreads_extralibs
enabled libkvazaar && require_pkg_config libkvazaar "kvazaar >= 0.8.1" kvazaar.h kvz_api_get
-enabled libmfx && require_pkg_config libmfx libmfx "mfx/mfxvideo.h" MFXInit
-enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
-enabled libnpp && require libnpp npp.h nppGetLibVersion -lnppi -lnppc
+enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_db_new
+# While it may appear that require is being used as a pkg-config
+# fallback for libmfx, it is actually being used to detect a different
+# installation route altogether. If libmfx is installed via the Intel
+# Media SDK or Intel Media Server Studio, these don't come with
+# pkg-config support. Instead, users should make sure that the build
+# can find the libraries and headers through other means.
+enabled libmfx && { check_pkg_config libmfx libmfx "mfx/mfxvideo.h" MFXInit ||
+ { require libmfx "mfx/mfxvideo.h" MFXInit "-llibmfx $advapi32_extralibs" && warn "using libmfx without pkg-config"; } }
+enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
+enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
+enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_load ||
+ require libmysofa mysofa.h mysofa_load -lmysofa $zlib_extralibs; }
+enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc ||
+ check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppc ||
+ die "ERROR: libnpp not found"; }
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 libopencv opencv opencv/cv.h cvCreateImageHeader
+enabled libopencv && { check_header opencv2/core/core_c.h &&
+ { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
+ require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
+ require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
-enabled libopenjpeg && { check_lib libopenjpeg openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC ||
- require_pkg_config libopenjpeg libopenjpeg1 openjpeg.h opj_version -DOPJ_STATIC; }
-enabled libopus && require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
-enabled libpulse && require_pkg_config libpulse libpulse-simple pulse/simple.h pa_simple_new
+enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
+ { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
+enabled libopus && {
+ enabled libopus_decoder && {
+ require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
+ }
+ enabled libopus_encoder && {
+ require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
+ }
+}
+enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
+enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo
enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket
-enabled libschroedinger && require_pkg_config libschroedinger schroedinger-1.0 schroedinger/schro.h schro_init
-enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy
+enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++"
+enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
+enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
+ require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
+enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
+enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
+enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
-enabled libsrt && require_pkg_config libsrt "srt >= 1.2.0" srt/srt.h srt_socket
+enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
+enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
+enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
-enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame
-enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc
+enabled libtls && require_pkg_config libtls libtls tls.h tls_configure
+enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame &&
+ { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
+ die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; }
+enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
+enabled libvidstab && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
+enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 1.3.9" libvmaf.h compute_vmaf
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 && require_pkg_config libvpx "vpx >= 1.3.0" vpx/vpx_codec.h vpx_codec_version &&
- { enabled libvpx_vp8_decoder &&
- check_pkg_config libvpx_vp8_decoder vpx "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx
- enabled libvpx_vp8_encoder &&
- check_pkg_config libvpx_vp8_encoder vpx "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx
- enabled libvpx_vp9_decoder &&
- check_pkg_config libvpx_vp9_decoder vpx "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx
- enabled libvpx_vp9_encoder &&
- check_pkg_config libvpx_vp9_encoder vpx "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx
- disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder &&
- die "libvpx enabled but no supported decoders/encoders found"
- }
+enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
+ require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
+
+enabled libvpx && {
+ enabled libvpx_vp8_decoder && {
+ check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx ||
+ check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx ||
+ die "ERROR: libvpx decoder version must be >=1.4.0";
+ }
+ enabled libvpx_vp8_encoder && {
+ check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx ||
+ check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx ||
+ die "ERROR: libvpx encoder version must be >=1.4.0";
+ }
+ enabled libvpx_vp9_decoder && {
+ check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
+ check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs"
+ }
+ enabled libvpx_vp9_encoder && {
+ check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
+ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs"
+ }
+ if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
+ die "libvpx enabled but no supported decoders found"
+ fi
+}
+
enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack
-enabled libwebp && require_pkg_config libwebp libwebp webp/encode.h WebPGetEncoderVersion
-enabled libx264 && require_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode &&
+enabled libwebp && {
+ enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
+ enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
+enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode ||
+ { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" &&
+ warn "using libx264 without pkg-config"; } } &&
- require_cpp_condition x264.h "X264_BUILD >= 118" &&
+ require_cpp_condition libx264 x264.h "X264_BUILD >= 118" &&
check_cpp_condition libx262 x264.h "X264_MPEG2"
enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
- require_cpp_condition x265.h "X265_BUILD >= 68"
- require_cpp_condition libx265 x265.h "X265_BUILD >= 57"
-enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode -lxavs
++ require_cpp_condition libx265 x265.h "X265_BUILD >= 68"
+enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
+enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version
+enabled libzmq && require_pkg_config libzmq libzmq zmq.h zmq_ctx_new
+enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
+ { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" ||
+ enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; }
+enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
+enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
+ check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
+ check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
+ die "ERROR: mbedTLS not found"; }
+enabled mediacodec && { enabled jni || die "ERROR: mediacodec requires --enable-jni"; }
enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
{ ! enabled cross_compile &&
add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
More information about the ffmpeg-cvslog
mailing list