From 1e03a686a386314be25520dc70e7be01d0f7193b Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 13 Nov 2014 16:27:30 +0000 Subject: [PATCH] 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 --- autogen.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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";