+#if defined(PCRE_STUDY_JIT_COMPILE) || defined(HAVE_PCRE2)
+#ifdef DISABLE_PCRE_JIT_COMPILATION
+#warning PCRE_STUDY_JIT_COMPILE is supported but Privoxy has been configured not to use it
+#else
+ if (!(flags & PCRS_DYNAMIC))
+ {
+#ifdef HAVE_PCRE2
+ /* Try to enable JIT compilation but continue if it's unsupported. */
+ if ((ret = pcre2_jit_compile(newjob->pattern, PCRE2_JIT_COMPLETE)) &&
+ (ret != PCRE2_ERROR_JIT_BADOPTION))
+ {
+ *errptr = ret;
+ pcrs_free_job(newjob);
+ return NULL;
+ }
+#else
+ pcre_study_options = PCRE_STUDY_JIT_COMPILE;
+#endif
+ }
+#endif