diff --git a/gnulib/Makefile.in b/gnulib/Makefile.in
index 2559d8022d95..49c803b83a91 100644
--- a/gnulib/Makefile.in
+++ b/gnulib/Makefile.in
@@ -107,7 +107,12 @@ host_triplet = @host@
 target_triplet = @target@
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
+	$(top_srcdir)/../config/largefile.m4 \
+	$(top_srcdir)/../config/lead-dot.m4 \
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../config/plugins.m4 \
+	$(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/__inline.m4 \
 	$(top_srcdir)/import/m4/absolute-header.m4 \
 	$(top_srcdir)/import/m4/alloca.m4 \
@@ -120,6 +125,7 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/clock_time.m4 \
 	$(top_srcdir)/import/m4/close.m4 \
 	$(top_srcdir)/import/m4/closedir.m4 \
+	$(top_srcdir)/import/m4/codeset.m4 \
 	$(top_srcdir)/import/m4/ctype_h.m4 \
 	$(top_srcdir)/import/m4/d-ino.m4 \
 	$(top_srcdir)/import/m4/d-type.m4 \
@@ -276,13 +282,7 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/wmemchr.m4 \
 	$(top_srcdir)/import/m4/wmempcpy.m4 \
 	$(top_srcdir)/import/m4/year2038.m4 \
-	$(top_srcdir)/import/m4/zzgnulib.m4 \
-	$(top_srcdir)/../config/codeset.m4 \
-	$(top_srcdir)/../config/depstand.m4 \
-	$(top_srcdir)/../config/largefile.m4 \
-	$(top_srcdir)/../config/lead-dot.m4 \
-	$(top_srcdir)/../config/override.m4 \
-	$(top_srcdir)/../config/plugins.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/import/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
diff --git a/gnulib/aclocal.m4 b/gnulib/aclocal.m4
index c7f866eb8bff..707108d7abfc 100644
--- a/gnulib/aclocal.m4
+++ b/gnulib/aclocal.m4
@@ -1169,6 +1169,11 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
+m4_include([../config/depstand.m4])
+m4_include([../config/largefile.m4])
+m4_include([../config/lead-dot.m4])
+m4_include([../config/override.m4])
+m4_include([../config/plugins.m4])
 m4_include([import/m4/00gnulib.m4])
 m4_include([import/m4/__inline.m4])
 m4_include([import/m4/absolute-header.m4])
@@ -1182,6 +1187,7 @@ m4_include([import/m4/chown.m4])
 m4_include([import/m4/clock_time.m4])
 m4_include([import/m4/close.m4])
 m4_include([import/m4/closedir.m4])
+m4_include([import/m4/codeset.m4])
 m4_include([import/m4/ctype_h.m4])
 m4_include([import/m4/d-ino.m4])
 m4_include([import/m4/d-type.m4])
@@ -1340,9 +1346,3 @@ m4_include([import/m4/wmemchr.m4])
 m4_include([import/m4/wmempcpy.m4])
 m4_include([import/m4/year2038.m4])
 m4_include([import/m4/zzgnulib.m4])
-m4_include([../config/codeset.m4])
-m4_include([../config/depstand.m4])
-m4_include([../config/largefile.m4])
-m4_include([../config/lead-dot.m4])
-m4_include([../config/override.m4])
-m4_include([../config/plugins.m4])
diff --git a/gnulib/configure b/gnulib/configure
index cb2a11359a19..cc7e8287d5a0 100755
--- a/gnulib/configure
+++ b/gnulib/configure
@@ -8433,7 +8433,7 @@ else
 int
 main ()
 {
-char* cs = nl_langinfo(CODESET);
+char* cs = nl_langinfo(CODESET); return !cs;
   ;
   return 0;
 }
diff --git a/gnulib/import/Makefile.in b/gnulib/import/Makefile.in
index 1899bebba368..9893d17c28b9 100644
--- a/gnulib/import/Makefile.in
+++ b/gnulib/import/Makefile.in
@@ -259,7 +259,12 @@ target_triplet = @target@
 @GL_COND_OBJ_WMEMPCPY_TRUE@am__append_81 = wmempcpy.c
 subdir = import
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
+	$(top_srcdir)/../config/largefile.m4 \
+	$(top_srcdir)/../config/lead-dot.m4 \
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../config/plugins.m4 \
+	$(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/__inline.m4 \
 	$(top_srcdir)/import/m4/absolute-header.m4 \
 	$(top_srcdir)/import/m4/alloca.m4 \
@@ -272,6 +277,7 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/clock_time.m4 \
 	$(top_srcdir)/import/m4/close.m4 \
 	$(top_srcdir)/import/m4/closedir.m4 \
+	$(top_srcdir)/import/m4/codeset.m4 \
 	$(top_srcdir)/import/m4/ctype_h.m4 \
 	$(top_srcdir)/import/m4/d-ino.m4 \
 	$(top_srcdir)/import/m4/d-type.m4 \
@@ -428,13 +434,7 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/wmemchr.m4 \
 	$(top_srcdir)/import/m4/wmempcpy.m4 \
 	$(top_srcdir)/import/m4/year2038.m4 \
-	$(top_srcdir)/import/m4/zzgnulib.m4 \
-	$(top_srcdir)/../config/codeset.m4 \
-	$(top_srcdir)/../config/depstand.m4 \
-	$(top_srcdir)/../config/largefile.m4 \
-	$(top_srcdir)/../config/lead-dot.m4 \
-	$(top_srcdir)/../config/override.m4 \
-	$(top_srcdir)/../config/plugins.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/import/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS)
