Commit 229e2614 authored by mru's avatar mru

configure: add check_struct function

This adds a check_struct function to test for availability of a
member within a struct.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21267 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8ce9e0f3
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment