[FFmpeg-cvslog] Merge commit 'bcaedef1189a3531aa4dfb020627eb0133ffa89c'

James Almer git at videolan.org
Wed Sep 27 00:06:14 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Sep 26 17:42:19 2017 -0300| [c83c164f05cba9e7cdb11c9dcd4fb87b90eb6c6d] | committer: James Almer

Merge commit 'bcaedef1189a3531aa4dfb020627eb0133ffa89c'

* commit 'bcaedef1189a3531aa4dfb020627eb0133ffa89c':
  configure: Add require_cpp_condition() convenience function

Merged-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c83c164f05cba9e7cdb11c9dcd4fb87b90eb6c6d
---

 configure | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 035e16ec14..b154924d09 100755
--- a/configure
+++ b/configure
@@ -1379,6 +1379,14 @@ require_header(){
     check_header "$header" "$@" || die "ERROR: $header header not found"
 }
 
+require_cpp_condition(){
+    log require "$@"
+    header="$1"
+    condition="$2"
+    shift 2
+    check_cpp_condition "$header" "$condition" "$@" || die "ERROR: $condition not satisfied"
+}
+
 use_pkg_config(){
     log use_pkg_config "$@"
     pkg="$1"
@@ -6017,13 +6025,11 @@ enabled libwebp           && {
 enabled libx264           && { use_pkg_config x264 "stdint.h x264.h" x264_encoder_encode ||
                                { require libx264 "stdint.h x264.h" x264_encoder_encode -lx264 &&
                                  warn "using libx264 without pkg-config"; } } &&
-                             { check_cpp_condition x264.h "X264_BUILD >= 118" ||
-                               die "ERROR: libx264 must be installed and version must be >= 0.118."; } &&
+                             require_cpp_condition x264.h "X264_BUILD >= 118" &&
                              { check_cpp_condition x264.h "X264_MPEG2" &&
                                enable libx262; }
 enabled libx265           && require_pkg_config x265 x265.h x265_api_get &&
-                             { check_cpp_condition x265.h "X265_BUILD >= 68" ||
-                               die "ERROR: libx265 version must be >= 68."; }
+                             require_cpp_condition x265.h "X265_BUILD >= 68"
 enabled libxavs           && require libxavs "stdint.h xavs.h" xavs_encoder_encode -lxavs
 enabled libxvid           && require libxvid xvid.h xvid_global -lxvidcore
 enabled libzimg           && require_pkg_config "zimg >= 2.3.0" zimg.h zimg_get_api_version


======================================================================

diff --cc configure
index 035e16ec14,555dc8861e..b154924d09
--- a/configure
+++ b/configure
@@@ -1376,13 -1121,22 +1376,21 @@@ require_header()
      log require "$@"
      header="$1"
      shift
 -    check_header "$header" "$@" || die "ERROR: $header not found"
 +    check_header "$header" "$@" || die "ERROR: $header header not found"
  }
  
+ require_cpp_condition(){
+     log require "$@"
+     header="$1"
+     condition="$2"
+     shift 2
+     check_cpp_condition "$header" "$condition" "$@" || die "ERROR: $condition not satisfied"
+ }
+ 
 -require_pkg_config(){
 -    log require_pkg_config "$@"
 -    pkg_version="$1"
 -    pkg="${1%% *}"
 -    check_pkg_config "$@" || die "ERROR: $pkg_version not found"
 +use_pkg_config(){
 +    log use_pkg_config "$@"
 +    pkg="$1"
 +    check_pkg_config "$@" || return 1
      add_cflags    $(get_safe "${pkg}_cflags")
      add_extralibs $(get_safe "${pkg}_extralibs")
  }
@@@ -6009,30 -4710,16 +6017,28 @@@ enabled libvpx            && 
          die "libvpx enabled but no supported decoders found"
      fi
  }
 +
  enabled libwavpack        && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput  -lwavpack
 -enabled libwebp           && require_pkg_config libwebp webp/encode.h WebPGetEncoderVersion
 -enabled libx264           && require_pkg_config x264 "stdint.h x264.h" x264_encoder_encode &&
 +enabled libwebp           && {
 +    enabled libwebp_encoder      && require_pkg_config "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
 +    enabled libwebp_anim_encoder && { use_pkg_config "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit || disable libwebp_anim_encoder; } }
 +enabled libx264           && { use_pkg_config x264 "stdint.h x264.h" x264_encoder_encode ||
 +                               { require libx264 "stdint.h x264.h" x264_encoder_encode -lx264 &&
 +                                 warn "using libx264 without pkg-config"; } } &&
-                              { check_cpp_condition x264.h "X264_BUILD >= 118" ||
-                                die "ERROR: libx264 must be installed and version must be >= 0.118."; } &&
+                              require_cpp_condition x264.h "X264_BUILD >= 118" &&
                               { check_cpp_condition x264.h "X264_MPEG2" &&
                                 enable libx262; }
  enabled libx265           && require_pkg_config x265 x265.h x265_api_get &&
-                              { check_cpp_condition x265.h "X265_BUILD >= 68" ||
-                                die "ERROR: libx265 version must be >= 68."; }
 -                             require_cpp_condition x265.h "X265_BUILD >= 57"
++                             require_cpp_condition x265.h "X265_BUILD >= 68"
  enabled libxavs           && require libxavs "stdint.h xavs.h" xavs_encoder_encode -lxavs
  enabled libxvid           && require libxvid xvid.h xvid_global -lxvidcore
 +enabled libzimg           && require_pkg_config "zimg >= 2.3.0" zimg.h zimg_get_api_version
 +enabled libzmq            && require_pkg_config libzmq zmq.h zmq_ctx_new
 +enabled libzvbi           && require libzvbi libzvbi.h vbi_decoder_new -lzvbi &&
 +                             { check_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 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
 +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