From 2334b6d59446dfa09680d4971b5fdb05c396ee79 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 22 Jul 2010 21:32:16 +0200 Subject: Make it possible to load Lua dynamically on Unix. (Luis Carvalho) --- src/configure.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/configure.in') 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) -- cgit v1.2.3