Configure: error: X Window system libraries and header files are required

I am trying to compile thunar 1.8.4.

It is giving me this error.

configure: error: X Window system libraries and header files are required

Ubuntu Mate 18.04

The library for development is not installed. Try

apt search xorg-dev #may be -develop
apt install xorg-dev

You may need more -dev packages for anything else thunar depends on. One of the drawbacks of a binary distribution.