base64: fix off-by-one buffer size bug
[gnulib.git] / gnulib-tool
index 37073ed..3356326 100755 (executable)
@@ -3341,20 +3341,25 @@ func_emit_lib_Makefile_am ()
       fi
     fi
   done
+  if test -n "$witness_c_macro"; then
+    cppflags_part1=" -D$witness_c_macro=1"
+  else
+    cppflags_part1=
+  fi
+  if $for_test; then
+    cppflags_part2=" -DGNULIB_STRICT_CHECKING=1"
+  else
+    cppflags_part2=
+  fi
   if test -z "$makefile_name"; then
     echo
-    if $for_test; then
-      cppflags_part1=" -DGNULIB_STRICT_CHECKING=1"
-    else
-      cppflags_part1=
-    fi
-    if test -n "$witness_c_macro"; then
-      cppflags_part2=" -D$witness_c_macro=1"
-    else
-      cppflags_part2=
-    fi
     echo "AM_CPPFLAGS =$cppflags_part1$cppflags_part2"
     echo "AM_CFLAGS ="
+  else
+    if test -n "$cppflags_part1$cppflags_part2"; then
+      echo
+      echo "AM_CPPFLAGS +=$cppflags_part1$cppflags_part2"
+    fi
   fi
   echo
   if LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *+\{0,1\}= *$libname\\.$libext\$" "$tmp"/allsnippets > /dev/null \
@@ -5121,7 +5126,7 @@ s,//*$,/,'
     echo "  m4_pattern_allow([^gl_ES\$])dnl a valid locale name"
     echo "  m4_pattern_allow([^gl_LIBOBJS\$])dnl a variable"
     echo "  m4_pattern_allow([^gl_LTLIBOBJS\$])dnl a variable"
-    echo "  AC_REQUIRE([AC_PROG_RANLIB])"
+    echo "  AC_REQUIRE([gl_PROG_AR_RANLIB])"
     if test -n "$uses_subdirs"; then
       echo "  AC_REQUIRE([AM_PROG_CC_C_O])"
     fi
@@ -5730,7 +5735,7 @@ func_create_testdir ()
        echo "AC_PROG_CC"
        echo "AC_PROG_INSTALL"
        echo "AC_PROG_MAKE_SET"
-       echo "AC_PROG_RANLIB"
+       echo "gl_PROG_AR_RANLIB"
        echo
        if test -n "$uses_subdirs"; then
          echo "AM_PROG_CC_C_O"
@@ -5845,7 +5850,7 @@ func_create_testdir ()
    echo "m4_pattern_allow([^gl_LIBOBJS\$])dnl a variable"
    echo "m4_pattern_allow([^gl_LTLIBOBJS\$])dnl a variable"
    echo
-   echo "AC_PROG_RANLIB"
+   echo "gl_PROG_AR_RANLIB"
    echo
    if test -n "$any_uses_subdirs"; then
      echo "AM_PROG_CC_C_O"