Rebased-by: Pieter Wuille <pieter.wuille@gmail.com>
Libtool will do the right thing and use whatever is available based on --enable-shared/--enable-static. This also means that some of the things we build actually test the dynamic library.