$(eval $(call find_lib,libuv,1.0,yes))
$(eval $(call find_lib,nettle,,yes))
$(eval $(call find_alt,lua,luajit))
+$(eval $(call find_luapkg,ltn12))
+$(eval $(call find_luapkg,ssl.https))
$(eval $(call find_lib,cmocka))
$(eval $(call find_bin,doxygen))
$(eval $(call find_bin,sphinx-build))
$(info [$(HAS_cmocka)] cmocka (tests/unit))
$(info [$(HAS_libsystemd)] systemd (daemon))
$(info [$(HAS_nettle)] nettle (modules/cookies))
+ $(info [$(HAS_ltn12)] Lua socket ltn12 (modules/trust_anchors))
+ $(info [$(HAS_ssl.https)] Lua ssl.https (modules/trust_anchors))
$(info )
# Verify required dependencies are met, as listed above
# integration tests
sudo dnf install cmake git python-dns python-jinja2
# optional features
- sudo dnf install golang hiredis-devel libmemcached-devel systemd-devel
+ sudo dnf install golang hiredis-devel libmemcached-devel lua-sec-compat lua-socket-compat systemd-devel
# docs
sudo dnf install doxygen python-breathe python-sphinx
HAS_$(1) := $(shell go list $(2) > /dev/null 2>&1 && echo yes || echo no)
endef
+# Find Lua package
+define find_luapkg
+ HAS_$(1) := $(shell luajit -l $(1) -e "os.exit(0)"> /dev/null 2>&1 && echo yes || echo no)
+endef
+
# Find Python package
define find_pythonpkg
HAS_$(1) := $(shell python -c "import $(1)" > /dev/null 2>&1 && echo yes || echo no)