#/bin/sh

# this script creates all configure scripts and config header files.
# it does it by finding all configure.ac files, and then running autoconf
# and autoheader in the directories they were found in.

echo Bootstraping build system...

{
	find -name configure.ac

} | sed 's/\/configure\.ac$//g' | {

	while read scriptdir; do
		echo Processing scripts for $scriptdir
		pushd $scriptdir > /dev/null
		autoconf
		autoheader
		rm -fr autom4te.cache
		popd > /dev/null
	done
}

	