The command I used was (I'm doing an out of tree build)

../../src/emacs-24.0.90/configure --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no

The last few lines printed are:

  ...
checking for getpt... no
checking for library containing tputs... no
configure: error: I couldn't find termcap functions (tputs and friends).
Maybe some development libraries/packages are missing?  Try installing
libncurses-dev(el), libterminfo-dev(el) or similar.

The config.log file is attached: