Hi,

During my many experiments with "make dist" and "make distcheck", I noticed
that './configure' produces an error message:

$ ./configure
...
checking for ELF binary format... yes
checking for the common suffixes of directories in the library search path... 
lib,lib,lib64
../../../../tp/Texinfo/XS/configure: line 8794: gt_INTL_MACOSX: command not 
found
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
...

The cause is that in the tp/Texinfo/XS/gnulib/m4/ directory, gettext.m4
is present but intlmacosx.m4 is not.

The fix to the problem is
  1) To apply the attached patch. Both the main configure.ac and
     tp/Texinfo/XS/configure.ac use the same po/ directory. Since the version
     of the gettext.m4 and related files must be in sync with the Makefile.in.in
     in the po/ directory, we have the constraint that the gettext 
infrastructure
     of both directories must be of the same version.
  2) In the tp/Texinfo/XS/ directory, run the command
       autopoint -f; rm -rf po
     and revert the changes of gnulib/m4/*.m4 files that downgrade from a newer
     serial number (from gnulib) to an older serial number (from gettext).
     You need to do this manually, because the autogen.sh does not do it.
     Unfortunately, there is an overlap between files brought in by autopoint
     and gnulib, and while it is OK to use newer versions (from gnulib) instead
     of older versions (from gettext), a downgrade is not recommended.
  3) Commit the file tp/Texinfo/XS/gnulib/m4/intlmacosx.m4 under version 
control,
     like the gettext.m4 file in the same directory.

Bruno

>From e738aab3f63588f4ec8be6aaa469fdca6ce29d99 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Tue, 6 Aug 2024 09:35:22 +0200
Subject: [PATCH] build: Prepare for use of autopoint.

* configure.ac: Add comments about use of autopoint.
* tp/Texinfo/XS/configure.ac: Specify the same GNU gettext version as the
top-level configure.ac. Add comments about use of autopoint.
---
 configure.ac               |  6 +++++-
 tp/Texinfo/XS/configure.ac | 10 ++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 1543971d2b..21bb4cd96d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -384,8 +384,12 @@ AC_ARG_WITH([external-Text-Unidecode],
 AC_SUBST([USE_UNICODE])
 AC_SUBST([USE_EXTERNAL_UNIDECODE])
 
-# i18n support.  To update to a new version of gettext, run:
+# i18n support.  To upgrade to a new version of gettext, run:
 #   gettextize -f --po-dir=po --po-dir=po_document
+# To fetch the *.m4 files without upgrading, run:
+#   autopoint -f
+# and revert the changes of gnulib/m4/*.m4 files that downgrade from a newer
+# serial number (from gnulib) to an older serial number (from gettext).
 # See http://gnu.org/s/gnulib/manual/html_node/gettextize-and-autopoint.html.
 AM_GNU_GETTEXT_VERSION([0.21])
 AM_GNU_GETTEXT([external])
diff --git a/tp/Texinfo/XS/configure.ac b/tp/Texinfo/XS/configure.ac
index f9fffdc463..480d514243 100644
--- a/tp/Texinfo/XS/configure.ac
+++ b/tp/Texinfo/XS/configure.ac
@@ -133,7 +133,17 @@ AC_PROG_CC
 
 gl_EARLY
 
+# i18n support.  Use the same GNU gettext version as the main configure.ac file.
+# To upgrade to a new version of gettext, run:
+#   gettextize -f --po-dir=../../../po --no-changelog
+# To fetch the *.m4 files without upgrading, run:
+#   autopoint -f; rm -rf po
+# and revert the changes of gnulib/m4/*.m4 files that downgrade from a newer
+# serial number (from gnulib) to an older serial number (from gettext).
+# See http://gnu.org/s/gnulib/manual/html_node/gettextize-and-autopoint.html.
+AM_GNU_GETTEXT_VERSION([0.21])
 AM_GNU_GETTEXT([external])
+
 AM_MISSING_PROG([XSUBPP], [xsubpp])
 AM_MISSING_PROG([GAWK], [gawk])
 
-- 
2.34.1

Reply via email to