diff -r 7e8f523b66af -r 4232a5da1af2 config.h.in --- 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