Fix : /bin/bash ./config.sub failed
checking build system type... Invalid configuration 4': machine
4' not recognized
configure: error: /bin/bash ./config.sub 4 failed
solution:
autoreconf --install
then configure again.
in my case, I passed a extra '4' to configure command by mistake.