Skip to content

Commit

Permalink
Makfile: PCRE2 default
Browse files Browse the repository at this point in the history
Remove the USE_PCRE2 makefile variable so that the makefile's
configuration searches for PCRE2 and falls back to PCRE if not found.
  • Loading branch information
bscottm committed Oct 4, 2024
1 parent f008ac7 commit d5fe32c
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -603,27 +603,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.
Expand Down

0 comments on commit d5fe32c

Please sign in to comment.