#! /bin/sh
#
# This package requires autoconf 2.59 or later and automake 1.9.1 or later.
#

set -x
# cleanup should not be necessary
# however, in some cases strange results are found if you do not start clean
rm -rf autom4te.cache
rm -f aclocal.m4 Makefile.in 
rm -f */Makefile.in */*/Makefile.in */*/defs.h.in
rm -f configure config.* depcomp install-sh missing
# run autotool commands
aclocal
autoheader
automake --add-missing --copy
autoconf

# To avoid confusing people with failures in the documentation build, 
# build documents during the bootstrap process.
OSname=`uname`
if [ $OSname != "Darwin" ]; then
  OSname=`uname -o`
fi
if [ $OSname != "Cygwin" ]; then
  cd doc; ./buildDoc.sh
fi

# ready to make a source code distribution tarball
