diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-25 13:12:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-25 13:12:49 +0200 |
commit | 8220a6813ed6889b4aefd2b313ff5e0875eb7952 (patch) | |
tree | 2a6f2602568588546bef690939d8ecd158747386 /src/configure.in | |
parent | 7510fe74337599f70ae2044aef4f186b1f1c1bf9 (diff) | |
download | vim-git-8220a6813ed6889b4aefd2b313ff5e0875eb7952.tar.gz |
Use the SONAME-versioned liblua, if it exists. (James Vega)
Diffstat (limited to 'src/configure.in')
-rw-r--r-- | src/configure.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/configure.in b/src/configure.in index f47221040..38fdea590 100644 --- a/src/configure.in +++ b/src/configure.in @@ -452,7 +452,7 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then if test "X$vi_cv_path_lua" != "X"; then dnl -- find Lua version AC_CACHE_CHECK(Lua version, vi_cv_version_lua, - [ vi_cv_version_lua=`${vi_cv_path_lua} -e "print(_VERSION:sub(5,7))"` ]) + [ vi_cv_version_lua=`${vi_cv_path_lua} -e "print(_VERSION)" | sed 's/.* //'` ]) 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) @@ -478,9 +478,17 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then LUA_PRO="if_lua.pro" AC_DEFINE(FEAT_LUA) if test "$enable_luainterp" = "dynamic"; then + dnl Determine the SONAME for the current version, but fallback to + dnl liblua${vi_cv_version_lua}.so if no SONAME-versioned file is found. + for i in 0 1 2 3 4 5 6 7 8 9; do + if test -f "${vi_cv_path_lua_pfx}/lib/liblua${vi_cv_version_lua}.so.$i"; then + LUA_SONAME=".$i" + break + fi + done AC_DEFINE(DYNAMIC_LUA) LUA_LIBS="" - LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua${vi_cv_version_lua}.so\\\" $LUA_CFLAGS" + LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua${vi_cv_version_lua}.so$LUA_SONAME\\\" $LUA_CFLAGS" fi fi AC_SUBST(LUA_SRC) |