Hi,
Library name for +lua/dyn can't be retrieved properly on Ubuntu and Fedora
(64 bit). The actual name is 'liblua5.1.so.0' on Ubuntu 12.04 and
'liblua-5.1.so.0' on Fedora 17, but Vim tries to use 'liblua.so.5.1'.
There were three problems:
1. The configure script tried to search /usr/lib/, but the library could
be placed on /usr/lib64/ or /usr/lib/x86_64-linux-gnu/ on 64-bit systems.
2. For loops were not stopped properly and a variable was overwritten.
3. 'liblua-{version}.so' was not searched.
Attached patch fixes these problems.
Tested on Ubuntu 12.04 64bit, 10.04 64bit and Cygwin.
Best regards,
Ken Takata
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
diff --git a/src/configure.in b/src/configure.in
--- a/src/configure.in
+++ b/src/configure.in
@@ -496,15 +496,21 @@
else
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 LUA_SOVER in "${vi_cv_version_lua}.so" ".so.${vi_cv_version_lua}"; do
+ multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
+ if test "X$multiarch" != "X"; then
+ lib_multiarch="lib/${multiarch}"
+ fi
+ for LUA_SOVER in "${vi_cv_version_lua}.so" "-${vi_cv_version_lua}.so" ".so.${vi_cv_version_lua}"; do
for i in 0 1 2 3 4 5 6 7 8 9; do
- if test -f "${vi_cv_path_lua_pfx}/lib/liblua${LUA_SOVER}.$i"; then
- LUA_SONAME=".$i"
- break
- fi
+ for subdir in ${lib_multiarch} lib64 lib; do
+ if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${LUA_SOVER}.$i"; then
+ LUA_SONAME=".$i"
+ break 3
+ fi
+ done
done
- vi_cv_dll_name_lua="liblua${LUA_SOVER}$LUA_SONAME"
done
+ vi_cv_dll_name_lua="liblua${LUA_SOVER}$LUA_SONAME"
fi
AC_DEFINE(DYNAMIC_LUA)
LUA_LIBS=""