Last active
March 7, 2024 22:57
-
-
Save jellybeansoup/4192307 to your computer and use it in GitHub Desktop.
Install Autoconf and Automake on OS X Mountain Lion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
# Install autoconf, automake and libtool smoothly on Mac OS X. | |
# Newer versions of these libraries are available and may work better on OS X | |
# | |
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html | |
# | |
export build=~/devtools # or wherever you'd like to build | |
mkdir -p $build | |
## | |
# Autoconf | |
# http://ftpmirror.gnu.org/autoconf | |
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=/usr/local | |
make | |
sudo make install | |
export PATH=$PATH:/usr/local/bin | |
## | |
# Automake | |
# http://ftpmirror.gnu.org/automake | |
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=/usr/local | |
make | |
sudo make install | |
## | |
# Libtool | |
# http://ftpmirror.gnu.org/libtool | |
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=/usr/local | |
make | |
sudo make install | |
echo "Installation complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@hainesc: I like your script. However, it seems that now the URL added icons, so the AUTOMAKE_VERSION and AUTOTOOL_VERSION variables are wrong:
Changing the awk argument from $2 to $6 fixes this
This returns 1.9.6 but the latest version has two digits, so I modified the sort with this tip, so this parsing works:
With the version number set at "/icons/compressed.gif", the installation fails and AUTOMAKE_ERROR and LIBTOOL_ERROR are empty, which removes the left-hand side in this comparison:
I added an else condition and placed the change of directory and removal of the temporary directory outside the condition, so they are always executed.
Here is my revision of hainesc's code: