Cannot find xorg-macros 1.12
I tried to install libXtst on Ubuntu 16, and it says it cannot find xorg-macros 1.12. I built and installed those in my home directory, and yet it still cannot find them. How can one tell autogen.sh where my macros are? Thank you.