So, here's my first entry in that shorter format.
If you're upgrading to Mac OS X Mountain Lion and Xcode 4.4.1, you'll find that Xcode does not include anymore the GNU Autoconf, Automake and Libtool build tools used by most open source projects to generate makefiles and dynamic libraries... That's not so great :(
I wanted to share what I did to build them myself from source, as it could help others too:
export build=~/devtools # or wherever you'd like to build
mkdir -p $build
cd $build
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.68.tar.gz
tar xzf autoconf-2.68.tar.gz
cd autoconf-2.68
./configure --prefix=$build/autotools-bin
make
make install
export PATH=$PATH:$build/autotools-bin/bin
cd $build
curl -OL http://ftpmirror.gnu.org/automake/automake-1.11.tar.gz
tar xzf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=$build/autotools-bin
make
make install
cd $build
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.tar.gz
tar xzf libtool-2.4.tar.gz
cd libtool-2.4
./configure --prefix=$build/autotools-bin
make
make install
mkdir -p $build
cd $build
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.68.tar.gz
tar xzf autoconf-2.68.tar.gz
cd autoconf-2.68
./configure --prefix=$build/autotools-bin
make
make install
export PATH=$PATH:$build/autotools-bin/bin
cd $build
curl -OL http://ftpmirror.gnu.org/automake/automake-1.11.tar.gz
tar xzf automake-1.11.tar.gz
cd automake-1.11
./configure --prefix=$build/autotools-bin
make
make install
cd $build
curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.tar.gz
tar xzf libtool-2.4.tar.gz
cd libtool-2.4
./configure --prefix=$build/autotools-bin
make
make install
Notice how I configured to install in --prefix=$build/autotools-bin? You can also omit that to install the tools in your system dirs if you want. I usually install what I build under my own user dir to avoid polluting the system dirs, but it's really your choice.
Hope this helps
18 comments:
On my machine (OS X 10.7.4) I had to add $build/autotools-bin/bin to the path otherwise automake wouldn't find autoconf.
Good catch. I just fixed the steps to correctly set the path. Thanks!
Can't we just install MacPorts or Brew ?
I've tried your technique and the 2 above and still the system can't find aclocal - although it can find both automake and autoconf...
Any idea ?
Macports or Brew should work too but I usually prefer a more minimalistic approach and build just what I need from source. The steps I described build the strict minimum to get automake working without duplicating any of the tools installed by Apple.
If you can't find aclocal, check your path and how you invoke it. It should be in $build/autotools-bin/bin besides automake and autoconf.
Thanks for sharing.
Three minutes copy-and-paste instead of hours try-and-error.
Wishing you well!
Hi,
i had problems with the ./configure command:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking build system type... i386-apple-darwin12.1.0
checking host system type... i386-apple-darwin12.1.0
configure: autobuild project... GNU Autoconf
configure: autobuild revision... 2.68
configure: autobuild hostname... tommbp.fritz.box
configure: autobuild timestamp... 20120919T082822Z
checking whether /bin/sh -n is known to work... yes
checking for characters that cannot appear in file names... none
checking whether directories can have trailing spaces... yes
checking for expr... /bin/expr
checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.14 is recommended
how can i solve this?
Thanks Jean-Sebastien, really great stuff for a newbie like myself :)
Very helpful. Thank you.
clark@simplexable.com
Very helpful. Thank you.
clark@simplexable.com
Very useful.
Xcode 4.2 has a libtool, so I thought I might not need to build that; but it seems to be incomplete (no libtoolize).
This worked well for me on Mountain Lion 10.8.2 and XCode Version 4.6 (4H127).
Thank you.
This is great--thanks for posting. I chose to use /usr/local.
Thank you so much for this!!
Thanks a lot! :) Worked for me.
Thank you very much! This was awesome
Much, much appreciated!
Thank you very much!
Thank you!
Post a Comment