Right. After enabling HAVE_X11 it works. Thanks!
BTW, it seems to me that there are quite a few broken
configurations. This is an instance: if HAVE_X11 is not defined, the
problem described on the subject arises.

It is kind of assumed that some defines belong together, such as
USE_LUCID can't be used unless HAVE_X11 is defined, ditto for
USE_X_TOOLKIT. I guess you aren't running configure, if you where this
wouldn't happen (unless configure itself is messed up).