1
0
mirror of https://github.com/open-simh/simh.git synced 2026-05-22 21:49:21 +00:00

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.
This commit is contained in:
B. Scott Michel
2024-10-03 15:53:35 -07:00
committed by Paul Koning
parent 59c55062f0
commit 24cd66782e

View File

@@ -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.