Blame SOURCES/lua-5.3.0-configure-compat-module.patch

1bf03d
diff -up lua-5.2.2/configure.ac.compat-module lua-5.2.2/configure.ac
1bf03d
--- lua-5.2.2/configure.ac.compat-module	2013-05-10 10:16:05.344137597 -0400
1bf03d
+++ lua-5.2.2/configure.ac	2013-05-10 10:16:05.357137596 -0400
1bf03d
@@ -11,6 +11,20 @@ AC_PROG_CC
1bf03d
 AC_PROG_LIBTOOL
1bf03d
 
1bf03d
 AC_ARG_WITH(
1bf03d
+  [compat-module],
1bf03d
+  [AC_HELP_STRING([--with-compat-module], [Enable LUA_COMPAT_MODULE functions [default=no]])],
1bf03d
+  [use_compat_module=$withval],
1bf03d
+  [use_compat_module=no]
1bf03d
+)
1bf03d
+
1bf03d
+COMPAT_DEFS="#undef LUA_COMPAT_ALL"
1bf03d
+if test "x$use_compat_module" == "xyes"; then
1bf03d
+  COMPAT_DEFS="#define LUA_COMPAT_5_1
1bf03d
+#define LUA_COMPAT_5_2"
1bf03d
+fi
1bf03d
+AC_SUBST(COMPAT_DEFS)
1bf03d
+
1bf03d
+AC_ARG_WITH(
1bf03d
   [readline],
1bf03d
   [AC_HELP_STRING([--with-readline], [Use readline for interpreter input [default=yes]])],
1bf03d
   [use_readline=$withval],
1bf03d
diff -up lua-5.2.2/src/luaconf.h.template.in.compat-module lua-5.2.2/src/luaconf.h.template.in
1bf03d
--- lua-5.2.2/src/luaconf.h.template.in.compat-module	2013-05-10 10:25:42.586116963 -0400
1bf03d
+++ lua-5.2.2/src/luaconf.h.template.in	2013-05-10 10:26:29.957115269 -0400
1bf03d
@@ -15,6 +15,7 @@
1bf03d
 @LUA_DL_DEFS@
1bf03d
 @LUA_BUILD_AS_DLL_DEFS@
1bf03d
 @READLINE_DEFS@
1bf03d
+@COMPAT_DEFS@
1bf03d
 
1bf03d
 
1bf03d
 /*