Automake includes the contents of the $LIBS variable in all link commands, including linking libraries. This results in the following behavior:
1) If libtool is creating a static library, this seems to work fine. The libraries in $LIBS are listed as dependencies in the resulting .la file. 2) If libtool is creating a shared library, and all the libraries listed in $LIBS are shared libraries, everything works correctly. The libraries in $LIBS are listed as dependencies in the resulting .la and .so files. 3) If libtool is creating a shared library, and one or more of the libraries in $LIBS is static, behavior is *incorrect*. libtool links the objects in the static archives into the resulting shared library. As static archives are typically compiled w/out PIC, the result is a broken shared library. How do I keep the behavior in 1) and 2), while changing the behavior for 3) such that the static libraries in $LIBS are listed as dependencies in the .la file, but not linked into the shared library?
