Make code compatible with yajl 2.0 *and* 1.0

This commit is contained in:
Michael Stapelberg
2011-04-27 19:52:53 +02:00
parent 28b9ed6eb3
commit 528f486eee
5 changed files with 100 additions and 7 deletions

View File

@ -80,6 +80,10 @@ ifeq ($(UNAME),FreeBSD)
LDFLAGS += -liconv
endif
# Fallback for libyajl 1 which did not include yajl_version.h. We need
# YAJL_MAJOR from that file to decide which code path should be used.
CFLAGS += -idirafter yajl-fallback
ifneq (,$(filter Linux GNU GNU/%, $(UNAME)))
CFLAGS += -D_GNU_SOURCE
endif