Building Emacs from git master complains errors in configure.ac

886 Views Asked by At

When I try to build Emacs from https://github.com/emacs-mirror/emacs at 4f54f7b using ./autogen.sh it errors as

Checking whether you have the necessary tools...
(Read INSTALL.REPO for more details on building Emacs)

Checking for autoconf (need at least version 2.65)...
ok
Checking for automake (need at least version 1.11)...
ok
Your system has the required tools.
Running 'autoreconf -fi -I m4' ...
configure.ac:54: error: possibly undefined macro: AS_ECHO
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:95: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:245: error: possibly undefined macro: AC_DEFINE
configure.ac:752: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:763: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:1020: error: possibly undefined macro: AM_SUBST_NOTMAKE
configure.ac:1471: error: possibly undefined macro: m4_default
autoreconf: /usr/bin/autoconf failed with exit status: 1

I've tried the common tricks to solve it without success. What to do?

Update: make bootstrap fails as

cd . && ACLOCAL_PATH='' /bin/bash /home/per/Work/emacs/build-aux/missing aclocal-1.14 -I m4
if [ -x ./config.status ]; then \
     ./config.status --recheck; \
else                \
     ./configure --cache-file=/dev/null; \
fi
cd . && /bin/bash /home/per/Work/emacs/build-aux/missing automake-1.14 --gnu -a -c lib/Makefile
[ -r "src/config.in" ] || ( cd . && /bin/bash /home/per/Work/emacs/build-aux/missing autoheader )
running CONFIG_SHELL=/bin/bash /bin/bash ./configure --prefix=/home/per/opt/x86_64-unknown-linux-gnu/emacs-snapshot CFLAGS=-O2 PKG_CONFIG_PATH=/home/per/opt/x86_64-unknown-linux-gnu/fish-snapshot/share/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/sparsehash-2.0.2/lib/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/igraph-0.6/lib/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/libarchive-snapshot/lib/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/libgit2-snapshot/lib/pkgconfig:/home/per/opt/x86_64-unknown-linux-gnu/nettle-3.0/lib/pkgconfig: --no-create --no-recursion
checking for xcrun... no
checking for GNU Make... make
./configure: line 2853: syntax error near unexpected token `1.11'
./configure: line 2853: `AM_INIT_AUTOMAKE(1.11)'
Makefile:412: receptet för målet ”config.status” misslyckades
make: *** [config.status] Fel 2
0

There are 0 best solutions below