diff --git a/autogen.sh b/autogen.sh
index bb2f4e10dcb4c6f360fbdd6ba1f0817fe3c0d408..4fb0c779911d0c94d4c4bc02c1116f94bc30ca83 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -12,10 +12,13 @@ modules="
 	iswblank
 	regex
 	snprintf-posix
+	stdarg
 	strcase
 	strcasestr-simple
 	strnlen
 	vsnprintf-posix
+	wchar
+	wctype-h
 "
 
 # Make sure the local gnulib git repo is up-to-date.
diff --git a/configure.ac b/configure.ac
index 659e4144e4b1e2921909ec173f5b5c117349eccd..3549747baf5a841b912ffc12b70c48804cb27b50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,7 @@ AC_DEFINE_DIR([PKGDATADIR], [pkgdatadir], [Where data are placed to.])
 
 dnl Checks for header files.
 
-AC_CHECK_HEADERS(libintl.h limits.h sys/param.h wchar.h wctype.h stdarg.h)
+AC_CHECK_HEADERS(libintl.h limits.h sys/param.h)
 
 dnl Checks for options.
 
diff --git a/src/chars.c b/src/chars.c
index 3f80e31e7bcf225905e49d96ff63377e8b9ecc86..af9d7af452c98429eecab05d733b9b8c5a60eb22 100644
--- a/src/chars.c
+++ b/src/chars.c
@@ -26,12 +26,8 @@
 #include <ctype.h>
 
 #ifdef ENABLE_UTF8
-#ifdef HAVE_WCHAR_H
 #include <wchar.h>
-#endif
-#ifdef HAVE_WCTYPE_H
 #include <wctype.h>
-#endif
 
 static bool use_utf8 = FALSE;
 	/* Whether we've enabled UTF-8 support. */
diff --git a/src/nano.h b/src/nano.h
index b21ccdb500f08235e2e2cc5b09319f0b7213a242..eba20ace86df382952554e7b6727991195810358 100644
--- a/src/nano.h
+++ b/src/nano.h
@@ -49,9 +49,7 @@
 #include <sys/param.h>
 #endif
 
-#ifdef HAVE_STDARG_H
 #include <stdarg.h>
-#endif
 
 /* Suppress warnings for __attribute__((warn_unused_result)). */
 #define IGNORE_CALL_RESULT(call) do { if (call) {} } while(0)