See the manual :-). There is the page about compiling at SoftAgency. Note that this page is written in Japanese.
If you want to use Japanese on MySQL, you must configure with option --with-charset=ujis (or sjis).
Note: Compiler gcc-2.8.x and egcs-2.91.x has bug that MySQL cannot handle SJIS data correctly. The bug is not available with egcs-2.93.x. I made the patch to avoid this problem (in MySQL 3.22.24, this patch was included).
To handle Japanese data correctly. This page is written by Japanese.
Japanese manual is available. It is at MySQL Nippon Association.
The extention library to use MySQL via Ruby.