aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-01-27 23:51:05 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2013-01-27 23:51:05 +0000
commitc68fcc48207a7b23393a9bc07f72570de8fcef86 (patch)
tree4603f3a5d17496a6a49e67e56999aa6801833578
parent045356f498df75c1d87a56512d655e6fc9f77558 (diff)
downloadusdx-c68fcc48207a7b23393a9bc07f72570de8fcef86.tar.gz
usdx-c68fcc48207a7b23393a9bc07f72570de8fcef86.tar.xz
usdx-c68fcc48207a7b23393a9bc07f72570de8fcef86.zip
add version number treatment for lua. The headers still need fixes for version 5.2
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2936 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--src/config-darwin.inc7
-rw-r--r--src/config.inc.in7
-rw-r--r--src/lib/Lua/ULua.pas22
3 files changed, 22 insertions, 14 deletions
diff --git a/src/config-darwin.inc b/src/config-darwin.inc
index 3d7aa374..345f0ed9 100644
--- a/src/config-darwin.inc
+++ b/src/config-darwin.inc
@@ -6,7 +6,12 @@
{* Libraries *}
{$IF Defined(IncludeConstants)}
- lua_lib_name = 'lua';
+ lua_lib_name = 'lua';
+ LUA_VERSION_INT = '5001004';
+ LUA_VERSION_RELEASE = '4';
+ LUA_VERSION_MINOR = '1';
+ LUA_VERSION_MAJOR = '5';
+ LUA_VERSION = '5.1.4';
{$IFEND}
{$DEFINE HaveFFmpeg}
diff --git a/src/config.inc.in b/src/config.inc.in
index a901a5fa..073b59b3 100644
--- a/src/config.inc.in
+++ b/src/config.inc.in
@@ -6,7 +6,12 @@
{* Libraries *}
{$IF Defined(IncludeConstants)}
- lua_lib_name = '@lua_LIB_NAME@';
+ lua_lib_name = '@lua_LIB_NAME@';
+ LUA_VERSION_INT = '@lua_VERSION_INT@';
+ LUA_VERSION_RELEASE = '@lua_VERSION_RELEASE@';
+ LUA_VERSION_MINOR = '@lua_VERSION_MINOR@';
+ LUA_VERSION_MAJOR = '@lua_VERSION_MAJOR@';
+ LUA_VERSION = '@lua_VERSION@';
{$IFEND}
{$@DEFINE_HAVE_FFMPEG@ HaveFFmpeg}
diff --git a/src/lib/Lua/ULua.pas b/src/lib/Lua/ULua.pas
index 1de48a3c..59161dde 100644
--- a/src/lib/Lua/ULua.pas
+++ b/src/lib/Lua/ULua.pas
@@ -1,7 +1,8 @@
unit ULua;
(*
- * A complete Pascal wrapper for Lua 5.1 DLL module.
+ * A complete Pascal wrapper for Lua DLL module.
+ * Version 5.1 or 5.2
*
* Created by Geo Massar, 2006
* Distributed as free/open source.
@@ -34,15 +35,12 @@ const
LuaDLL = 'lua5.1.dll';
{$ENDIF}
{$IFDEF UNIX}
-{$IFDEF DARWIN}
- LuaDLL = 'liblua.5.1.dylib';
- {$linklib liblua.5.1}
-{$ELSE}
- LuaDLL = lua_lib_name;
-{$ENDIF}
-{$ENDIF}
-{$IFDEF MACOS}
- SDLgfxLibName = 'lua5.1';
+ {$IFDEF DARWIN}
+ LuaDLL = 'liblua.dylib';
+ {$linklib liblua}
+ {$ELSE}
+ LuaDLL = lua_lib_name;
+ {$ENDIF}
{$ENDIF}
(* formats for Lua numbers *)
@@ -139,8 +137,8 @@ const
*)
const
- LUA_VERSION = 'Lua 5.1';
- LUA_VERSION_NUM = 501;
+ LUA_VERSION = 'Lua ' + LUA_VERSION_MAJOR + '.' + LUA_VERSION_MINOR;
+ LUA_VERSION_NUM = 100*(ord(LUA_VERSION_MAJOR) - ord('0')) + (ord(LUA_VERSION_MINOR) - ord('0'));
LUA_COPYRIGHT = 'Copyright (C) 1994-2006 Tecgraf, PUC-Rio';
LUA_AUTHORS = 'R. Ierusalimschy, L. H. de Figueiredo & W. Celes';