title: How can an autotools user specify a combination of static & dynamic linking?
body: <p>I'm building a program with autoconf, automake, and libtool.
  My work requires that I statically link (most) libraries. This hasn't been
  a problem in the past because I could statically link everything with
  <code>-all-static</code>. Now it's a problem because I have to use a library which is
  only dynamic; it was given to us by a thirdparty, and we don't have the source.</p>
  
  <p>Of course, <code>-all-static</code> now causes the build to fail. Is it possible to
  tell libtool to statically link everything, except for this one library?
  Is it possible to have libtool do any combination of static and
  dynamic linking, or is it all or nothing?</p>
  
  <p>So far I've tried creating a convenience library with <code>LDFLAGS = -static</code>, which depends on the libraries I want to statically link. But libtool doesn't concatenate the static libraries, like I would have hoped. The program depending on the convenience library still dynamically links everything.</p>
  
  <p>I've also tried <code>--disable-shared</code>, but that didn't affect the build.</p>
  
  <hr>
  
  <p>These questions are similar, but don't really answer my question:</p>
  
  <p><a href="https://stackoverflow.com/questions/10842949/force-linking-a-static-library-into-a-shared-one-with-libtool">Force linking a static library into a shared one with Libtool</a></p>
  
  <p><a href="https://stackoverflow.com/questions/1943834/is-it-possible-to-link-some-but-not-all-libraries-statically-with-libtool">Is it possible to link some — but not all — libraries statically with libtool?</a></p>
  
  <p>(I don't want to delete shared libraries from my system, and specifing the full path for everything is hardly better than linking by hand, but maybe it's the only way.)</p>