[SOLVED] "Could not find library -lXpm" when building The SWI-Prolog XPCE package

When trying to build swi-prolog packages from source, the xpce package complains:

* ERROR: Could not find library -lXpm.                          *
* Please install the XPM library and rerun configure.           *
* The primary source for libXpm is at:                          *
*                                                               *
*     http://www-sop.inria.fr/koala/lehors/xpm.html             *

According to google, a number of people seem to have got the same error.

The solution was (at least in Ubuntu Jaunty, 9.04): install libxt-dev:

sudo apt-get install libxt-dev

Now you should succeed with running (staying in the packages or the xpce folder):
sudo make install

Though I'm using the paco package organizer, so I would instead run:
sudo paco -lp swi-prolog-package-xpce "make install"