diff --git a/misc/composer/build-xhprof.sh b/misc/composer/build-xhprof.sh
index 517d228d0bc3dfa2d54e8abedd99c5b061b95d98..63178b87ef3202552add6ee4bdef43f199e54032 100755
--- a/misc/composer/build-xhprof.sh
+++ b/misc/composer/build-xhprof.sh
@@ -27,6 +27,16 @@ if ! phpize &> ../../../../tmp/xhprof-logs/phpize.log; then
     exit 1
 fi
 
+if ! aclocal &> ../../../../tmp/xhprof-logs/aclocal.log; then
+    echo "Fatal error: aclocal failed! View tmp/xhprof-logs/aclocal.log for more info."
+    exit 1
+fi
+
+if ! autoconf &> ../../../../tmp/xhprof-logs/autoconf.log; then
+    echo "Fatal error: autoconf failed! View tmp/xhprof-logs/autoconf.log for more info."
+    exit 1
+fi
+
 if ! ./configure &> ../../../../tmp/xhprof-logs/configure.log; then
     echo "Fatal error: configure script failed! View tmp/xhprof-logs/configure.log for more info."
     exit 2