diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-07 02:17:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-07 02:17:30 +0200 |
commit | 46a47077eee2d7755e17f6557903f383cdfe1b8b (patch) | |
tree | 2f42fe2b5bcd4f3e71a24bc9126ce73ecc665a74 /configure | |
parent | a6da14ec3cbe009b2f6fe3eaaa4865e8c8f5ef1a (diff) | |
parent | 5adc829eb0787682111ca063bfc2b31558999dff (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
configure: add functions for testing code fragments
af_amix: avoid spurious EAGAIN.
af_amix: return AVERROR(EAGAIN) when request_frame didn't produce output.
af_amix: only consider negative return codes as errors.
avconv: use only meaningful timestamps in start time check.
avconv: fix the check for -ss as an output option.
mss3: add forgotten 'static' qualifier for private table
lavc: options: add planar names for request_sample_fmt
flacdec: add planar output support
flvdec: Treat all nellymoser versions as the same codec
Conflicts:
ffmpeg.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 39 |
1 files changed, 18 insertions, 21 deletions
@@ -716,6 +716,20 @@ check_ld(){ check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $libs $extralibs } +check_code(){ + log check_code "$@" + check=$1 + headers=$2 + code=$3 + shift 3 + { + for hdr in $headers; do + echo "#include <$hdr>" + done + echo "int main(void) { $code; return 0; }" + } | check_$check "$@" +} + check_cppflags(){ log check_cppflags "$@" set -- $($filter_cppflags "$@") @@ -912,15 +926,7 @@ check_type(){ type=$2 shift 2 disable_safe "$type" - incs="" - for hdr in $headers; do - incs="$incs -#include <$hdr>" - done - check_cc "$@" <<EOF && enable_safe "$type" -$incs -$type v; -EOF + check_code cc "$headers" "$type v" "$@" && enable_safe "$type" } check_struct(){ @@ -930,15 +936,8 @@ check_struct(){ 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 + check_code cc "$headers" "const void *p = &(($struct *)0)->$member" "$@" && + enable_safe "${struct}_${member}" } require(){ @@ -2689,9 +2688,7 @@ case "$arch" in ;; x86) subarch="x86_32" - check_cc <<EOF && subarch="x86_64" - int test[(int)sizeof(char*) - 7]; -EOF + check_code cc "" "int test[(int)sizeof(char*) - 7]" && subarch="x86_64" if test "$subarch" = "x86_64"; then spic=$shared fi |