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 a054830..e6b2a31 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)