aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2007-02-14 22:18:13 +0000
committerMåns Rullgård <mans@mansr.com>2007-02-14 22:18:13 +0000
commitd8bc5f06e43c5c1b27f532255bf9bc765061ce37 (patch)
tree1228e89068e2e0fc40a55312e346dc4276cc92e1
parentafde41b414e27753db7d13621fc96e27040327ba (diff)
downloadffmpeg-d8bc5f06e43c5c1b27f532255bf9bc765061ce37.tar.gz
simplify
Originally committed as revision 7985 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure14
1 files changed, 5 insertions, 9 deletions
diff --git a/configure b/configure
index 3442a9e73e..014ac886e8 100755
--- a/configure
+++ b/configure
@@ -409,29 +409,25 @@ check_header(){
log check_header "$@"
header=$1
shift
- check_cpp "$@" <<EOF
+ var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
+ disable $var
+ check_cpp "$@" <<EOF && enable $var
#include <$header>
int x;
EOF
- err=$?
- var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
- test "$err" = 0 && enable $var || disable $var
- return $err
}
check_func(){
log check_func "$@"
func=$1
shift
- check_ld "$@" <<EOF
+ disable $func
+ check_ld "$@" <<EOF && enable $func
extern int $func();
int main(){
$func();
}
EOF
- err=$?
- test "$err" = 0 && enable $func || disable $func
- return $err
}
check_lib(){