glooxのインストール

glooxとは、XMPPのライブラリ。ほかにも、XMPPのライブラリは、コチラに載っている。

正直なところ、どれがいいのかは分からないけど、リストの中のc++で、一番上*1だったので、ちょっと使ってみた。

ダウンロードと、インストールまでの流れは、こちらに一通り書いてある。

で、glooxのコンパイルで軽くつまずいた。

tlsopensslserver.cpp:225: warning: unused parameter 'is_export'
tlsopensslserver.cpp:248: warning: unused parameter 'is_export'
tlsopensslserver.cpp: In member function 'virtual bool gloox::OpenSSLServer::privateInit()':
tlsopensslserver.cpp:257: error: 'EC_KEY_new_by_curve_name' was not declared in this scope
make[3]: *** [tlsopensslserver.lo] エラー 1
make[3]: ディレクトリ `/home/ykot/svn/gloox-1.0/src' から出ます
make[2]: *** [all-recursive] エラー 1
make[2]: ディレクトリ `/home/ykot/svn/gloox-1.0/src' から出ます
make[1]: *** [all-recursive] エラー 1
make[1]: ディレクトリ `/home/ykot/svn/gloox-1.0' から出ます
make: *** [all] エラー 2

ファイル名から、openssl絡みのエラーだろうと勝手に想像して、configureオプションでwithoutに変更。うまく指定すれば、opensslでも使えるはずだろうけど、めんどくさかったのと、今回は使用しないため、withoutとした。このあたりは、使用したいものを./configure --helpで確認するのが良いかと思う。*2

$ ./configure --without-openssl --with-gnutls
$ make
$ sudo make install

また、このconfigureオプションでは、gnutlsを使用できるようにしている。
インストール後の情報は、gloox-configで確認可能。

$ gloox-config
Usage: gloox-config [OPTIONS]
Options:
    [--prefix]
    [--libs]
    [--cflags]
    [--cxxflags]
    [--data-dir]
    [--version]

少し使ってみて、いい感じなら使用法をアップするかも :-P

*1:リストはアルファベット順

*2:本来は、はじめからそうするべき...