don't require /autoconf/ to be 2.68 (also allow e.g. autoconf268)

partially reverts 182f5a0f34 in the sense
that configure still insists on autoconf 2.68, but in a way that allows
to specify an already installed copy (that the libnumbertext build
already picked up successfully)

While there is autoconf268 package, it gets installed as autoconf268, but
aclocal doesn't provide a way to use something else than "autoconf"

In the spirit of "keeping it simple", no conditional check is done
whether libnumbertext is actually enabled or not.

Change-Id: Ice05a70ef56a4ed3428c74d15d6aeeaa54f71c0b
Reviewed-on: https://gerrit.libreoffice.org/67159
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
This commit is contained in:
Christian Lohmaier 2019-01-30 15:10:56 +01:00 committed by Thorsten Behrens
parent fb3c3216ba
commit 1919669008
2 changed files with 12 additions and 3 deletions

View file

@ -39,6 +39,7 @@ sub clean()
}
my $aclocal;
my $autoconf;
# check we have various vital tools
sub sanity_checks($)
@ -48,7 +49,7 @@ sub sanity_checks($)
my %required =
(
'pkg-config' => "pkg-config is required to be installed",
'autoconf' => "autoconf is required",
$autoconf => "autoconf is required",
$aclocal => "$aclocal is required",
);
@ -135,6 +136,9 @@ die "\$src_path must not contain spaces, but it is '$src_path'." if ($src_path =
# Alloc $ACLOCAL to specify which aclocal to use
$aclocal = $ENV{ACLOCAL} ? $ENV{ACLOCAL} : 'aclocal';
# Alloc $AUTOCONF to specify which autoconf to use
# (e.g. autoconf268 from a backports repo)
$autoconf = $ENV{AUTOCONF} ? $ENV{AUTOCONF} : 'autoconf';
my $system = `uname -s`;
chomp $system;
@ -191,7 +195,7 @@ if ($src_path ne $build_path)
}
system ("$aclocal $aclocal_flags") && die "Failed to run aclocal";
unlink ("configure");
system ("autoconf -I ${src_path}") && die "Failed to run autoconf";
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

View file

@ -11,7 +11,12 @@ dnl in order to create a configure script.
AC_INIT([LibreOffice],[6.3.0.0.alpha0+],[],[],[http://documentfoundation.org/])
AC_PREREQ([2.68])
dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed
dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
dnl so check for the version of autoconf that is actually used to create the configure script
AC_PREREQ([2.59])
m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.68]), -1,
[AC_MSG_ERROR([at least autoconf version 2.68 is needed (you can use AUTOCONF environment variable to point to a suitable one)])])
if test -n "$BUILD_TYPE"; then
AC_MSG_ERROR([You have sourced config_host.mk in this shell. This may lead to trouble, please run in a fresh (login) shell.])