Usual MySQL build prerequisites:
Unix: compiler and make utility, curses dev package on Linux
Windows: Visual Studio (Express version okay)
Mac OS X: Xcode tools
Everywhere: bison, unless you're building from source package where bison output is already packed. On OpenSolaris/Solaris Express you would need to install m4 in addition to bison. NOTE: On Windows install bison into path without spaces, not into default location. Reason: this bug in bison 2.4.1
CMake version 2.6.3 or later installed on your system.