Make code compatible with yajl 2.0 *and* 1.0

This commit is contained in:
Michael Stapelberg
2011-04-27 20:04:34 +02:00
parent b78b23de97
commit 7cc3dae079
3 changed files with 33 additions and 1 deletions

View File

@ -73,6 +73,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