Hi, I've hit several pcre2 related issues when building privoxy 4.0.0 on Solaris (where the header lives in a sub-directory). The configure script for pcre2/pcre2.h has the following issues:
pcre2/pcre2.h) is missing the PCRE2_CODE_UNIT_WIDTH define and hence always fails.HAVE_PCRE2 on success.Here is the patch for the necessary changes:
--- privoxy-4.0.0-stable/configure.in
+++ privoxy-4.0.0-stable/configure.in
@@ -887,8 +887,8 @@ AC_CHECK_LIB(pcre2-8, pcre2_compile_8, [
AC_EGREP_HEADER(pcre2_pattern_info, pcre2.h,[have_pcre2=yes; AC_DEFINE(HAVE_PCRE2)], [AC_MSG_WARN([[pcre2 old version installed]]); have_pcre2=no])
], [
AC_CHECK_HEADER(pcre2/pcre2.h, [
- AC_EGREP_HEADER(pcre2_pattern_info, pcre2/pcre2.h, [have_pcre2=yes; AC_DEFINE(PCRE2_H_IN_SUBDIR)], [AC_MSG_WARN([[pcre2 old version installed]]); have_pcre2=no])
- ], [have_pcre2=no])
+ AC_EGREP_HEADER(pcre2_pattern_info, pcre2/pcre2.h, [have_pcre2=yes; AC_DEFINE(HAVE_PCRE2) AC_DEFINE(PCRE2_H_IN_SUBDIR)], [AC_MSG_WARN([[pcre2 old version installed]]); have_pcre2=no])
+ ], [have_pcre2=no], [#define PCRE2_CODE_UNIT_WIDTH 8])
], [#define PCRE2_CODE_UNIT_WIDTH 8])
], [have_pcre2=no])
Additionally, pcrs.h doesn't support include from pcre2/pcre2.h (PCRE2_H_IN_SUBDIR is not checked like in project.h).
The patch is attached below.
Thanks for the report and patch.
Applied and pushed after changing configure.ac to configure.in.
Thanks!