5.1.22-rcのconfigure

./configure \
'--prefix=/usr/local/mysql' \
'--localstatedir=/usr/local/mysql/data' \
'--libexecdir=/usr/local/mysql/bin' \
'--with-comment=MySQL Community Server (GPL)' \
'--with-server-suffix=' \
'--enable-thread-safe-client' \
'--enable-local-infile' \
'--enable-assembler' \
'--with-pic' \
'--with-fast-mutexes' \
'--with-client-ldflags=-static' \
'--with-mysqld-ldflags=-static' \
'--with-zlib-dir=bundled' \
'--with-big-tables' \
'--with-ssl' \
'--with-readline' \
'--with-embedded-server' \
'--with-archive-storage-engine' \
'--with-blackhole-storage-engine' \
'--with-ndbcluster' \
'--with-csv-storage-engine' \
'--with-example-storage-engine' \
'--with-federated-storage-engine' \
'--with-partition' \
'--with-innodb' \
'--with-extra-charsets=all' 

とりあえずこれにCC/CXX/CFLAGS/CXXFLAGSと--with-debugを付けて使うことにする。