Blame SOURCES/autoconf-2.13-autoscan.patch

c1bc70
--- autoconf-2.13/autoscan.pl~	Tue Jul 10 19:00:10 2001
c1bc70
+++ autoconf-2.13/autoscan.pl	Tue Jul 10 19:00:10 2001
c1bc70
@@ -123,14 +123,33 @@
c1bc70
 # Called by &find on each file.
c1bc70
 sub wanted
c1bc70
 {
c1bc70
-    if (/^.*\.[chlymC]$/ || /^.*\.cc$/) {
c1bc70
-	$name =~ s?^\./??; push(@cfiles, $name);
c1bc70
-    }
c1bc70
-    elsif (/^[Mm]akefile$/ || /^[Mm]akefile\.in$/ || /^GNUmakefile$/) {
c1bc70
-	$name =~ s?^\./??; push(@makefiles, $name);
c1bc70
-    }
c1bc70
-    elsif (/^.*\.sh$/) {
c1bc70
-	$name =~ s?^\./??; push(@shfiles, $name);
c1bc70
+  # Wanted only if there is no corresponding FILE.in.
c1bc70
+  return
c1bc70
+    if -f "$_.in";
c1bc70
+
c1bc70
+  # Strip a useless leading `./'.
c1bc70
+  $name =~ s,^\./,,;
c1bc70
+
c1bc70
+  if (/^.*\.[chlymC](\.in)?$/)
c1bc70
+    {
c1bc70
+      push (@cfiles, $name);
c1bc70
+      $programs{cc}++;
c1bc70
+    }
c1bc70
+  elsif (/^.*\.(cc|cpp|cxx|CC|C|hh|hpp|hxx|HH|H|yy|ypp|ll|lpp)(\.in)?$/)
c1bc70
+    {
c1bc70
+      push (@cfiles, $name);
c1bc70
+      $programs{CC}++;
c1bc70
+    }
c1bc70
+  elsif (/^[Mm]akefile(\.in)?$/ || /^GNUmakefile$/)
c1bc70
+    {
c1bc70
+      # Wanted only if there is no corresponding Makefile.in.
c1bc70
+      # Using Find, $_ contains the current filename with the current
c1bc70
+      # directory of the walk through.
c1bc70
+      push (@makefiles, $name);
c1bc70
+    }
c1bc70
+  elsif (/^.*\.sh(\.in)?$/)
c1bc70
+    {
c1bc70
+      push (@shfiles, $name);
c1bc70
     }
c1bc70
 }
c1bc70
 
c1bc70
@@ -244,7 +263,7 @@
c1bc70
 	    $libraries{$1}++;
c1bc70
 	}
c1bc70
 	# Tokens in the code.
c1bc70
-	while (s/\W([a-zA-Z_]\w*)\W/ /) {
c1bc70
+	while (s/\W([a-zA-Z_][\w\+\.-]*)\W/ /) {
c1bc70
 	    $programs{$1}++;
c1bc70
 	}
c1bc70
     }