This really isn't a Splunk question, but it's been here forever and has double points so I'll try. 😄
It looks like you are compiling on an OS X machine. Normally gcc is not named gcc-4.2 . Make sure your system has the gcc compiler - you may need to install it either from a ports package or install XCode. (My imac at home has XCode and has /usr/bin/gcc but not /usr/bin/gcc-4.2)
You have a variety of possible paths:
look for this code already compiled as part of a ports package
consult with the MySQL lists for assistance with compiling their driver
make sure you have gcc installed, then hack in a symlink to gcc-4.2 -> gcc like this
sudo ln -s /usr/bin/gcc /usr/local/bin/gcc-4.2
... View more