#! /bin/sh
# bootstrap -- Use this script to create generated files from the CVS dist

# Avoid broken or bad automake
if automake --version | grep ' 1.4'; then
	AUTOMAKE=automake-1.7
	ACLOCAL=aclocal-1.7
else
	AUTOMAKE=automake
	ACLOCAL=aclocal
fi

# Debian stable has the obsolete autoconf 2.13. Use 2.50 (2.52?) instead
if autoconf --version | grep 2.13; then
	AUTOCONF=autoconf2.50
else
	AUTOCONF=autoconf
fi

set -x

# now generate makefiles ...
$ACLOCAL
#autoheader
$AUTOMAKE --foreign --add-missing --copy
$AUTOCONF

MESSAGE=" 

Build the Makefiles with the configure command.
  ./configure [--someoption=somevalue ...]

For help on options or configuring run
  ./configure --help

Build and install binaries with the usual
  make
  make check
  make install

Build distribution tarball with
  make dist

Verify distribution tarball with
  make distcheck

Or just build the Debian packages without configuring
  dpkg-buildpackage -rfakeroot

When building from a CVS checkout, you need these Debian tools:
  debhelper (>> 4.0.0), automake1.6|automake1.7|automake (>> 1.6), 
  autoconf (>> 2.50), perl, docbook, docbook-utils, docbook-xml, cvs2cl
"

