From 10d995c2908e2c4a2e8faeb7bf92e9f38987c85a Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 15 Jan 2013 01:09:38 +0100 Subject: [PATCH] support for LuaJIT --- lib/wrappers/lua/lua.nim | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/lib/wrappers/lua/lua.nim b/lib/wrappers/lua/lua.nim index 000e099933..0346c42859 100755 --- a/lib/wrappers/lua/lua.nim +++ b/lib/wrappers/lua/lua.nim @@ -35,19 +35,32 @@ #** In french or in english # -when defined(MACOSX): - const - NAME* = "liblua(|5.2|5.1|5.0).dylib" - LIB_NAME* = "liblua(|5.2|5.1|5.0).dylib" -elif defined(UNIX): - const - NAME* = "liblua(|5.2|5.1|5.0).so(|.0)" - LIB_NAME* = "liblua(|5.2|5.1|5.0).so(|.0)" -else: - const - NAME* = "lua(|5.2|5.1|5.0).dll" - LIB_NAME* = "lua(|5.2|5.1|5.0).dll" - +when defined(useLuajit): + when defined(MACOSX): + const + NAME* = "libluajit.dylib" + LIB_NAME* = "libluajit.dylib" + elif defined(UNIX): + const + NAME* = "libluajit.so(|.0)" + LIB_NAME* = "libluajit.so(|.0)" + else: + const + NAME* = "luajit.dll" + LIB_NAME* = "luajit.dll" +else: + when defined(MACOSX): + const + NAME* = "liblua(|5.2|5.1|5.0).dylib" + LIB_NAME* = "liblua(|5.2|5.1|5.0).dylib" + elif defined(UNIX): + const + NAME* = "liblua(|5.2|5.1|5.0).so(|.0)" + LIB_NAME* = "liblua(|5.2|5.1|5.0).so(|.0)" + else: + const + NAME* = "lua(|5.2|5.1|5.0).dll" + LIB_NAME* = "lua(|5.2|5.1|5.0).dll" const VERSION* = "Lua 5.1"