From d4c4a6350e465c145de74bb1ecf8099e77f006a4 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Wed, 6 Jan 2021 22:51:21 +0100 Subject: [PATCH] bootstrap: Fix parsing of package name. * build-aux/bootstrap (package): Attempt to use autoconf --trace to parse AC_INIT before falling back to sed expression. --- ChangeLog | 6 ++++++ build-aux/bootstrap | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0831c85e1..f3a43c826 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-01-06 Simon Josefsson + + bootstrap: Fix parsing of package name. + * build-aux/bootstrap (package): Attempt to use autoconf --trace + to parse AC_INIT before falling back to sed expression. + 2021-01-06 Bruno Haible logb: Fix test failure on glibc/powerpc. diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 7523f65b4..bb2410a45 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2020-11-18.17; # UTC +scriptversion=2021-01-06.21; # UTC # Bootstrap this package from checked-out sources. @@ -201,8 +201,11 @@ extract_package_name=' p } ' -package=$(sed -n "$extract_package_name" configure.ac) \ - || die 'cannot find package name in configure.ac' +package=$(${AUTOCONF:-autoconf} --trace AC_INIT:\$4 configure.ac 2>/dev/null) +if test -z "$package"; then + package=$(sed -n "$extract_package_name" configure.ac) \ + || die 'cannot find package name in configure.ac' +fi gnulib_name=lib$package build_aux=build-aux -- 2.20.1