diff --git a/autogen/config.in b/autogen/config.in
index 9f530cc57d3..c0fb1f34bf4 100644
--- a/autogen/config.in
+++ b/autogen/config.in
@@ -253,9 +253,6 @@ along with GNU Emacs. If not, see . */
/* Define to 1 if you have the `clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
-/* Define to 1 if you have the `closedir' function. */
-#undef HAVE_CLOSEDIR
-
/* Define to 1 if you have the header file. */
#undef HAVE_COFF_H
@@ -339,9 +336,6 @@ along with GNU Emacs. If not, see . */
/* Define to 1 if you have the `difftime' function. */
#undef HAVE_DIFFTIME
-/* Define to 1 if you have the header file. */
-#undef HAVE_DIRENT_H
-
/* Define to 1 if you have the 'dup2' function. */
#undef HAVE_DUP2
diff --git a/autogen/configure b/autogen/configure
index 0558955911f..fbb2efbc860 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -3214,7 +3214,6 @@ as_fn_append ac_header_list " sys/resource.h"
as_fn_append ac_header_list " sys/utsname.h"
as_fn_append ac_header_list " pwd.h"
as_fn_append ac_header_list " utmp.h"
-as_fn_append ac_header_list " dirent.h"
as_fn_append ac_header_list " util.h"
as_fn_append ac_header_list " sys/socket.h"
as_fn_append ac_header_list " stdlib.h"
@@ -8806,8 +8805,6 @@ done
-
-
@@ -13474,7 +13471,7 @@ esac
for ac_func in gethostname \
-closedir getrusage get_current_dir_name \
+getrusage get_current_dir_name \
lrand48 \
select getpagesize setlocale \
utimes getrlimit setrlimit shutdown getaddrinfo \