From 2722bdbc025fe7c9f9a47c0210386ba18ce2398f Mon Sep 17 00:00:00 2001
From: Aki Tuomi <aki.tuomi@open-xchange.com>
Date: Wed, 8 Jan 2025 16:13:08 +0200
Subject: [PATCH] Makefile: Fix modifying tests based on mail UTF-8 feature in
 core

---
 Makefile.am  | 6 +++---
 configure.ac | 2 --
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 53a4d1028..9f2d3d209 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -193,10 +193,10 @@ test_cases = \
 
 prepare_test_cases:
 	$(AM_V_at)for case in $(test_utf8_cases); do \
-		if test @HAVE_MAIL_UTF8@ = 1; then \
-		  $(SED) -s -e 's/#UTF8#.*//' $${case}.in > $$case ; \
-		else \
+		if test $(DOVECOT_HAVE_MAIL_UTF8) = yes; then \
 		  $(SED) -s -e 's/#UTF8#//' $${case}.in > $$case ; \
+		else \
+		  $(SED) -s -e 's/#UTF8#.*//' $${case}.in > $$case ; \
 		fi; \
 	done
 
diff --git a/configure.ac b/configure.ac
index d406e635c..ba24a322e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,8 +49,6 @@ AC_SUBST(BINARY_CFLAGS)
 AC_SUBST(BINARY_LDFLAGS)
 AC_SUBST(LIBDOVECOT_INCLUDE)
 
-DC_HAVE_MAIL_UTF8
-
 AC_SUBST(PIGEONHOLE_ASSET_VERSION, regexp(AC_PACKAGE_VERSION, [^\([0-9]+\)\.\([0-9]+\).\([0-9]+\)], [\1.\2.\3]))
 AS_IF([test $PIGEONHOLE_ASSET_VERSION = "0.0.0"], [
    AC_SUBST([PIGEONHOLE_ASSET_VERSION], "main")
-- 
GitLab