Skip to content

Instantly share code, notes, and snippets.

@abeluck
Created July 9, 2019 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abeluck/50820a76dc4417760db77b634bf101af to your computer and use it in GitHub Desktop.
Save abeluck/50820a76dc4417760db77b634bf101af to your computer and use it in GitHub Desktop.
Build emacs from source on Debian 9 (stretch)
#!/bin/bash
# Builds emacs from source
# Tested on Debian 9 (stretch)
set -e
emacs_src=$HOME/src/emacs
emacs_dest=$HOME/.local
emacs_tag=emacs-26.2
if [ ! -d $emacs_src ]; then
git clone --depth 1 https://git.savannah.gnu.org/git/emacs.git $emacs_src
fi
cd $emacs_src
git fetch -t
git checkout $emacs_tag
sudo apt install libc6-dev \
libgif-dev \
libgnutls28-dev \
libgtk-3-dev \
libice-dev \
libjpeg-dev \
libmagickcore-dev \
libmagick++-dev \
libncurses5-dev \
libotf-dev \
libsm-dev \
libtiff5-dev \
libx11-dev \
libxext-dev \
libxi-dev \
libxmu-dev \
libxmuu-dev \
libxpm-dev \
libxrandr-dev \
libxt-dev \
libxtst-dev \
libxv-dev
./autogen.sh
./configure --prefix=$emacs_dest \
--with-gnutls \
--with-modules \
--with-x-toolkit=gtk3 \
--without-makeinfo
make -j$(nproc)
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment