From 8c95ba82813fab1777d920544c179d1a2c10156a Mon Sep 17 00:00:00 2001
From: Ting-Wei Lan <lantw@src.gnome.org>
Date: Wed, 24 Jul 2019 16:54:35 +0800
Subject: [PATCH] =?UTF-8?q?build:=20Allow=20building=20with=20gettext=20?=
 =?UTF-8?q?=E2=89=A5=200.20?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The use of AM_GNU_GETTEXT_VERSION in configure.ac instructs autopoint to
copy po/Makefile.in.in from the exact gettext version. It is fine if the
version of gettext installed on the system has the same minor version
number with the requested version, but it fails if you have a newer
version of gettext because of the mismatch between autoconf macros and
Makefile.in.in.

  *** error: gettext infrastructure mismatch: using a Makefile.in.in
  from gettext version 0.19 but the autoconf macros are from gettext
  version 0.20

Instead of specifying the exact version with AM_GNU_GETTEXT_VERSION, we
can use AM_GNU_GETTEXT_REQUIRE_VERSION to ask autopoint to simply use
the gettext version installed on the system to prevent the mismatch.

This also bumps the version requirement on gettext to 0.19.6 because
AM_GNU_GETTEXT_REQUIRE_VERSION was added in this version.
---
 configure.ac | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index beb5ee1..7b3972f 100644
--- configure.ac
+++ configure.ac
@@ -37,7 +37,9 @@ AM_PROG_LIBTOOL
 # ****
 # i18n
 # ****
-AM_GNU_GETTEXT_VERSION([0.19.4])
+# FIXME: Remove AM_GNU_GETTEXT_VERSION once autoreconf supports REQUIRE_VERSION
+AM_GNU_GETTEXT_VERSION([0.19.6])
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
 AM_GNU_GETTEXT([external])
 
 GETTEXT_PACKAGE=libgnomekbd
-- 
2.26.2