Generate configure before calling ./configure --help
Change-Id: I21a88802b6ca617a44def3bc96789eb97969c918 Reviewed-on: https://gerrit.libreoffice.org/6291 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
This commit is contained in:
parent
10515c6c6f
commit
6b114c2dbc
1 changed files with 26 additions and 26 deletions
52
autogen.sh
52
autogen.sh
|
@ -101,6 +101,32 @@ sub invalid_distro($$)
|
|||
closedir ($dirh);
|
||||
}
|
||||
|
||||
# Alloc $ACLOCAL to specify which aclocal to use
|
||||
$aclocal = $ENV{ACLOCAL} ? $ENV{ACLOCAL} : 'aclocal';
|
||||
|
||||
my $system = `uname -s`;
|
||||
chomp $system;
|
||||
|
||||
sanity_checks ($system) unless($system eq 'Darwin');
|
||||
|
||||
my $aclocal_flags = $ENV{ACLOCAL_FLAGS};
|
||||
|
||||
$aclocal_flags .= " -I $src_path/m4";
|
||||
$aclocal_flags .= " -I $src_path/m4/mac" if ($system eq 'Darwin');
|
||||
$aclocal_flags .= " -I /opt/freeware/share/aclocal" if ($system eq 'AIX');
|
||||
|
||||
$ENV{AUTOMAKE_EXTRA_FLAGS} = '--warnings=no-portability' if (!($system eq 'Darwin'));
|
||||
|
||||
if ($src_path ne $build_path)
|
||||
{
|
||||
system ("ln -sf $src_path/configure.ac configure.ac");
|
||||
system ("ln -sf $src_path/g g");
|
||||
}
|
||||
system ("$aclocal $aclocal_flags") && die "Failed to run aclocal";
|
||||
unlink ("configure");
|
||||
system ("autoconf -I ${src_path}") && die "Failed to run autoconf";
|
||||
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|-\?)$/) {
|
||||
|
@ -152,32 +178,6 @@ for my $arg (@args) {
|
|||
}
|
||||
}
|
||||
|
||||
# Alloc $ACLOCAL to specify which aclocal to use
|
||||
$aclocal = $ENV{ACLOCAL} ? $ENV{ACLOCAL} : 'aclocal';
|
||||
|
||||
my $system = `uname -s`;
|
||||
chomp $system;
|
||||
|
||||
sanity_checks ($system) unless($system eq 'Darwin');
|
||||
|
||||
my $aclocal_flags = $ENV{ACLOCAL_FLAGS};
|
||||
|
||||
$aclocal_flags .= " -I $src_path/m4";
|
||||
$aclocal_flags .= " -I $src_path/m4/mac" if ($system eq 'Darwin');
|
||||
$aclocal_flags .= " -I /opt/freeware/share/aclocal" if ($system eq 'AIX');
|
||||
|
||||
$ENV{AUTOMAKE_EXTRA_FLAGS} = '--warnings=no-portability' if (!($system eq 'Darwin'));
|
||||
|
||||
if ($src_path ne $build_path)
|
||||
{
|
||||
system ("ln -sf $src_path/configure.ac configure.ac");
|
||||
system ("ln -sf $src_path/g g");
|
||||
}
|
||||
system ("$aclocal $aclocal_flags") && die "Failed to run aclocal";
|
||||
unlink ("configure");
|
||||
system ("autoconf -I ${src_path}") && die "Failed to run autoconf";
|
||||
die "Failed to generate the configure script" if (! -f "configure");
|
||||
|
||||
if (defined $ENV{NOCONFIGURE}) {
|
||||
print "Skipping configure process.";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue