]> git.sesse.net Git - ffmpeg/commitdiff
configure: simplify argument handling in check_ld
authorMans Rullgard <mans@mansr.com>
Sun, 14 Oct 2012 00:35:56 +0000 (01:35 +0100)
committerMans Rullgard <mans@mansr.com>
Mon, 15 Oct 2012 16:46:18 +0000 (17:46 +0100)
Use the existing filter functions instead of open-coding the
separation of general flags and libraries.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure

index a054830d0dddeffe7dd3d7bf726674f65cd1106f..e6b2a313054cc5f8683caefbd5fe17e7cb5d24d9 100755 (executable)
--- a/configure
+++ b/configure
@@ -704,11 +704,8 @@ ld_o(){
 
 check_ld(){
     log check_ld "$@"
-    flags=''
-    libs=''
-    for f; do
-        test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
-    done
+    flags=$(filter_out '-l*' "$@")
+    libs=$(filter '-l*' "$@")
     check_cc $($cflags_filter $flags) || return
     flags=$($ldflags_filter $flags)
     libs=$($ldflags_filter $libs)