summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@libreoffice.org>2013-10-17 15:01:45 +0200
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2013-11-13 18:17:35 +0000
commit6b114c2dbce8bbb5aa9ffd7fac581d942cfc2819 (patch)
tree72a5c5aba531cd6e70865a966878a8aa471082bc /autogen.sh
parent10515c6c6f2d7257b1e9f17b16f18a637dcbf5c8 (diff)
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>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh52
1 files changed, 26 insertions, 26 deletions
diff --git a/autogen.sh b/autogen.sh
index dc3a58d1fb2f..a2a967512785 100755
--- a/autogen.sh
+++ b/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 {