#!/bin/bash

# A fake texi file so that automake can see what we want to do
test -f autobook.texi || cat > autobook.texi <<EOF
@setfilename fnord
@include version.texi
EOF

# make setup
# On MAC OS X, GNU libtoolize is named 'glibtoolize':
if [ "`uname -s 2>/dev/null`" == 'Darwin' ]
then
 glibtoolize
else
 libtoolize
fi
aclocal -I m4
automake --gnu --add-missing --copy --force
autoheader
autoconf

# Remove the fake texi file (if any)
grep "@setfilename fnord" autobook.texi >/dev/null 2>&1 \
  && rm -f autobook.texi

exit 0
