title: How to relink libtool-built executables with correct Library Path without install?
body: <p>A have a project build with GNU autotools. Now I have a tiny change and only want to copy <em>one single library</em> <code>libmylib.so</code> and <em>one program</em> <code>myprog.x</code> (using that library) from the whole collection.</p>
  
  <p>I do not want to use <code>make install</code> because I have to be very careful not to overwrite all the other stuff.</p>
  
  <p>When I do</p>
  
  <pre><code>ldd .libs/myprog.x
  </code></pre>
  
  <p>I see that the library used is -- as expected -- the freshly built library and not that one in <code>/usr/lib/</code>.</p>
  
  <pre><code>$ ldd .libs/myprog.x
  libmylib.so.0 =&gt; /home/user/project/.libs/libmylib.so.0 (0x003bb000)
  libnsl.so.1 =&gt; /lib/libnsl.so.1 (0x00f57000)
  libc.so.6 =&gt; /lib/tls/libc.so.6 (0x00948000)
  libz.so.1 =&gt; /usr/lib/libz.so.1 (0x0024e000)
  /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00ee7000)
  </code></pre>
  
  <p>How can I tell <code>make</code> or <code>libtool</code> to <strong>relink</strong> <code>myprog.x</code> so that I can copy it manually to <code>/usr/bin/</code>? After copying <code>libmylib.so</code> to <code>/usr/lib/</code> of course.</p>