mysql-proxy-0.7インストールまとめ

Luaダウンロードサイトから,最新版をダウンロード.
Lua: download area
現時点での最新版は,5.1.4.

makeしてインストール.

# make linux
# make install

linuxの他に,現在対応しているOSリストは以下:

aix ansi bsd freebsd generic linux macosx mingw posix solaris

glib-2のダウンロードサイトから,最新版をダウンロード.
Index of /pub/gnome/sources/glib/2.20
現時点での最新版は2.20.1.

makeしてインストール.現在のバージョンも残しておきたいので,デフォルトのまま/usr/local以下にインストールすることに.

# ./configure
# make -j 4
# make install
# ldconfig

mysql-proxyのダウンロードサイトから,0.7をダウンロード.
https://launchpad.net/mysql-proxy/trunk/0.7.0

makeしてインストール.まず,glib2の最新版を/usr/local以下に置いたための環境変数を設定.設定しないと,速攻でこんなエラーが.

# ./configure --with-mysql=/usr/local/mysql/bin/mysql_config
(中略)
checking for GLIB... configure: error: Package requirements (glib-2.0 >= 2.16.0) were not met:

Requested 'glib-2.0 >= 2.16.0' but version of GLib is 2.12.3

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

このメッセージの通り,環境変数を設定してmake.

# export CFLAGS="-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include"
# export LDFLAGS="-L/usr/local/lib -lglib-2.0 -lgmodule-2.0 -lgthread-2.0"
# export GLIB_CFLAGS=-I/usr/local/include
# export GLIB_LIBS=-L/usr/local/lib
# export GMODULE_CFLAGS=-L/usr/local/lib
# export GMODULE_LIBS=-L/usr/local/lib
# export GTHREAD_CFLAGS=-L/usr/local/lib
# export GTHREAD_LIBS=-L/usr/local/lib
# ./configure --with-mysql=/usr/local/mysql/bin/mysql_config
# make -j 4
# make install

これくらいで動きます.
多少の実行時警告は出ますが,「警告は無視」という格言の通り,深く気にせずに.