./configure is looking for the graphics library, available from www.boutell.com/gd.
Get it, unpack it, read the INSTALL file, and install it in /usr/local/gd. Then run configure with --with-gd-root=/usr/local/gd. You'll need gdbm too if you haven't got it installed already. It's available from any GNU mirror. Get it, unpack it, read the INSTALL file, and install it in /usr/local/gdbm. You'll need to tell configure where to find it with --with-gdbm-root=/usr/local/gdbm. Good luck. MJR
