The stock libXpm.3.4f-ELF.tar.gz places the files in [/]usr/X11R6/lib. The
stock GCC 2.7.0 kit includes ld scripts that don't look there. Much (but not
all) of the stuff in XFree86 3.1.x gets symlinked from places where the ld
scripts *do* look, so some things link and some don't depending on which
libraries they want. This will drive you crazy until you realize that ld isn't
using the same search list as ld.so.
Is it better to make (and maintain) scads of symlinks for all these libraries,
or to tweak the ld scripts to look in *all* of the "right places"? From a
maintenance standpoint, I'd rather the latter, but I wanted a reality check
before doing so.
You are in a twisty little maze of hyperlinks, all useless.