I applied this, which fixed it: From: Ben Pfaff <b...@cs.stanford.edu> Date: Sun, 3 Jan 2021 16:08:09 -0800 Subject: [PATCH] configure: Ensure the version always has 3 parts in PSPP_CHECK_XGETTEXT.
Makes configure succeed on Debian for me, where "xgettext --version" prints 0.21 as the version. --- acinclude.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index 750a87efb1..c657b46e1f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -362,6 +362,10 @@ AC_DEFUN([PSPP_CHECK_XGETTEXT], [pspp_cv_progrecent_xgettext], [pspp_cv_progrecent_xgettext=maybe ver=`$ac_cv_prog_XGETTEXT --version | sed -n -e '/xgettext/s/[[^0-9]]*\([[0-9\.]][[0-9\.]]*\).*/\1/p'` + case $ver in # ( + *.*.*) ;; # ( + *.*) ver="$ver.0" ;; + esac majmin=`echo $ver | sed -e 's/\.[[0-9]]*$//'` major=`echo $majmin | sed -e 's/\.[[0-9]]*$//'` minor=`echo $majmin | sed -e 's/^[[0-9]]*\.//'` -- 2.29.2 On Sun, Jan 3, 2021 at 4:02 PM Ben Pfaff <b...@cs.stanford.edu> wrote: > > It didn't make any difference for me. On my system, with Debian's > gettext 0.21-3, xgettext --version prints: > > xgettext (GNU gettext-tools) 0.21 > Copyright (C) 1995-2020 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Written by Ulrich Drepper. > > Writing a short shell script based on what appears in configure, I get: > > ac_cv_prog_XGETTEXT=xgettext > ver=`$ac_cv_prog_XGETTEXT --version | sed -n -e '/xgettext/s/[^0-9]*\([0-9\ > .][0-9\.]*\).*/\1/p'` > majmin=`echo $ver | sed -e 's/\.[0-9]*$//'` > major=`echo $majmin | sed -e 's/\.[0-9]*$//'` > minor=`echo $majmin | sed -e 's/^[0-9]*\.//'` > echo "ver=$ver majmin=$majmin major=$major minor=$minor" > > which prints: > > ver=0.21 majmin=0 major=0 minor=0 > > After majmin strips the .21 off, there are no dots left for major or > minor to strip anything else off, so of course major and minor both > end up 0. > > On Sat, Jan 2, 2021 at 11:23 PM John Darrington > <j...@darrington.wattle.id.au> wrote: > > > > That is strange. It works for me. I will rewrite it using > > sed calls instead of parameter expansion and see if that's > > any better for people. > > > > J' > > > > On Sat, Jan 02, 2021 at 03:22:55PM -0800, Ben Pfaff wrote: > > There's something wrong with the new version check. It doesn't work on > > my system. > > > > When I apply the following: > > > > diff --git a/acinclude.m4 b/acinclude.m4 > > index 14f746effa..c9a3334772 100644 > > --- a/acinclude.m4 > > +++ b/acinclude.m4 > > @@ -360,10 +360,13 @@ AC_DEFUN([PSPP_CHECK_XGETTEXT], > > [AC_CACHE_CHECK([whether gettext is sufficiently recent], > > [pspp_cv_progrecent_xgettext], > > [pspp_cv_progrecent_xgettext=maybe > > + echo "$ac_cv_prog_XGETTEXT --version" > > ver=`$ac_cv_prog_XGETTEXT --version | sed -n -e > > '/xgettext/s/[[^0-9]]*\([[0-9\.]][[0-9\.]]*\).*/\1/p'` > > + echo "ver=$ver" > > major=${ver%%.[[0-9]][[0-9]]*} > > majmin=${ver%.[[0-9]][[0-9]]*} > > minor=${majmin##[0-9]*.} > > + echo "major=$major majmin=$majmin minor=$minor" > > if test "$major" -lt 0; then > > pspp_cv_progrecent_xgettext=no; > > elif test "$minor" -lt 20; then > > > > I get this output from configure (and then it fails): > > > > checking whether gettext is sufficiently recent... xgettext --version > > ver=0.21 > > major=0 majmin=0 minor=0 > > > > I'm using Debian testing. > > > > On Sat, Jan 2, 2021 at 5:57 AM John Darrington > > <j...@darrington.wattle.id.au> wrote: > > > > > > So far as I can make out from the information there, it stopped > > working > > > with this commit: > > > > > > > > > commit 210739b77d0f943b5073375fe39d1f09723adb2c (HEAD -> master, > > savannah/master) > > > Author: John Darrington <j...@darrington.wattle.id.au> > > > Date: Sat Jan 2 10:57:23 2021 +0100 > > > > > > Recent gettext to version 0.20 or later > > > > > > > > > I'm suprised that Debian sid, and Debian testing stopped working, > > because > > > as recently discussed both those distributions contain recent > > gettext versions. > > > > > > Can you perhaps look into the situation to find out what is going > > wrong? > > > > > > > > > J' > > > > > > > > > > > > > > > 41;344;0cOn Sat, Jan 02, 2021 at 01:22:12PM +0100, Friedrich > > Beckmann wrote: > > > the latest commits result in failing builds: > > > > > > http://caeis.etech.fh-augsburg.de:8010/#/ > > > > > > Fritz > > >