Changeset

7767:36bf9ed87ae1

util.dependencies: Add check and info about lua-bitops (for mod_websockets)
author Kim Alvefur <zash@zash.se>
date Mon, 05 Dec 2016 21:46:06 +0100
parents 7766:5594d0caa5a8
children 7768:57d0f2d3d5c5 7770:f0024972489e
files util/dependencies.lua
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/dependencies.lua	Mon Dec 05 21:43:09 2016 +0100
+++ b/util/dependencies.lua	Mon Dec 05 21:46:06 2016 +0100
@@ -99,6 +99,16 @@
 			}, "SSL/TLS support will not be available");
 	end
 
+	local bit = _G.bit32 or softreq"bit";
+
+	if not bit then
+		missingdep("lua-bitops", {
+			["Debian/Ubuntu"] = "sudo apt-get install lua-bitop";
+			["luarocks"] = "luarocks install luabitop";
+			["Source"] = "http://bitop.luajit.org/";
+		}, "WebSocket support will not be available");
+	end
+
 	local encodings, err = softreq "util.encodings"
 	if not encodings then
 		if err:match("module '[^']*' not found") then
@@ -132,6 +142,7 @@
 		end
 		fatal = true;
 	end
+
 	return not fatal;
 end