Index: ChangeLog =================================================================== RCS file: /cvsroot/libtool/libtool/ChangeLog,v retrieving revision 1.1220.2.18 diff -u -r1.1220.2.18 ChangeLog --- ChangeLog 26 Jun 2003 06:55:25 -0000 1.1220.2.18 +++ ChangeLog 6 Jul 2003 10:22:19 -0000 @@ -1,3 +1,9 @@ +2003-07-06 Abel Cheung + + * ltmain.in: Always prepend inst_prefix_dir to deplibs so that + system libraries won't be picked up before staging libraries during + relinking. + 2003-06-25 Alexandre Oliva , Tim Waugh * libtool.m4: Replace mis-uses of path with pathname. Index: ltmain.in =================================================================== RCS file: /cvsroot/libtool/libtool/ltmain.in,v retrieving revision 1.334.2.5 diff -u -r1.334.2.5 ltmain.in --- ltmain.in 3 Jun 2003 18:20:07 -0000 1.334.2.5 +++ ltmain.in 6 Jul 2003 10:23:57 -0000 @@ -3599,15 +3599,23 @@ fi tmp_deplibs= + inst_prefix_arg= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + if test -n "$inst_prefix_dir" && (echo "$test_deplib" | grep -- "$inst_prefix_dir" >/dev/null); then + inst_prefix_arg="$test_deplib" + else + tmp_deplibs="$tmp_deplibs $test_deplib" + fi ;; esac done deplibs="$tmp_deplibs" + if test -n "$inst_prefix_arg"; then + deplibs="$inst_prefix_arg $deplibs" + fi if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then