diff options
author | portix <portix@gmx.net> | 2013-06-10 21:30:49 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2013-06-10 21:30:49 +0200 |
commit | bc126c86392a618f437a7ebac53590873409dc10 (patch) | |
tree | 4c7a5c3bca8ce29550af8f30c28be47d64d68182 | |
parent | e7cdaaeb06374d1b9eb04842340d62f73a9b4be1 (diff) | |
parent | 273474986c16f98aa5ffde0393a68b2637d7531c (diff) | |
download | dwb-bc126c86392a618f437a7ebac53590873409dc10.zip |
Merged in radhermit/dwb/json-c (pull request #1)
Fix compile with >=json-c-0.11
-rw-r--r-- | config.mk | 12 | ||||
-rw-r--r-- | src/util/Makefile | 2 |
2 files changed, 12 insertions, 2 deletions
@@ -107,8 +107,18 @@ else $(error Cannot find $(GNUTLS)) endif +# >=json-c-0.11 renamed its library, pc file, and include dir +# first check for >=0.11, if it doesn't exist check for <0.11 +ifeq ($(shell pkg-config --exists json-c && echo 1), 1) +JSONC=json-c +else ifeq ($(shell pkg-config --exists json && echo 1), 1) -LIBS+=$(GNUTLS) +JSONC=json +endif +endif + +ifdef JSONC +LIBS+=$(JSONC) else $(error Cannot find json-c) endif diff --git a/src/util/Makefile b/src/util/Makefile index bfa7ac2a..fc74323c 100644 --- a/src/util/Makefile +++ b/src/util/Makefile @@ -14,7 +14,7 @@ HSTS_PRELOAD=$(BASE_DIR)/$(SRCDIR)/hsts_preload.h TRANSPORT_SECURITY_JSON=transport_security_state_static.json TRANSPORT_SECURITY_CERTS=transport_security_state_static.certs -LIBS=glib-2.0 gnutls json +LIBS=glib-2.0 gnutls $(JSONC) CFLAGS+=$(shell pkg-config --cflags $(LIBS)) LDFLAGS=$(shell pkg-config --libs $(LIBS)) |