Emacs 24 will build with the gtk2 X toolkit by default, but you can override that with an argument to the configure command -- this is recommended in any case, because an Emacs built with any version of the Gnome toolkit, and run in daemon mode, will tend to crash when a client disconnects.
Several toolkit bindings are available, but none is required, and given your situation and the need for minimal dependencies, building without a toolkit is the option I recommend. To do so, visit the directory where you unpacked your Emacs source tarball and do
./configure --with-x-toolkit=no # ...
make && make install
As always, if building to install without root privileges, you'll want to give a --prefix
argument to configure, specifying some location writable for your account and present in your $PATH
, so that you can install and run your custom-built Emacs with minimal extra effort.
If you're not accustomed to using X without a toolkit, and frequently make use of the toolbar, menubar, and scrollbar in Emacs, a version built without a toolkit will be rather strange to get used to. On the other hand, if you can't install the necessary dependencies to use a toolkit, then building without one will at least give you a working graphical Emacs. (You don't really need toolbars, menubars, or scrollbars anyway. "Luke, you've switched off your targeting computer. What's wrong?" "Nothing. I'm all right.")