#! /bin/sh
#
# $Id$
#
# Run the various GNU autotools to bootstrap the build
# system.  Should only need to be done once.

[ -e configure.ac ] || ln -s autotools/configure.ac

CONFIGURE_OUTPUT=-oconfigure.gnu

# for now avoid using bash as not everyone has that installed
CONFIG_SHELL=/bin/sh
export CONFIG_SHELL

case `uname` in
  Darwin) LIBTOOLIZE=glibtoolize ;;
  *)      LIBTOOLIZE=libtoolize  ;;
esac

echo "Running aclocal..."
aclocal -Iautotools/m4 || exit 1

echo "Running autoheader..."
autoheader || exit 1

echo "Running libtoolize"
echo "libtoolize will suggest to edit Makefile.am. but there is no Makefile.am"
$LIBTOOLIZE || exit 1

echo "Running automake..."
automake -a -c --gnu || exit 1

echo "Running autoconf..."
autoconf $CONFIGURE_OUTPUT || exit 1

echo "not Running configure..."
##./configure $@ || exit 1


