From f259a40084d870bacb404e23b29892c347f52117 Mon Sep 17 00:00:00 2001
From: Alexey Pavlov <alexpux@gmail.com>
Date: Tue, 14 Feb 2017 14:45:21 +0300
Subject: [PATCH 3/7] perl.cygwin-Configure-libsearch

---
 Configure | 24 ++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/Configure b/Configure
index bd96249..4febcd8 100755
--- a/Configure
+++ b/Configure
@@ -330,6 +330,7 @@ _o=''
 archobjs=''
 exe_ext=''
 firstmakefile=''
+libprefix='lib'
 lib_ext=''
 obj_ext=''
 path_sep=''
@@ -5251,20 +5252,25 @@ done
 for thislib in $libswanted; do
 	for thisdir in $libspath; do
 	    xxx=''
-	    if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
-		xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
-	        $test -f "$xxx" && eval $libscheck
-		$test -f "$xxx" && libstyle=shared
-		xxx=`ls $thisdir/lib$thislib.[0-9].$so 2>/dev/null|sed -n '$p'`
-	        $test -f "$xxx" && eval $libscheck
-		$test -f "$xxx" && libstyle=shared
-	    fi
-	    if test ! -f "$xxx"; then
+           if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
+               xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|sed -n '$p'`
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle=shared
+               xxx=`ls $thisdir/lib$thislib.[0-9].$so 2>/dev/null|sed -n '$p'`
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle=shared
+           fi
+           if test ! -f "$xxx"; then
 		xxx=$thisdir/lib$thislib.$so$_a
 		$test -f "$xxx" && eval $libscheck
 		$test -f "$xxx" && libstyle="import"
 	    fi
 	    if test ! -f "$xxx"; then
+               xxx=$thisdir/lib$thislib.$so$_a
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle="import"
+           fi
+           if test ! -f "$xxx"; then
 		xxx=$thisdir/$thislib.$so$_a
 		$test -f "$xxx" && eval $libscheck
 		$test -f "$xxx" && libstyle="import"
-- 
2.37.1

