This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
quadmath: try finding if only available as gcc internal library.
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 15 Nov 2014 01:48:36 +0000 (20:48 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 15 Nov 2014 01:48:36 +0000 (20:48 -0500)
hints/linux.sh

index 956adfc..d4f0823 100644 (file)
@@ -178,6 +178,23 @@ case "$plibpth" in
     ;;
 esac
 
+# libquadmath is sometimes installed as gcc internal library,
+# so contrary to our usual policy of *not* looking at gcc internal
+# directories we now *do* look at them, in case they contain
+# the quadmath library.
+# XXX This may apply to other gcc internal libraries, if such exist.
+# XXX This could be at Configure level, but then the $gcc is messy.
+case "$usequadmath" in
+"$define")
+  for d in `LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries | cut -f2- -d= | tr ':' $trnl | grep 'gcc' | sed -e 's:/$::'`
+  do
+    case `ls $d/*libquadmath*$so* 2>/dev/null` in
+    $d/*libquadmath*$so*) xlibpth="$xlibpth $d" ;;
+    esac
+  done
+  ;;
+esac
+
 case "$libc" in
 '')
 # If you have glibc, then report the version for ./myconfig bug reporting.