aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-01-17 19:10:03 +0000
committerMåns Rullgård <mans@mansr.com>2010-01-17 19:10:03 +0000
commit14d367516504c0caedc6426fa3122a59e55584ca (patch)
treef597a321edac1e579dd0e30abc8f1c8d5854070f
parent300cde27b625a5b1f9336d6e061b63b5eed118a6 (diff)
downloadffmpeg-14d367516504c0caedc6426fa3122a59e55584ca.tar.gz
configure: add check_struct function
This adds a check_struct function to test for availability of a member within a struct. Originally committed as revision 21267 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index cf3d51ac2c..391e0349aa 100755
--- a/configure
+++ b/configure
@@ -759,6 +759,24 @@ $type v;
EOF
}
+check_struct(){
+ log check_type "$@"
+ headers=$1
+ struct=$2
+ member=$3
+ shift 3
+ disable_safe "${struct}_${member}"
+ incs=""
+ for hdr in $headers; do
+ incs="$incs
+#include <$hdr>"
+ done
+ check_cc "$@" <<EOF && enable_safe "${struct}_${member}"
+$incs
+const void *p = &(($struct *)0)->$member;
+EOF
+}
+
require(){
name="$1"
header="$2"