--- automake1.9-nonfree-1.9.6.orig/m4/gcj.m4
+++ automake1.9-nonfree-1.9.6/m4/gcj.m4
@@ -8,7 +8,7 @@
 # with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([AM_PROG_GCJ],[
-AC_CHECK_PROGS(GCJ, gcj, gcj)
+AC_CHECK_PROGS(GCJ, [gcj gcj-3.2 gcj-3.1 gcj-3.0 gcj-2.95], gcj)
 test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
 if test "x${GCJFLAGS-unset}" = xunset; then
    GCJFLAGS="-g -O2"
--- automake1.9-nonfree-1.9.6.orig/tests/txinfo13.test
+++ automake1.9-nonfree-1.9.6/tests/txinfo13.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,8 +18,9 @@
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Check for subdir Texinfo.
-# PR/343
+# Check for subdir Texinfo (PR/343)
+# Also make sure we do not distribute too much foo.info* files (Report
+# from Vincent Lefevre)
 
 required='makeinfo tex texi2dvi-o'
 . ./defs || exit 1
@@ -34,6 +35,8 @@
 
 installcheck-local:
 	test -f $(infodir)/main.info
+check-local:
+	test ! -f $(srcdir)/subdir/main.info.bak
 END
 
 mkdir subdir
@@ -53,6 +56,7 @@
 I'm included.
 END
 
+touch subdir/main.info.bak
 
 $ACLOCAL
 $AUTOMAKE --add-missing
@@ -64,3 +68,4 @@
 $MAKE distcheck
 test -f ../subdir/main.info
 test ! -f subdir/main.info
+test -f ../subdir/main.info.bak
--- automake1.9-nonfree-1.9.6.orig/automake.in
+++ automake1.9-nonfree-1.9.6/automake.in
@@ -2752,7 +2752,7 @@
 	  next if $outfile;
 
 	  $outfile = $1;
-	  if ($outfile =~ /\.(.+)$/ && $1 ne 'info')
+	  if ($outfile =~ /\.([^.]+)$/ && $1 ne 'info')
 	    {
 	      error ("$filename:$.",
 		     "output `$outfile' has unrecognized extension");
--- automake1.9-nonfree-1.9.6.orig/doc/automake.texi
+++ automake1.9-nonfree-1.9.6/doc/automake.texi
@@ -1,7 +1,7 @@
 \input texinfo   @c -*-texinfo-*-
 @c %**start of header
-@setfilename automake.info
-@settitle automake
+@setfilename automake-1.9.info
+@settitle automake-1.9
 @setchapternewpage off
 @c %**end of header
 
@@ -34,12 +34,12 @@
 
 @dircategory Software development
 @direntry
-* automake: (automake).         Making Makefile.in's.
+* automake-1.9: (automake-1.9).         Making Makefile.in's.
 @end direntry
 
 @dircategory Individual utilities
 @direntry
-* aclocal: (automake)Invoking aclocal.          Generating aclocal.m4.
+* aclocal-1.9: (automake-1.9)Invoking aclocal.          Generating aclocal.m4.
 @end direntry
 
 @titlepage
--- automake1.9-nonfree-1.9.6.orig/lib/am/texinfos.am
+++ automake1.9-nonfree-1.9.6/lib/am/texinfos.am
@@ -1,7 +1,7 @@
 ## automake - create Makefile.in from Makefile.am
 
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-## 2003, 2004, 2005 Free Software Foundation, Inc.
+## 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -238,11 +238,14 @@
 	    $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
 	  esac; \
 	  if test -f $$base; then d=.; else d=$(srcdir); fi; \
-	  for file in $$d/$$base*; do \
+	  base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
+	  for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
+	    if test -f $$file; then \
 ## Strip leading '$$d/'.
-	    relfile=`expr "$$file" : "$$d/\(.*\)"`; \
-	    test -f $(distdir)/$$relfile || \
-	      cp -p $$file $(distdir)/$$relfile; \
+	      relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+	      test -f $(distdir)/$$relfile || \
+		cp -p $$file $(distdir)/$$relfile; \
+	    else :; fi; \
 	  done; \
 	done
 endif %?LOCAL-TEXIS%
