diff src/auto/configure @ 3833:4da6003f0f0e v7.3.674

updated for version 7.3.674 Problem: Can't compile with Lua/dyn on Cygwin. Solution: Adjust configure to use the right library name. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Wed, 03 Oct 2012 14:48:08 +0200
parents 2b3b7b483708
children de253f606048
line wrap: on
line diff
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -4648,15 +4648,7 @@ fi
 
   LUA_INC=
   if test "X$vi_cv_path_lua_pfx" != "X"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
-$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
-    if test -f $vi_cv_path_lua_pfx/include/lua.h; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-            # Extract the first word of "lua", so it can be a program name with args.
+        # Extract the first word of "lua", so it can be a program name with args.
 set dummy lua; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -4696,8 +4688,8 @@ else
 fi
 
 
-      if test "X$vi_cv_path_lua" != "X"; then
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
+    if test "X$vi_cv_path_lua" != "X"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
 $as_echo_n "checking Lua version... " >&6; }
 if test "${vi_cv_version_lua+set}" = set; then :
   $as_echo_n "(cached) " >&6
@@ -4706,23 +4698,31 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua" >&5
 $as_echo "$vi_cv_version_lua" >&6; }
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
-$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
-        if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
+$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
+    if test -f $vi_cv_path_lua_pfx/include/lua.h; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-          LUA_INC=/lua$vi_cv_version_lua
-        else
-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-          vi_cv_path_lua_pfx=
-        fi
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
+$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
+      if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        LUA_INC=/lua$vi_cv_version_lua
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        vi_cv_path_lua_pfx=
       fi
     fi
   fi
 
   if test "X$vi_cv_path_lua_pfx" != "X"; then
-    if test "X$vi_cv_version_lua" != "X"; then
+    if test "X$LUA_INC" != "X"; then
             LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
     else
       LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
@@ -4734,16 +4734,21 @@ fi
     $as_echo "#define FEAT_LUA 1" >>confdefs.h
 
     if test "$enable_luainterp" = "dynamic"; then
-                  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
+      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
+			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
+	vi_cv_dll_name_lua="liblua${vi_cv_version_lua}.so$LUA_SONAME"
+      fi
       $as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
 
       LUA_LIBS=""
-      LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua${vi_cv_version_lua}.so$LUA_SONAME\\\" $LUA_CFLAGS"
+      LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
     fi
   fi
   if test "$fail_if_missing" = "yes" -a -z "$LUA_SRC"; then