#!/bin/sh
#
# This bootstrap file has been inspired by Bootstraping chapter
# in Autobook by Vaughan, Elliston, Tromey and Taylor.
# http://sources.redhat.com/autobook/

set -x

if [ ! -d configure.aux ]; then
  mkdir configure.aux
fi

# required by autoconf
hg log --style changelog > ChangeLog

# generate Mercurial's id
echo '#define CHANGESET "Mercurial changeset ' `hg id` '"' > include/hgid.h

# add -I for localy installed wxwin.m4
if [ -d /usr/local/share/aclocal/ ]; then
  aclocdir="-I /usr/local/share/aclocal/"
fi

aclocal $aclocdir \
&& automake --gnu --add-missing --copy \
&& autoconf

#./configure FCFLAGS="-Wall -g -p -fbounds-check -fimplicit-none" CFLAGS="-Wall -g -p"  CXXFLAGS="-D__WXDEBUG__ -g -p -Wall"
