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 31da1eb0c1
commit 646fcc3dbc
3 changed files with 33 additions and 1 deletions

View File

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