1
1
mirror of https://github.com/tstack/lnav.git synced 2024-09-11 13:05:51 +03:00

[pcre2] don't add PRCE2_HOME to the search path if it is empty

This used to add -L/lib to LDFLAGS which was not an issue unless
you are cross compiling and then it may detect PCRE features based
on the host PCRE not the target one.
This commit is contained in:
AJ Bagwell 2022-11-29 11:07:32 +00:00
parent 9034bc2c76
commit c431ba904c

View File

@ -140,8 +140,10 @@ then
# If both library and header were found, action-if-found
#
m4_ifblank([$2],[
CPPFLAGS="$CPPFLAGS -I${PCRE2_HOME}/include"
LDFLAGS="$LDFLAGS -L${PCRE2_HOME}/lib"
if test -n "${PCRE2_HOME}"; then
CPPFLAGS="$CPPFLAGS -I${PCRE2_HOME}/include"
LDFLAGS="$LDFLAGS -L${PCRE2_HOME}/lib"
fi
LIBS="-lpcre2-8 $LIBS"
AC_DEFINE([HAVE_PCRE2], [1],
[Define to 1 if you have `PCRE2' library (-lpcre2-$1)])