From 24cd66782e57217df048bb1c38e8b69d90b844f2 Mon Sep 17 00:00:00 2001 From: "B. Scott Michel" Date: Thu, 3 Oct 2024 15:53:35 -0700 Subject: [PATCH] Makfile: PCRE2 default Remove the USE_PCRE2 makefile variable so that the makefile's configuration searches for PCRE2 and falls back to PCRE if not found. --- makefile | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/makefile b/makefile index 344deace..0cc0ea9a 100644 --- a/makefile +++ b/makefile @@ -611,27 +611,22 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) LIBEXT = $(LIBEXTSAVE) endif endif - ## RegEx: Prefer the PCRE library over PCRE2 for historical reasons. Only detect - ## and use PCRE2 if USE_PCRE2 is set as a command line variable or in the - ## environment. FALLBACK_PCRE=yes - ifdef USE_PCRE2 - # Find the PCRE2 RegEx library - ifneq (,$(call find_include,pcre2)) - PCRE2_LIB=pcre2-8 - ifneq (,$(call find_lib,${PCRE2_LIB})) - OS_CCDEFS += -DHAVE_PCRE2_H - OS_LDFLAGS += -l${PCRE2_LIB} - $(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2)) - ifeq ($(LD_SEARCH_NEEDED),$(call need_search,${PCRE2_LIB})) - OS_LDFLAGS += -L$(dir $(call find_lib,${{PCRE2_LIB}})) - endif - FALLBACK_PCRE= + # Find the PCRE2 RegEx library + ifneq (,$(call find_include,pcre2)) + PCRE2_LIB=pcre2-8 + ifneq (,$(call find_lib,${PCRE2_LIB})) + OS_CCDEFS += -DHAVE_PCRE2_H + OS_LDFLAGS += -l${PCRE2_LIB} + $(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2)) + ifeq ($(LD_SEARCH_NEEDED),$(call need_search,${PCRE2_LIB})) + OS_LDFLAGS += -L$(dir $(call find_lib,${{PCRE2_LIB}})) endif + FALLBACK_PCRE= endif - ifneq ($(FALLBACK_PCRE),) - $(info *** Info *** PCRE2 not detected, falling back to PCRE) - endif + endif + ifneq ($(FALLBACK_PCRE),) + $(info *** Info *** PCRE2 not detected, falling back to PCRE) endif # Find PCRE RegEx library, either because we didn't want PCRE2 or we didn't # find PCRE2.