As has been noted before, the "seems to be moved" warning is a false positive when $absdir contains some /../'s,
while the library name recorded in the .la file does not have those.  This patch will avoid printing the warning if both
directories give the same result from `cd $dir && pwd`.  It also prints more information about where the library seems
to have been moved from if it does print a warning.

Note that in the presence of an automounter, it is not valid to use `cd $dir && pwd` to find the cannonical name of
a directory because the result will be a specific volume instead of /usr/lib or whatever.  Some systems maintain
multiple duplicate read-only volumes with copies of /usr/lib, so that 'cd /usr/lib && pwd' does not always give
the same answer.

See also:
http://lists.gnu.org/archive/html/libtool/2004-03/msg00091.html
http://gcc.gnu.org/ml/gcc-patches/2001-05/msg01827.html

--- /usr/share/libtool/ltmain.sh    2005-11-22 08:18:02.000000000 -0500
+++ ltmain.sh    2006-05-13 18:15:15.000000000 -0400
@@ -2795,7 +2795,11 @@
             exit $EXIT_FAILURE
           fi
           if test "$absdir" != "$libdir"; then
-            $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+            absdir2=`cd "$absdir" && pwd || echo "$absdir"`
+            libdir2=`cd "$libdir" && pwd || echo "$libdir"`
+            if test "$absdir2" != "$libdir2"; then
+              $echo "$modename: warning: \`$deplib' seems to be moved from \`$libdir' to \`$absdir'" 1>&2
+            fi
           fi
           path="$absdir"
         fi

_______________________________________________
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool

Reply via email to