さくらインターネットのOSはFreeBSD 7.1で、テキストベースのWebブラウザlynxがデフォルトでインストールされていますが、使いにくいので、w3mを一般ユーザーでコンパイル、インストールします。
新しいバージョンのw3mを使いたいところだが、0.5.xでは、コンパイル時にエラーを吐いてコンパイルに失敗する。そこで、バージョン 0.4.1をコンパイルする。このバージョンはconfigureの使い方が標準と違い、クセがある。
$ tar zxfv w3m-0.4.1.tar.gz
$ cd w3m-0.4.1
$ ./configure
...
%
% Hello foo. Let's start configuration process for w3m.
% Please answer some questions.
%
Which directory do you want to put the binary?
(default: /usr/local/bin) /home/foo/local/bin
Which directory do you want to put the support binary files?
(default: /usr/local/libexec/w3m) /home/foo/local/libexec/w3m
Which directory do you want to use local cgi?
(default: /usr/local/libexec/w3m/cgi-bin) /home/foo/local/libexec/w3m/cgi-bin
Which directory do you want to put the helpfile?
(default: /usr/local/share/w3m) /home/foo/local/share/w3m
Which directory do you want to put the manfile?
(default: /usr/local/man) /home/foo/local/man
Which directory do you want to put the system wide w3m configuration file?
(default: /usr/local/etc/w3m) /home/foo/local/etc/w3m
Which language do you prefer?
1 .. Japanese (charset ISO-2022-JP, EUC-JP, Shift_JIS) (LANG=JA)
2 .. English (charset US_ASCII, ISO-8859-1, etc) (LANG=EN)
[12]? 1
You select Japanese (charset ISO-2022-JP, EUC-JP, Shift_JIS) LANG=JA
What is your display kanji code?
S .. Shift JIS (DISPLAY_CODE=S)
E .. EUC-JP (DISPLAY_CODE=E)
j .. JIS: ESC $@ - ESC (J (DISPLAY_CODE=j)
N .. JIS: ESC $B - ESC (J (DISPLAY_CODE=N)
n .. JIS: ESC $B - ESC (B (DISPLAY_CODE=n)
m .. JIS: ESC $@ - ESC (B (DISPLAY_CODE=m)
[SEjNnm]? E
You select EUC-JP DISPLAY_CODE=E
Use 2-byte character for table border, item, etc. [y]?
Use Lynx-like key binding as default [n]?
Let's do some configurations. Choose config option among the list.
1 - Baby model (no color, no menu, no mouse, no cookie, no SSL)
2 - Little model (color, menu, no mouse, no cookie, no SSL)
3 - Mouse model (color, menu, mouse, no cookie, no SSL)
4 - Cookie model (color, menu, mouse, cookie, no SSL)
5 - Monster model (with everything; you need openSSL library)
6 - Customize
Which? 4
Use color ESC sequence for kterm/pxvt .... yes
Use mouse (requires xterm/kterm/gpm/sysmouse) .... yes
Use popup menu .... yes
Use cookie .... yes
Use SSL (need OpenSSL library; Please see http://www.openssl.org/) .... no
Inline image support [n]?
ANSI color escape sequences support [n]?
Use Migemo (Roma-ji search; Please see http://migemo.namazu.org/) [n]?
External URI loader support [y]?
Use w3mmail.cgi [y]?
NNTP support [y]?
Gopher support [y]?
Use alarm support code [y]?
Use mark operation [y]?
Input your favorite editor program.
(Default: /usr/bin/vi) /usr/local/bin/jvim
Input your favorite external browser program.
(Default: /usr/local/bin/lynx)
Input your favorite C-compiler.
(Default: gcc)
Input your favorite C flags.
(Default: -O)
Terminal library -ltermcap found at /usr/lib, and it seems to work.
Terminal library -ltermlib found at /usr/lib, and it seems to work.
Terminal library -lcurses found at /usr/lib, and it seems to work.
Terminal library -lncurses found at /usr/lib, and it seems to work.
Which terminal library do you want to use? (type "none" if you do not need one)
(default: -lncurses)
/usr/lib/libz found
/usr/include/zlib.h found
Input additional LD flags other than listed above, if any:
:
...
$ make
$ make install