diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/deps.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index 53798cd1..8403f127 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua | |||
| @@ -499,8 +499,10 @@ local function find_lua_incdir(prefix, luaver, luajitver) | |||
| 499 | end | 499 | end |
| 500 | 500 | ||
| 501 | function deps.check_lua(vars) | 501 | function deps.check_lua(vars) |
| 502 | local incdir_found = true | ||
| 502 | if (not vars.LUA_INCDIR) and vars.LUA_DIR then | 503 | if (not vars.LUA_INCDIR) and vars.LUA_DIR then |
| 503 | vars.LUA_INCDIR = find_lua_incdir(vars.LUA_DIR, cfg.lua_version, cfg.luajit_version) | 504 | vars.LUA_INCDIR = find_lua_incdir(vars.LUA_DIR, cfg.lua_version, cfg.luajit_version) |
| 505 | incdir_found = (vars.LUA_INCDIR ~= nil) | ||
| 504 | end | 506 | end |
| 505 | local shortv = cfg.lua_version:gsub("%.", "") | 507 | local shortv = cfg.lua_version:gsub("%.", "") |
| 506 | local libnames = { | 508 | local libnames = { |
| @@ -520,6 +522,9 @@ function deps.check_lua(vars) | |||
| 520 | return true | 522 | return true |
| 521 | end | 523 | end |
| 522 | end | 524 | end |
| 525 | if not incdir_found then | ||
| 526 | return nil, "Failed finding Lua header files. You may need to install them or configure LUA_INCDIR.", "dependency" | ||
| 527 | end | ||
| 523 | return nil, "Failed finding Lua library. You may need to configure LUA_LIBDIR.", "dependency" | 528 | return nil, "Failed finding Lua library. You may need to configure LUA_LIBDIR.", "dependency" |
| 524 | end | 529 | end |
| 525 | 530 | ||
