Commit d8bc5f06 authored by Måns Rullgård's avatar Måns Rullgård
Browse files

simplify

Originally committed as revision 7985 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent afde41b4
...@@ -409,29 +409,25 @@ check_header(){ ...@@ -409,29 +409,25 @@ check_header(){
log check_header "$@" log check_header "$@"
header=$1 header=$1
shift shift
check_cpp "$@" <<EOF var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
disable $var
check_cpp "$@" <<EOF && enable $var
#include <$header> #include <$header>
int x; int x;
EOF EOF
err=$?
var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
test "$err" = 0 && enable $var || disable $var
return $err
} }
check_func(){ check_func(){
log check_func "$@" log check_func "$@"
func=$1 func=$1
shift shift
check_ld "$@" <<EOF disable $func
check_ld "$@" <<EOF && enable $func
extern int $func(); extern int $func();
int main(){ int main(){
$func(); $func();
} }
EOF EOF
err=$?
test "$err" = 0 && enable $func || disable $func
return $err
} }
check_lib(){ check_lib(){
......
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