To reproduce: # emerge -C sys-devel/gettext; emerge -1 media-libs/gd [... output not shown ...] # gdlib-config --libs -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lz -lm @LIBICONV@ Looks like the build system needs /usr/share/aclocal/iconv.m4 for proper functioning, which would mean that gd misses a dependency on gettext. (Also I don't understand why the build silently continues if it doesn't find iconv.m4. It should error out.)
the ebuild is written so as to not require gettext. i've tweaked it further to make sure @LIBICONV@ is elided. http://sources.gentoo.org/media-libs/gd/gd-2.0.35-r4.ebuild?r1=1.1&r2=1.2