This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
The URL for the dist source repo changed
[metaconfig.git] / U / modified / d_longdbl.U
index fb16e0e..f6fca68 100644 (file)
@@ -7,11 +7,11 @@
 ?RCS:
 ?RCS: $Log: d_longdbl.U,v $
 ?RCS:
-?MAKE:d_longdbl longdblsize: Compile Setvar Myread +cc +ccflags +optimize \
-       echo n c cat rm test doublesize
+?MAKE:d_longdbl longdblsize: Compile Setvar Myread run \
+       cat rm_try test doublesize
 ?MAKE: -pick add $@ %<
 ?S:d_longdbl:
-?S:    This variable conditionally defines HAS_LONG_DOUBLE if 
+?S:    This variable conditionally defines HAS_LONG_DOUBLE if
 ?S:    the long double type is supported.
 ?S:.
 ?S:longdblsize:
@@ -24,7 +24,7 @@
 ?C:    doubles.
 ?C:.
 ?C:LONG_DOUBLESIZE:
-?C:    This symbol contains the size of a long double, so that the 
+?C:    This symbol contains the size of a long double, so that the
 ?C:    C preprocessor can make decisions based on it.  It is only
 ?C:    defined if the system supports long doubles.
 ?C:.
 ?H:?LONG_DOUBLESIZE:#define LONG_DOUBLESIZE $longdblsize               /**/
 ?H:?LONG_DOUBLESIZE:#endif
 ?H:.
-?LINT:set d_longdbl
 ?F:!try
+?LINT:set d_longdbl
 : check for long doubles
 echo " "
-echo $n "Checking to see if your system supports long double...$c" >&4
-echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
-if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+echo "Checking to see if you have long double..." >&4
+echo 'int main() { long double x = 7.0; }' > try.c
+set try
+if eval $compile; then
        val="$define"
-       echo " Yup, it does." >&4
+       echo "You have long double."
 else
        val="$undef"
-       echo " Nope, it doesn't." >&4
+       echo "You do not have long double."
 fi
-$rm try.*
+$rm_try
 set d_longdbl
 eval $setvar
 
@@ -56,7 +57,7 @@ eval $setvar
 case "${d_longdbl}${longdblsize}" in
 $define)
        echo " "
-       $echo $n "Checking to see how big your long doubles are...$c" >&4
+       echo "Checking to see how big your long doubles are..." >&4
        $cat >try.c <<'EOCP'
 #include <stdio.h>
 int main()
@@ -67,9 +68,10 @@ EOCP
        set try
 ?X:    Don't use compile_ok because some compilers warn you that they have
 ?X:    'long double' as just 'double'.
+       set try
        if eval $compile; then
-               longdblsize=`./try`
-               $echo " $longdblsize bytes." >&4
+               longdblsize=`$run ./try`
+               echo "Your long doubles are $longdblsize bytes long."
        else
                dflt='8'
                echo " "
@@ -79,10 +81,12 @@ EOCP
                longdblsize="$ans"
        fi
        if $test "X$doublesize" = "X$longdblsize"; then
-               echo "(That isn't any different from an ordinary double.)"
-       fi      
+               echo "That isn't any different from an ordinary double."
+               echo "I'll keep your setting anyway, but you may see some"
+               echo "harmless compilation warnings."
+       fi
        ;;
 esac
-$rm -f try.c try
+$rm_try
 @end