Use AC_PATH_XTRA to search for X11 in configure.ac. In Makefiles, add
X_CFLAGS to AM_CFLAGS for the source compilation. Add X_LIBS to LDFLAGS.
Add X_PRE_LIBS and X_EXTRA_LIBS to LDADD.
With this patch, X Windows system is correctly detected on Mac OS X.
Use a mapping table to map xfree86 keycodes to evdev keycodes and obtain
consistent keysyms for keymaps. This way, it is now possible to generate
correct keymaps when evdev driver is used on host.