Replicate 7d2543a3cb but for all types of X servers
7d2543a3cb
[ajax: Fixed test/Makefile.am as well] Reviewed-by: Adam Jackson <ajax@redhat.com>