]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Let autoreconf pass warning flags to new-enough aclocal.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 20 Jul 2010 05:35:01 +0000 (07:35 +0200)
committerEric Blake <eblake@redhat.com>
Tue, 20 Jul 2010 13:15:59 +0000 (07:15 -0600)
* bin/autoreconf.in ($aclocal_supports_warnings)
($automake_supports_warnings): New globals.
(parse_args): Set and use them.  Be sure to invoke `aclocal
--help' and `automake --help' just once each.
* NEWS: Update.
Prompted by report from Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
NEWS
bin/autoreconf.in

index 76e77c3597c507f065650d7c6cae3e4494e29b09..1228e9be40d42c9a939e2616fa97e3b9d25269c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-07-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Let autoreconf pass warning flags to new-enough aclocal.
+       * bin/autoreconf.in ($aclocal_supports_warnings)
+       ($automake_supports_warnings): New globals.
+       (parse_args): Set and use them.  Be sure to invoke `aclocal
+       --help' and `automake --help' just once each.
+       * NEWS: Update.
+       Prompted by report from Bruno Haible.
+
        Fix parsing of empty variable settings on the command line.
        * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Work around
        expr bug returning 0 instead of the empty string.
diff --git a/NEWS b/NEWS
index a8683c624cefe3b6e68e359bc366584d19819292..a1ce55831a061849ac2b32c8e70ab8d68d22b499 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,8 @@ GNU Autoconf NEWS - User visible changes.
    in other contexts, e.g., for Automake, and may be subject to
    further restrictions in the future.  Regression introduced in 2.66.
 
+** autoreconf passes warning flags to new enough versions of aclocal.
+
 
 * Major changes in Autoconf 2.66 (2010-07-02) [stable]
   Released by Eric Blake, based on git versions 2.65.*.
index 0fc3bb8fefe748dc4cc65fc6aa85ef4d8b8dcd47..e22f7b63349935ad12b32906554b73a541525407 100644 (file)
@@ -122,8 +122,12 @@ my $install = 0;
 my $symlink = 0;
 # Does aclocal support --force?
 my $aclocal_supports_force = 0;
+# Does aclocal support -Wfoo?
+my $aclocal_supports_warnings = 0;
 # Does automake support --force-missing?
 my $automake_supports_force_missing = 0;
+# Does automake support -Wfoo?
+my $automake_supports_warnings = 0;
 
 my @prepend_include;
 my @include;
@@ -182,8 +186,12 @@ sub parse_args ()
        }
     }
 
-  $aclocal_supports_force = `$aclocal --help 2>/dev/null` =~ /--force/;
-  $automake_supports_force_missing = `$automake --help 2>/dev/null` =~ /--force-missing/;
+  my $aclocal_help = `$aclocal --help 2>/dev/null`;
+  my $automake_help = `$automake --help 2>/dev/null`;
+  $aclocal_supports_force = $aclocal_help =~ /--force/;
+  $aclocal_supports_warnings = $aclocal_help =~ /--warnings/;
+  $automake_supports_force_missing = $automake_help =~ /--force-missing/;
+  $automake_supports_warnings = $automake_help =~ /--warnings/;
 
   # Dispatch autoreconf's option to the tools.
   # --include;
@@ -242,7 +250,9 @@ sub parse_args ()
       $autoconf   .= $warn;
       $autoheader .= $warn;
       $automake   .= $warn
-       if `$automake --help` =~ /--warnings/;
+       if $automake_supports_warnings;
+      $aclocal    .= $warn
+        if $aclocal_supports_warnings;
     }
 }