From 24b3f138b027a23b553f4baec4d907a52b6c8cd5 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Thu, 4 Sep 2025 08:46:06 +0300 Subject: [PATCH] m4: Fix how pcre2_substitute_callout_block is checked The old way was very wrong --- m4/want_pcre.m4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/m4/want_pcre.m4 b/m4/want_pcre.m4 index f013aaad82..692a673177 100644 --- a/m4/want_pcre.m4 +++ b/m4/want_pcre.m4 @@ -14,7 +14,12 @@ AC_DEFUN([DOVECOT_WANT_PCRE], [ AS_IF([test "$have_pcre" != "no"], [ old_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $LIBPCRE_CFLAGS" - AC_CHECK_FUNCS([pcre2_substitute_callout_block]) + AC_CHECK_DECL([pcre2_substitute_callout_block], + AC_DEFINE(HAVE_PCRE2_SUBSTITUTE_CALLOUT_BLOCK,, + [Define if you have pcre2_substitute_callout_block]),, + [[#define PCRE2_CODE_UNIT_WIDTH 0]] + [[#include ]] + ) CFLAGS="$old_CFLAGS" AC_DEFINE(HAVE_LIBPCRE,, [Define if you have libpcre2 backed regular expressions]) ]) -- 2.47.3