config.h.in
changeset 148 b222f4d111d9
parent 147 66a63c9609de
child 151 5d90caa7fb2c
--- a/config.h.in	Sat Nov 07 22:36:02 2015 +0200
+++ b/config.h.in	Sat Mar 05 18:34:07 2016 +0200
@@ -1,5 +1,5 @@
 
-/* Copyright 2009-2012 Myhailo Danylenko
+/* Copyright 2009-2016 Myhailo Danylenko
 
 This file is part of mcabber-lua.
 
@@ -24,9 +24,6 @@
 // define this to enable debugging output
 #cmakedefine DEBUG
 
-// define this if you are building with lua 5.2
-#cmakedefine HAVE_LUA52
-
 // define this if you want lua to create alias to '/lua' at module loading
 #cmakedefine ENABLE_LUA_ALIAS
 
@@ -39,6 +36,9 @@
 // indicates, whether mcabber have built-in carbons completion
 #cmakedefine HAVE_COMPL_CARBONS
 
+// name of module description struct
+#define MODULE_STRUCT info_${LUA_MODULENAME}
+
 // size of background pipe reading buffer
 #define MLUA_BGREAD_BUFFER   ( ${ML_BGREAD_BUFFER} )
 
@@ -51,10 +51,12 @@
 #define OPT_MLUA_RC       "${OPT_MLUA_RC}"
 #define OPT_MLUA_LM_DEBUG "${OPT_MLUA_LM_DEBUG}"
 
-#ifndef HAVE_LUA52
+// define if module is building againts lua 5.1
+#cmakedefine LUA51_COMPATIBILITY
+
+#ifdef LUA51_COMPATIBILITY
 #  define lua_rawlen lua_objlen
 #  define luaL_setfuncs(STATE, REGTABLE, IGZERO) luaL_register ( STATE, NULL, REGTABLE )
-#  define info_lua52 info_lua51
 #endif
 
 #ifdef DEBUG