Get correct library and include paths by running mysql_config from the MySQL/MariaDB package that you want to use for building sysbench.
If there are two paths returned, like in MariaDB 5.5, the one where
mysql.h sits seems to work well.
To link dynamically, run
To link statically, run
Copy libtool from the system to the sysbench dir, otherwise it is likely to fail:
cp `which libtool` ./
ls -l ./libtool