#! /bin/bash

#source ../resources/tools/chk_bootstrap_prg.sh

echo Removing old files...
rm -f configure Makefile Makefile.in src/Makefile src/Makefile.in config.h config.status aclocal.m4 config.cache config.log

mkdir config
echo "aclocal -I config"
aclocal -I config
if test $? -ne 0; then
    exit 1
fi
echo "autoconf"
autoconf
if test $? -ne 0; then
    exit 1
fi
echo "autoheader"
autoheader
if test $? -ne 0; then
    exit 1
fi
echo "libtoolize --force --automake"
libtoolize --force --automake
if test $? -ne 0; then
    exit 1
fi

echo "automake --foreign --add-missing"
automake --foreign --add-missing
if test $? -ne 0; then
    exit 1
fi
echo "BOOTSTRAP complete"