Hi,

2013/04/13 Sat 9:09:51 UTC+9 Ken Takata:
> 
> 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
> 

I had a report from Hirohito Higashi that the previous patch
didn't work well on Fedora 17.  Here is an updated patch.
Tested on Fedora 17 64bit, Ubuntu 12.04 64/32bit 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
@@ -494,17 +494,26 @@
       if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
 	vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
       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
-	  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
+	multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
+	if test "X$multiarch" != "X"; then
+	  lib_multiarch="lib/${multiarch}"
+	fi
+	dnl Determine the sover for the current version, but fallback to
+	dnl liblua${vi_cv_version_lua}.so if no sover-versioned file is found.
+	for subdir in "${lib_multiarch}" lib64 lib; do
+	  if test -z "$subdir"; then
+	    continue
+	  fi
+	  for 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}/${subdir}/liblua${sover}$i"; then
+		sover2="$i"
+		break 3
+	      fi
+	    done
 	  done
-	  vi_cv_dll_name_lua="liblua${LUA_SOVER}$LUA_SONAME"
 	done
+	vi_cv_dll_name_lua="liblua${sover}$sover2"
       fi
       AC_DEFINE(DYNAMIC_LUA)
       LUA_LIBS=""

Raspunde prin e-mail lui