emacsの門はくぐっては出て、くぐっては出てを繰り返してる。
Windowsで秀丸を最初に使ったので、そこから脱出できない。
Solaris/Linuxで作業するときには、emacsだったり、vimだったりするけど。
emacs、vim使いとは到底言えないレベルだ。
emacsには慣れた方がよさそうなので、2009/5月から始まったEmacsトラノマキを
Software Designの総集編で見ながらいろいろ試してみる。
まず、CentOS5.3にemacs23.1をインストールしてみた。
configure
[oc@centos5 PKG]$ configure
configure: error: The following required libraries were not found:
libXpm libjpeg libgif/libungif libtiff
Maybe some development libraries/packages are missing?
If you don't want to link with them give
--with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no
いきなりライブラリが足りないって怒られるし。
rpm -qiで確認すると入ってるんだけどな・・・
と思ったら必要なのは、development liibrariesか。
[oc@centos5 PKG]$ sudo yum install libXpm-devel.i386 giflib-devel.i386 libtiff-devel.i386 libjpeg-devel.i386
[oc@centos5 PKG]$ sudo yum install libXpm-devel.i386 giflib-devel.i386 libtiff-devel.i386 libjpeg-devel.i386
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* epel: ftp.riken.jp
* addons: www.ftp.ne.jp
* pgdg83: yum.pgsqlrpms.org
* utterramblings: www.jasonlitka.com
* base: www.ftp.ne.jp
* updates: www.ftp.ne.jp
* extras: www.ftp.ne.jp
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Updates
Finished
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
-
- > Running transaction check
- > Package libtiff-devel.i386 0:3.8.2-7.el5_3.4 set to be updated
- > Processing Dependency: libtiff = 3.8.2-7.el5_3.4 for package: libtiff-devel
- > Package libjpeg-devel.i386 0:6b-37 set to be updated
- > Package libXpm-devel.i386 0:3.5.5-3 set to be updated
- > Package giflib-devel.i386 0:4.1.3-7.1.el5_3.1 set to be updated
- > Processing Dependency: giflib = 4.1.3-7.1.el5_3.1 for package: giflib-devel
- > Running transaction check
- > Package giflib.i386 0:4.1.3-7.1.el5_3.1 set to be updated
- > Package libtiff.i386 0:3.8.2-7.el5_3.4 set to be updated
- > Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
giflib-devel
i386 4.1.3-7.1.el5_3.1 base 103 k
libXpm-devel
i386 3.5.5-3 base 31 k
libjpeg-devel
i386 6b-37 base 105 k
libtiff-devel
i386 3.8.2-7.el5_3.4 base 465 k
Updating:
giflib
i386 4.1.3-7.1.el5_3.1 base 39 k
libtiff
i386 3.8.2-7.el5_3.4 base 306 k
Transaction Summary
=============================================================================
Install 4 Package(s)
Update 2 Package(s)
Remove 0 Package(s)
Total download size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): giflib-devel-4.1.3 100% |=========================| 103 kB 00:00
(2/6): libtiff-3.8.2-7.el 100% |=========================| 306 kB 00:00
(3/6): giflib-4.1.3-7.1.e 100% |=========================| 39 kB 00:00
(4/6): libXpm-devel-3.5.5 100% |=========================| 31 kB 00:00
(5/6): libjpeg-devel-6b-3 100% |=========================| 105 kB 00:00
(6/6): libtiff-devel-3.8. 100% |=========================| 465 kB 00:00
Running
rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libtiff ######################### [1/8]
Updating : giflib ######################### [2/8]
Installing: libtiff-devel ######################### [3/8]
Installing: libjpeg-devel ######################### [4/8]
Installing: libXpm-devel ######################### [5/8]
Installing: giflib-devel ######################### [6/8]
Cleanup : giflib ######################### [7/8]
Cleanup : libtiff ######################### [8/8]
Installed: giflib-devel.
i386 0:4.1.3-7.1.el5_3.1 libXpm-devel.
i386 0:3.5.5-3 libjpeg-devel.
i386 0:6b-37 libtiff-devel.
i386 0:3.8.2-7.el5_3.4
Updated: giflib.
i386 0:4.1.3-7.1.el5_3.1 libtiff.
i386 0:3.8.2-7.el5_3.4
Complete!
もう一度 configure
[oc@centos5 emacs-23.1]$ configure
Configured for `
i686-pc-
linux-
gnu'.
Where should the build process find the source code? /home/oc/work/PKG/
emacs-23.1
What operating system and machine description files should
Emacs use?
`s/
gnu-
linux.h' and `m/intel386.h'
What compiler should
emacs be built with?
gcc -g -O2 -Wno-pointer-
sign
Should
Emacs use the
GNU version of
malloc? yes
(Using Doug Lea's new
malloc from the
GNU C Library.)
Should
Emacs use a relocating allocator for buffers? yes
Should
Emacs use
mmap(2) for buffer allocation? no
What window system should
Emacs use?
x11
What toolkit should
Emacs use?
GTK
Where do we find
X Windows header files? Standard dirs
Where do we find
X Windows libraries? Standard dirs
Does
Emacs use -lXaw3d? no
Does
Emacs use -lXpm? yes
Does
Emacs use -ljpeg? yes
Does
Emacs use -ltiff? yes
Does
Emacs use a gif library? yes -lgif
Does
Emacs use -lpng? yes
Does
Emacs use -lrsvg-2? no
Does
Emacs use -lgpm? yes
Does
Emacs use -ldbus? yes
Does
Emacs use -lfreetype? yes
Does
Emacs use -lm17n-flt? no
Does
Emacs use -lotf? no
Does
Emacs use -lxft? yes
Does
Emacs use toolkit scroll bars? yes
configure: creating ./config.status
config.status: creating
Makefile
config.status: creating lib-src/
Makefile.c
config.status: creating oldXMenu/
Makefile
config.status: creating doc/
emacs/
Makefile
config.status: creating doc/misc/
Makefile
config.status: creating doc/lispintro/
Makefile
config.status: creating doc/lispref/
Makefile
config.status: creating src/
Makefile.c
config.status: creating lwlib/
Makefile
config.status: creating
lisp/
Makefile
config.status: creating leim/
Makefile
config.status: creating src/config.h
config.status: executing default commands
creating src/epaths.h
creating lib-src/
Makefile
creating src/
Makefile
make
[oc@centos5 emacs-23.1]$ make
省略
Updating /home/oc/work/PKG/emacs-23.1/leim/leim-list.el ... done
sed -n '/^[^;]/ p' < /home/oc/work/PKG/emacs-23.1/leim/leim-ext.el >> leim-list.el
make[1]: ディレクトリ `/home/oc/work/PKG/emacs-23.1/leim' から出ます
動作確認
[oc@centos5 emacs-23.1]$ src/emacs -q
正常に起動したら、ctrl + x ctrl + cで終了
install
[oc@centos5 emacs-23.1]$ sudo make install
cd lib-src; make all \
CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-D_BSD_SOURCE ' \
LDFLAGS='-Wl,-znocombreloc ' MAKE='make'
make[1]: ディレクトリ `/home/oc/work/PKG/emacs-23.1/lib-src' に入ります
make[1]: `all' に対して行うべき事はありません.
make[1]: ディレクトリ `/home/oc/work/PKG/emacs-23.1/lib-src' から出ます
boot=bootstrap-emacs; \
if [ ! -x "src/$boot" ]; then \
cd src; make all \
CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-D_BSD_SOURCE ' \
LDFLAGS='-Wl,-znocombreloc ' MAKE='make' BOOTSTRAPEMACS="$boot"; \
fi;
make[1]:
ディレクトリ `/home/oc/work/PKG/
emacs-23.1/leim' から出ます
cd lib-src; make maybe-blessmail \
MAKE='make' archlibdir='/usr/local/libexec/
emacs/23.1/
i686-pc-
linux-
gnu'
make[1]:
ディレクトリ `/home/oc/work/PKG/
emacs-23.1/lib-src' に入ります
make[1]: `maybe-blessmail' に対して行うべき事はありません.
make[1]:
ディレクトリ `/home/oc/work/PKG/
emacs-23.1/lib-src' から出ます
[oc@centos5
emacs-23.1]$ sudo make install
バージョン確認
[oc@centos5 emacs-23.1]$ which emacs
/usr/local/bin/emacs
[oc@centos5 emacs-23.1]$ emacs -version
GNU Emacs 23.1.1
Copyright (C) 2009 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.