Skip to content

Commit

Permalink
MAKEFILE: Move PCRE2 library path search earlier
Browse files Browse the repository at this point in the history
Don't put "-L" linker options after the "-l" library. Move the search
for libpcre2-8 before "-lpcre2-8" is added to OS_LDFLAGS.
  • Loading branch information
bscottm committed Nov 21, 2024
1 parent 770626d commit f02e082
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,14 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
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}}))
PCRE2_LIBPATH = $(dir $(call find_lib,${PCRE2_LIB}))
ifneq (,${PCRE2_LIBPATH})
OS_LDFLAGS += -L${PCRE2_LIBPATH}
endif
endif
OS_LDFLAGS += -l${PCRE2_LIB}
$(info using libpcre2-8: $(call find_lib,${PCRE2_LIB}) $(call find_include,pcre2))
FALLBACK_PCRE=
endif
endif
Expand Down

0 comments on commit f02e082

Please sign in to comment.