This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
quadmath needs gcc, at least 4.6.
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 23 Aug 2014 01:02:23 +0000 (21:02 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 19 Sep 2014 13:26:49 +0000 (09:26 -0400)
Configure

index 2c820f9..bd0327e 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -4446,9 +4446,11 @@ esac
 set usemultiplicity
 eval $setvar
 
 set usemultiplicity
 eval $setvar
 
-: Check if quadmath is requested
+: Check if usequadmath is requested
 case "$usequadmath" in
 "$define"|true|[yY]*)
 case "$usequadmath" in
 "$define"|true|[yY]*)
+       usequadmath="$define"
+        # if usequadmath enabled also enable uselongdouble
        uselongdouble="$define"
        ;;
 *)     usequadmath="$undef" ;;
        uselongdouble="$define"
        ;;
 *)     usequadmath="$undef" ;;
@@ -16305,8 +16307,47 @@ define:define)
        nvsize=$doublesize
        ;;
 esac
        nvsize=$doublesize
        ;;
 esac
+
 case "$usequadmath:$i_quadmath" in
 case "$usequadmath:$i_quadmath" in
-define:define) nvtype="__float128" ;;
+define:define)
+  nvtype="__float128"
+  nvsize=16
+  case "$libs" in
+  *quadmath*) ;;
+  *) $cat <<EOM >&4
+
+*** You requested the use of the quadmath library, but you
+*** do not seem to have the quadmath library installed.
+*** Cannot continue, aborting.
+EOM
+    exit 1
+    ;;
+  esac
+  ;;
+define:*) $cat <<EOM >&4
+
+*** You requested the use of the quadmath library, but you
+*** do not seem to have the required header, <quadmath.h>.
+EOM
+  case "$gccversion" in
+  [23].*|4.[0-5]*)
+   $cat <<EOM >&4
+*** Your gcc looks a bit old:
+*** $gccversion
+EOM
+    ;;
+  '')
+   $cat <<EOM >&4
+*** You are not running a gcc.
+EOM
+    ;;
+  esac
+  $cat <<EOM >&4
+*** For the quadmath library you need at least gcc 4.6.
+*** Cannot continue, aborting.
+EOM
+  exit 1
+  ;;
 esac
 
 $echo "(IV will be "$ivtype", $ivsize bytes)"
 esac
 
 $echo "(IV will be "$ivtype", $ivsize bytes)"