I believe libxpm comes as part of XFree86 4.x. (which I assume you have installed if you are looking to run emacs under X) At any rate, I have it but have been having a similar problem compiling x3270. ld seems to think that _XpmReadFileTo Pixmap is not defined. However, it is in the library...