Gnuplot のコンパイルとインストール

Gnuplot (4.2.4) は,ライセンスの関係がどうとかで readline がデフォルトでは使えない.このためコマンドプロンプト上でファイルを Tab キーとかで補完できないので不便だ.そこで自分でコンパイルする.
まず,ソースの取得.例えば

% apt-get source gnuplot

とか.直接 Gnuplot のサイトから取って来るのでもいい.

./configure を実行する.オプションは,

% ./configure --with-readline=gnu --prefix=/usr

のような感じ. --with-readline=gnuGNU の readline が有効になる. --prefix=/usr はお好みで(この設定だと実行ファイルが /usr/bin/gnuplot に置かれる).

次,make.

% make

なんとなく make check してみる.

% make check

デモがわんさと表示される.

最後に, make install して終りたかったのだが,

% sudo make install

エラーが出た!

make[1]: ディレクトリ `/home/akihiko/prg/src/gnuplot/gnuplot-4.2.4/docs' に入ります
../mkinstalldirs /usr/local/share/gnuplot/4.2
/usr/bin/install -c -m 644 gnuplot.gih /usr/local/share/gnuplot/4.2/gnuplot.gih
/bin/sh /home/akihiko/prg/src/gnuplot/gnuplot-4.2.4/missing --run makeinfo -I. ./gnuplot.texi --no-split --output=gnuplot.info
./gnuplot.texi:10582: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:10076: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:9734: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:9513: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:9502: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:9493: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:9476: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:9474: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:7413: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:4870: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:4851: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:4840: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:3459: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).
./gnuplot.texi:3131: Cross reference to nonexistent node `origin' (perhaps incorrect sectioning?).

Martin Backschat's Blogにあった解決策:

% sed -i 's/origin_/origin/g' docs/gnuplot.texi

を試したところ,

% sudo make install

でインストールに成功.

gnuplot> load 'u

このくらいまで打ち込んでから Tab キーを押すと,シェルのように補完してくれる.
便利.