The econf part of the fvwm-2.5.21 ebuild uses use_enable instead of use_with for enabling / disabling png support. The ebuild (incorrectly) passes --enable-png-library, when it should pass --with-png-library instead (when the png USE-flag is set, of course). Since the configure script does not bail out on an invalid argument the enabling/disabling of png support becomes automagic: it all depends on whether libpng is found or not. I currently don't know whether this affects other fvwm ebuilds as well, but I guess it does (unless fvwm changed their png configure parameters between versions 2.5.18 and 2.5.21).
Also, for the sake of avoiding issues with 'automagic' configuration, wouldn't it be proper form to include a `use_enable gtk` part as well?
Ignore the previous comment please; I'm stupid apparently. Sorry :).
This should be fixed in the ebuild for 2.5.25, which I just committed. Thanks. :)