Skip to content

Commit

Permalink
Move from Lua 5.1+luainspect to Lua 5.3+luacheck
Browse files Browse the repository at this point in the history
* Move to Lua 5.1
* Improve detection and --enable-bundled-lua
  • Loading branch information
hishamhm committed Feb 19, 2015
1 parent dddbd05 commit 4e49029
Show file tree
Hide file tree
Showing 144 changed files with 5,377 additions and 34,040 deletions.
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

AUTOMAKE_OPTIONS = subdir-objects

bin_PROGRAMS = dit

my_dit_C_sources = dit.c Buffer.c CRT.c Clipboard.c DebugMemory.c Field.c \
Expand Down Expand Up @@ -26,7 +28,7 @@ dit_LDADD = $(LUA_LIB)
dit_DEPENDENCIES = $(LUA_DEP)

lua-$(DIT_LUA_VERSION)/src/liblua.a:
cd lua-$(DIT_LUA_VERSION)/src && make CC="$(CC)" MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl" liblua.a
cd lua-$(DIT_LUA_VERSION)/src && make CC="$(CC)" MYCFLAGS="-DLUA_COMPAT_5_1 -DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl" liblua.a

Prototypes.h: $(my_dit_C_sources)
tools/GenHeaders Prototypes.h
Expand Down
16 changes: 15 additions & 1 deletion aclocal/ax_lua.m4
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ AC_DEFUN([AX_LUA_VERSION],
if test "x$LUA" != x; then
lua_text_version=$(LUA_INIT= $LUA -v 2>&1 | head -n 1 | cut -d' ' -f2)
case $lua_text_version in
5.3*)
lua_version=503
;;
5.2*)
lua_version=502
;;
5.1*)
lua_version=501
;;
Expand Down Expand Up @@ -142,11 +148,19 @@ AC_DEFUN([AX_LUA_HEADERS],
if test "x$with_lua_includes" != x; then
LUA_INCLUDE="-I$with_lua_includes"
elif test "x$with_lua_prefix" != x; then
if test -e "$with_lua_prefix/include/lua5.1"; then
if test -e "$with_lua_prefix/include/lua5.3"; then
LUA_INCLUDE="-I$with_lua_prefix/include/lua5.3"
elif test -e "$with_lua_prefix/include/lua5.2"; then
LUA_INCLUDE="-I$with_lua_prefix/include/lua5.2"
elif test -e "$with_lua_prefix/include/lua5.1"; then
LUA_INCLUDE="-I$with_lua_prefix/include/lua5.1"
else
LUA_INCLUDE="-I$with_lua_prefix/include"
fi
elif test -e "/usr/include/lua5.3"; then
LUA_INCLUDE="-I/usr/include/lua5.3"
elif test -e "/usr/include/lua5.2"; then
LUA_INCLUDE="-I/usr/include/lua5.2"
elif test -e "/usr/include/lua5.1"; then
LUA_INCLUDE="-I/usr/include/lua5.1"
fi
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([gettimeofday memchr memmove memset mkdir putenv realpath regcomp strchr strdup strncasecmp strrchr strstr])

DIT_LUA_VERSION=5.1.5
DIT_LUA_VERSION=5.3.0

AC_ARG_ENABLE(bundled-lua, [AC_HELP_STRING([--enable-bundled-lua], [compile bundled copy of Lua])],, enable_bundled_lua="default")

Expand Down
2 changes: 1 addition & 1 deletion highlight/lua.dithl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ rule \" alt
rule ' alt
rule [[ alt

context function ) bright bright brightalt
context function ) bright bright brightdiff
context ( ) bright bright normal
handover_rule ) bright
rule , bright
Expand Down
34 changes: 0 additions & 34 deletions lua-5.1.5/COPYRIGHT

This file was deleted.

183 changes: 0 additions & 183 deletions lua-5.1.5/HISTORY

This file was deleted.

99 changes: 0 additions & 99 deletions lua-5.1.5/INSTALL

This file was deleted.

Loading

0 comments on commit 4e49029

Please sign in to comment.