This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge pull request #65 from tonycoz/compiler-find-quadmath
[metaconfig.git] / U / modified / libs.U
index bca283f..bccb6b3 100644 (file)
@@ -88,6 +88,7 @@
 ?INIT:libswanted=''
 ?INIT:: some systems want to use only the non-versioned libso:s
 ?INIT:ignore_versioned_solibs=''
+?LINT:extern usecbacktrace
 ?LINT:extern libscheck
 ?LINT:extern p
 ?LINT:use uselongdouble
@@ -106,6 +107,9 @@ esac
 case "$usesocks" in
 "$define") libswanted="$libswanted socks5 socks5_sh" ;;
 esac
+case "$usecbacktrace" in
+"$define") libswanted="$libswanted bfd" ;;
+esac
 libsfound=''
 libsfiles=''
 libsdirs=''
@@ -120,6 +124,19 @@ for thislib in $libswanted; do
                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/$thislib.$so$_a
+               $test -f "$xxx" && eval $libscheck
+               $test -f "$xxx" && libstyle="import"
            fi
            if test ! -f "$xxx"; then
                xxx=$thisdir/lib$thislib.$so
@@ -156,14 +173,14 @@ for thislib in $libswanted; do
                case " $dflt " in
                *"-l$thislib "*);;
                *) dflt="$dflt -l$thislib"
-                   libsfound="$libsfound $xxx"
-                   yyy=`basename $xxx`
-                   libsfiles="$libsfiles $yyy"
-                   yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
-                   case " $libsdirs " in
-                   *" $yyy "*) ;;
-                   *) libsdirs="$libsdirs $yyy" ;;
-                   esac
+                  libsfound="$libsfound $xxx"
+                  yyy=`basename $xxx`
+                  libsfiles="$libsfiles $yyy"
+                  yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
+                  case " $libsdirs " in
+                  *" $yyy "*) ;;
+                  *) libsdirs="$libsdirs $yyy" ;;
+                  esac
                   ;;
                esac
                break