place -l flags after object files in check_ld()
authorMåns Rullgård <mans@mansr.com>
Tue, 19 Jun 2007 01:27:51 +0000 (01:27 +0000)
committerMåns Rullgård <mans@mansr.com>
Tue, 19 Jun 2007 01:27:51 +0000 (01:27 +0000)
Originally committed as revision 9367 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure

index 985afbf..0ecacce 100755 (executable)
--- a/configure
+++ b/configure
@@ -398,7 +398,12 @@ check_cpp(){
 check_ld(){
     log check_ld "$@"
     check_cc || return
-    check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
+    flags=''
+    libs=''
+    for f; do
+        test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
+    done
+    check_cmd $cc $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
 }
 
 check_cflags(){