See attached build log. (Please do not complain about the need for looking at the build log until you can provide an easy way to open bugs with the correct data picked out of a tinderbox log. Thanks.)
Created attachment 247044 [details] Build log
Created attachment 267807 [details, diff] prosody-0.7.0-flags.patch Neither does it honor CFLAGS. With this patch the ebuild passes LDFLAGS and CFLAGS down to the configure script. Note that I needed to explicitly set options ("-shared" for LDFLAGS, "-Wall -fPIC" for CFLAGS), as they are used as passed in. So these flags might need some adjustments depending on the platform (I used the defaults I normally call sane).
This has been fixed in prosody-0.8.0.