summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/autogen.sh b/autogen.sh
index f5960e375005..2498c5a3313a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -112,14 +112,14 @@ my @cmdline_args = ();
my $input = "autogen.input";
my $lastrun = "autogen.lastrun";
-if (-f $input) {
- warn "Ignoring command-line arguments, using $input.\n" if (@ARGV);
- warn "Ignoring $lastrun, using $input.\n" if (-f $lastrun);
- @cmdline_args = read_args ($input);
-} elsif (-f $lastrun) {
- warn "Ignoring command-line arguments, using $lastrun.\n" if (@ARGV);
- print STDERR "Reading $lastrun. Please rename it to $input to avoid this message.\n";
- @cmdline_args = read_args ($lastrun);
+if (!@ARGV) {
+ if (-f $input) {
+ warn "Ignoring $lastrun, using $input.\n" if (-f $lastrun);
+ @cmdline_args = read_args ($input);
+ } elsif (-f $lastrun) {
+ print STDERR "Reading $lastrun. Please rename it to $input to avoid this message.\n";
+ @cmdline_args = read_args ($lastrun);
+ }
} else {
@cmdline_args = @ARGV;
}