With the encroaching success of Gtk and Qt, the days of Xaw replacements such as Xaw3d and neXtaw are probably numbered. However, the latter have the advantage that they are small (in addition to being stable) and so this might help extend their longevity a bit. Note, moreover, that Emacs 21 supports neither Gtk nor Qt.
The target system in my case is an old Linux distribution running kernel 2.2.26, gcc-3.2.3, glibc-2.2.3, and XFree86-4.1.0.
The first step is to download and compile neXtaw-0.15.1, which is the latest version at this time. By default, neXtaw's headers and libraries are installed in /usr/local/include and /usr/local/lib, respectively.
The second step is to download and compile Emacs-21.4a, the latest version of the 21 series at this time. Assuming that X's headers and libraries are installed in /usr/X11R6 (the standard place on Linux systems), specify the following configure options (on one line):
./configure --x-includes=/usr/local/include:/usr/X11R6/include --x-libraries=/usr/local/lib:/usr/X11R6/lib
Naturally, if you install neXtaw's headers and libraries in the same place as X's headers and libraries, then it suffices to run ./configure without any special options.
After configure has finished, open the file src/Makefile in an editor and change the line LIBW= -lXaw3d to LIBW= -lneXtaw. This ensures that neXtaw will be used instead of Xaw3d. Then run make followed by make install (the latter step naturally assumes that the run with make is successful).
Here's a screenshot of Emacs 21 with a split window on my system. Observe, in particular, the cool neXtaw scrollbars! However, be aware that Emacs thinks that it's using Xaw3d, hence the fact that it's really using neXtaw isn't recorded under Show Emacs Version.
http://pinon.sdf-eu.org/technotes/nextaw_emacs.html