diff --git a/bootstrap b/bootstrap
index 60ad57a..bc03303 100755
--- a/bootstrap
+++ b/bootstrap
@@ -36,7 +36,7 @@ aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am 2>/dev/n
 
 # Check for automake
 amvers="no"
-for v in 16 15 14 13; do
+for v in 17 16 15 14 13; do
   if automake-1.${v} --version >/dev/null 2>&1; then
     amvers="-1.${v}"
     break
diff --git a/configure.ac b/configure.ac
index 036fc99..a89f286 100644
--- a/configure.ac
+++ b/configure.ac
@@ -312,7 +312,10 @@ esac
 AM_CONDITIONAL([NO_LIBASR], [test x$asr_in_libc = x1])
 
 AC_MSG_CHECKING([compiler and flags for sanity])
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])],
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[ 
+	       #include <stdio.h>
+	       #include <stdlib.h> 
+	       ]], [[ exit(0); ]])],
 	[	AC_MSG_RESULT([yes]) ],
 	[
 		AC_MSG_RESULT([no])
