[Libreoffice-commits] core.git: autogen.sh configure.ac

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 30 19:32:49 UTC 2019


 autogen.sh   |    8 ++++++--
 configure.ac |    7 ++++++-
 2 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 191966900865bd720f356941cb392abf3538df31
Author:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Wed Jan 30 15:10:56 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Jan 30 20:32:18 2019 +0100

    don't require /autoconf/ to be 2.68 (also allow e.g. autoconf268)
    
    partially reverts 182f5a0f34fa45d2f74ba22eda41d4e39dca93e5 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 at cib.de>
    Tested-by: Jenkins

diff --git a/autogen.sh b/autogen.sh
index 8c0bb0ade4ba..0ac16f1f9779 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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
diff --git a/configure.ac b/configure.ac
index 7ececcaeb282..7297c72a1db9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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.])


More information about the Libreoffice-commits mailing list