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