+test -z "$AUTOCONF" && type autoconf >/dev/null 2>&1 && AUTOCONF=autoconf
+export AUTOCONF
+test -z "$AUTORECONF" && type autoreconf >/dev/null 2>&1 && AUTORECONF=autoreconf
+export AUTORECONF
+test -z "$AUTOHEADER" && type autoheader >/dev/null 2>&1 && AUTOHEADER=autoheader
+export AUTOHEADER
+test -z "$AUTOMAKE" && type automake >/dev/null 2>&1 && AUTOMAKE=automake
+export AUTOMAKE
+test -z "$ACLOCAL" && type aclocal >/dev/null 2>&1 && ACLOCAL=aclocal
+export ACLOCAL
+test -z "$LIBTOOL" && type libtool >/dev/null 2>&1 && LIBTOOL=libtool
+export LIBTOOL
+if test -z "$LIBTOOLIZE"; then
+ if type glibtoolize >/dev/null 2>&1; then
+ LIBTOOLIZE=glibtoolize
+ elif type libtoolize >/dev/null 2>&1; then
+ LIBTOOLIZE=libtoolize
+ fi
+fi
+export LIBTOOLIZE
+
+autoconf_ver=$($AUTOCONF --version 2>/dev/null | head -n1)
+if test -z "$autoconf_ver"; then
+ echo Could not determine autoconf
+ exit 1
+fi
+autoreconf_ver=$($AUTORECONF --version 2>/dev/null | head -n1)
+if test -z "$autoreconf_ver"; then
+ echo Could not determine autoreconf
+ exit 1
+fi
+autoheader_ver=$($AUTOHEADER --version 2>/dev/null | head -n1)
+if test -z "$autoheader_ver"; then
+ echo Could not determine autoheader
+ exit 1
+fi
+automake_ver=$($AUTOMAKE --version 2>/dev/null | head -n1)
+if test -z "$automake_ver"; then
+ echo Could not determine automake
+ exit 1
+fi
+aclocal_ver=$($ACLOCAL --version 2>/dev/null | head -n1)
+if test -z "$aclocal_ver"; then
+ echo Could not determine aclocal
+ exit 1
+fi
+libtool_ver=$($LIBTOOL --version 2>/dev/null | head -n1)
+if test -z "$libtool_ver" -a -n "$LIBTOOLIZE"; then
+ libtool_ver=$($LIBTOOLIZE --version 2>/dev/null | head -n1)
+fi
+if test -z "$libtool_ver"; then
+ echo WARNING: Could not determine libtool
+fi