#! /bin/sh                   

# debug
#set -x

# stop on errors
set -e
sed -e "s/^DIST_COMMON/#DIST_COMMON/g" storage/ndb/Makefile.am > storage/ndb/Makefile.am.$$
mv storage/ndb/Makefile.am.$$ storage/ndb/Makefile.am

# for package in . ./storage/innobase
for package in .
do
	(cd $package
	rm -rf config.cache autom4te.cache
	aclocal
	autoheader
	libtoolize --force
	aclocal
#	automake --verbose --add-missing --force-missing
	automake --add-missing --force-missing
	autoconf)
done

#rm -rf ./bdb/build_unix/config.cache ./bdb/dist/autom4te.cache
#(cd ./bdb/dist && sh s_all)
