Skip to content

Commit d5fe32c

Browse files
committed
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.
1 parent f008ac7 commit d5fe32c

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

makefile

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -603,27 +603,22 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
603603
LIBEXT = $(LIBEXTSAVE)
604604
endif
605605
endif
606-
## RegEx: Prefer the PCRE library over PCRE2 for historical reasons. Only detect
607-
## and use PCRE2 if USE_PCRE2 is set as a command line variable or in the
608-
## environment.
609606
FALLBACK_PCRE=yes
610-
ifdef USE_PCRE2
611-
# Find the PCRE2 RegEx library
612-
ifneq (,$(call find_include,pcre2))
613-
PCRE2_LIB=pcre2-8
614-
ifneq (,$(call find_lib,${PCRE2_LIB}))
615-
OS_CCDEFS += -DHAVE_PCRE2_H
616-
OS_LDFLAGS += -l${PCRE2_LIB}
617-
$(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2))
618-
ifeq ($(LD_SEARCH_NEEDED),$(call need_search,${PCRE2_LIB}))
619-
OS_LDFLAGS += -L$(dir $(call find_lib,${{PCRE2_LIB}}))
620-
endif
621-
FALLBACK_PCRE=
607+
# Find the PCRE2 RegEx library
608+
ifneq (,$(call find_include,pcre2))
609+
PCRE2_LIB=pcre2-8
610+
ifneq (,$(call find_lib,${PCRE2_LIB}))
611+
OS_CCDEFS += -DHAVE_PCRE2_H
612+
OS_LDFLAGS += -l${PCRE2_LIB}
613+
$(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2))
614+
ifeq ($(LD_SEARCH_NEEDED),$(call need_search,${PCRE2_LIB}))
615+
OS_LDFLAGS += -L$(dir $(call find_lib,${PCRE2_LIB}))
622616
endif
617+
FALLBACK_PCRE=
623618
endif
624-
ifneq ($(FALLBACK_PCRE),)
625-
$(info *** Info *** PCRE2 not detected, falling back to PCRE)
626-
endif
619+
endif
620+
ifneq ($(FALLBACK_PCRE),)
621+
$(info *** Info *** PCRE2 not detected, falling back to PCRE)
627622
endif
628623
# Find PCRE RegEx library, either because we didn't want PCRE2 or we didn't
629624
# find PCRE2.

0 commit comments

Comments
 (0)