A lot of Apache modules will ignore LDFLAGS during src_compile - this can be solved in two ways: patch the apache-module.eclass or patch apxs itself.
So far there are three bugs about such modules, more are known to fail (mod_caucho for example) but no bugs exist for them yet.
I'm attaching a small patch against apxs that makes it aware of LDFLAGS environment variable which solves the above issue for all modules at once. It also has the added benefit of working properly for ebuilds not using apache-module.eclass or direct builds by users.
The point of this bug is to get a short discussion going on and get the patch in next patches tarball release (2.2.16-r1?).
Benedikt: what's your opinion on this?
Created attachment 245480 [details, diff]
After discussing this with Benedikt I've committed this patch as 10_all_apxs_ldflags.patch to Apache patches repository. This will be released when new patches tarball will be created and Apache bumped to use it.
This patch is in 2.2.17.