#!/bin/sh

echo "cleaning up config.cache"
rm -f ./config.cache

BASEDIR="${PWD}"

echo "executing aclocal"
aclocal

echo "executing autoheader"
autoheader

echo "executing automake"
automake --foreign --add-missing --copy

echo "executing autoconf"
autoconf


echo ""

if [ ! -f ./Makefile.in ]; then
    echo "no Makefile.in, automake messed up."
    exit 1;
fi
if [ ! -f ./configure ]; then
    echo "no ./configure, autoconf messed up."
    exit 2;
fi

echo "To configure for this system, run ./configure"
