# Exit on error:
set -e

wget http://ftpmirror.gnu.org/automake/automake-1.14.tar.gz
tar xf automake-1.14.tar.gz
cd automake-1.14

CC=/static/bin/musl-gcc \
    LDFLAGS='-s -L/static/lib -static -static-libgcc' \
    ./configure --prefix=/static

make install
cd ..
rm -rf automake-1.14
rm automake-1.14.tar.gz

exit 0
