Hi,
I had to add MySQL support to IRCServices, which wasn't really easy too. I needed some days to figure out what I have to change.
I'd say you have to change the line
IRCDLIBS=-lcrypt -lnsl -ldl -L/home/xxx/Unreal3.2/extras/regexp/lib -ltre -L../extras/c-ares/lib -lcares
to something like that
IRCDLIBS=-lcrypt -lnsl -ldl -L/home/xxx/Unreal3.2/extras/regexp/lib -ltre -L../extras/c-ares/lib -lcares
-L/usr/lib/mysql -lmysql
If GCC can't find mysql.h you have to change the line
XCFLAGS=-I/home/xxx/Unreal3.2/extras/regexp/include -I/home/xxx/Unreal3.2/extras/c-ares/include -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -export-dynamic
to
XCFLAGS=-I/home/xxx/Unreal3.2/extras/regexp/include
-I/usr/include/mysql -I/home/xxx/Unreal3.2/extras/c-ares/include -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -export-dynamic
Of course these are only examples, and path could differ depending on your linux distribution.
Hope this helped you a little. If there are still questions just ask

(btw.: Sorry for my english, I'm not a native speaker)
Greets, Mephisto