使用X支持构建emacs

时间:2012-03-13 04:01:58

标签: emacs

我正在尝试在64位Suse Linux(10.2企业版)框上构建具有X支持的emacs 24.0.94。我看到X11库安装在/ usr / lib / X11R6中,我告诉配置脚本在该位置查找它们:

--x-includes=/usr/X11R6/include:/usr/include --x-libraries=/usr/X11R6/lib64:/usr/lib64

即使使用上述选项,配置脚本也会抱怨它找不到任何Xtoolkit:

checking X11 version 6... before 6
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for librsvg-2.0 >= 2.11.0... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for Wand >= 6.2.8... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for gtk+-2.0 >= 2.10 glib-2.0 >= 2.10... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for dbus-1 >= 1.0... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for gio-2.0 >= 2.26... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for gconf-2.0 >= 2.13... no
checking for lgetfilecon in -lselinux... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for gnutls >= 2.6.6... no
checking for gnutls_certificate_set_verify_function... no
checking for xaw3d... no
checking for libXaw... configure: error: No X toolkit could be found.
If you are sure you want Emacs compiled without an X toolkit, pass
  --with-x-toolkit=no
to configure.  Otherwise, install the development libraries for the toolkit
that you want to use (e.g. Gtk+) and re-run configure.

有人可以告诉我可能是什么问题吗?

2 个答案:

答案 0 :(得分:14)

因为像上周一样你现在可以用GTK3编译

以下是基于debian的系统的依赖关系列表:

  • 工具

gcc autoconf automake texinfo libtool git

  • 库:

libncurses5-dev libgnutls-dev librsvg2-dev libxpm-dev libjpeg62-dev libtiff-dev libgif-dev libqt4-dev libgtk-3-dev

(另一种方法是使用apt-get build-dep emacs23并添加gtk3)

这是我在所有机器上用于自动构建的脚本:

#!/bin/bash

init=false
SRC_DIR=~/src

if [ ! -d "$SRC_DIR" ]; then mkdir $SRC_DIR; fi

if [ ! -d "$SRC_DIR/emacs" ]; then
    init=true
    cd $SRC_DIR && pwd && git clone git://git.sv.gnu.org/emacs.git && cd emacs
else
    cd $SRC_DIR/emacs
fi

git pull 1>&1 | grep "Already up-to-date."
if [[ ! $? -eq 0 && ! $init ]]; then
    read -e -p "## Branch moved, build and install emacs? [Y/n] " yn
    if [[ $yn == "y" || $yn == "Y" || $yn == "" ]] ; then
        make distclean && autoreconf -i -I m4 && ./configure --with-x-toolkit=gtk3 && make && sudo make install
    fi
fi

答案 1 :(得分:6)

On Suse,您通常希望编译支持GTK的Emacs,因此您应该安装GTK标头和X标头(包gtk2-devel)。

为了编译具有所有现代功能的Emacs,您需要为./configure输出中找不到的软件包安装开发包:rsvg,dbus,gnutls等...