On 2023-04-28 23:42, Jim Meyering wrote:
On Sat, Apr 22, 2023 at 6:08 PM Carlo Marcelo Arenas Belón
<care...@gmail.com> wrote:
Building against a different version of PCRE2 that the one that is provided
with the system is complicated by the fact that unlike what is advertised,
if a pkg-config module for libpcre2-8 is found, it will override the values
that were provided with PCRE_CFLAGS and PCRE_LIBS.

Thank you. Pushed.

I installed the attached minor fixup for that, to handle "./configure PCRE_CFLAGS= PCRE_LIBS=".
From c3259803fe255fb55f2cfcdf4cf5bd94ae3befdd Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sat, 29 Apr 2023 18:30:47 -0700
Subject: [PATCH] =?UTF-8?q?build:=20support=20explicit=20=E2=80=98PCRE=5FC?=
 =?UTF-8?q?FLAGS=3D=20PCRE=5FLIBS=3D=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* m4/pcre.m4 (gl_FUNC_PCRE): Check whether PCRE_CFLAGS and
PCRE_LIBS are set, not whether they are set to a nonempty value.
---
 m4/pcre.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/pcre.m4 b/m4/pcre.m4
index f4c71c7..4000782 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -22,7 +22,7 @@ AC_DEFUN([gl_FUNC_PCRE],
 
   if test $test_pcre != no; then
 
-    if test -z "$PCRE_CFLAGS" && test -z "$PCRE_LIBS"; then
+    if test -z "${PCRE_CFLAGS+set}" && test -z "${PCRE_LIBS+set}"; then
       PKG_CHECK_MODULES([PCRE], [libpcre2-8], [], [: ${PCRE_LIBS=-lpcre2-8}])
     fi
 
-- 
2.39.2

Reply via email to