The legacy (Autotools) way to build MySQL on Unix was to run this command:
BUILD/autorun.sh; ./configure lots of options; make
That may still work. However, ./configure created by ./BUILD/autorun.sh is just a wrapper that translates old-style Autotools options to new-style cmake options. The script is neither perfect nor supported. It is meant to be a temporary solution for those who need time to rewrite ./configure based scripts to native CMake.
Instead of running BUILD/autorun.sh, you can invoke ./cmake/configure.pl directly.