diff --git a/configure b/configure index 33bb2144e3..18f57ae5b6 100755 --- a/configure +++ b/configure @@ -763,11 +763,8 @@ check_ld(){ log check_ld "$@" type=$1 shift 1 - flags='' - libs='' - for f; do - test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f" - done + flags=$(filter_out '-l*' "$@") + libs=$(filter '-l*' "$@") check_$type $($cflags_filter $flags) || return flags=$($ldflags_filter $flags) libs=$($ldflags_filter $libs)