I am having the exact same problem and it appears to be due to mysql_config on ubuntu 12.04 no longer reporting --lssl as when running "mysql_config --libs".
I am having the exact same problem and it appears to be due to mysql_config on ubuntu 12.04 no longer reporting --lssl as when running "mysql_config --libs".