[FFmpeg-cvslog] configure: Extend check_header() to allow checking for multiple headers

Diego Biurrun git at videolan.org
Sat Nov 11 21:49:18 EET 2017


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Oct  4 02:03:53 2017 +0200| [62d5b5a9d3b0181335072d6fa792f2d805bc27b6] | committer: Diego Biurrun

configure: Extend check_header() to allow checking for multiple headers

Also use that new capability to simplify bktr header checks.

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

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

diff --git a/configure b/configure
index c5d4e262d6..d5188c8818 100755
--- a/configure
+++ b/configure
@@ -929,13 +929,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_func(){
@@ -1128,9 +1130,9 @@ require(){
 
 require_header(){
     log require "$@"
-    header="$1"
+    headers="$1"
     shift
-    check_header "$header" "$@" || die "ERROR: $header not found"
+    check_header "$headers" "$@" || die "ERROR: $headers not found"
 }
 
 require_cpp_condition(){
@@ -4780,13 +4782,10 @@ check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
 check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines
 
 # 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
 



More information about the ffmpeg-cvslog mailing list