This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
metaconfig unit change for #16099.
[metaconfig.git] / U / compline / doublesize.U
CommitLineData
959f3c4c
JH
1?RCS: $Id: doublesize.U,v 3.0.1.1 1994/10/29 16:17:06 ram Exp $
2?RCS:
3?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4?RCS:
5?RCS: You may redistribute only under the terms of the Artistic Licence,
6?RCS: as specified in the README file that comes with the distribution.
7?RCS: You may reuse parts of this distribution only within the terms of
8?RCS: that same Artistic Licence; a copy of which may be found at the root
9?RCS: of the source tree for dist 3.0.
10?RCS:
11?RCS: $Log: doublesize.U,v $
12?RCS: Revision 3.0.1.1 1994/10/29 16:17:06 ram
13?RCS: patch36: added ?F: line for metalint file checking
14?RCS:
15?RCS: Revision 3.0 1993/08/18 12:08:06 ram
16?RCS: Baseline for dist 3.0 netwide release.
17?RCS:
0f00356b 18?MAKE:doublesize: cat rm Myread Compile run
959f3c4c
JH
19?MAKE: -pick add $@ %<
20?S:doublesize:
21?S: This variable contains the value of the DOUBLESIZE symbol, which
22?S: indicates to the C program how many bytes there are in a double.
23?S:.
24?C:DOUBLESIZE:
25?C: This symbol contains the size of a double, so that the C preprocessor
26?C: can make decisions based on it.
27?C:.
28?H:#define DOUBLESIZE $doublesize /**/
29?H:.
959f3c4c
JH
30: check for length of double
31echo " "
32case "$doublesize" in
33'')
0fdea05a 34 echo "Checking to see how big your double precision numbers are..." >&4
959f3c4c
JH
35 $cat >try.c <<'EOCP'
36#include <stdio.h>
37int main()
38{
37a56d0d 39 printf("%d\n", (int)sizeof(double));
b8fb7a32 40 exit(0);
959f3c4c
JH
41}
42EOCP
43 set try
44 if eval $compile_ok; then
0f00356b 45 doublesize=`$run ./try`
0fdea05a 46 echo "Your double is $doublesize bytes long."
959f3c4c
JH
47 else
48 dflt='8'
49 echo "(I can't seem to compile the test program. Guessing...)"
50 rp="What is the size of a double precision number (in bytes)?"
51 . ./myread
52 doublesize="$ans"
53 fi
54 ;;
55esac
56$rm -f try.c try
57