Mercurial > prosody-hg
comparison util/dependencies.lua @ 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 | 5594d0caa5a8 |
| children | 57d0f2d3d5c5 b1f80447a2b1 |
comparison
equal
deleted
inserted
replaced
| 7766:5594d0caa5a8 | 7767:36bf9ed87ae1 |
|---|---|
| 97 ["luarocks"] = "luarocks install luasec"; | 97 ["luarocks"] = "luarocks install luasec"; |
| 98 ["Source"] = "https://github.com/brunoos/luasec"; | 98 ["Source"] = "https://github.com/brunoos/luasec"; |
| 99 }, "SSL/TLS support will not be available"); | 99 }, "SSL/TLS support will not be available"); |
| 100 end | 100 end |
| 101 | 101 |
| 102 local bit = _G.bit32 or softreq"bit"; | |
| 103 | |
| 104 if not bit then | |
| 105 missingdep("lua-bitops", { | |
| 106 ["Debian/Ubuntu"] = "sudo apt-get install lua-bitop"; | |
| 107 ["luarocks"] = "luarocks install luabitop"; | |
| 108 ["Source"] = "http://bitop.luajit.org/"; | |
| 109 }, "WebSocket support will not be available"); | |
| 110 end | |
| 111 | |
| 102 local encodings, err = softreq "util.encodings" | 112 local encodings, err = softreq "util.encodings" |
| 103 if not encodings then | 113 if not encodings then |
| 104 if err:match("module '[^']*' not found") then | 114 if err:match("module '[^']*' not found") then |
| 105 missingdep("util.encodings", { ["Windows"] = "Make sure you have encodings.dll from the Prosody distribution in util/"; | 115 missingdep("util.encodings", { ["Windows"] = "Make sure you have encodings.dll from the Prosody distribution in util/"; |
| 106 ["GNU/Linux"] = "Run './configure' and 'make' in the Prosody source directory to build util/encodings.so"; | 116 ["GNU/Linux"] = "Run './configure' and 'make' in the Prosody source directory to build util/encodings.so"; |
| 130 print(err) | 140 print(err) |
| 131 print "***********************************" | 141 print "***********************************" |
| 132 end | 142 end |
| 133 fatal = true; | 143 fatal = true; |
| 134 end | 144 end |
| 145 | |
| 135 return not fatal; | 146 return not fatal; |
| 136 end | 147 end |
| 137 | 148 |
| 138 local function log_warnings() | 149 local function log_warnings() |
| 139 if _VERSION > "Lua 5.2" then | 150 if _VERSION > "Lua 5.2" then |
