--- a/config.h.in Tue Nov 27 12:12:57 2012 +0200
+++ b/config.h.in Wed Nov 28 04:27:33 2012 +0200
@@ -1,5 +1,5 @@
-/* Copyright 2009 Myhailo Danylenko
+/* Copyright 2009-2012 Myhailo Danylenko
This file is part of mcabber-lua.
@@ -24,6 +24,9 @@
// define this to enable debugging output
#cmakedefine DEBUG
+// define this if you are building with lua 5.2
+#cmakedefine HAVE_LUA52
+
// define this to enable exporting mcabber connection for lua-loudmouth
#cmakedefine LLM_CONNECTION_ENABLE
@@ -38,6 +41,11 @@
#define PROJECT_VERSION ( "${PROJECT_VERSION}" )
+#ifndef HAVE_LUA52
+# define lua_rawlen lua_objlen
+# define luaL_setfuncs(STATE, REGTABLE, IGZERO) luaL_register ( STATE, NULL, REGTABLE )
+#endif
+
#ifdef DEBUG
# include <stdio.h>