Blame autogen.sh

Packit e8bc57
#!/bin/sh
Packit e8bc57
#
Packit e8bc57
# Run this to generate all the initial makefiles, etc.
Packit e8bc57
Packit e8bc57
DIE=0
Packit e8bc57
Packit e8bc57
PROGNAME="bogofilter"
Packit e8bc57
(autoconf --version) < /dev/null | head -1 > autogen.log 2>&1 || {
Packit e8bc57
  echo
Packit e8bc57
  echo "**Error**: You must have 'autoconf' installed to compile $PROGNAME."
Packit e8bc57
  echo "Download the appropriate package for your distribution,"
Packit e8bc57
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
Packit e8bc57
  DIE=1
Packit e8bc57
}
Packit e8bc57
Packit e8bc57
(automake --version) < /dev/null | head -1 >> autogen.log 2>&1 || {
Packit e8bc57
  echo
Packit e8bc57
  echo "**Error**: You must have 'automake' installed to compile $PROGNAME."
Packit e8bc57
  echo "Download the appropriate package for your distribution,"
Packit e8bc57
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
Packit e8bc57
  DIE=1
Packit e8bc57
}
Packit e8bc57
Packit e8bc57
(flex --version) < /dev/null | head -1 >> autogen.log 2>&1 || {
Packit e8bc57
  echo
Packit e8bc57
  echo "**Error**: You must have 'flex' installed to compile $PROGNAME."
Packit e8bc57
  echo "Download the appropriate package for your distribution,"
Packit e8bc57
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
Packit e8bc57
  DIE=1
Packit e8bc57
}
Packit e8bc57
Packit e8bc57
if [ "$DIE" -eq 1 ]; then
Packit e8bc57
  exit 1
Packit e8bc57
fi
Packit e8bc57
Packit e8bc57
if [ -z "$*" ]; then
Packit e8bc57
  echo "**Warning**:  Running 'configure' with no arguments."
Packit e8bc57
  echo "If you wish to pass any to it, specify them on the"
Packit e8bc57
  echo "'$0' command line."
Packit e8bc57
  echo
Packit e8bc57
fi
Packit e8bc57
Packit e8bc57
echo "Running 'autoreconf -fis'"
Packit e8bc57
autoreconf -fis
Packit e8bc57
echo ""
Packit e8bc57
Packit e8bc57
echo "Running './configure --quiet $@'"
Packit e8bc57
./configure --quiet "$@"
Packit e8bc57
echo ""
Packit e8bc57
Packit e8bc57
echo "Running 'make -s check'"
Packit e8bc57
make -s check
Packit e8bc57
echo ""