changeset 3284:5f4998342dca

* tools/make-shared-from-static: Look for libXXX.lib and XXX.lib in MSVC mode.
author Michael Goffioul <michael.goffioul@gmail.com>
date Tue, 05 Nov 2013 09:05:23 -0500
parents f641f0543a6b
children 67bcfe6539c7
files tools/make-shared-from-static
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tools/make-shared-from-static	Tue Nov 05 09:05:23 2013 -0500
+++ b/tools/make-shared-from-static	Tue Nov 05 09:05:23 2013 -0500
@@ -137,11 +137,15 @@
       # Modern libtool won't create .a files, but will create directly .lib files.
       # If the .a file does not exist, check for an existing .lib file.
       if [ ! -f "$infile" ]; then
-        msvc_infile=`echo $infile | sed -e 's/\.a$/.lib/'`
-        if [ -f "$msvc_infile" ]; then
-          infile="$msvc_infile"
-          msvclibmode=true
-        fi
+        msvc_infiles="`echo $infile | sed -e 's/\.a$/.lib/'` \
+`dirname \"$infile\"`/`echo $base_infile | sed -e 's/\.a$/.lib/' -e 's/^lib//'`"
+        for msvc_infile in $msvc_infiles; do
+          if [ -f "$msvc_infile" ]; then
+            infile="$msvc_infile"
+            msvclibmode=true
+            break
+          fi
+        done
       fi
     else
       outfile=$(echo $base_infile | sed 's/\.a$/.dll/')