From the coders list:
"Right now if you want to do the linking for a .so, you're right that
there is no infrastructure at the moment to handle that. The
--with-ldflags was the right guess, but that does insert the results
at application linking time, not shared-library time.
configure will have to be modified to handle this is the future (so
you might want to file a feature request to ensure we don't forget
See thread "linking in external libraries" (30 April)