68

I want to install autoconf, automake, m4, etc… from the source on a Mac OS X 10.7.2 machine running Xcode 4.2.1. The problem is anything that I try and install I have to rely on autoconf. Therefore, I am trying to install autoconf I get:

configure.ac:30: require Automake 1.11, but have 1.10

I try to install automake, the bootstrap reports:

configure.ac:20: error: Autoconf version 2.68 or higher is required
configure.ac:20: the top level
autom4te: /usr/bin/gm4 failed with exit status: 63
aclocal.tmp: error: autom4te failed with exit status: 63

Currently installed autoconf version: autoconf (GNU Autoconf) 2.61

Currently installed automake version: automake (GNU automake) 1.10

0

3 Answers 3

103

Update: Just use Homebrew to install these packages and move on with life.

Install Homebrew and just install the autoconf, automake and libtool packages like this:

brew install autoconf automake libtool

When I wrote this answer about 3+ years ago, it was to correct a previous answer that was outdated, link-only and vague in explanation. At that time I preferred to use raw source compilation on macOS for a task like this rather than a package manager like Homebrew because I simply found Homebrew and MacPorts to be a tad immature back then.

Now I use Homebrew (aka brew) on macOS as regularly as I use apt-get on Ubuntu and yum on CentOS. I would recommend avoiding compiling anything from raw source code on macOS unless you really have no choice.

Old answer content below for reference purposes.


I realize this question is about 3+ years old, but the accepted answer is a link only answer and that link is now dead. And the other answer is technically correct, but it still does not explain the actual hands-on process required to install the GNU versions of autoconf, automake and libtool in Mac OS X.

First, Xcode—since at least version 4.3 I believe—no longer includes the GNU versions of autoconf, automake and libtool. This doesn’t mean you can’t install GNU tools on your own. And here is how.

I’ve used this process on Mac OS X 10.6 (Snow Leopard), 10.7 (Lion), 10.8 (Mountain Lion) and 10.9 (Mavericks) without issue.

Install Xcode and Xcode command line tools.

The first prerequisite is to have Xcode installed along with the Xcode command line tools as well. Chances are if you need autoconf, automake and libtool installed, you already have Xcode and the command line tools installed, but just pointing that out for those who don’t have that setup yet.

Now, onto the show! Just note that version numbers of downloads are based on what is current (as of April 2015) and works well as of the time of this post. Adjust to other versions if you need to:


Install autoconf 2.69.

Set the working directory to your home directory:

cd

Get the source code and decompress it:

curl -O -L http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
tar -xzf autoconf-2.69.tar.gz

Go into the uncompressed source code directory:

cd autoconf-*

Run the configure script on the source code:

./configure

Now run make to compile it:

make

Now install it:

sudo make install

Check the newly installed autoconf version to confirm all went well:

autoconf --version

Response should be something like this:

autoconf 2.69


Install automake 1.15.

Set the working directory to your home directory:

cd

Get the source code and decompress it:

curl -O -L http://ftpmirror.gnu.org/automake/automake-1.15.tar.gz
tar -xzf automake-1.15.tar.gz

Go into the uncompressed source code directory:

cd automake-*

Run the configure script on the source code:

./configure

Now run make to compile it:

make

Now install it:

sudo make install

Check the newly installed automake version to confirm all went well:

automake --version

Response should be something like this:

automake 1.15


Install libtool 2.4.6.

Set the working directory to your home directory:

cd

Get the source code and decompress it:

curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
tar -xzf libtool-2.4.6.tar.gz

Go into the uncompressed source code directory:

cd libtool-*

Run the configure script on the source code:

./configure

Now run make to compile it:

make

Now install it:

sudo make install

Check the newly installed libtool version—via the man page—to confirm all went well:

man libtool

On the first page of the man page there should be something like this:

libtool - manual page for libtool 2.4.6

6
  • 8
    Great to show how to do it without using brew.
    – Konchog
    Jul 19, 2020 at 16:18
  • 3
    Upvoted the answer for the old answer not the new. While using brew is easy, the old answer actually answered the question and is a great reference for those wanting to compile from source. While compiling from source comes with it's own pitfalls, it is a great learning experience. While Homebrew and Macports are great, they should not be the only answer to the question, "How do I install 'x'". All that to say, thank you for your thorough answer. Apr 17, 2021 at 21:36
  • @Buggy Thank you! I agree about learning how to compile from source, but as someone who has been floating between macOS and Linux for decades, macOS (and it’s hybrid customized BSD existence) is a unique kind of hell to compile from source on. If I am using Linux, compiling from source is a breeze even when it is complex. On macOS it is truly a headache not worth dealing with unless you have a real reason to do so. Homebrew has made my life easier. Apr 18, 2021 at 4:32
  • thank you man!, I downloaded and compiled the latest version of autoconf, automake and libtool, and after that I compiled htop v3.2.1 with no problems
    – armandfp
    Dec 4, 2022 at 10:35
  • @armandfp Well, you should have just installed Homebrew and then run brew install htop. No mess or headaches. Clean package installer for macOS. Dec 4, 2022 at 23:42
23

Just use Homebrew. It compiles everything for you. It worked like a charm for me.

brew install autoconf automake libtool
2
  • MacOSX (at least, Sierra) already has libtool. Also on Sierra, 'brew install autoconf automake' does install autoconf but then raises an error: "Could not symlink bin/autoconf /usr/local/bin is not writable." The problem is solved by SethMMorton's answer at StackOverflow: Error when trying to “brew link autoconf”. Basically, you need to chmod /usr/local so it's writable by you, the user. Sep 19, 2017 at 12:07
  • @ElisevanLooij I did not had this issue with Sierra. Successfully installed autoconf-2.69 and automake-1.15.1. But you're right that libtool is unneeded.
    – Cœur
    Oct 6, 2017 at 10:53
3

If you install autoconf from the git repository, you will need automake. However, if you instead download a distribution tarball for autoconf, you will not have that dependency. You should always install from a distribution tarball, and not from a vcs. In other words, if you want to install autoconf from source, just install it from source! But realize that "install from source" means "install from a distribution tarball"; it does not mean "install from git".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .