version checking fix
diff --git a/ChangeLog b/ChangeLog
index 50d817a..3c364eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 
 	* Released 1.3.
 
+	* automake.in (handle_options): Correctly handle trailing alpha
+ 	version letter or lack thereof.  Test version3.test.
+
 	* automake.in (am_conf_line_warning): Perl 4 fixlet; typo fix.
 
 	* automake.in (handle_ltlibraries): Examine _DEPENDENCIES
diff --git a/automake.in b/automake.in
index 43ce91f..91289aa 100755
--- a/automake.in
+++ b/automake.in
@@ -668,12 +668,10 @@
 	    }
 	    elsif (/([0-9]+)\.([0-9]+)([a-z])?/)
 	    {
-		# Got a version number.  Note that alpha releases
-		# count as the next higher release.  Note also that we
-		# assume there will be a maximum of 100 minor releases
-		# for any given major release.
+		# Got a version number.
 
-		local ($rmajor, $rminor, $ralpha) = ($1, $2);
+		local ($rmajor, $rminor, $ralpha) = ($1, $2, $3);
+
 		if ($VERSION !~ /([0-9]+)\.([0-9]+)([a-z])?/)
 		{
 		    print STDERR
@@ -688,7 +686,7 @@
 		if ($rmajor > $tmajor
 		    || ($rmajor == $tmajor && $rminor > $tminor)
 		    || ($rminor == $tminor && $rminor == $tminor
-			&& $ralpha > $talpha))
+			&& $ralpha gt $talpha))
 		{
 		    &am_line_error ('AUTOMAKE_OPTIONS',
 				    "require version $_, only have $VERSION");
diff --git a/tests/ChangeLog b/tests/ChangeLog
index f49d630..20f280b 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,8 @@
 Sun Apr  5 15:26:42 1998  Tom Tromey  <tromey@cygnus.com>
 
+	* version3.test: Increased version number to ensure failure for a
+	long time to come.
+
 	* library.test: New file.
 
 	* lex2.test: Updated since lex error changed to warning.
diff --git a/tests/version3.test b/tests/version3.test
index 4d5476c..00fdcfb 100755
--- a/tests/version3.test
+++ b/tests/version3.test
@@ -5,7 +5,7 @@
 . $srcdir/defs || exit 1
 
 cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = 1.3x
+AUTOMAKE_OPTIONS = 9.9x
 END
 
 $AUTOMAKE && exit 1