]> git.sur5r.net Git - i3/i3/blobdiff - common.mk
Merge branch 'master' into next
[i3/i3] / common.mk
index ce41f287394af52d3400517ab19875dcda845f7f..b8ceea3bfc65475a72f9152db1c5c09e72999576 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -12,7 +12,6 @@ ifndef SYSCONFDIR
     SYSCONFDIR=$(PREFIX)/etc
   endif
 endif
-TERM_EMU=xterm
 # The escaping is absurd, but we need to escape for shell, sed, make, define
 GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch $(shell [ -f $(TOPDIR)/.git/HEAD ] && sed 's/ref: refs\/heads\/\(.*\)/\\\\\\"\1\\\\\\"/g' $(TOPDIR)/.git/HEAD || echo 'unknown'))"
 VERSION:=$(shell git describe --tags --abbrev=0)
@@ -49,10 +48,15 @@ CFLAGS += $(call cflags_for_lib, xcursor)
 CFLAGS += $(call cflags_for_lib, x11)
 CFLAGS += $(call cflags_for_lib, yajl)
 CFLAGS += $(call cflags_for_lib, libev)
+CFLAGS += $(call cflags_for_lib, libpcre)
 CPPFLAGS += -DI3_VERSION=\"${GIT_VERSION}\"
 CPPFLAGS += -DSYSCONFDIR=\"${SYSCONFDIR}\"
 CPPFLAGS += -DTERM_EMU=\"$(TERM_EMU)\"
 
+ifeq ($(shell pkg-config --atleast-version=8.10 libpcre && echo 1),1)
+CPPFLAGS += -DPCRE_HAS_UCP=1
+endif
+
 LIBS += -lm
 LIBS += $(call ldflags_for_lib, xcb-event, xcb-event)
 LIBS += $(call ldflags_for_lib, xcb-keysyms, xcb-keysyms)
@@ -70,6 +74,7 @@ LIBS += $(call ldflags_for_lib, xcursor, Xcursor)
 LIBS += $(call ldflags_for_lib, x11, X11)
 LIBS += $(call ldflags_for_lib, yajl, yajl)
 LIBS += $(call ldflags_for_lib, libev, ev)
+LIBS += $(call ldflags_for_lib, libpcre, pcre)
 
 # Please test if -Wl,--as-needed works on your platform and send me a patch.
 # it is known not to work on Darwin (Mac OS X)