[FFmpeg-cvslog] Merge commit '62d5b5a9d3b0181335072d6fa792f2d805bc27b6'

James Almer git at videolan.org
Sat Nov 11 21:49:20 EET 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Nov 11 16:45:00 2017 -0300| [84522ad3fe77520595e97f33aca7ac0c8aee56bf] | committer: James Almer

Merge commit '62d5b5a9d3b0181335072d6fa792f2d805bc27b6'

* commit '62d5b5a9d3b0181335072d6fa792f2d805bc27b6':
  configure: Extend check_header() to allow checking for multiple headers

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

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

 configure | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/configure b/configure
index 256be4d5dc..111137b9bd 100755
--- a/configure
+++ b/configure
@@ -1107,13 +1107,15 @@ check_stripflags(){
 
 check_header(){
     log check_header "$@"
-    header=$1
+    headers=$1
     shift
-    disable_sanitized $header
-    check_cpp "$@" <<EOF && enable_sanitized $header
-#include <$header>
-int x;
-EOF
+    disable_sanitized $headers
+    {
+        for hdr in $headers; do
+            print_include $hdr
+        done
+        echo "int x;"
+    } | check_cpp "$@" && enable_sanitized $headers
 }
 
 check_header_objcc(){
@@ -1389,9 +1391,9 @@ require_cpp(){
 
 require_header(){
     log require "$@"
-    header="$1"
+    headers="$1"
     shift
-    check_header "$header" "$@" || die "ERROR: $header header not found"
+    check_header "$headers" "$@" || die "ERROR: $headers not found"
 }
 
 require_cpp_condition(){
@@ -6148,13 +6150,10 @@ check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_def
 check_type "dshow.h" IBaseFilter
 
 # check for ioctl_meteor.h, ioctl_bt848.h and alternatives
-{ check_header dev/bktr/ioctl_meteor.h &&
-  check_header dev/bktr/ioctl_bt848.h; } ||
-{ check_header machine/ioctl_meteor.h &&
-  check_header machine/ioctl_bt848.h; } ||
-{ check_header dev/video/meteor/ioctl_meteor.h &&
-  check_header dev/video/bktr/ioctl_bt848.h; } ||
-check_header dev/ic/bt8xx.h
+check_header "dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h"                   ||
+    check_header "machine/ioctl_meteor.h machine/ioctl_bt848.h"                 ||
+    check_header "dev/video/meteor/ioctl_meteor.h dev/video/bktr/ioctl_bt848.h" ||
+    check_header "dev/ic/bt8xx.h"
 
 if check_struct sys/soundcard.h audio_buf_info bytes; then
     enable_sanitized sys/soundcard.h


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

diff --cc configure
index 256be4d5dc,d5188c8818..111137b9bd
--- a/configure
+++ b/configure
@@@ -1107,37 -929,17 +1107,39 @@@ check_stripflags()
  
  check_header(){
      log check_header "$@"
-     header=$1
+     headers=$1
      shift
-     disable_sanitized $header
-     check_cpp "$@" <<EOF && enable_sanitized $header
- #include <$header>
- int x;
- EOF
+     disable_sanitized $headers
+     {
+         for hdr in $headers; do
+             print_include $hdr
+         done
+         echo "int x;"
+     } | check_cpp "$@" && enable_sanitized $headers
  }
  
 +check_header_objcc(){
 +    log check_header_objcc "$@"
 +    rm -f -- "$TMPO"
 +    header=$1
 +    shift
 +    disable_sanitized $header
 +    {
 +       echo "#include <$header>"
 +       echo "int main(void) { return 0; }"
 +    } | check_objcc && check_stat "$TMPO" && enable_sanitized $header
 +}
 +
 +check_apple_framework(){
 +    log check_apple_framework "$@"
 +    framework="$1"
 +    name="$(tolower $framework)"
 +    header="${framework}/${framework}.h"
 +    disable $name
 +    check_header_objcc $header &&
 +        enable $name && eval ${name}_extralibs='"-framework $framework"'
 +}
 +
  check_func(){
      log check_func "$@"
      func=$1
@@@ -1379,19 -1128,11 +1381,19 @@@ 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"
+     headers="$1"
      shift
-     check_header "$header" "$@" || die "ERROR: $header header not found"
+     check_header "$headers" "$@" || die "ERROR: $headers not found"
  }
  
  require_cpp_condition(){
@@@ -6145,27 -4781,15 +6147,24 @@@ check_lib vfw32 "windows.h vfw.h" capCr
  # w32api 3.12 had it defined wrong
  check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines
  
 +check_type "dshow.h" IBaseFilter
 +
  # check for ioctl_meteor.h, ioctl_bt848.h and alternatives
- { check_header dev/bktr/ioctl_meteor.h &&
-   check_header dev/bktr/ioctl_bt848.h; } ||
- { check_header machine/ioctl_meteor.h &&
-   check_header machine/ioctl_bt848.h; } ||
- { check_header dev/video/meteor/ioctl_meteor.h &&
-   check_header dev/video/bktr/ioctl_bt848.h; } ||
- check_header dev/ic/bt8xx.h
+ check_header "dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h"                   ||
+     check_header "machine/ioctl_meteor.h machine/ioctl_bt848.h"                 ||
+     check_header "dev/video/meteor/ioctl_meteor.h dev/video/bktr/ioctl_bt848.h" ||
+     check_header "dev/ic/bt8xx.h"
  
 -check_header sys/soundcard.h
 +if check_struct sys/soundcard.h audio_buf_info bytes; then
 +    enable_sanitized sys/soundcard.h
 +else
 +    check_cc -D__BSD_VISIBLE -D__XSI_VISIBLE <<EOF && add_cppflags -D__BSD_VISIBLE -D__XSI_VISIBLE && enable_sanitized sys/soundcard.h
 +    #include <sys/soundcard.h>
 +    audio_buf_info abc;
 +EOF
 +fi
  
 -enabled_any alsa_indev alsa_outdev &&
 +enabled alsa && check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimestamp ||
      check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound
  
  enabled libjack &&



More information about the ffmpeg-cvslog mailing list