I'd like to build both static and shared libraries with Autotools. However, this results in a double compile, as described in this question.
Is there a way to avoid this? My first though was to enable -fPIC and -DPIC even when building the static library. However, that didn't work.
I understand that -fPIC is suboptimal for static libraries, but I'm more concerned with build time than runtime efficiency for this particular project.