test -z "$srcdir" && srcdir=.
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory $srcdir does not look like the"
echo " top-level package directory"
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo "**Error**: You must have autoconf installed."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
(grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null) && {
(glibtoolize --version) < /dev/null > /dev/null 2>&1 || {
echo "**Error**: You must have libtool installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
(gtkdocize --flavour no-tmpl) < /dev/null > /dev/null 2>&1 || {
echo "You must have gtk-doc installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo "**Error**: You must have automake installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo "**Error**: Missing aclocal. The version of automake"
echo "installed doesn't appear recent enough."
echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"