/[autoconf]/autoconf/lib/Autom4te/General.pm
ViewVC logotype

Diff of /autoconf/lib/Autom4te/General.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by akim, Sat Nov 3 12:01:36 2001 UTC revision 1.19 by akim, Mon Jan 21 13:00:52 2002 UTC
# Line 275  sub getopt (%) Line 275  sub getopt (%)
275    # If fixed some day, use this: '' => sub { push @ARGV, "-" }    # If fixed some day, use this: '' => sub { push @ARGV, "-" }
276    my $stdin = grep /^-$/, @ARGV;    my $stdin = grep /^-$/, @ARGV;
277    @ARGV = grep !/^-$/, @ARGV;    @ARGV = grep !/^-$/, @ARGV;
278    %option = (%option,    %option = ("h|help"     => sub { print $help; exit 0 },
              "h|help"     => sub { print $help; exit 0 },  
279               "V|version"  => sub { print $version; exit 0 },               "V|version"  => sub { print $version; exit 0 },
280    
281               "v|verbose"    => \$verbose,               "v|verbose"    => \$verbose,
282               "d|debug"      => \$debug,               "d|debug"      => \$debug,
283               'f|force'      => \$force,               'f|force'      => \$force,
284              );  
285    Getopt::Long::Configure ("bundling");               # User options last, so that they have precedence.
286                 %option);
287      Getopt::Long::Configure ("bundling", "pass_through");
288    GetOptions (%option)    GetOptions (%option)
289      or exit 1;      or exit 1;
290    
291      foreach (grep { /^-./ } @ARGV)
292        {
293          print STDERR "$0: unrecognized option `$_'\n";
294          print STDERR "Try `$0 --help' for more information.\n";
295          exit (1);
296        }
297    
298    push @ARGV, '-'    push @ARGV, '-'
299      if $stdin;      if $stdin;
300  }  }

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26