summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2014-11-13 16:27:30 +0000
committerMichael Meeks <michael.meeks@collabora.com>2014-11-13 16:29:46 +0000
commit1e03a686a386314be25520dc70e7be01d0f7193b (patch)
treeba7cb4e0e6467a6799dfd2c6a02a7eff379e6840 /autogen.sh
parent236819ecfa38360aa72d1061808b20204a0af594 (diff)
autogen: add --best-effort to help automation bridge option changes.
When we add or deprecate configure --with / --enable options lots of scripts can break. Instead just add --best-effort to your autogen.sh command line to get warnings but not a failure in this case. Change-Id: I73d6ba53ee179384c2e34bf6780d074b04f70c06
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh
index 1a1a2d452ed3..cdf4e768f939 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -161,6 +161,10 @@ die "Failed to generate the configure script" if (! -f "configure");
# Handle help arguments first, so we don't clobber autogen.lastrun
for my $arg (@ARGV) {
if ($arg =~ /^(--help|-h|-\?)$/) {
+ print STDERR "autogen.sh - libreoffice configuration helper\n";
+ print STDERR " --clean forcibly re-generate configuration\n";
+ print STDERR " --best-effort don't fail on un-known configure with/enable options\n";
+ print STDERR "\nOther arguments passed directly to configure:\n\n";
system ("./configure --help");
exit;
}
@@ -203,6 +207,8 @@ WARNING
my @args;
my $default_config = "$src_path/distro-configs/default.conf";
+my $option_checking = 'fatal';
+
if (-f $default_config) {
print STDERR "Reading default config file: $default_config.\n";
push @args, read_args ($default_config);
@@ -217,6 +223,8 @@ for my $arg (@cmdline_args) {
} else {
push @args, read_args ($config);
}
+ } elsif ($arg =~ m/--best-effort$/) {
+ $option_checking = 'warn';
} else {
push @args, $arg;
}
@@ -252,7 +260,7 @@ if (defined $ENV{NOCONFIGURE}) {
}
}
push @args, "--srcdir=$src_path";
- push @args, "--enable-option-checking=fatal";
+ push @args, "--enable-option-checking=$option_checking";
print "Running ./configure with '" . join ("' '", @args), "'\n";
system ("./configure", @args) && die "Error running configure";