From 893a84738606a8ac588ba1e9d4145cbbcbfff811 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Wed, 2 Jul 2025 12:03:53 +0200
Subject: [PATCH] Fix autoreconf with gettext 0.25

This fixes the following error that appeared when running autoreconf
after updating to gettext 0.25:

	configure.ac:76: error: possibly undefined macro: AM_ICONV
	      If this token and others are legitimate, please use m4_pattern_allow.
	      See the Autoconf documentation.
	autoreconf: error: /nix/store/dvpiwvz7an7icljfscdi76h11c03cma4-autoconf-2.72/bin/autoconf failed with exit status: 1

The version of gettext given in AM_GNU_GETTEXT_VERSION() is picked
quite arbitrarily based on what's likely to be available in distros,
since gettext itself is not actually used here, just some supporting
stuff from it.

Link: https://github.com/dosfstools/dosfstools/pull/218
---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index efb8fb5..2cecab1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,8 +15,11 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_INIT([dosfstools], [4.2])
+AC_CONFIG_MACRO_DIRS([m4])
 AC_SUBST([RELEASE_DATE], [2021-01-31])
 AM_INIT_AUTOMAKE([1.11 foreign subdir-objects parallel-tests])
+AM_GNU_GETTEXT_VERSION([0.20])
+AM_GNU_GETTEXT([external])
 
 AC_ARG_ENABLE([compat-symlinks],
 	[AS_HELP_STRING([--enable-compat-symlinks],
-- 
2.49.0

