[FFmpeg-cvslog] Merge commit 'aba7fdcc8baaed35e804c7882b70a848a0e566c7'

James Almer git at videolan.org
Tue Sep 26 23:32:17 EEST 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Sep 26 17:29:57 2017 -0300| [14194090a6f65c5110689944c91a6b9030c65791] | committer: James Almer

Merge commit 'aba7fdcc8baaed35e804c7882b70a848a0e566c7'

* commit 'aba7fdcc8baaed35e804c7882b70a848a0e566c7':
  configure: Add require_header() convenience function

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

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

 configure | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index b07cef182c..035e16ec14 100755
--- a/configure
+++ b/configure
@@ -1372,6 +1372,13 @@ require_cpp(){
     check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
 }
 
+require_header(){
+    log require "$@"
+    header="$1"
+    shift
+    check_header "$header" "$@" || die "ERROR: $header header not found"
+}
+
 use_pkg_config(){
     log use_pkg_config "$@"
     pkg="$1"
@@ -5884,14 +5891,14 @@ enabled cuda_sdk          && require cuda_sdk cuda.h cuCtxCreate -lcuda
 enabled cuvid             && { enabled cuda ||
                                die "ERROR: CUVID requires CUDA"; }
 enabled chromaprint       && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
-enabled decklink          && { { check_header DeckLinkAPI.h || die "ERROR: DeckLinkAPI.h header not found"; } &&
+enabled decklink          && { require_header DeckLinkAPI.h &&
                                { check_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a060100" || die "ERROR: Decklink API version must be >= 10.6.1."; } }
-enabled libndi_newtek     && { check_header Processing.NDI.Lib.h || die "ERROR: Processing.NDI.Lib.h header not found"; }
-enabled frei0r            && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
+enabled libndi_newtek     && require_header Processing.NDI.Lib.h
+enabled frei0r            && require_header frei0r.h
 enabled gmp               && require gmp gmp.h mpz_export -lgmp
 enabled gnutls            && require_pkg_config 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            && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
+enabled ladspa            && require_header ladspa.h
 enabled libiec61883       && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
 enabled libass            && require_pkg_config libass ass/ass.h ass_library_init
 enabled libbluray         && require_pkg_config libbluray libbluray/bluray.h bd_open
@@ -6053,7 +6060,7 @@ enabled opengl            && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL
 enabled omx_rpi           && { check_header OMX_Core.h ||
                                { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_header OMX_Core.h ; } ||
                                die "ERROR: OpenMAX IL headers not found"; }
-enabled omx               && { check_header OMX_Core.h || die "ERROR: OpenMAX IL headers not found"; }
+enabled omx               && require_header OMX_Core.h
 enabled openssl           && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
                                use_pkg_config openssl openssl/ssl.h SSL_library_init ||
                                check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||


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

diff --cc configure
index b07cef182c,30f053954b..035e16ec14
--- a/configure
+++ b/configure
@@@ -1364,18 -1117,18 +1364,25 @@@ require()
      check_lib $name "$headers" $func "$@" || die "ERROR: $name_version not found"
  }
  
 +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="$1"
+     shift
 -    check_header "$header" "$@" || die "ERROR: $header not found"
++    check_header "$header" "$@" || die "ERROR: $header header not found"
+ }
+ 
 -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")
  }
@@@ -5875,44 -4642,19 +5882,44 @@@ for func in $MATH_FUNCS; d
      eval check_mathfunc $func \${${func}_args:-1} $LIBM
  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 avisynth          && require_header avisynth/avisynth_c.h
 -enabled avxsynth          && require avxsynth "avxsynth/avxsynth_c.h dlfcn.h" dlopen -ldl
 -enabled cuda              && require cuda cuda.h cuInit -lcuda
 +enabled cuda_sdk          && require cuda_sdk cuda.h cuCtxCreate -lcuda
 +enabled cuvid             && { enabled cuda ||
 +                               die "ERROR: CUVID requires CUDA"; }
 +enabled chromaprint       && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
- enabled decklink          && { { check_header DeckLinkAPI.h || die "ERROR: DeckLinkAPI.h header not found"; } &&
++enabled decklink          && { require_header DeckLinkAPI.h &&
 +                               { check_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a060100" || die "ERROR: Decklink API version must be >= 10.6.1."; } }
- enabled libndi_newtek     && { check_header Processing.NDI.Lib.h || die "ERROR: Processing.NDI.Lib.h header not found"; }
- enabled frei0r            && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
++enabled libndi_newtek     && require_header Processing.NDI.Lib.h
+ enabled frei0r            && require_header frei0r.h
 +enabled gmp               && require gmp gmp.h mpz_export -lgmp
  enabled gnutls            && require_pkg_config 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            && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
++enabled ladspa            && require_header ladspa.h
 +enabled libiec61883       && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
 +enabled libass            && require_pkg_config libass ass/ass.h ass_library_init
 +enabled libbluray         && require_pkg_config libbluray libbluray/bluray.h bd_open
  enabled libbs2b           && require_pkg_config 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 caca caca.h caca_create_canvas
  enabled libdc1394         && require_pkg_config 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 fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen
 +enabled libdrm            && require_pkg_config libdrm xf86drm.h drmGetVersion
 +enabled libfdk_aac        && { use_pkg_config 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 fontconfig "fontconfig/fontconfig.h" FcInit
  enabled libfreetype       && require_pkg_config freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
 +enabled libfribidi        && require_pkg_config fribidi fribidi.h fribidi_version_info
 +enabled libgme            && { use_pkg_config 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"; }
@@@ -6053,9 -4724,10 +6060,9 @@@ enabled opengl            && { check_li
  enabled omx_rpi           && { check_header OMX_Core.h ||
                                 { ! enabled cross_compile && add_cflags -isystem/opt/vc/include/IL && check_header OMX_Core.h ; } ||
                                 die "ERROR: OpenMAX IL headers not found"; }
- enabled omx               && { check_header OMX_Core.h || die "ERROR: OpenMAX IL headers not found"; }
+ enabled omx               && require_header OMX_Core.h
 -enabled openssl           && { { check_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
 -                                 check_pkg_config openssl openssl/ssl.h SSL_library_init; } && {
 -                               add_cflags $openssl_cflags && add_extralibs $openssl_extralibs; } ||
 +enabled openssl           && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
 +                               use_pkg_config openssl openssl/ssl.h SSL_library_init ||
                                 check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
                                 check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                                 check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||



More information about the ffmpeg-cvslog mailing list