Build Emacs with X support

Since like last week you can now compile with GTK3.

Here is the list of dependencies for Debian-based systems:

  • Tools:

    gcc autoconf automake texinfo libtool git

  • libraries:

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

    (another way is to use apt-get build-dep emacs23 and add gtk3)

And here is the script I use for automated builds on all my machines:

#!/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

On SUSE Linux you will typically want to compile Emacs with support for GTK, so you should install GTK headers along with X headers (package gtk2-devel).

In order to compile Emacs with all modern features you will want to install development packages for packages not found in your ./configure output: rsvg, dbus, gnutls, etc...

Tags:

Emacs