Skip to content

Instantly share code, notes, and snippets.

@xuhdev
Last active December 18, 2024 08:15
Show Gist options
  • Save xuhdev/378a1f9e35fe554fdf30e9c1943846e5 to your computer and use it in GitHub Desktop.
Save xuhdev/378a1f9e35fe554fdf30e9c1943846e5 to your computer and use it in GitHub Desktop.
My Emacs configure (for build)
#!/bin/sh
# Configure Emacs build options.
./autogen.sh
mkdir build && cd build
# Replace `--with-pgtk` with `--with-cairo` if building for X11.
CFLAGS='-march=native -O3' ../configure \
--with-modules \
--with-xwidgets \
--prefix="$HOME/.local/opt/emacs/" \
--program-transform-name='s/^ctags$/ctags.emacs/' \
--with-mailutils \
--enable-acl \
--with-imagemagick \
--with-native-compilation=aot \
--with-pgtk \
--with-tree-sitter
# Put this to ~/.local/share/applications
[Desktop Entry]
Type=Application
Name=Emacs
Exec=/home/hong/.local/opt/emacs/bin/emacs
Icon=/home/hong/.local/opt/emacs/share/icons/hicolor/scalable/apps/emacs.svg
StartupNotify=true
Terminal=false
Categories=Development;TextEditor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment