rls: Makefile - link agaist libicu on macos/darwin
authorDaniel-Constantin Mierla <miconda@gmail.com>
Sat, 22 Jun 2019 08:58:18 +0000 (10:58 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Sat, 22 Jun 2019 14:39:46 +0000 (16:39 +0200)
- libxml2 needs it but its pkg-config doesn't list it

src/modules/rls/Makefile

index 33ed9f4..b62be93 100644 (file)
@@ -10,6 +10,12 @@ NAME=rls.so
 
 ifeq ($(CROSS_COMPILE),)
 XML2CFG=$(shell which xml2-config)
+ifeq ($(OS), darwin)
+ICU_BUILDER = $(shell \
+       if pkg-config --exists icu-uc; then \
+               echo 'pkg-config icu-uc'; \
+       fi)
+endif
 endif
 
 ifneq ($(XML2CFG),)
@@ -21,6 +27,11 @@ else
        LIBS+=-L$(LOCALBASE)/lib -lxml2
 endif
 
+ifneq ($(ICU_BUILDER),)
+       DEFS += $(shell $(ICU_BUILDER) --cflags )
+       LIBS += $(shell $(ICU_BUILDER) --libs)
+endif
+
 DEFS+=
 
 SERLIBPATH=../../lib