This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
/\=/ does not require \ even in older awk
[metaconfig.git] / U / perl / uselongdbl.U
index 445a588..9a17542 100644 (file)
 ?C:    This symbol, if defined, indicates that long doubles should
 ?C:    be used when available.
 ?C:.
-?H:#$uselongdouble     USE_LONG_DOUBLE         /**/
+?H:?%<:#ifndef USE_LONG_DOUBLE
+?H:?%<:#$uselongdouble USE_LONG_DOUBLE         /**/
+?H:?%<:#endif
 ?H:.
-?LINT:set uselongdouble
 ?LINT:extern ccflags
-?LINT:change ccflags
 ?LINT:use usemorebits
-?LINT:use uselfs
 ?F:!uselongdouble.cbu
-cat <<EOM
-
-Perl can be built to take advantage of long doubles which
-(if available) may give more accuracy and range for floating point
-numbers.  To do so, Configure must be run with -Duselongdouble.
+: Check for uselongdouble support
+case "$ccflags" in
+*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
+esac
 
-If this doesn't make any sense to you, just accept the default 'n'.
-EOM
 case "$uselongdouble" in
 $define|true|[yY]*)    dflt='y';;
 *) dflt='n';;
 esac
+cat <<EOM
+
+Perl can be built to take advantage of long doubles which
+(if available) may give more accuracy and range for floating point numbers.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
 rp='Try to use long doubles if available?'
 . ./myread
 case "$ans" in
-y|Y)   val="$define"   ;;
+y|Y)   val="$define"   ;;
 *)      val="$undef"   ;;
 esac
 set uselongdouble
 eval $setvar
 
 case "$uselongdouble" in
-"$define"|true|[yY]*)
+true|[yY]*) uselongdouble="$define" ;;
+esac
+
 : Look for a hint-file generated 'call-back-unit'.  If the
 : user has specified that long doubles should be used,
 : we may need to set or change some other defaults.
-       if $test -f uselongdouble.cbu; then
-               echo "Your platform has some specific hints for long doubles, using them..."
-               . ./uselongdouble.cbu
-       else
+if $test -f uselongdouble.cbu; then
+    echo "Your platform has some specific hints regarding long doubles, using them..."
+    . ./uselongdouble.cbu
+else
+    case "$uselongdouble" in
+       $define)
                $cat <<EOM
-(Your platform doesn't have any specific hints for long doubles.)
+(Your platform does not have any specific hints for long doubles.)
 EOM
-       fi
        ;;
-esac
+    esac
+fi