summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMarek Vavrusa <marek@vavrusa.com>2016-08-09 22:54:26 +0200
committerOndřej Surý <ondrej@sury.org>2016-08-11 14:06:45 +0200
commit8a8e91e0893e99becf80be1f2844814bb90aaa7e (patch)
tree9415f879f455a58abc0cd3d99638e72dfe8d37b0 /Makefile
parentFixed a possible memory leak. (diff)
downloadknot-resolver-8a8e91e0893e99becf80be1f2844814bb90aaa7e.tar.xz
knot-resolver-8a8e91e0893e99becf80be1f2844814bb90aaa7e.zip
build: fixed build with libknot<2.3 without cookies
the cookies require libknot>=2.3, Makefile didn't check for that, and turning cookies off wasn't possible either
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6179612a..ce157d25 100644
--- a/Makefile
+++ b/Makefile
@@ -65,8 +65,11 @@ endif
BUILD_CFLAGS += $(libknot_CFLAGS) $(libuv_CFLAGS) $(nettle_CFLAGS) $(cmocka_CFLAGS) $(lua_CFLAGS) $(libdnssec_CFLAGS) $(libsystemd_CFLAGS)
BUILD_CFLAGS += $(addprefix -I,$(wildcard contrib/ccan/*) contrib/murmurhash3)
-ifeq ($(HAS_nettle),yes)
+# Check if it has libknot 2.3.0 and nettle to support DNS cookies
+$(eval $(call find_alt,knot230,libknot,2.3))
+ifeq ($(HAS_nettle)|$(HAS_knot230),yes|yes)
BUILD_CFLAGS += -DENABLE_COOKIES
+ENABLE_COOKIES := yes
endif
# Overview