I am trying reinstall pacman on my Arch Linux distribution. When I run the configure script "configure.ac", I get a bunch of undefined macros:

error: possibly undefined macro: AM_INIT_AUTOMAKE.
If this token and others are legitimate, please use m4_pattern_allow.
See the autoconf documentation.
error: possibly undefined macro: AC_PROG_LIBTOOL
error: possibly undefined macro: AM_GNU_GETTEXT 
error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
error: possibly undefined macro: AM_CONDITIONAL

Does anyone know what would cause these macros to be undefined? Having come from Ubuntu (where everything just works, and is therefore boring), I don't really know about automake.

  • Why are you building from source? Why don't you download the packages on another machine, copy them across and extract them to root as per wiki.archlinux.org/index.php/…
    – jasonwryan
    Aug 13, 2011 at 4:31
  • 1
    It appears that what? Is that the whole sequence of errors? How did you retrieve the source? Aug 13, 2011 at 14:24
  • 2
    Jason, I do not have pacman on my other machine, and I would rather not download another package manager. Plus if I was not building from source I would not have this wonderful opportunity to learn about M4 and automake. Sorry about the bad edit, I removed it. Yes, that is the whole sequence of errors. I retrieved the source from the ArchLinux website at projects.archlinux.org/pacman.git with wget.
    – SirTasty
    Aug 13, 2011 at 20:14
  • 1
    configure.ac is not a configure script and is not runnable.
    – qdii
    Apr 24, 2013 at 23:19

5 Answers 5


Try this, maybe it can help:

autoreconf --install

(See the manpage, there is a --force option also)

  • cvs program not found; autopoint failed with exit status 1. I am installing cvs from sources, will let you know how it goes.
    – SirTasty
    Aug 13, 2011 at 19:41
  • 1
    @SirTasty: cvs?? hmm, maybe try to use autoconf and automake directly? Aug 13, 2011 at 19:53
  • Autoconf gives me the undefined macro warnings. automake gives me (semicolons separate lines): Makefile.am:2: WANT_DOC does not appear in AM_CONDITIONAL ; Makefile.am: required file ./ChangeLog not found ; configure.ac:57: required file config.h.in not found`
    – SirTasty
    Aug 13, 2011 at 20:10
  • I'm not an autotools expert (or fan either). Maybe wait for one to show up… By chance, what about aclocal first? Aug 13, 2011 at 20:21
  • I had a similar autoconf error (on redhat fc19) and the autoreconf --install solved it.
    – gaoithe
    May 25, 2015 at 11:14

The macros in the error message you posted are defined by automake and libtool; it looks like you need to install those packages.

Then try autoreconf --install

  • Both of those packages are installed, or at least "which automake" and "which libtool" return reasonable results.
    – SirTasty
    Aug 13, 2011 at 8:51
  • 2
    @SirTasty Then you probably need to run "autoreconf" as Stéphane suggests. Aug 13, 2011 at 13:51
  • 6
    On my CentOS6.7 system, I had to do this: sudo yum install autoconf automake libtool cmake autoconf-archive gcc-c++ Mar 16, 2017 at 17:54
  • 1
    For me, with the error configure.ac:118: error: possibly undefined macro: AC_MSG_ERROR on Manjaro Linux, installing autoconf-archive did the trick, although another error resulted which has also now been avoided. The other packages were installed. Just for information, further details on that start from github.com/NixOS/nix/pull/3154#issuecomment-545207139.
    – James Ray
    Oct 23, 2019 at 0:55

For anybody else looking: While automake and libtool are very likely candidates, some systems won't install gettext automatically. This is also required.


I was pretty confused when getting these errors, because I had everything installed and autoreconf --install wasn't helping. The problem was just corrupted aclocal.m4 and deleting it before autoreconf solved the problem.


Install following packages that would solve the autoreconf issues.

$ sudo apt-get -y install autoconf automake libtool cmake autoconf-archive build-essential

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.