summaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-22 21:32:16 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-22 21:32:16 +0200
commit2334b6d59446dfa09680d4971b5fdb05c396ee79 (patch)
treef16c0149bad87220b8d096d323183ff765b88b4a /src/configure.in
parent766fb0d2b24c48545fa9fc9134b0843802223d64 (diff)
downloadvim-2334b6d59446dfa09680d4971b5fdb05c396ee79.zip
Make it possible to load Lua dynamically on Unix. (Luis Carvalho)
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/configure.in b/src/configure.in
index b10d5c9da..0492eb08d 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -413,11 +413,11 @@ fi
dnl Check for Lua feature.
AC_MSG_CHECKING(--enable-luainterp argument)
AC_ARG_ENABLE(luainterp,
- [ --enable-luainterp Include Lua interpreter.], ,
+ [ --enable-luainterp[=OPTS] Include Lua interpreter. [default=no] [OPTS=no/yes/dynamic]], ,
[enable_luainterp="no"])
AC_MSG_RESULT($enable_luainterp)
-if test "$enable_luainterp" = "yes"; then
+if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
dnl -- find the lua executable
AC_SUBST(vi_cv_path_lua)
@@ -477,6 +477,11 @@ if test "$enable_luainterp" = "yes"; then
LUA_OBJ="objects/if_lua.o"
LUA_PRO="if_lua.pro"
AC_DEFINE(FEAT_LUA)
+ if test "$enable_luainterp" = "dynamic"; then
+ AC_DEFINE(DYNAMIC_LUA)
+ LUA_LIBS=""
+ LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua${vi_cv_version_lua}.so\\\" $LUA_CFLAGS"
+ fi
fi
AC_SUBST(LUA_SRC)
AC_SUBST(LUA_OBJ)