Subject: bug#14429: libdir does not take sysroot into account

From: [email-masked]
Date: Mon, 20 May 2013 18:50:13 -0400 (EDT)

I am using libtool master (a4629ebf) configured with
"--with-sysroot=/tmp/root".  My build toolchain (gcc, binutils) has been
configured with the same sysroot.

I am trying to cross-compile linux-pam. All dependencies have been
configured and built with --prefix=/usr, but ultimately been moved after
installing to /tmp/root.

Building fails with

libtool: warning: library '/tmp/root/lib64/libpam.la' was moved.
libtool: warning: library '/tmp/root/lib64/libpam_misc.la' was moved.
libtool:   error: cannot find the library '/lib64/libpam.la' or unhandled
argument '/lib64/libpam.la'

/tmp/root/lib64/libpam.la includes

# Directory that this library needs to be installed in:
libdir='/lib64'

libtool should prepend its sysroot to libdir.