When I emerge xscreensaver on my system(s) xscreensaver complained about the lack of XML despite the fact I have libxml and libxml2 installed. I captured the output of the build and found it couldn't find xmlIO.h: checking for xml2-config... /usr/bin/xml2-config checking for XML includes... -I/usr/include/libxml2 checking for XML libs... -L/usr/lib -lxml2 -lz -lm checking for xmlIO.h... no xmlIO.h is found in two places on my box: /usr/include/gnome-xml and /usr/include/libxml2/libxml I'm not using gnome, but I do have gtk installed, I resolved the problem by exporting the C_INCLUDE_PATH to include the /usr/include/libxml2/libxml directory.
Yes I see this also, I have both libxml and libxml2 installed yet xscreensaver fails to find them. I tweaked the .ebuild to add --with-xml=/usr/include/libxml2/libxml then added two symlinks in there, lib and include which both pointed to that same directory. an ugly method, but it solved the problem. I like yours better :) I also found a forums article about this showing some other people experiencing it: http://forums.gentoo.org/viewtopic.php?t=381&highlight=xscreensaver
took me a while to find out that a problem lies when C_INCLUDE_PATH isn't / terminated.... commited a working fix now