It's really only a stopgap since you would need to do something more intelligent when you detect --enable-shared and then dynamically adjust hogweed's link options.
Can you be a bit more concrete about what you think is needed? What are the different cases, and what should the link options be in each case? (I've read you earlier mail with some other issues, I hope to reply to it reasonably soon).
The problem w/ my patch is the use case where the user specified --disable-shared. In that case, it would build the static libs, but my patch looks explicitly to link against the shared lib: libnettle.dll.a. I explicitly used libnettle.dll.a b/c it built both the static lib and the shared lib and I was unsure which one it would choose to link against (shared or static lib).
Libtool: No. I think libtool is a reasonable idea, but I consider the current way it's implemented (a shell script of 9000+ lines invoked for each file being compiled) as way too awful. I strongly prefer the autoconf way, to select suitable compile and link flags during *configure*, and just substitute the right things in the Makefile. It makes it a *lot* easier to track down problems. Ideally, I'd prefer a libtool-ish autofonf macro which defines a set of autoconf substitutions, and nothing more.
Have you considered using dolt (dolt.freedesktop.org)?
pkg-config: Possibly, but I'm not so familiar with it. Do you want nettle's configure to use pkg-config to pick up gmp, or do you want nettle to install pkg-config stuff so others can use it to pick up nettle and hogweed?
I'm more looking at nettle to install pkg-config so others can pick it up.