Autoconf 2.57 didn't like these m4_undefine for some reason (probably a bug).
Luckily, they weren't needed.
diff --git a/ares/configure.ac b/ares/configure.ac
index 9d3d897..2d09dba 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -64,15 +64,11 @@
 )
 
 dnl skip libtool C++ and Fortran compiler checks
-m4_undefine([AC_PROG_CXX])
 m4_defun([AC_PROG_CXX],[])
-m4_undefine([AC_PROG_F77])
 m4_defun([AC_PROG_F77],[])
 
 dnl skip libtool C++ and Fortran linker checks
-m4_undefine([AC_LIBTOOL_CXX])
 m4_defun([AC_LIBTOOL_CXX],[])
-m4_undefine([AC_LIBTOOL_F77])
 m4_defun([AC_LIBTOOL_F77],[])
 
 dnl libtool setup
diff --git a/configure.ac b/configure.ac
index 5c13d7c..b8a16f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,15 +116,11 @@
 AC_LIBTOOL_WIN32_DLL
 
 dnl skip libtool C++ and Fortran compiler checks
-m4_undefine([AC_PROG_CXX])
 m4_defun([AC_PROG_CXX],[])
-m4_undefine([AC_PROG_F77])
 m4_defun([AC_PROG_F77],[])
 
 dnl skip libtool C++ and Fortran linker checks
-m4_undefine([AC_LIBTOOL_CXX])
 m4_defun([AC_LIBTOOL_CXX],[])
-m4_undefine([AC_LIBTOOL_F77])
 m4_defun([AC_LIBTOOL_F77],[])
 
 dnl libtool setup