On 11/27/2016 04:29 PM, Bruno Haible wrote:

When you specify --makefile-name=module.mk, gnulib-tool knows that you
don't want a top-level Makefile.am and does not generate AUTOMAKE_OPTIONS
and generates augmentations (+=) of the other variables instead of assignments.

OK, I didn't realize that.  I also completely missed the option initially.

Now I'm calling gnulib-tool with the --makefile-name option and my new --non-recursive-makefile option. Instead of using the non-recursive-gnulib-prefix-hack module I added

  AC_CONFIG_LIBOBJ_DIR([libgnu])

to my configure.ac file. Maybe gnulib-tool could do this automatically if --non-recursive-makefile is specified? I think it would be nice to just have the option (or a module) but not both.

I made some more modifications to gnulib-tool and the module and m4 files that Octave uses. Diffs are attached.

As you can see, I've hard-wired "libgnu" in many places. Obviously this isn't the right thing to do, but it demonstrates what changes need to be made. It would also be great if there were some automake magic or if we could fix gnulib-tool to do these things automatically, but I don't see how at the moment. I imagine that automatically modifying the contents of things like EXTRA_DIST or BUILT_SOURCES might be possible, but I don't see how to automatically adjust the hand-coded makefile snippets.

jwe

diff --git a/gnulib-tool b/gnulib-tool
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -253,6 +253,7 @@ Options for --import, --add/remove-impor
       --source-base=DIRECTORY
                             Directory relative to --dir where source code is
                             placed (default \"lib\").
+      --non-recursive-makefile  Generate non-recursive makefile.
       --m4-base=DIRECTORY   Directory relative to --dir where *.m4 macros are
                             placed (default \"m4\").
       --po-base=DIRECTORY   Directory relative to --dir where *.po files are
@@ -1011,6 +1012,7 @@ func_determine_path_separator
 # - verbose         integer, default 0, inc/decremented by --verbose/--quiet
 # - libname, supplied_libname  from --lib
 # - sourcebase      from --source-base
+# - non_recursive   from --non-recursive-makefile
 # - m4base          from --m4-base
 # - pobase          from --po-base
 # - docbase         from --doc-base
@@ -1062,6 +1064,8 @@ func_determine_path_separator
   libname=libgnu
   supplied_libname=
   sourcebase=
+  non_recursive=false
+  lt_prefix=
   m4base=
   pobase=
   docbase=
@@ -1185,6 +1189,9 @@ func_determine_path_separator
         fi
         sourcebase=$1
         shift ;;
+      --non-recursive-makefile )
+        non_recursive=true
+        shift ;;
       --source-base=* )
         sourcebase=`echo "X$1" | sed -e 's/^X--source-base=//'`
         shift ;;
@@ -2416,7 +2423,7 @@ func_get_automake_snippet_unconditional 
         | combine_lines \
         | sed -n -e "$sed_extract_mentioned_files" | sed -e 's/#.*//'`
       all_files=`func_get_filelist $1`
-      func_filter_filelist lib_files "$nl" "$all_files" 'lib/' '' 'lib/' ''
+      func_filter_filelist lib_files "$nl" "$all_files" 'lib/' '' 'lib/' '' 
"$sourcebase/" ''
       # Remove $already_mentioned_files from $lib_files.
       echo "$lib_files" | LC_ALL=C sort -u > "$tmp"/lib-files
       extra_files=`for f in $already_mentioned_files; do echo $f; done \
@@ -3423,6 +3430,17 @@ func_emit_lib_Makefile_am ()
     perhapsLT=
     sed_eliminate_LDFLAGS='/^lib_LDFLAGS[       ]*+=/d'
   fi
+  lt_prefix="${libname}_${libext}_"
+  if $non_recursive; then
+    lt_prefix_tmp="`echo "$sourcebase" | LC_ALL=C sed -e 
's/[^a-zA-Z0-9_]/_/g'`"
+    case "$lt_prefix_tmp" in
+      *_) ;;
+      *)
+        lt_prefix_tmp="${lt_prefix_tmp}_"
+      ;;
+    esac
+    lt_prefix="$lt_prefix_tmp$lt_prefix"
+  fi
   if $for_test; then
     # When creating a package for testing: Attempt to provoke failures,
     # especially link errors, already during "make" rather than during
@@ -3457,19 +3475,19 @@ func_emit_lib_Makefile_am ()
             sed -e 's,lib_LIBRARIES,lib%_LIBRARIES,g' \
                 -e 's,lib_LTLIBRARIES,lib%_LTLIBRARIES,g' \
                 -e "$sed_eliminate_LDFLAGS" \
-                -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \
+                -e 's,lib_\([A-Z][A-Z]*\),'"${lt_prefix}"'\1,g' \
                 -e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
                 -e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
                 -e "$sed_transform_check_PROGRAMS" \
                 -e "$sed_replace_include_guard_prefix"
           if test "$module" = 'alloca'; then
-            echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@"
-            echo "${libname}_${libext}_DEPENDENCIES += @${perhapsLT}ALLOCA@"
+            echo "${lt_prefix}LIBADD += @${perhapsLT}ALLOCA@"
+            echo "${lt_prefix}DEPENDENCIES += @${perhapsLT}ALLOCA@"
           fi
-        } | combine_lines "${libname}_${libext}_SOURCES" > "$tmp"/amsnippet1
+        } | combine_lines "${lt_prefix}SOURCES" > "$tmp"/amsnippet1
         {
           func_get_automake_snippet_unconditional "$module" |
-            LC_ALL=C sed -e 
's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g'
+            LC_ALL=C sed -e 's,lib_\([A-Z][A-Z]*\),'"${lt_prefix}"'\1,g'
         } > "$tmp"/amsnippet2
         # Skip the contents if it's entirely empty.
         if grep '[^     ]' "$tmp"/amsnippet1 "$tmp"/amsnippet2 > /dev/null ; 
then
@@ -3511,33 +3529,43 @@ func_emit_lib_Makefile_am ()
     if test -n "$uses_subdirs"; then
       subdir_options=' subdir-objects'
     fi
-    echo "AUTOMAKE_OPTIONS = 1.9.6 gnits${subdir_options}"
+    if ! $non_recursive; then
+      echo "AUTOMAKE_OPTIONS = 1.9.6 gnits${subdir_options}"
+    fi
   fi
   echo
   if test -z "$makefile_name"; then
-    echo "SUBDIRS ="
-    echo "noinst_HEADERS ="
-    echo "noinst_LIBRARIES ="
-    echo "noinst_LTLIBRARIES ="
-    # Automake versions < 1.11.4 create an empty pkgdatadir at
-    # installation time if you specify pkgdata_DATA to empty.
-    # See automake bugs #10997 and #11030:
-    #  * http://debbugs.gnu.org/10997
-    #  * http://debbugs.gnu.org/11030
-    # So we need this workaround.
-    if grep '^pkgdata_DATA *+=' "$tmp"/allsnippets > /dev/null; then
-      echo "pkgdata_DATA ="
+    if ! $non_recursive; then
+      echo "SUBDIRS ="
+      echo "noinst_HEADERS ="
+      echo "noinst_LIBRARIES ="
+      echo "noinst_LTLIBRARIES ="
+      # Automake versions < 1.11.4 create an empty pkgdatadir at
+      # installation time if you specify pkgdata_DATA to empty.
+      # See automake bugs #10997 and #11030:
+      #  * http://debbugs.gnu.org/10997
+      #  * http://debbugs.gnu.org/11030
+      # So we need this workaround.
+      if grep '^pkgdata_DATA *+=' "$tmp"/allsnippets > /dev/null; then
+        echo "pkgdata_DATA ="
+      fi
+      echo "EXTRA_DIST ="
+      echo "BUILT_SOURCES ="
+      echo "SUFFIXES ="
     fi
-    echo "EXTRA_DIST ="
-    echo "BUILT_SOURCES ="
-    echo "SUFFIXES ="
   fi
-  echo "MOSTLYCLEANFILES $assign core *.stackdump"
+  if $non_recursive; then
+    echo "MOSTLYCLEANFILES $assign ${sourcebase}/core 
${sourcebase}/*.stackdump"
+  else
+    echo "MOSTLYCLEANFILES $assign core *.stackdump"
+  fi
   if test -z "$makefile_name"; then
-    echo "MOSTLYCLEANDIRS ="
-    echo "CLEANFILES ="
-    echo "DISTCLEANFILES ="
-    echo "MAINTAINERCLEANFILES ="
+    if ! $non_recursive; then
+      echo "MOSTLYCLEANDIRS ="
+      echo "CLEANFILES ="
+      echo "DISTCLEANFILES ="
+      echo "MAINTAINERCLEANFILES ="
+    fi
   fi
   # Execute edits that apply to the Makefile.am being generated.
   edit=0
@@ -3565,12 +3593,25 @@ func_emit_lib_Makefile_am ()
   fi
   if test -z "$makefile_name"; then
     echo
-    echo "AM_CPPFLAGS =$cppflags_part1$cppflags_part2"
-    echo "AM_CFLAGS ="
+    if $non_recursive; then
+      echo "${lt_prefix}CPPFLAGS = -I$sourcebase -I\$(srcdir)/$sourcebase"
+      echo "${lt_prefix}CPPFLAGS += $cppflags_part1$cppflags_part2"
+      echo "${lt_prefix}CFLAGS ="
+    else
+      echo "AM_CPPFLAGS =$cppflags_part1$cppflags_part2"
+      echo "AM_CFLAGS ="
+    fi
   else
+    if $non_recursive; then
+      echo "${lt_prefix}CPPFLAGS = -I$sourcebase -I\$(srcdir)/$sourcebase"
+    fi
     if test -n "$cppflags_part1$cppflags_part2"; then
       echo
-      echo "AM_CPPFLAGS +=$cppflags_part1$cppflags_part2"
+      if $non_recursive; then
+        echo "${lt_prefix}CPPFLAGS += $cppflags_part1$cppflags_part2"
+      else
+        echo "AM_CPPFLAGS +=$cppflags_part1$cppflags_part2"
+      fi
     fi
   fi
   echo
@@ -3584,20 +3625,24 @@ func_emit_lib_Makefile_am ()
     # it should not be installed.
     :
   else
-    # By default, the generated library should not be installed.
-    echo "noinst_${perhapsLT}LIBRARIES += $libname.$libext"
+      # By default, the generated library should not be installed.
+    if $non_recursive; then
+      echo "noinst_${perhapsLT}LIBRARIES += $sourcebase/$libname.$libext"
+    else
+      echo "noinst_${perhapsLT}LIBRARIES += $libname.$libext"
+    fi
   fi
   echo
-  echo "${libname}_${libext}_SOURCES ="
+  echo "${lt_prefix}SOURCES ="
   # Here we use $(LIBOBJS), not @LIBOBJS@. The value is the same. However,
   # automake during its analysis looks for $(LIBOBJS), not for @LIBOBJS@.
-  echo "${libname}_${libext}_LIBADD = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
-  echo "${libname}_${libext}_DEPENDENCIES = 
\$(${macro_prefix}_${perhapsLT}LIBOBJS)"
-  echo "EXTRA_${libname}_${libext}_SOURCES ="
+  echo "${lt_prefix}LIBADD = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
+  echo "${lt_prefix}DEPENDENCIES = \$(${macro_prefix}_${perhapsLT}LIBOBJS)"
+  echo "EXTRA_${lt_prefix}SOURCES ="
   if test "$libtool" = true; then
-    echo "${libname}_${libext}_LDFLAGS = \$(AM_LDFLAGS)"
-    echo "${libname}_${libext}_LDFLAGS += -no-undefined"
-    # Synthesize an ${libname}_${libext}_LDFLAGS augmentation by combining
+    echo "${lt_prefix}LDFLAGS = \$(AM_LDFLAGS)"
+    echo "${lt_prefix}LDFLAGS += -no-undefined"
+    # Synthesize an ${lt_prefix}LDFLAGS augmentation by combining
     # the link dependencies of all modules.
     for module in $modules; do
       func_verify_nontests_module
@@ -3607,7 +3652,7 @@ func_emit_lib_Makefile_am ()
     done \
       | LC_ALL=C sed -e '/^$/d' -e 's/ when linking with libtool.*//' \
       | LC_ALL=C sort -u \
-      | LC_ALL=C sed -e 's/^/'"${libname}_${libext}"'_LDFLAGS += /'
+      | LC_ALL=C sed -e 's/^/'"${lt_prefix}"'LDFLAGS += /'
   fi
   echo
   if test -n "$pobase"; then
@@ -3617,7 +3662,7 @@ func_emit_lib_Makefile_am ()
   cat "$tmp"/allsnippets \
     | sed -e 's|\$(top_srcdir)/build-aux/|$(top_srcdir)/'"$auxdir"'/|g'
   echo
-  echo "mostlyclean-local: mostlyclean-generic"
+  echo "libgnu-mostlyclean-local: mostlyclean-generic"
   echo "       @for dir in '' \$(MOSTLYCLEANDIRS); do \\"
   echo "         if test -n \"\$\$dir\" && test -d \$\$dir; then \\"
   echo "           echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\"
@@ -4006,8 +4051,8 @@ func_emit_initmacro_end ()
   echo "      # Remove the extension."
   echo "      sed_drop_objext='s/\\.o\$//;s/\\.obj\$//'"
   echo "      for i in \`for i in \$${macro_prefix_arg}_LIBOBJS; do echo 
\"\$i\"; done | sed -e \"\$sed_drop_objext\" | sort | uniq\`; do"
-  echo "        ${macro_prefix_arg}_libobjs=\"\$${macro_prefix_arg}_libobjs 
\$i.\$ac_objext\""
-  echo "        
${macro_prefix_arg}_ltlibobjs=\"\$${macro_prefix_arg}_ltlibobjs \$i.lo\""
+  echo "        ${macro_prefix_arg}_libobjs=\"\$${macro_prefix_arg}_libobjs 
$sourcebase/\$i.\$ac_objext\""
+  echo "        
${macro_prefix_arg}_ltlibobjs=\"\$${macro_prefix_arg}_ltlibobjs 
$sourcebase/${sourcebase}_${libname}_${libext}-\$i.lo\""
   echo "      done"
   echo "    fi"
   echo "    AC_SUBST([${macro_prefix_arg}_LIBOBJS], 
[\$${macro_prefix_arg}_libobjs])"
@@ -5818,12 +5863,11 @@ func_create_testdir ()
   if test -z "$modules"; then
     # All modules together.
     # Except config-h, which breaks all modules which use HAVE_CONFIG_H.
-    # Except non-recursive-gnulib-prefix-hack, which represents a nonstandard
     # way of using Automake.
     # Except ftruncate, mountlist, which abort the configuration on mingw. 
FIXME.
     # Except lib-ignore, which leads to link errors when Sun C++ is used. 
FIXME.
     modules=`func_all_modules`
-    modules=`for m in $modules; do case $m in config-h | 
non-recursive-gnulib-prefix-hack | ftruncate | mountlist | lib-ignore) ;; *) 
echo $m;; esac; done`
+    modules=`for m in $modules; do case $m in config-h | ftruncate | mountlist 
| lib-ignore) ;; *) echo $m;; esac; done`
   fi
   specified_modules="$modules"
 
diff --git a/m4/alloca.m4 b/m4/alloca.m4
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -26,14 +26,14 @@ AC_DEFUN([gl_FUNC_ALLOCA],
       AC_DEFINE([HAVE_ALLOCA], [1],
         [Define to 1 if you have 'alloca' after including <alloca.h>,
          a header that may be supplied by this distribution.])
-      ALLOCA_H=alloca.h
+      ALLOCA_H=libgnu/alloca.h
     else
       dnl alloca exists as a library function, i.e. it is slow and probably
       dnl a memory leak. Don't define HAVE_ALLOCA in this case.
       ALLOCA_H=
     fi
   else
-    ALLOCA_H=alloca.h
+    ALLOCA_H=libgnu/alloca.h
   fi
   AC_SUBST([ALLOCA_H])
   AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
diff --git a/m4/argz.m4 b/m4/argz.m4
--- a/m4/argz.m4
+++ b/m4/argz.m4
@@ -27,7 +27,7 @@ AC_CHECK_TYPES([error_t],
 #endif])
 
 ARGZ_H=
-AC_CHECK_FUNC([argz_replace], [], [ARGZ_H=argz.h])
+AC_CHECK_FUNC([argz_replace], [], [ARGZ_H=libgnu/argz.h])
 
 dnl if have system argz functions, allow forced use of
 dnl libltdl-supplied implementation (and default to do so
@@ -70,7 +70,7 @@ AS_IF([test -z "$ARGZ_H"],
      AS_IF([test "$lt_cv_sys_argz_works" = yes],
         [AC_DEFINE([HAVE_WORKING_ARGZ], [1],
                    [This value is set to 1 to indicate that the system argz 
facility works])],
-        [ARGZ_H=argz.h])])
+        [ARGZ_H=libgnu/argz.h])])
 
 AC_SUBST([ARGZ_H])
 AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"])
diff --git a/m4/assert_h.m4 b/m4/assert_h.m4
--- a/m4/assert_h.m4
+++ b/m4/assert_h.m4
@@ -21,7 +21,7 @@ AC_DEFUN([gl_ASSERT_H],
        [gl_cv_static_assert=yes],
        [gl_cv_static_assert=no])])
   if test $gl_cv_static_assert = no; then
-    ASSERT_H=assert.h
+    ASSERT_H=libgnu/assert.h
     gl_NEXT_HEADERS([assert.h])
   fi
   AC_SUBST([ASSERT_H])
diff --git a/m4/float_h.m4 b/m4/float_h.m4
--- a/m4/float_h.m4
+++ b/m4/float_h.m4
@@ -12,14 +12,14 @@ AC_DEFUN([gl_FLOAT_H],
   REPLACE_FLOAT_LDBL=0
   case "$host_os" in
     aix* | beos* | openbsd* | mirbsd* | irix*)
-      FLOAT_H=float.h
+      FLOAT_H=libgnu/float.h
       ;;
     freebsd*)
       case "$host_cpu" in
 changequote(,)dnl
         i[34567]86 )
 changequote([,])dnl
-          FLOAT_H=float.h
+          FLOAT_H=libgnu/float.h
           ;;
         x86_64 )
           # On x86_64 systems, the C compiler may still be generating
@@ -29,14 +29,14 @@ changequote([,])dnl
              yes
              #endif],
             [],
-            [FLOAT_H=float.h])
+            [FLOAT_H=libgnu/float.h])
           ;;
       esac
       ;;
     linux*)
       case "$host_cpu" in
         powerpc*)
-          FLOAT_H=float.h
+          FLOAT_H=libgnu/float.h
           ;;
       esac
       ;;
@@ -85,7 +85,7 @@ int main ()
       REPLACE_ITOLD=1
       dnl We add the workaround to <float.h> but also to <math.h>,
       dnl to increase the chances that the fix function gets pulled in.
-      FLOAT_H=float.h
+      FLOAT_H=libgnu/float.h
       ;;
   esac
 
diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
--- a/m4/fnmatch.m4
+++ b/m4/fnmatch.m4
@@ -127,7 +127,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
     dnl don't do "make distclean".
     rm -f "$gl_source_base/fnmatch.h"
   else
-    FNMATCH_H=fnmatch.h
+    FNMATCH_H=libgnu/fnmatch.h
   fi
   AC_SUBST([FNMATCH_H])
   AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"])
diff --git a/m4/getopt.m4 b/m4/getopt.m4
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -354,7 +354,7 @@ dnl is ambiguous with environment values
 
 AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
 [
-  GETOPT_H=getopt.h
+  GETOPT_H=libgnu/getopt.h
   AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
     [Define to rpl_ if the getopt replacement functions and variables
      should be used.])
diff --git a/m4/glob.m4 b/m4/glob.m4
--- a/m4/glob.m4
+++ b/m4/glob.m4
@@ -10,7 +10,7 @@ dnl with or without modifications, as lo
 
 AC_DEFUN([gl_GLOB],
 [ GLOB_H=
-  AC_CHECK_HEADERS([glob.h], [], [GLOB_H=glob.h])
+  AC_CHECK_HEADERS([glob.h], [], [GLOB_H=libgnu/glob.h])
 
   if test -z "$GLOB_H"; then
     AC_CACHE_CHECK([for GNU glob interface version 1],
@@ -22,7 +22,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 
         [gl_cv_gnu_glob_interface_version_1=no])])
 
     if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
-      GLOB_H=glob.h
+      GLOB_H=libgnu/glob.h
     fi
   fi
 
@@ -49,7 +49,7 @@ if (glob ("conf*-globtest", 0, NULL, &fo
       fi])
 
     if test $gl_cv_glob_lists_symlinks = no; then
-      GLOB_H=glob.h
+      GLOB_H=libgnu/glob.h
     fi
   fi
 
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -24,7 +24,7 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
   if test "$gl_cv_header_limits_width" = yes; then
     LIMITS_H=
   else
-    LIMITS_H=limits.h
+    LIMITS_H=libgnu/limits.h
   fi
   AC_SUBST([LIMITS_H])
   AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
diff --git a/m4/pthread.m4 b/m4/pthread.m4
--- a/m4/pthread.m4
+++ b/m4/pthread.m4
@@ -42,10 +42,10 @@ AC_DEFUN([gl_PTHREAD_CHECK],
    if test $ac_cv_header_pthread_h != yes ||
       test $ac_cv_type_pthread_t != yes ||
       test $ac_cv_type_pthread_spinlock_t != yes; then
-     PTHREAD_H='pthread.h'
+     PTHREAD_H='libgnu/pthread.h'
      AC_LIBOBJ([pthread])
    elif test $gl_cv_header_pthread_h_pollution = yes; then
-     PTHREAD_H=pthread.h
+     PTHREAD_H=libgnu/pthread.h
    else
      PTHREAD_H=
    fi
diff --git a/m4/stdarg.m4 b/m4/stdarg.m4
--- a/m4/stdarg.m4
+++ b/m4/stdarg.m4
@@ -40,7 +40,7 @@ void (*func) (va_list, va_list) = va_cop
       ], [gl_aixcc=yes], [gl_aixcc=no])
     if test $gl_aixcc = yes; then
       dnl Provide a substitute <stdarg.h> file.
-      STDARG_H=stdarg.h
+      STDARG_H=libgnu/stdarg.h
       gl_NEXT_HEADERS([stdarg.h])
       dnl Fallback for the case when <stdarg.h> contains only macro 
definitions.
       if test "$gl_cv_next_stdarg_h" = '""'; then
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -10,12 +10,12 @@ AC_DEFUN([gl_STDDEF_H],
   AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   STDDEF_H=
-  AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h],
+  AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; 
STDDEF_H=libgnu/stddef.h],
     [[#include <stddef.h>
     ]])
   if test $gt_cv_c_wchar_t = no; then
     HAVE_WCHAR_T=0
-    STDDEF_H=stddef.h
+    STDDEF_H=libgnu/stddef.h
   fi
   AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
     [gl_cv_decl_null_works],
@@ -26,7 +26,7 @@ AC_DEFUN([gl_STDDEF_H],
       [gl_cv_decl_null_works=no])])
   if test $gl_cv_decl_null_works = no; then
     REPLACE_NULL=1
-    STDDEF_H=stddef.h
+    STDDEF_H=libgnu/stddef.h
   fi
   AC_SUBST([STDDEF_H])
   AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
diff --git a/m4/stdint.m4 b/m4/stdint.m4
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -297,7 +297,7 @@ static const char *macro_values[] =
   HAVE_C99_STDINT_H=0
   HAVE_SYS_BITYPES_H=0
   HAVE_SYS_INTTYPES_H=0
-  STDINT_H=stdint.h
+  STDINT_H=libgnu/stdint.h
   if test "$gl_cv_header_working_stdint_h" = yes; then
     HAVE_C99_STDINT_H=1
     dnl Now see whether the system <stdint.h> works without
@@ -355,7 +355,7 @@ int32_t i32 = INT32_C (0x7fffffff);
   fi
 
   # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
-  LIMITS_H=limits.h
+  LIMITS_H=libgnu/limits.h
   AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
 
   AC_SUBST([HAVE_C99_STDINT_H])
diff --git a/m4/sysexits.m4 b/m4/sysexits.m4
--- a/m4/sysexits.m4
+++ b/m4/sysexits.m4
@@ -33,10 +33,10 @@ AC_DEFUN([gl_SYSEXITS],
           }
         ]])],
       [SYSEXITS_H=],
-      [SYSEXITS_H=sysexits.h])
+      [SYSEXITS_H=libgnu/sysexits.h])
   else
     HAVE_SYSEXITS_H=0
-    SYSEXITS_H=sysexits.h
+    SYSEXITS_H=libgnu/sysexits.h
   fi
   AC_SUBST([HAVE_SYSEXITS_H])
   AC_SUBST([SYSEXITS_H])
diff --git a/modules/alloca-opt b/modules/alloca-opt
--- a/modules/alloca-opt
+++ b/modules/alloca-opt
@@ -18,17 +18,17 @@ BUILT_SOURCES += $(ALLOCA_H)
 # We need the following in order to create <alloca.h> when the system
 # doesn't have one that works with the given compiler.
 if GL_GENERATE_ALLOCA_H
-alloca.h: alloca.in.h $(top_builddir)/config.status
+libgnu/alloca.h: libgnu/alloca.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         cat $(srcdir)/alloca.in.h; \
+         cat $(srcdir)/libgnu/alloca.in.h; \
        } > $@-t && \
        mv -f $@-t $@
 else
-alloca.h: $(top_builddir)/config.status
+libgnu/alloca.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += alloca.h alloca.h-t
+MOSTLYCLEANFILES += libgnu/alloca.h libgnu/alloca.h-t
 
 Include:
 <alloca.h>
diff --git a/modules/allocator b/modules/allocator
--- a/modules/allocator
+++ b/modules/allocator
@@ -10,7 +10,7 @@ Depends-on:
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += allocator.c
+lib_SOURCES += libgnu/allocator.c
 
 Include:
 "allocator.h"
diff --git a/modules/areadlink b/modules/areadlink
--- a/modules/areadlink
+++ b/modules/areadlink
@@ -12,7 +12,7 @@ readlink
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += areadlink.c
+lib_SOURCES += libgnu/areadlink.c
 
 Include:
 "areadlink.h"
diff --git a/modules/areadlink-with-size b/modules/areadlink-with-size
--- a/modules/areadlink-with-size
+++ b/modules/areadlink-with-size
@@ -14,7 +14,7 @@ unistd
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += areadlink-with-size.c
+lib_SOURCES += libgnu/areadlink-with-size.c
 
 Include:
 "areadlink.h"
diff --git a/modules/base64 b/modules/base64
--- a/modules/base64
+++ b/modules/base64
@@ -14,7 +14,7 @@ configure.ac:
 gl_FUNC_BASE64
 
 Makefile.am:
-lib_SOURCES += base64.h base64.c
+lib_SOURCES += libgnu/base64.h libgnu/base64.c
 
 Include:
 "base64.h"
diff --git a/modules/bitrotate b/modules/bitrotate
--- a/modules/bitrotate
+++ b/modules/bitrotate
@@ -12,7 +12,7 @@ stdint
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += bitrotate.h bitrotate.c
+lib_SOURCES += libgnu/bitrotate.h libgnu/bitrotate.c
 
 Include:
 "bitrotate.h"
diff --git a/modules/c-ctype b/modules/c-ctype
--- a/modules/c-ctype
+++ b/modules/c-ctype
@@ -12,7 +12,7 @@ stdbool
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += c-ctype.h c-ctype.c
+lib_SOURCES += libgnu/c-ctype.h libgnu/c-ctype.c
 
 Include:
 "c-ctype.h"
diff --git a/modules/canonicalize b/modules/canonicalize
--- a/modules/canonicalize
+++ b/modules/canonicalize
@@ -28,7 +28,7 @@ gl_MODULE_INDICATOR_FOR_TESTS([canonical
 gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
 
 Makefile.am:
-lib_SOURCES += canonicalize.c
+lib_SOURCES += libgnu/canonicalize.c
 
 Include:
 "canonicalize.h"
diff --git a/modules/careadlinkat b/modules/careadlinkat
--- a/modules/careadlinkat
+++ b/modules/careadlinkat
@@ -14,7 +14,7 @@ configure.ac:
 AC_CHECK_FUNCS_ONCE([readlinkat])
 
 Makefile.am:
-lib_SOURCES += careadlinkat.c
+lib_SOURCES += libgnu/careadlinkat.c
 
 Include:
 "careadlinkat.h"
diff --git a/modules/cloexec b/modules/cloexec
--- a/modules/cloexec
+++ b/modules/cloexec
@@ -14,7 +14,7 @@ configure.ac:
 gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
 
 Makefile.am:
-lib_SOURCES += cloexec.c
+lib_SOURCES += libgnu/cloexec.c
 
 Include:
 "cloexec.h"
diff --git a/modules/configmake b/modules/configmake
--- a/modules/configmake
+++ b/modules/configmake
@@ -1,4 +1,4 @@
-Description:
+qDescription:
 Access from source code to variables set by "configure" or "make".
 
 Files:
@@ -14,7 +14,7 @@ Makefile.am:
 # provided by autoconf 2.59c+ or 2.70.
 # The Automake-defined pkg* macros are appended, in the order
 # listed in the Automake 1.10a+ documentation.
-configmake.h: Makefile
+libgnu/configmake.h: Makefile
        $(AM_V_GEN)rm -f $@-t && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          echo '#define PREFIX "$(prefix)"'; \
@@ -48,8 +48,8 @@ configmake.h: Makefile
        } | sed '/""/d' > $@-t && \
        mv -f $@-t $@
 
-BUILT_SOURCES += configmake.h
-CLEANFILES += configmake.h configmake.h-t
+BUILT_SOURCES += libgnu/configmake.h
+CLEANFILES += libgnu/configmake.h libgnu/configmake.h-t
 
 Include:
 /* Include only after all system include files.  */
diff --git a/modules/crypto/md2 b/modules/crypto/md2
--- a/modules/crypto/md2
+++ b/modules/crypto/md2
@@ -11,7 +11,7 @@ minmax
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += md2.c
+lib_SOURCES += libgnu/md2.c
 
 Include:
 "md2.h"
diff --git a/modules/crypto/md4 b/modules/crypto/md4
--- a/modules/crypto/md4
+++ b/modules/crypto/md4
@@ -14,7 +14,7 @@ configure.ac:
 gl_MD4
 
 Makefile.am:
-lib_SOURCES += md4.c
+lib_SOURCES += libgnu/md4.c
 
 Include:
 "md4.h"
diff --git a/modules/crypto/md5 b/modules/crypto/md5
--- a/modules/crypto/md5
+++ b/modules/crypto/md5
@@ -17,7 +17,7 @@ configure.ac:
 gl_MD5
 
 Makefile.am:
-lib_SOURCES += md5.c
+lib_SOURCES += libgnu/md5.c
 
 Include:
 "md5.h"
diff --git a/modules/crypto/sha1 b/modules/crypto/sha1
--- a/modules/crypto/sha1
+++ b/modules/crypto/sha1
@@ -17,7 +17,7 @@ configure.ac:
 gl_SHA1
 
 Makefile.am:
-lib_SOURCES += sha1.c
+lib_SOURCES += libgnu/sha1.c
 
 Include:
 "sha1.h"
diff --git a/modules/crypto/sha256 b/modules/crypto/sha256
--- a/modules/crypto/sha256
+++ b/modules/crypto/sha256
@@ -17,7 +17,7 @@ configure.ac:
 gl_SHA256
 
 Makefile.am:
-lib_SOURCES += sha256.c
+lib_SOURCES += libgnu/sha256.c
 
 Include:
 "sha256.h"
diff --git a/modules/crypto/sha512 b/modules/crypto/sha512
--- a/modules/crypto/sha512
+++ b/modules/crypto/sha512
@@ -18,7 +18,7 @@ configure.ac:
 gl_SHA512
 
 Makefile.am:
-lib_SOURCES += sha512.c
+lib_SOURCES += libgnu/sha512.c
 
 Include:
 "sha512.h"
diff --git a/modules/dirent b/modules/dirent
--- a/modules/dirent
+++ b/modules/dirent
@@ -16,11 +16,11 @@ configure.ac:
 gl_DIRENT_H
 
 Makefile.am:
-BUILT_SOURCES += dirent.h
+BUILT_SOURCES += libgnu/dirent.h
 
 # We need the following in order to create <dirent.h> when the system
 # doesn't have one that works with the given compiler.
-dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
+libgnu/dirent.h: libgnu/dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -53,10 +53,10 @@ dirent.h: dirent.in.h $(top_builddir)/co
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/dirent.in.h; \
+             < $(srcdir)/libgnu/dirent.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += dirent.h dirent.h-t
+MOSTLYCLEANFILES += libgnu/dirent.h libgnu/dirent.h-t
 
 Include:
 <dirent.h>
diff --git a/modules/dirname b/modules/dirname
--- a/modules/dirname
+++ b/modules/dirname
@@ -16,7 +16,7 @@ gl_DIRNAME
 gl_MODULE_INDICATOR([dirname])
 
 Makefile.am:
-lib_SOURCES += dirname.c basename.c
+lib_SOURCES += libgnu/dirname.c libgnu/basename.c
 
 Include:
 "dirname.h"
diff --git a/modules/dirname-lgpl b/modules/dirname-lgpl
--- a/modules/dirname-lgpl
+++ b/modules/dirname-lgpl
@@ -18,7 +18,7 @@ configure.ac:
 gl_DIRNAME_LGPL
 
 Makefile.am:
-lib_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
+lib_SOURCES += libgnu/dirname-lgpl.c libgnu/basename-lgpl.c libgnu/stripslash.c
 
 Include:
 "dirname.h"
diff --git a/modules/errno b/modules/errno
--- a/modules/errno
+++ b/modules/errno
@@ -17,7 +17,7 @@ BUILT_SOURCES += $(ERRNO_H)
 # We need the following in order to create <errno.h> when the system
 # doesn't have one that is POSIX compliant.
 if GL_GENERATE_ERRNO_H
-errno.h: errno.in.h $(top_builddir)/config.status
+libgnu/errno.h: libgnu/errno.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -31,14 +31,14 @@ errno.h: errno.in.h $(top_builddir)/conf
              -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
              -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
              -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
-             < $(srcdir)/errno.in.h; \
+             < $(srcdir)/libgnu/errno.in.h; \
        } > $@-t && \
        mv $@-t $@
 else
-errno.h: $(top_builddir)/config.status
+libgnu/errno.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += errno.h errno.h-t
+MOSTLYCLEANFILES += libgnu/errno.h libgnu/errno.h-t
 
 Include:
 <errno.h>
diff --git a/modules/exitfail b/modules/exitfail
--- a/modules/exitfail
+++ b/modules/exitfail
@@ -11,7 +11,7 @@ stdlib
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += exitfail.c
+lib_SOURCES += libgnu/exitfail.c
 
 Include:
 "exitfail.h"
diff --git a/modules/fcntl-h b/modules/fcntl-h
--- a/modules/fcntl-h
+++ b/modules/fcntl-h
@@ -19,11 +19,11 @@ configure.ac:
 gl_FCNTL_H
 
 Makefile.am:
-BUILT_SOURCES += fcntl.h
+BUILT_SOURCES += libgnu/fcntl.h
 
 # We need the following in order to create <fcntl.h> when the system
 # doesn't have one that works with the given compiler.
-fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
+libgnu/fcntl.h: libgnu/fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -43,10 +43,10 @@ fcntl.h: fcntl.in.h $(top_builddir)/conf
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/fcntl.in.h; \
+             < $(srcdir)/libgnu/fcntl.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += fcntl.h fcntl.h-t
+MOSTLYCLEANFILES += libgnu/fcntl.h libgnu/fcntl.h-t
 
 Include:
 <fcntl.h>
diff --git a/modules/fd-hook b/modules/fd-hook
--- a/modules/fd-hook
+++ b/modules/fd-hook
@@ -11,7 +11,7 @@ unistd
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += fd-hook.c
+lib_SOURCES += libgnu/fd-hook.c
 
 Include:
 "fd-hook.h"
diff --git a/modules/file-set b/modules/file-set
--- a/modules/file-set
+++ b/modules/file-set
@@ -15,7 +15,7 @@ xalloc-die
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += file-set.c
+lib_SOURCES += libgnu/file-set.c
 
 Include:
 "file-set.h"
diff --git a/modules/filemode b/modules/filemode
--- a/modules/filemode
+++ b/modules/filemode
@@ -15,7 +15,7 @@ configure.ac:
 gl_FILEMODE
 
 Makefile.am:
-lib_SOURCES += filemode.c
+lib_SOURCES += libgnu/filemode.c
 
 Include:
 "filemode.h"
diff --git a/modules/filenamecat-lgpl b/modules/filenamecat-lgpl
--- a/modules/filenamecat-lgpl
+++ b/modules/filenamecat-lgpl
@@ -13,7 +13,7 @@ configure.ac:
 gl_FILE_NAME_CONCAT_LGPL
 
 Makefile.am:
-lib_SOURCES += filenamecat-lgpl.c
+lib_SOURCES += libgnu/filenamecat-lgpl.c
 
 Include:
 "filenamecat.h"
diff --git a/modules/float b/modules/float
--- a/modules/float
+++ b/modules/float
@@ -25,7 +25,7 @@ BUILT_SOURCES += $(FLOAT_H)
 # We need the following in order to create <float.h> when the system
 # doesn't have one that works with the given compiler.
 if GL_GENERATE_FLOAT_H
-float.h: float.in.h $(top_builddir)/config.status
+libgnu/float.h: libgnu/float.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -34,14 +34,14 @@ float.h: float.in.h $(top_builddir)/conf
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
              -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \
-             < $(srcdir)/float.in.h; \
+             < $(srcdir)/libgnu/float.in.h; \
        } > $@-t && \
        mv $@-t $@
 else
-float.h: $(top_builddir)/config.status
+libgnu/float.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += float.h float.h-t
+MOSTLYCLEANFILES += libgnu/float.h libgnu/float.h-t
 
 Include:
 <float.h>
diff --git a/modules/fnmatch b/modules/fnmatch
--- a/modules/fnmatch
+++ b/modules/fnmatch
@@ -34,18 +34,18 @@ BUILT_SOURCES += $(FNMATCH_H)
 # We need the following in order to create <fnmatch.h> when the system
 # doesn't have one that supports the required API.
 if GL_GENERATE_FNMATCH_H
-fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
+libgnu/fnmatch.h: libgnu/fnmatch.in.h $(top_builddir)/config.status 
$(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-             < $(srcdir)/fnmatch.in.h; \
+             < $(srcdir)/libgnu/fnmatch.in.h; \
        } > $@-t && \
        mv -f $@-t $@
 else
-fnmatch.h: $(top_builddir)/config.status
+libgnu/fnmatch.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
+MOSTLYCLEANFILES += libgnu/fnmatch.h libgnu/fnmatch.h-t
 
 Include:
 <fnmatch.h>
diff --git a/modules/getopt-posix b/modules/getopt-posix
--- a/modules/getopt-posix
+++ b/modules/getopt-posix
@@ -31,7 +31,7 @@ BUILT_SOURCES += $(GETOPT_H)
 
 # We need the following in order to create <getopt.h> when the system
 # doesn't have one that works with the given compiler.
-getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
+libgnu/getopt.h: libgnu/getopt.in.h $(top_builddir)/config.status 
$(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -41,10 +41,10 @@ getopt.h: getopt.in.h $(top_builddir)/co
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-             < $(srcdir)/getopt.in.h; \
+             < $(srcdir)/libgnu/getopt.in.h; \
        } > $@-t && \
        mv -f $@-t $@
-MOSTLYCLEANFILES += getopt.h getopt.h-t
+MOSTLYCLEANFILES += libgnu/getopt.h libgnu/getopt.h-t
 
 Include:
 <unistd.h>
diff --git a/modules/getprogname b/modules/getprogname
--- a/modules/getprogname
+++ b/modules/getprogname
@@ -14,7 +14,7 @@ configure.ac:
 gl_FUNC_GETPROGNAME
 
 Makefile.am:
-lib_SOURCES += getprogname.h getprogname.c
+lib_SOURCES += libgnu/getprogname.h libgnu/getprogname.c
 
 Include:
 "getprogname.h"
diff --git a/modules/gettext-h b/modules/gettext-h
--- a/modules/gettext-h
+++ b/modules/gettext-h
@@ -11,7 +11,7 @@ AC_SUBST([LIBINTL])
 AC_SUBST([LTLIBINTL])
 
 Makefile.am:
-lib_SOURCES += gettext.h
+lib_SOURCES += libgnu/gettext.h
 
 Include:
 "gettext.h"
diff --git a/modules/glob b/modules/glob
--- a/modules/glob
+++ b/modules/glob
@@ -45,21 +45,21 @@ BUILT_SOURCES += $(GLOB_H)
 # We need the following in order to create <glob.h> when the system
 # doesn't have one that works with the given compiler.
 if GL_GENERATE_GLOB_H
-glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
+libgnu/glob.h: libgnu/glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/glob.in.h; \
+             < $(srcdir)/libgnu/glob.in.h; \
        } > $@-t && \
        mv -f $@-t $@
 else
-glob.h: $(top_builddir)/config.status
+libgnu/glob.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += glob.h glob.h-t
+MOSTLYCLEANFILES += libgnu/glob.h libgnu/glob.h-t
 
 Include:
 <glob.h>
diff --git a/modules/hard-locale b/modules/hard-locale
--- a/modules/hard-locale
+++ b/modules/hard-locale
@@ -14,7 +14,7 @@ configure.ac:
 gl_HARD_LOCALE
 
 Makefile.am:
-lib_SOURCES += hard-locale.c
+lib_SOURCES += libgnu/hard-locale.c
 
 Include:
 "hard-locale.h"
diff --git a/modules/hash b/modules/hash
--- a/modules/hash
+++ b/modules/hash
@@ -14,7 +14,7 @@ xalloc-oversized
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += hash.c
+lib_SOURCES += libgnu/hash.c
 
 Include:
 "hash.h"
diff --git a/modules/hash-pjw b/modules/hash-pjw
--- a/modules/hash-pjw
+++ b/modules/hash-pjw
@@ -10,7 +10,7 @@ Depends-on:
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += hash-pjw.h hash-pjw.c
+lib_SOURCES += libgnu/hash-pjw.h libgnu/hash-pjw.c
 
 Include:
 "hash-pjw.h"
diff --git a/modules/hash-triple b/modules/hash-triple
--- a/modules/hash-triple
+++ b/modules/hash-triple
@@ -13,7 +13,7 @@ same-inode
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += hash-triple.c
+lib_SOURCES += libgnu/hash-triple.c
 
 Include:
 "hash-triple.h"
diff --git a/modules/limits-h b/modules/limits-h
--- a/modules/limits-h
+++ b/modules/limits-h
@@ -17,7 +17,7 @@ BUILT_SOURCES += $(LIMITS_H)
 # We need the following in order to create <limits.h> when the system
 # doesn't have one that is compatible with GNU.
 if GL_GENERATE_LIMITS_H
-limits.h: limits.in.h $(top_builddir)/config.status
+libgnu/limits.h: libgnu/limits.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -25,14 +25,14 @@ limits.h: limits.in.h $(top_builddir)/co
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
-             < $(srcdir)/limits.in.h; \
+             < $(srcdir)/libgnu/limits.in.h; \
        } > $@-t && \
        mv $@-t $@
 else
-limits.h: $(top_builddir)/config.status
+libgnu/limits.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += limits.h limits.h-t
+MOSTLYCLEANFILES += libgnu/limits.h libgnu/limits.h-t
 
 Include:
 <limits.h>
diff --git a/modules/localcharset b/modules/localcharset
--- a/modules/localcharset
+++ b/modules/localcharset
@@ -28,7 +28,7 @@ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETA
 AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
 
 Makefile.am:
-lib_SOURCES += localcharset.h localcharset.c
+lib_SOURCES += libgnu/localcharset.h libgnu/localcharset.c
 
 # We need the following in order to install a simple file in $(libdir)
 # which is shared with other installed packages. We use a list of referencing
@@ -37,7 +37,7 @@ lib_SOURCES += localcharset.h localchars
 # On systems with glibc-2.1 or newer, the file is redundant, therefore we
 # avoid installing it.
 
-all-local: charset.alias ref-add.sed ref-del.sed
+all-local: libgnu/charset.alias libgnu/ref-add.sed libgnu/ref-del.sed
 
 charset_alias = $(DESTDIR)$(libdir)/charset.alias
 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
@@ -59,12 +59,12 @@ install-exec-localcharset: all-local
          $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
        fi ; \
        if test -f $(charset_alias); then \
-         sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+         sed -f libgnu/ref-add.sed $(charset_alias) > $(charset_tmp) ; \
          $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
          rm -f $(charset_tmp) ; \
        else \
          if $$need_charset_alias; then \
-           sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+           sed -f libgnu/ref-add.sed libgnu/charset.alias > $(charset_tmp) ; \
            $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
            rm -f $(charset_tmp) ; \
          fi ; \
@@ -73,7 +73,7 @@ install-exec-localcharset: all-local
 uninstall-local: uninstall-localcharset
 uninstall-localcharset: all-local
        if test -f $(charset_alias); then \
-         sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+         sed -f libgnu/ref-del.sed $(charset_alias) > $(charset_tmp); \
          if grep '^# Packages using this file: $$' $(charset_tmp) \
              > /dev/null; then \
            rm -f $(charset_alias); \
@@ -83,18 +83,18 @@ uninstall-localcharset: all-local
          rm -f $(charset_tmp); \
        fi
 
-charset.alias: config.charset
-       $(AM_V_GEN)rm -f t-$@ $@ && \
-       $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
-       mv t-$@ $@
+libgnu/charset.alias: libgnu/config.charset
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       $(SHELL) $(srcdir)/libgnu/config.charset '$(host)' > $@-t && \
+       mv $@-t $@
 
 SUFFIXES += .sed .sin
 .sin.sed:
-       $(AM_V_GEN)rm -f t-$@ $@ && \
-       sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
-       mv t-$@ $@
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > $@-t && \
+       mv $@-t $@
 
-CLEANFILES += charset.alias ref-add.sed ref-del.sed
+CLEANFILES += libgnu/charset.alias libgnu/ref-add.sed libgnu/ref-del.sed
 
 Include:
 "localcharset.h"
diff --git a/modules/lock b/modules/lock
--- a/modules/lock
+++ b/modules/lock
@@ -14,7 +14,7 @@ gl_LOCK
 gl_MODULE_INDICATOR([lock])
 
 Makefile.am:
-lib_SOURCES += glthread/lock.h glthread/lock.c
+lib_SOURCES += libgnu/glthread/lock.h libgnu/glthread/lock.c
 
 Include:
 "glthread/lock.h"
diff --git a/modules/malloca b/modules/malloca
--- a/modules/malloca
+++ b/modules/malloca
@@ -18,7 +18,7 @@ configure.ac:
 gl_MALLOCA
 
 Makefile.am:
-lib_SOURCES += malloca.c
+lib_SOURCES += libgnu/malloca.c
 
 Include:
 "malloca.h"
diff --git a/modules/math b/modules/math
--- a/modules/math
+++ b/modules/math
@@ -18,12 +18,12 @@ configure.ac:
 gl_MATH_H
 
 Makefile.am:
-BUILT_SOURCES += math.h
-lib_SOURCES += math.c
+BUILT_SOURCES += libgnu/math.h
+lib_SOURCES += libgnu/math.c
 
 # We need the following in order to create <math.h> when the system
 # doesn't have one that works with the given compiler.
-math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
+libgnu/math.h: libgnu/math.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -75,7 +75,7 @@ math.h: math.in.h $(top_builddir)/config
              -e 's/@''GNULIB_HYPOT''@/$(GNULIB_HYPOT)/g' \
              -e 's/@''GNULIB_HYPOTF''@/$(GNULIB_HYPOTF)/g' \
              -e 's/@''GNULIB_HYPOTL''@/$(GNULIB_HYPOTL)/g' \
-             < $(srcdir)/math.in.h | \
+             < $(srcdir)/libgnu/math.in.h | \
          sed -e 's/@''GNULIB_ILOGB''@/$(GNULIB_ILOGB)/g' \
              -e 's/@''GNULIB_ILOGBF''@/$(GNULIB_ILOGBF)/g' \
              -e 's/@''GNULIB_ILOGBL''@/$(GNULIB_ILOGBL)/g' \
@@ -294,7 +294,7 @@ math.h: math.in.h $(top_builddir)/config
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += math.h math.h-t
+MOSTLYCLEANFILES += libgnu/math.h libgnu/math.h-t
 
 Include:
 <math.h>
diff --git a/modules/minmax b/modules/minmax
--- a/modules/minmax
+++ b/modules/minmax
@@ -11,7 +11,7 @@ configure.ac:
 gl_MINMAX
 
 Makefile.am:
-lib_SOURCES += minmax.h
+lib_SOURCES += libgnu/minmax.h
 
 Include:
 "minmax.h"
diff --git a/modules/nproc b/modules/nproc
--- a/modules/nproc
+++ b/modules/nproc
@@ -15,7 +15,7 @@ configure.ac:
 gl_NPROC
 
 Makefile.am:
-lib_SOURCES += nproc.c
+lib_SOURCES += libgnu/nproc.c
 
 Include:
 "nproc.h"
diff --git a/modules/openat-die b/modules/openat-die
--- a/modules/openat-die
+++ b/modules/openat-die
@@ -14,7 +14,7 @@ snippet/_Noreturn
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += openat-die.c
+lib_SOURCES += libgnu/openat-die.c
 
 Include:
 "openat.h"
diff --git a/modules/progname b/modules/progname
--- a/modules/progname
+++ b/modules/progname
@@ -12,7 +12,7 @@ AC_CHECK_DECLS([program_invocation_name]
 AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
 
 Makefile.am:
-lib_SOURCES += progname.h progname.c
+lib_SOURCES += libgnu/progname.h libgnu/progname.c
 
 Include:
 "progname.h"
diff --git a/modules/same b/modules/same
--- a/modules/same
+++ b/modules/same
@@ -19,7 +19,7 @@ configure.ac:
 gl_SAME
 
 Makefile.am:
-lib_SOURCES += same.c
+lib_SOURCES += libgnu/same.c
 
 Include:
 "same.h"
diff --git a/modules/save-cwd b/modules/save-cwd
--- a/modules/save-cwd
+++ b/modules/save-cwd
@@ -18,7 +18,7 @@ configure.ac:
 gl_SAVE_CWD
 
 Makefile.am:
-lib_SOURCES += save-cwd.c
+lib_SOURCES += libgnu/save-cwd.c
 
 Include:
 "save-cwd.h"
diff --git a/modules/sigaction b/modules/sigaction
--- a/modules/sigaction
+++ b/modules/sigaction
@@ -21,7 +21,7 @@ fi
 gl_SIGNAL_MODULE_INDICATOR([sigaction])
 
 Makefile.am:
-lib_SOURCES += sig-handler.c
+lib_SOURCES += libgnu/sig-handler.c
 
 Include:
 <signal.h>
diff --git a/modules/signal-h b/modules/signal-h
--- a/modules/signal-h
+++ b/modules/signal-h
@@ -16,11 +16,11 @@ configure.ac:
 gl_SIGNAL_H
 
 Makefile.am:
-BUILT_SOURCES += signal.h
+BUILT_SOURCES += libgnu/signal.h
 
 # We need the following in order to create <signal.h> when the system
 # doesn't have a complete one.
-signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
+libgnu/signal.h: libgnu/signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -47,10 +47,10 @@ signal.h: signal.in.h $(top_builddir)/co
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/signal.in.h; \
+             < $(srcdir)/libgnu/signal.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += signal.h signal.h-t
+MOSTLYCLEANFILES += libgnu/signal.h libgnu/signal.h-t
 
 Include:
 <signal.h>
diff --git a/modules/size_max b/modules/size_max
--- a/modules/size_max
+++ b/modules/size_max
@@ -11,7 +11,7 @@ configure.ac:
 gl_SIZE_MAX
 
 Makefile.am:
-lib_SOURCES += size_max.h
+lib_SOURCES += libgnu/size_max.h
 
 Include:
 "size_max.h"
diff --git a/modules/snippet/arg-nonnull b/modules/snippet/arg-nonnull
--- a/modules/snippet/arg-nonnull
+++ b/modules/snippet/arg-nonnull
@@ -17,19 +17,19 @@ Makefile.am:
 # present in all Makefile.am that need it. This is ensured by the applicability
 # 'all' defined above.
 
-BUILT_SOURCES += arg-nonnull.h
+BUILT_SOURCES += libgnu/arg-nonnull.h
 # The arg-nonnull.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
 # off.
-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+libgnu/arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
        $(AM_V_GEN)rm -f $@-t $@ && \
        sed -n -e '/GL_ARG_NONNULL/,$$p' \
          < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
          > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+MOSTLYCLEANFILES += libgnu/arg-nonnull.h libgnu/arg-nonnull.h-t
 
-ARG_NONNULL_H=arg-nonnull.h
+ARG_NONNULL_H=libgnu/arg-nonnull.h
 
 Include:
 
diff --git a/modules/snippet/c++defs b/modules/snippet/c++defs
--- a/modules/snippet/c++defs
+++ b/modules/snippet/c++defs
@@ -17,18 +17,18 @@ Makefile.am:
 # present in all Makefile.am that need it. This is ensured by the applicability
 # 'all' defined above.
 
-BUILT_SOURCES += c++defs.h
+BUILT_SOURCES += libgnu/c++defs.h
 # The c++defs.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
+libgnu/c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
        $(AM_V_GEN)rm -f $@-t $@ && \
        sed -n -e '/_GL_CXXDEFS/,$$p' \
          < $(top_srcdir)/build-aux/snippet/c++defs.h \
          > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+MOSTLYCLEANFILES += libgnu/c++defs.h libgnu/c++defs.h-t
 
-CXXDEFS_H=c++defs.h
+CXXDEFS_H=libgnu/c++defs.h
 
 Include:
 
diff --git a/modules/snippet/warn-on-use b/modules/snippet/warn-on-use
--- a/modules/snippet/warn-on-use
+++ b/modules/snippet/warn-on-use
@@ -13,19 +13,19 @@ Depends-on:
 configure.ac:
 
 Makefile.am:
-BUILT_SOURCES += warn-on-use.h
+BUILT_SOURCES += libgnu/warn-on-use.h
 # The warn-on-use.h that gets inserted into generated .h files is the same as
 # build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
 # off.
-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
+libgnu/warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
        $(AM_V_GEN)rm -f $@-t $@ && \
        sed -n -e '/^.ifndef/,$$p' \
          < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
          > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+MOSTLYCLEANFILES += libgnu/warn-on-use.h libgnu/warn-on-use.h-t
 
-WARN_ON_USE_H=warn-on-use.h
+WARN_ON_USE_H=libgnu/warn-on-use.h
 
 Include:
 
diff --git a/modules/sockets b/modules/sockets
--- a/modules/sockets
+++ b/modules/sockets
@@ -17,7 +17,7 @@ configure.ac:
 AC_REQUIRE([gl_SOCKETS])
 
 Makefile.am:
-lib_SOURCES += sockets.h sockets.c
+lib_SOURCES += libgnu/sockets.h libgnu/sockets.c
 
 Include:
 "sockets.h"
diff --git a/modules/stdalign b/modules/stdalign
--- a/modules/stdalign
+++ b/modules/stdalign
@@ -16,17 +16,17 @@ BUILT_SOURCES += $(STDALIGN_H)
 # We need the following in order to create <stdalign.h> when the system
 # doesn't have one that works.
 if GL_GENERATE_STDALIGN_H
-stdalign.h: stdalign.in.h $(top_builddir)/config.status
+libgnu/stdalign.h: libgnu/stdalign.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         cat $(srcdir)/stdalign.in.h; \
+         cat $(srcdir)/libgnu/stdalign.in.h; \
        } > $@-t && \
        mv $@-t $@
 else
-stdalign.h: $(top_builddir)/config.status
+libgnu/stdalign.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += stdalign.h stdalign.h-t
+MOSTLYCLEANFILES += libgnu/stdalign.h libgnu/stdalign.h-t
 
 Include:
 <stdalign.h>
diff --git a/modules/stdbool b/modules/stdbool
--- a/modules/stdbool
+++ b/modules/stdbool
@@ -17,17 +17,17 @@ BUILT_SOURCES += $(STDBOOL_H)
 # We need the following in order to create <stdbool.h> when the system
 # doesn't have one that works.
 if GL_GENERATE_STDBOOL_H
-stdbool.h: stdbool.in.h $(top_builddir)/config.status
+libgnu/stdbool.h: libgnu/stdbool.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; 
\
+         sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < 
$(srcdir)/libgnu/stdbool.in.h; \
        } > $@-t && \
        mv $@-t $@
 else
-stdbool.h: $(top_builddir)/config.status
+libgnu/stdbool.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+MOSTLYCLEANFILES += libgnu/stdbool.h libgnu/stdbool.h-t
 
 Include:
 <stdbool.h>
diff --git a/modules/stddef b/modules/stddef
--- a/modules/stddef
+++ b/modules/stddef
@@ -18,7 +18,7 @@ BUILT_SOURCES += $(STDDEF_H)
 # We need the following in order to create <stddef.h> when the system
 # doesn't have one that works with the given compiler.
 if GL_GENERATE_STDDEF_H
-stddef.h: stddef.in.h $(top_builddir)/config.status
+libgnu/stddef.h: libgnu/stddef.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -29,14 +29,14 @@ stddef.h: stddef.in.h $(top_builddir)/co
              -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
              -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
              -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
-             < $(srcdir)/stddef.in.h; \
+             < $(srcdir)/libgnu/stddef.in.h; \
        } > $@-t && \
        mv $@-t $@
 else
-stddef.h: $(top_builddir)/config.status
+libgnu/stddef.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += stddef.h stddef.h-t
+MOSTLYCLEANFILES += libgnu/stddef.h libgnu/stddef.h-t
 
 Include:
 <stddef.h>
diff --git a/modules/stdint b/modules/stdint
--- a/modules/stdint
+++ b/modules/stdint
@@ -27,7 +27,7 @@ BUILT_SOURCES += $(STDINT_H)
 # We need the following in order to create <stdint.h> when the system
 # doesn't have one that works with the given compiler.
 if GL_GENERATE_STDINT_H
-stdint.h: stdint.in.h $(top_builddir)/config.status
+libgnu/stdint.h: libgnu/stdint.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -58,14 +58,14 @@ stdint.h: stdint.in.h $(top_builddir)/co
              -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
              -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
              -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
-             < $(srcdir)/stdint.in.h; \
+             < $(srcdir)/libgnu/stdint.in.h; \
        } > $@-t && \
        mv $@-t $@
 else
-stdint.h: $(top_builddir)/config.status
+libgnu/stdint.h: $(top_builddir)/config.status
        rm -f $@
 endif
-MOSTLYCLEANFILES += stdint.h stdint.h-t
+MOSTLYCLEANFILES += libgnu/stdint.h libgnu/stdint.h-t
 
 Include:
 <stdint.h>
diff --git a/modules/stdio b/modules/stdio
--- a/modules/stdio
+++ b/modules/stdio
@@ -19,11 +19,11 @@ configure.ac:
 gl_STDIO_H
 
 Makefile.am:
-BUILT_SOURCES += stdio.h
+BUILT_SOURCES += libgnu/stdio.h
 
 # We need the following in order to create <stdio.h> when the system
 # doesn't have one that works with the given compiler.
-stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
+libgnu/stdio.h: libgnu/stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -84,7 +84,7 @@ stdio.h: stdio.in.h $(top_builddir)/conf
              -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
              -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
              -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
-             < $(srcdir)/stdio.in.h | \
+             < $(srcdir)/libgnu/stdio.in.h | \
          sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
              -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
              -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
@@ -139,7 +139,7 @@ stdio.h: stdio.in.h $(top_builddir)/conf
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += stdio.h stdio.h-t
+MOSTLYCLEANFILES += libgnu/stdio.h libgnu/stdio.h-t
 
 Include:
 <stdio.h>
diff --git a/modules/stdlib b/modules/stdlib
--- a/modules/stdlib
+++ b/modules/stdlib
@@ -18,11 +18,11 @@ configure.ac:
 gl_STDLIB_H
 
 Makefile.am:
-BUILT_SOURCES += stdlib.h
+BUILT_SOURCES += libgnu/stdlib.h
 
 # We need the following in order to create <stdlib.h> when the system
 # doesn't have one that works with the given compiler.
-stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+libgnu/stdlib.h: libgnu/stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
\
   $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
@@ -64,7 +64,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
              -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
              -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
              -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
-             < $(srcdir)/stdlib.in.h | \
+             < $(srcdir)/libgnu/stdlib.in.h | \
          sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
              -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
              -e 
's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
@@ -116,7 +116,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+MOSTLYCLEANFILES += libgnu/stdlib.h libgnu/stdlib.h-t
 
 Include:
 <stdlib.h>
diff --git a/modules/strftime b/modules/strftime
--- a/modules/strftime
+++ b/modules/strftime
@@ -16,7 +16,7 @@ configure.ac:
 gl_FUNC_GNU_STRFTIME
 
 Makefile.am:
-lib_SOURCES += strftime.c
+lib_SOURCES += libgnu/strftime.c
 
 Include:
 "strftime.h"
diff --git a/modules/string b/modules/string
--- a/modules/string
+++ b/modules/string
@@ -18,11 +18,11 @@ configure.ac:
 gl_HEADER_STRING_H
 
 Makefile.am:
-BUILT_SOURCES += string.h
+BUILT_SOURCES += libgnu/string.h
 
 # We need the following in order to create <string.h> when the system
 # doesn't have one that works with the given compiler.
-string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
+libgnu/string.h: libgnu/string.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -67,7 +67,7 @@ string.h: string.in.h $(top_builddir)/co
              -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
              -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
              -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
-             < $(srcdir)/string.in.h | \
+             < $(srcdir)/libgnu/string.in.h | \
          sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
              -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
              -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
@@ -107,10 +107,10 @@ string.h: string.in.h $(top_builddir)/co
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
-             < $(srcdir)/string.in.h; \
+             < $(srcdir)/libgnu/string.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += string.h string.h-t
+MOSTLYCLEANFILES += libgnu/string.h libgnu/string.h-t
 
 Include:
 <string.h>
diff --git a/modules/strings b/modules/strings
--- a/modules/strings
+++ b/modules/strings
@@ -16,11 +16,11 @@ configure.ac:
 gl_HEADER_STRINGS_H
 
 Makefile.am:
-BUILT_SOURCES += strings.h
+BUILT_SOURCES += libgnu/strings.h
 
 # We need the following in order to create <strings.h> when the system
 # doesn't have one that works with the given compiler.
-strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H) $(ARG_NONNULL_H)
+libgnu/strings.h: libgnu/strings.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -36,10 +36,10 @@ strings.h: strings.in.h $(top_builddir)/
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/strings.in.h; \
+             < $(srcdir)/libgnu/strings.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += strings.h strings.h-t
+MOSTLYCLEANFILES += libgnu/strings.h libgnu/strings.h-t
 
 Include:
 <strings.h>
diff --git a/modules/strnlen1 b/modules/strnlen1
--- a/modules/strnlen1
+++ b/modules/strnlen1
@@ -11,7 +11,7 @@ memchr
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += strnlen1.h strnlen1.c
+lib_SOURCES += libgnu/strnlen1.h libgnu/strnlen1.c
 
 Include:
 "strnlen1.h"
diff --git a/modules/sys_resource b/modules/sys_resource
--- a/modules/sys_resource
+++ b/modules/sys_resource
@@ -17,12 +17,12 @@ gl_HEADER_SYS_RESOURCE
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/resource.h
+BUILT_SOURCES += libgnu/sys/resource.h
 
 # We need the following in order to create <sys/resource.h> when the system
 # doesn't have one.
-sys/resource.h: sys_resource.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/resource.h: libgnu/sys_resource.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -36,11 +36,11 @@ sys/resource.h: sys_resource.in.h $(top_
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/sys_resource.in.h; \
+             < $(srcdir)/libgnu/sys_resource.in.h; \
        } > $@-t && \
        mv -f $@-t $@
-MOSTLYCLEANFILES += sys/resource.h sys/resource.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += libgnu/sys/resource.h libgnu/sys/resource.h-t
+MOSTLYCLEANDIRS += libgnu/sys
 
 Include:
 <sys/resource.h>
diff --git a/modules/sys_select b/modules/sys_select
--- a/modules/sys_select
+++ b/modules/sys_select
@@ -18,12 +18,12 @@ gl_HEADER_SYS_SELECT
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/select.h
+BUILT_SOURCES += libgnu/sys/select.h
 
 # We need the following in order to create <sys/select.h> when the system
 # doesn't have one that works with the given compiler.
-sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H)
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/select.h: libgnu/sys_select.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -40,11 +40,11 @@ sys/select.h: sys_select.in.h $(top_buil
              -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/sys_select.in.h; \
+             < $(srcdir)/libgnu/sys_select.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += sys/select.h sys/select.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += libgnu/sys/select.h libgnu/sys/select.h-t
+MOSTLYCLEANDIRS += libgnu/sys
 
 Include:
 <sys/select.h>
diff --git a/modules/sys_socket b/modules/sys_socket
--- a/modules/sys_socket
+++ b/modules/sys_socket
@@ -24,13 +24,13 @@ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/socket.h
-lib_SOURCES += sys_socket.c
+BUILT_SOURCES += libgnu/sys/socket.h
+lib_SOURCES += libgnu/sys_socket.c
 
 # We need the following in order to create <sys/socket.h> when the system
 # doesn't have one that works with the given compiler.
-sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H) $(ARG_NONNULL_H)
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/socket.h: libgnu/sys_socket.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -64,11 +64,11 @@ sys/socket.h: sys_socket.in.h $(top_buil
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/sys_socket.in.h; \
+             < $(srcdir)/libgnu/sys_socket.in.h; \
        } > $@-t && \
        mv -f $@-t $@
-MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += libgnu/sys/socket.h libgnu/sys/socket.h-t
+MOSTLYCLEANDIRS += libgnu/sys
 
 Include:
 <sys/socket.h>
diff --git a/modules/sys_stat b/modules/sys_stat
--- a/modules/sys_stat
+++ b/modules/sys_stat
@@ -19,12 +19,12 @@ gl_HEADER_SYS_STAT_H
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/stat.h
+BUILT_SOURCES += libgnu/sys/stat.h
 
 # We need the following in order to create <sys/stat.h> when the system
 # has one that is incomplete.
-sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/stat.h: libgnu/sys_stat.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -69,11 +69,11 @@ sys/stat.h: sys_stat.in.h $(top_builddir
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/sys_stat.in.h; \
+             < $(srcdir)/libgnu/sys_stat.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += libgnu/sys/stat.h libgnu/sys/stat.h-t
+MOSTLYCLEANDIRS += libgnu/sys
 
 Include:
 <sys/stat.h>
diff --git a/modules/sys_time b/modules/sys_time
--- a/modules/sys_time
+++ b/modules/sys_time
@@ -17,12 +17,12 @@ gl_HEADER_SYS_TIME_H
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/time.h
+BUILT_SOURCES += libgnu/sys/time.h
 
 # We need the following in order to create <sys/time.h> when the system
 # doesn't have one that works with the given compiler.
-sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/time.h: libgnu/sys_time.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -40,10 +40,10 @@ sys/time.h: sys_time.in.h $(top_builddir
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/sys_time.in.h; \
+             < $(srcdir)/libgnu/sys_time.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += sys/time.h sys/time.h-t
+MOSTLYCLEANFILES += libgnu/sys/time.h libgnu/sys/time.h-t
 
 Include:
 <sys/time.h>
diff --git a/modules/sys_times b/modules/sys_times
--- a/modules/sys_times
+++ b/modules/sys_times
@@ -15,12 +15,12 @@ gl_SYS_TIMES_H
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/times.h
+BUILT_SOURCES += libgnu/sys/times.h
 
 # We need the following in order to create <sys/times.h> when the system
 # doesn't have one that works with the given compiler.
-sys/times.h: sys_times.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/times.h: libgnu/sys_times.in.h $(top_builddir)/config.status 
$(WARN_ON_USE_H) $(ARG_NONNULL_H)
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -34,11 +34,11 @@ sys/times.h: sys_times.in.h $(top_buildd
              -e 's|@''HAVE_TIMES''@|$(HAVE_TIMES)|g' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/sys_times.in.h; \
+             < $(srcdir)/libgnu/sys_times.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += sys/times.h sys/times.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += libgnu/sys/times.h libgnu/sys/times.h-t
+MOSTLYCLEANDIRS += libgnu/sys
 
 Include:
 <sys/times.h>
diff --git a/modules/sys_types b/modules/sys_types
--- a/modules/sys_types
+++ b/modules/sys_types
@@ -15,12 +15,12 @@ gl_SYS_TYPES_H
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/types.h
+BUILT_SOURCES += libgnu/sys/types.h
 
 # We need the following in order to create <sys/types.h> when the system
 # doesn't have one that works with the given compiler.
-sys/types.h: sys_types.in.h $(top_builddir)/config.status
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/types.h: libgnu/sys_types.in.h $(top_builddir)/config.status
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -29,10 +29,10 @@ sys/types.h: sys_types.in.h $(top_buildd
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
              -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
-             < $(srcdir)/sys_types.in.h; \
+             < $(srcdir)/libgnu/sys_types.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += sys/types.h sys/types.h-t
+MOSTLYCLEANFILES += libgnu/sys/types.h libgnu/sys/types.h-t
 
 Include:
 <sys/types.h>
diff --git a/modules/sys_uio b/modules/sys_uio
--- a/modules/sys_uio
+++ b/modules/sys_uio
@@ -15,12 +15,12 @@ gl_HEADER_SYS_UIO
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/uio.h
+BUILT_SOURCES += libgnu/sys/uio.h
 
 # We need the following in order to create <sys/uio.h> when the system
 # doesn't have one that works with the given compiler.
-sys/uio.h: sys_uio.in.h $(top_builddir)/config.status
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/uio.h: libgnu/sys_uio.in.h $(top_builddir)/config.status
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -29,11 +29,11 @@ sys/uio.h: sys_uio.in.h $(top_builddir)/
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \
              -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \
-             < $(srcdir)/sys_uio.in.h; \
+             < $(srcdir)/libgnu/sys_uio.in.h; \
        } > $@-t && \
        mv -f $@-t $@
-MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += libgnu/sys/uio.h libgnu/sys/uio.h-t
+MOSTLYCLEANDIRS += libgnu/sys
 
 Include:
 <sys/uio.h>
diff --git a/modules/sys_utsname b/modules/sys_utsname
--- a/modules/sys_utsname
+++ b/modules/sys_utsname
@@ -15,12 +15,12 @@ gl_SYS_UTSNAME_H
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/utsname.h
+BUILT_SOURCES += libgnu/sys/utsname.h
 
 # We need the following in order to create <sys/utsname.h> when the system
 # does not have one.
-sys/utsname.h: sys_utsname.in.h $(top_builddir)/config.status $(WARN_ON_USE_H) 
$(ARG_NONNULL_H)
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/utsname.h: libgnu/sys_utsname.in.h $(top_builddir)/config.status 
$(WARN_ON_USE_H) $(ARG_NONNULL_H)
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -34,11 +34,11 @@ sys/utsname.h: sys_utsname.in.h $(top_bu
              -e 's|@''HAVE_UNAME''@|$(HAVE_UNAME)|g' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/sys_utsname.in.h; \
+             < $(srcdir)/libgnu/sys_utsname.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += sys/utsname.h sys/utsname.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += libgnu/sys/utsname.h libgnu/sys/utsname.h-t
+MOSTLYCLEANDIRS += libgnu/sys
 
 Include:
 <sys/utsname.h>
diff --git a/modules/sys_wait b/modules/sys_wait
--- a/modules/sys_wait
+++ b/modules/sys_wait
@@ -15,12 +15,12 @@ gl_SYS_WAIT_H
 AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/wait.h
+BUILT_SOURCES += libgnu/sys/wait.h
 
 # We need the following in order to create <sys/wait.h> when the system
 # has one that is incomplete.
-sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H)
-       $(AM_V_at)$(MKDIR_P) sys
+libgnu/sys/wait.h: libgnu/sys_wait.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) libgnu/sys
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -31,11 +31,11 @@ sys/wait.h: sys_wait.in.h $(top_builddir
              -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/sys_wait.in.h; \
+             < $(srcdir)/libgnu/sys_wait.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += sys/wait.h sys/wait.h-t
-MOSTLYCLEANDIRS += sys
+MOSTLYCLEANFILES += libgnu/sys/wait.h libgnu/sys/wait.h-t
+MOSTLYCLEANDIRS += libgnu/sys
 
 Include:
 <sys/wait.h>
diff --git a/modules/tempname b/modules/tempname
--- a/modules/tempname
+++ b/modules/tempname
@@ -20,7 +20,7 @@ configure.ac:
 gl_FUNC_GEN_TEMPNAME
 
 Makefile.am:
-lib_SOURCES += tempname.c
+lib_SOURCES += libgnu/tempname.c
 
 Include:
 "tempname.h"
diff --git a/modules/threadlib b/modules/threadlib
--- a/modules/threadlib
+++ b/modules/threadlib
@@ -16,7 +16,7 @@ configure.ac:
 gl_THREADLIB
 
 Makefile.am:
-lib_SOURCES += glthread/threadlib.c
+lib_SOURCES += libgnu/glthread/threadlib.c
 
 Include:
 
diff --git a/modules/time b/modules/time
--- a/modules/time
+++ b/modules/time
@@ -18,11 +18,11 @@ configure.ac:
 gl_HEADER_TIME_H
 
 Makefile.am:
-BUILT_SOURCES += time.h
+BUILT_SOURCES += libgnu/time.h
 
 # We need the following in order to create <time.h> when the system
 # doesn't have one that works with the given compiler.
-time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) 
$(WARN_ON_USE_H)
+libgnu/time.h: libgnu/time.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -55,10 +55,10 @@ time.h: time.in.h $(top_builddir)/config
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/time.in.h; \
+             < $(srcdir)/libgnu/time.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += time.h time.h-t
+MOSTLYCLEANFILES += libgnu/time.h libgnu/time.h-t
 
 Include:
 <time.h>
diff --git a/modules/tls b/modules/tls
--- a/modules/tls
+++ b/modules/tls
@@ -13,7 +13,7 @@ configure.ac:
 gl_TLS
 
 Makefile.am:
-lib_SOURCES += glthread/tls.h glthread/tls.c
+lib_SOURCES += libgnu/glthread/tls.h libgnu/glthread/tls.c
 
 Include:
 "glthread/tls.h"
diff --git a/modules/tmpdir b/modules/tmpdir
--- a/modules/tmpdir
+++ b/modules/tmpdir
@@ -16,7 +16,7 @@ configure.ac:
 gt_TMPDIR
 
 Makefile.am:
-lib_SOURCES += tmpdir.h tmpdir.c
+lib_SOURCES += libgnu/tmpdir.h libgnu/tmpdir.c
 
 Include:
 "tmpdir.h"
diff --git a/modules/u64 b/modules/u64
--- a/modules/u64
+++ b/modules/u64
@@ -12,7 +12,7 @@ stdint
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += u64.c
+lib_SOURCES += libgnu/u64.c
 
 Include:
 "u64.h"
diff --git a/modules/unistd b/modules/unistd
--- a/modules/unistd
+++ b/modules/unistd
@@ -21,12 +21,12 @@ configure.ac:
 gl_UNISTD_H
 
 Makefile.am:
-BUILT_SOURCES += unistd.h
-lib_SOURCES += unistd.c
+BUILT_SOURCES += libgnu/unistd.h
+lib_SOURCES += libgnu/unistd.c
 
 # We need the following in order to create an empty placeholder for
 # <unistd.h> when the system doesn't have one.
-unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
+libgnu/unistd.h: libgnu/unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -85,7 +85,7 @@ unistd.h: unistd.in.h $(top_builddir)/co
              -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
              -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
              -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
-             < $(srcdir)/unistd.in.h | \
+             < $(srcdir)/libgnu/unistd.in.h | \
          sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
              -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
              -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
@@ -167,7 +167,7 @@ unistd.h: unistd.in.h $(top_builddir)/co
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += unistd.h unistd.h-t
+MOSTLYCLEANFILES += libgnu/unistd.h libgnu/unistd.h-t
 
 Include:
 <unistd.h>
diff --git a/modules/unistd-safer b/modules/unistd-safer
--- a/modules/unistd-safer
+++ b/modules/unistd-safer
@@ -17,7 +17,7 @@ configure.ac:
 gl_UNISTD_SAFER
 
 Makefile.am:
-lib_SOURCES += dup-safer.c fd-safer.c pipe-safer.c
+lib_SOURCES += libgnu/dup-safer.c libgnu/fd-safer.c libgnu/pipe-safer.c
 
 Include:
 "unistd-safer.h"
diff --git a/modules/wchar b/modules/wchar
--- a/modules/wchar
+++ b/modules/wchar
@@ -17,11 +17,11 @@ configure.ac:
 gl_WCHAR_H
 
 Makefile.am:
-BUILT_SOURCES += wchar.h
+BUILT_SOURCES += libgnu/wchar.h
 
 # We need the following in order to create <wchar.h> when the system
 # version does not work standalone.
-wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
+libgnu/wchar.h: libgnu/wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -70,7 +70,7 @@ wchar.h: wchar.in.h $(top_builddir)/conf
              -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
              -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
              -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
-             < $(srcdir)/wchar.in.h | \
+             < $(srcdir)/libgnu/wchar.in.h | \
          sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
              -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
              -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
@@ -130,7 +130,7 @@ wchar.h: wchar.in.h $(top_builddir)/conf
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += wchar.h wchar.h-t
+MOSTLYCLEANFILES += libgnu/wchar.h libgnu/wchar.h-t
 
 Include:
 <wchar.h>
diff --git a/modules/wctype-h b/modules/wctype-h
--- a/modules/wctype-h
+++ b/modules/wctype-h
@@ -17,12 +17,12 @@ configure.ac:
 gl_WCTYPE_H
 
 Makefile.am:
-BUILT_SOURCES += wctype.h
-lib_SOURCES += wctype-h.c
+BUILT_SOURCES += libgnu/wctype.h
+lib_SOURCES += libgnu/wctype-h.c
 
 # We need the following in order to create <wctype.h> when the system
 # doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H)
+libgnu/wctype.h: libgnu/wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
@@ -46,10 +46,10 @@ wctype.h: wctype.in.h $(top_builddir)/co
              -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             < $(srcdir)/wctype.in.h; \
+             < $(srcdir)/libgnu/wctype.in.h; \
        } > $@-t && \
        mv $@-t $@
-MOSTLYCLEANFILES += wctype.h wctype.h-t
+MOSTLYCLEANFILES += libgnu/wctype.h libgnu/wctype.h-t
 
 Include:
 <wctype.h>
diff --git a/modules/xalloc b/modules/xalloc
--- a/modules/xalloc
+++ b/modules/xalloc
@@ -15,7 +15,7 @@ configure.ac:
 gl_XALLOC
 
 Makefile.am:
-lib_SOURCES += xmalloc.c
+lib_SOURCES += libgnu/xmalloc.c
 
 Include:
 "xalloc.h"
diff --git a/modules/xalloc-die b/modules/xalloc-die
--- a/modules/xalloc-die
+++ b/modules/xalloc-die
@@ -13,7 +13,7 @@ exitfail
 configure.ac:
 
 Makefile.am:
-lib_SOURCES += xalloc-die.c
+lib_SOURCES += libgnu/xalloc-die.c
 
 Include:
 "xalloc.h"
diff --git a/modules/xgetcwd b/modules/xgetcwd
--- a/modules/xgetcwd
+++ b/modules/xgetcwd
@@ -15,7 +15,7 @@ configure.ac:
 gl_XGETCWD
 
 Makefile.am:
-lib_SOURCES += xgetcwd.c
+lib_SOURCES += libgnu/xgetcwd.c
 
 Include:
 "xgetcwd.h"
diff --git a/modules/xsize b/modules/xsize
--- a/modules/xsize
+++ b/modules/xsize
@@ -14,7 +14,7 @@ configure.ac:
 gl_XSIZE
 
 Makefile.am:
-lib_SOURCES += xsize.h xsize.c
+lib_SOURCES += libgnu/xsize.h libgnu/xsize.c
 
 Include:
 "xsize.h"
diff --git a/modules/xstrndup b/modules/xstrndup
--- a/modules/xstrndup
+++ b/modules/xstrndup
@@ -14,7 +14,7 @@ configure.ac:
 gl_XSTRNDUP
 
 Makefile.am:
-lib_SOURCES += xstrndup.h xstrndup.c
+lib_SOURCES += libgnu/xstrndup.h libgnu/xstrndup.c
 
 Include:
 "xstrndup.h"

Reply via email to