autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix for autoscan


From: Pavel Roskin
Subject: Fix for autoscan
Date: Thu, 9 Nov 2000 18:10:45 -0500 (EST)

Hello!

Autoscan should try to make autoconf.scan that requires no upgrades. This
is mostly trivial stuff. More complicated changes will be done and sent
separately.

ChangeLog:
        * autoscan.pl (scan_files): Eliminate a warning if no C files
        are found.
        (output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES
        instead of old-style arguments for AC_INIT and AC_OUTPUT.

Regards,
Pavel Roskin

____________________
Index: autoscan.pl
--- autoscan.pl Mon Oct 16 14:25:56 2000
+++ autoscan.pl Thu Nov  9 17:40:51 2000
@@ -151,7 +151,9 @@
 # that might create nonportabilities.
 sub scan_files
 {
-  $initfile = $cfiles[0];              # Pick one at random.
+  if (defined $cfiles[0]) {
+    $initfile = $cfiles[0];            # Pick one at random.
+  }
 
   if ($verbose) {
     print "cfiles:", join(" ", @cfiles), "\n";
@@ -318,7 +320,10 @@
   local (%unique_makefiles);
 
   print CONF "# Process this file with autoconf to produce a configure 
script.\n";
-  print CONF "AC_INIT($initfile)\n";
+  print CONF "AC_INIT\n";
+  if (defined $initfile) {
+    print CONF "AC_CONFIG_SRCDIR([$initfile])\n";
+  }
 
   &output_programs;
   &output_headers;
@@ -330,7 +335,9 @@
     s/\.in$//;
     $unique_makefiles{$_}++;
   }
-  print CONF "\nAC_OUTPUT([", join("\n           ", keys(%unique_makefiles)), 
"])\n";
+  print CONF "\nAC_CONFIG_FILES([",
+    join("\n           ", keys(%unique_makefiles)), "])\n";
+  print CONF "AC_OUTPUT\n";
 
   close CONF;
 }
____________________





reply via email to

[Prev in Thread] Current Thread [Next in Thread]