title: How to rename a shared library to avoid same-name conflict?
body: <p>I found a library, <a href="http://sourceforge.net/projects/libjson/" rel="nofollow"><code>libjson</code></a>, that I am trying to build as a shared library and use in a project.  Building is simple enough; after fixing a Makefile bug,</p>
  
  <pre><code># SHARED=1 make install
  </code></pre>
  
  <p>will compile and install a <code>.so</code> in <code>/usr/lib</code>.  The problem is that my system (Arch Linux) already has a library named <code>libjson</code>, which the Makefile thoughtlessly overwrites for me!  Arch's library was installed as a dependency, so it can't be replaced.  Presumably other distros would have a similar problem if they had a library named <code>libjson</code>.</p>
  
  <p>What can I do about this?  I could rename the library (<code>libjson-mine</code> or something), but dynamic linking is only a couple steps away from magic, so I have no idea if this will break something.  <strong>How can I rename the library?</strong></p>
  
  <p>The other option is to drop the library's source code into my current project's source tree and have the builder make a static library instead.  (Obviously this makes my code's repository a bit messier, hence the undesirability.)  If I went this route, I'd need to make the linker prefer my <code>libjson.a</code> instead of searching <code>/usr/lib</code> for a "suitable" (read: wrong) library.  <strong>How do I make the linker prefer my version?</strong></p>
  
  <p>Or, is there a third option that I'm not aware of?</p>