summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile3
-rwxr-xr-xsrc/auto/configure25
-rw-r--r--src/configure.in13
-rw-r--r--src/if_lua.c6
4 files changed, 24 insertions, 23 deletions
diff --git a/src/Makefile b/src/Makefile
index b01029f94..62c583556 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -405,9 +405,8 @@ CClink = $(CC)
# LUA
# Uncomment this when you want to include the Lua interface.
#CONF_OPT_LUA = --enable-luainterp
-# Lua installation dir (also in LUA_PREFIX environment variable)
+# Lua installation dir (when not set uses $LUA_PREFIX or defaults to /usr)
#CONF_OPT_LUA_PREFIX = --with-lua-prefix=/usr/local
-#CONF_OPT_LUA_PREFIX = --with-lua-prefix=/usr
# MZSCHEME
# Uncomment this when you want to include the MzScheme interface.
diff --git a/src/auto/configure b/src/auto/configure
index 5d083cb14..2f3b1dcb7 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -4605,8 +4605,8 @@ if test "${with_lua_prefix+set}" = set; then :
withval=$with_lua_prefix; with_lua_prefix="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
$as_echo "$with_lua_prefix" >&6; }
else
- with_lua_prefix="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
-$as_echo "\"no\"" >&6; }
+ with_lua_prefix="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
@@ -4620,8 +4620,9 @@ $as_echo_n "checking LUA_PREFIX environment var... " >&6; }
$as_echo "\"$LUA_PREFIX\"" >&6; }
vi_cv_path_lua_pfx="$LUA_PREFIX"
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"not set\"" >&5
-$as_echo "\"not set\"" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
+$as_echo "not set, default to /usr" >&6; }
+ vi_cv_path_lua_pfx="/usr"
fi
fi
@@ -4630,11 +4631,11 @@ $as_echo "\"not set\"" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
-$as_echo "\"yes\"" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
-$as_echo "\"no\"" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
# Extract the first word of "lua", so it can be a program name with args.
set dummy lua; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -4688,12 +4689,12 @@ $as_echo "$vi_cv_version_lua" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
-$as_echo "\"yes\"" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
LUA_INC=/lua$vi_cv_version_lua
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
-$as_echo "\"no\"" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
vi_cv_path_lua_pfx=
fi
fi
diff --git a/src/configure.in b/src/configure.in
index a6fbc8540..6a2b9d2e9 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -425,7 +425,7 @@ if test "$enable_luainterp" = "yes"; then
AC_ARG_WITH(lua_prefix,
[ --with-lua-prefix=PFX Prefix where Lua is installed.],
with_lua_prefix="$withval"; AC_MSG_RESULT($with_lua_prefix),
- with_lua_prefix="";AC_MSG_RESULT("no"))
+ with_lua_prefix="";AC_MSG_RESULT(no))
if test "X$with_lua_prefix" != "X"; then
vi_cv_path_lua_pfx="$with_lua_prefix"
@@ -435,7 +435,8 @@ if test "$enable_luainterp" = "yes"; then
AC_MSG_RESULT("$LUA_PREFIX")
vi_cv_path_lua_pfx="$LUA_PREFIX"
else
- AC_MSG_RESULT("not set")
+ AC_MSG_RESULT([not set, default to /usr])
+ vi_cv_path_lua_pfx="/usr"
fi
fi
@@ -443,9 +444,9 @@ if test "$enable_luainterp" = "yes"; then
if test "X$vi_cv_path_lua_pfx" != "X"; then
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include)
if test -f $vi_cv_path_lua_pfx/include/lua.h; then
- AC_MSG_RESULT("yes")
+ AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT("no")
+ AC_MSG_RESULT(no)
dnl -- try to find Lua executable
AC_PATH_PROG(vi_cv_path_lua, lua)
if test "X$vi_cv_path_lua" != "X"; then
@@ -454,10 +455,10 @@ if test "$enable_luainterp" = "yes"; then
[ vi_cv_version_lua=`${vi_cv_path_lua} -e "print(_VERSION:sub(5,7))"` ])
AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua)
if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
- AC_MSG_RESULT("yes")
+ AC_MSG_RESULT(yes)
LUA_INC=/lua$vi_cv_version_lua
else
- AC_MSG_RESULT("no")
+ AC_MSG_RESULT(no)
vi_cv_path_lua_pfx=
fi
fi
diff --git a/src/if_lua.c b/src/if_lua.c
index d05c1e335..133f2fc5f 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -921,7 +921,7 @@ luaV_eval(lua_State *L)
}
static int
-luaV_beep(lua_State *L)
+luaV_beep(lua_State *L UNUSED)
{
vim_beep();
return 0;
@@ -955,8 +955,8 @@ luaV_buffer(lua_State *L)
{
if (l == 0) break;
}
- else if (strncmp(s, buf->b_ffname, l) == 0
- || strncmp(s, buf->b_sfname, l) == 0)
+ else if (strncmp(s, (char *)buf->b_ffname, l) == 0
+ || strncmp(s, (char *)buf->b_sfname, l) == 0)
break;
}
}