diff --git a/buildconf b/buildconf
index c1f3e1d876c80e8f23280a325f952941eb91ffa7..ee272188545788fc0ce84e7e8f71c6dcd3a44d27 100755
--- a/buildconf
+++ b/buildconf
@@ -154,8 +154,10 @@ echo "buildconf: running autoconf"
 ${AUTOCONF:-autoconf}     || die "The command '${AUTOCONF:-autoconf}' failed"
 
 if test -d ares; then
-  echo "buildconf: running autoconf in the ares directory"
   cd ares
+  echo "buildconf: running aclocal in the ares directory"
+  ${ACLOCAL:-aclocal}     || die "The command '${ACLOCAL:-aclocal}' failed"
+  echo "buildconf: running autoconf in the ares directory"
   ${AUTOCONF:-autoconf}     || die "The command '${AUTOCONF:-autoconf}' failed"
   cd ..
 fi