Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-03-07 05:49:55 +0300
committerMichael Niedermayer <michaelni@gmx.at>2011-03-19 22:06:09 +0300
commit05aa8c4441c74732d411480ab3e477d602dd7695 (patch)
treeda124ca4bcdecb7b0517085c6e2e33d81d1821e2 /configure
parent8ea36711b0a85e24a77e1c76b1cb24aa63df217f (diff)
configure: allow checking multiple functions in check_func_headers()
This makes it possible to pass a space-separated list of functions to check_func_headers and check_lib2. If any function is missing, none are enabled as available, so this should only be used for all-or-nothing sets, i.e. groups in which none will be used if any one is missing. Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit edaf1ae2763ce1a23dec70e730ba2bb8ee476dfd) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 12 insertions, 15 deletions
diff --git a/configure b/configure
index 0b6bdb63dd..e633fb4089 100755
--- a/configure
+++ b/configure
@@ -700,20 +700,17 @@ EOF
check_func_headers(){
log check_func_headers "$@"
headers=$1
- func=$2
+ funcs=$2
shift 2
- disable $func
- incs=""
- for hdr in $headers; do
- incs="$incs
-#include <$hdr>"
- done
- check_ld "$@" <<EOF && enable $func && enable_safe $headers
-$incs
-int main(int argc, char **argv){
- return (long) $func;
-}
-EOF
+ {
+ for hdr in $headers; do
+ echo "#include <$hdr>"
+ done
+ for func in $funcs; do
+ echo "long check_$func(void) { return (long) $func; }"
+ done
+ echo "int main(void) { return 0; }"
+ } | check_ld "$@" && enable $funcs && enable_safe $headers
}
check_cpp_condition(){
@@ -740,9 +737,9 @@ check_lib(){
check_lib2(){
log check_lib2 "$@"
headers="$1"
- func="$2"
+ funcs="$2"
shift 2
- check_func_headers "$headers" $func "$@" && add_extralibs "$@"
+ check_func_headers "$headers" "$funcs" "$@" && add_extralibs "$@"
}
check_exec(){