#!/bin/sh

# reconfigure
#
# Runs aclocal, autoconf and automake to prepare the
# configure script.
#
# This script should be run from the top level directory.

# We should probably use autoreconf instead of this script,
# but autoreconf does not seem to regenerate Makefile.in after
# a change to Makefile.am, and the -f flag to autoreconf does
# not seem to work.
#
#echo "This script is no longer needed. Use autoreconf instead."
#exit 0

# Simple test to see where we are
# FIXME: Does not work when typing ./scripts/...
CHECK=`echo $0 | cut -d'/' -f1`
if [ "$CHECK" != "scripts" ]; then
	echo "This script must be run from the top level directory."
	exit 1
fi

echo Generating configure script
echo

rm -f config.cache
rm -f config.log
rm -f config.status

echo " - Running aclocal"
aclocal
echo " - Running autoconf"
autoconf
echo " - Running automake"
automake -a

echo
