The previous one does not work as expected. You also need to change
tools/Makefile.dep.
- Remove some unnecessary variables
- configure already supports custom X11 path via XLIB_DIR, use that.
PR: 106020
Submitted by: rafan
Approved by: Nguyen Tam Chinh <chinhngt at sectorb.msk.ru> (maintainer)