# libpcre
PCRE_CFLAGS := $(call cflags_for_lib, libpcre)
-ifeq ($(shell $(PKG_CONFIG) --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1)
-I3_CPPFLAGS += -DPCRE_HAS_UCP=1
+ifneq ($(shell $(PKG_CONFIG) --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1)
+$(error "libpcre >= 8.10 not found")
endif
PCRE_LIBS := $(call ldflags_for_lib, libpcre,pcre)
pkg-config,
libev-dev (>= 1:4.04),
libyajl-dev (>= 2.0.4),
- libpcre3-dev,
+ libpcre3-dev (>= 1:8.10),
libstartup-notification0-dev (>= 0.10),
libcairo2-dev,
libpango1.0-dev,
struct regex *re = scalloc(1, sizeof(struct regex));
re->pattern = sstrdup(pattern);
int options = PCRE_UTF8;
-#ifdef PCRE_HAS_UCP
/* We use PCRE_UCP so that \B, \b, \D, \d, \S, \s, \W, \w and some POSIX
* character classes play nicely with Unicode */
options |= PCRE_UCP;
-#endif
while (!(re->regex = pcre_compile2(pattern, options, &errorcode, &error, &offset, NULL))) {
/* If the error is that PCRE was not compiled with UTF-8 support we
* disable it and try again */