#!/bin/sh --

if test x"$1" = x"-dev" ; then
  include_deps=
  shift
else
  include_deps="-i"
fi

if aclocal -I m4 && autoheader && (cd m4 && make -f Makefile.am.in ) \
  && automake $include_deps && autoconf && ./configure "$@"
then
  echo
  echo "The mutt source code was successfully prepared."
  echo "Type make && make install to build and install mutt."
  echo
else
  echo
  echo "Some part of the preparation process failed."
  echo "Please refer to doc/devel-notes.txt for details."
  echo
  exit 1
fi
