diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 4418a1c..b0ec76a 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -2238,31 +2238,46 @@ if test yes = "$GCC"; then lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/;/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/;" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; + lt_canon_foo = ""; + lt_canon_count = 0; + lt_multi_foo = ""; + lt_multi_count = 0; + lt_multi = 1; for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == ";") { + lt_multi = 0; + continue; + } + if ($lt_i == "" || $lt_i == ".") continue; + if (!lt_multi) { if ($lt_i == "..") { - lt_count++; + lt_canon_count++; + } else if (lt_canon_count == 0) { + lt_canon_foo = "/" $lt_i lt_canon_foo; } else { - if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; - } else { - lt_count--; - } + lt_canon_count--; } } + if ($lt_i == "..") { + lt_multi_count++; + } else if (lt_multi_count == 0) { + lt_multi_foo = "/" $lt_i lt_multi_foo; + } else { + lt_multi_count--; + } } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } + if (lt_canon_foo != "") { lt_canon_freq[[lt_canon_foo]]++; } + if (lt_canon_freq[[lt_multi_foo]]) { lt_multi_foo = lt_canon_foo; } + if (lt_multi_foo != "") { lt_multi_freq[[lt_multi_foo]]++; } + if (lt_multi_freq[[lt_multi_foo]] == 1) { print lt_multi_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts.