I've noted that I can't emerge it anymore ( nor the vanila version ).
They all fail at the same point during configure process - when configure tries compiling test programs and linking them to libraires.
It finds headers fine ( checking for X11/extensions/xf86vmproto.h... yes ), but then fails to link against the library ( checking for -lXxf86vm... not found ).
I tried manually compiling those test code snippets ad they compile and execute fine...
I might be wrong on this, but it looks as if configure scripts is getting wrong the library dir and tries to link the 32-bit code with the libraries in /usr/lib instead of /usr/lib32 and that is the reason compile fails....
I tried several compilers-- gcc.5.5.0/6.4.0/7.2.0, all with the same result...
I run hardened profile, if that matters ( hardened/linux/amd64 ).
I tried to attach build log etc, but at the moment each attempt has fizzled out ( connection time out etc).
Will try later.
Created attachment 507218 [details]
Created attachment 507220 [details]
emerge --info wine-d3d9
Maybe it is a gold linker problem? Are you able to try without that?
Feel free to re-open if you can provide additional information as requested.