Just a heads up that a couple of things have changed in present Lua 5.2 releases yet the only things which seem to effect Swig are the following two.

1) The psuedo index LUA_GLOBALSINDEX has been removed.
Swig call this in the following function

/* this is the initialization function
  added at the very end of the code
  the function is always called SWIG_init, but an eariler #define will rename it
SWIGEXPORT int SWIG_init(lua_State* L)
  int i;
  /* start with global table */
  /* SWIG's internal initalisation */

This could be replaced with the following code which is recommended with for the current version
yet it is not compatible with Lua 5.1, so instead you could replace with

2) The alais for luaL_Reg which was luaL_reg has been removed.
This could changed to luaL_Reg and not have any compatibility issues.