Compiling on Fedora: At first sight, the error log seems to indicate that there is a problem with the library path:
"ERROR: Could not load/find library -lXpm. Please install the XPM library and rerun configure."
but /usr/lib64/libXpm.so clearly exists.
It turns out that devel library for the X Toolkit is missing:
dnf install libXt-devel
in addition to
dnf install libX11-devel libXpm-devel libXext-devel
and possibly others.
Confusing. Maybe passing to cmake (as foreseen) will make things better.