aboutsummaryrefslogtreecommitdiff
path: root/install.bat
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-02-19 20:21:32 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-02-20 03:51:25 -0300
commit1ed80a15d215f5b924008f61f4a30da6139ca1bf (patch)
tree82995044c324a65bb5b5b512eecd557e60682e80 /install.bat
parentfaa7c7560645fde443ad022214c0bb1fbea6953f (diff)
downloadluarocks-1ed80a15d215f5b924008f61f4a30da6139ca1bf.tar.gz
luarocks-1ed80a15d215f5b924008f61f4a30da6139ca1bf.tar.bz2
luarocks-1ed80a15d215f5b924008f61f4a30da6139ca1bf.zip
fix: let runtime detection handle LUALIB filename
This should be more flexible than hardcoding a value that may become incorrect once people reconfigure their LuaRocks to point to another Lua distribution, especially on Windows. Fixes #905.
Diffstat (limited to 'install.bat')
-rw-r--r--install.bat3
1 files changed, 1 insertions, 2 deletions
diff --git a/install.bat b/install.bat
index e84f78cf..ba4a12fd 100644
--- a/install.bat
+++ b/install.bat
@@ -339,7 +339,7 @@ local function look_for_link_libraries(directory)
339 -- MinGW does not generate .lib, nor needs it to link, but MSVC does, 339 -- MinGW does not generate .lib, nor needs it to link, but MSVC does,
340 -- so .lib must be listed first to ensure they are found first if present, 340 -- so .lib must be listed first to ensure they are found first if present,
341 -- to prevent MSVC trying to link to a .dll, which won't work. 341 -- to prevent MSVC trying to link to a .dll, which won't work.
342 local names = {S"lua$LUA_VERSION.lib", S"lua$LUA_SHORTV.lib", S"lua$LUA_VERSION.dll", S"lua$LUA_SHORTV.dll", "liblua.dll.a"} 342 local names = {S"lua$LUA_VERSION.lib", S"lua$LUA_SHORTV.lib", S"liblua$LUA_SHORTV.a", S"lua$LUA_VERSION.dll", S"lua$LUA_SHORTV.dll", "liblua.dll.a"}
343 local directories 343 local directories
344 if vars.LUA_LIBDIR then 344 if vars.LUA_LIBDIR then
345 directories = {vars.LUA_LIBDIR} 345 directories = {vars.LUA_LIBDIR}
@@ -1151,7 +1151,6 @@ if USE_MINGW and vars.LUA_RUNTIME == "MSVCRT" then
1151else 1151else
1152 f:write(" MSVCRT = '"..vars.LUA_RUNTIME.."',\n") 1152 f:write(" MSVCRT = '"..vars.LUA_RUNTIME.."',\n")
1153end 1153end
1154f:write(S" LUALIB = '$LUA_LIBNAME',\n")
1155if USE_MINGW then 1154if USE_MINGW then
1156 f:write(S[[ 1155 f:write(S[[
1157 CC = $MINGW_CC, 1156 CC = $MINGW_CC,