Try installing the stuff it says it can't find;
Code:
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL \ -I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH \ -I/usr/local/include/sasl -I/usr/local/bdb/include \ -DUSE_TLS -I/usr/local/ssl/include/openssl -g -O -I. -DLINUX2 -c argv.c
gcc: -I/usr/local/mysql/include/mysql: No such file or directory
gcc: -I/usr/local/include/sasl: No such file or directory
gcc: -DUSE_TLS: No such file or directory
Or installing via your package manager to fix deps properly