This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix .gitignore: only ignore 'perl' in root of repo, not U/perl subdir
[metaconfig.git] / U / perl / d_isfinite.U
1 ?RCS: $Id$
2 ?RCS:
3 ?RCS: Copyright (c) 2000 Jarkko Hietaniemi
4 ?RCS:
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
7 ?RCS:
8 ?MAKE:d_isfinite: Inlibc cat i_math Compile rm_try Setvar
9 ?MAKE:  -pick add $@ %<
10 ?S:d_isfinite:
11 ?S:     This variable conditionally defines the HAS_ISFINITE symbol, which
12 ?S:     indicates to the C program that the isfinite() routine is available.
13 ?S:.
14 ?C:HAS_ISFINITE:
15 ?C:     This symbol, if defined, indicates that the isfinite routine is
16 ?C:     available to check whether a double is finite (non-infinity non-NaN).
17 ?C:.
18 ?LINT:set d_isfinite
19 ?H:#$d_isfinite HAS_ISFINITE            /**/
20 ?H:.
21 : check for isfinite
22 echo "Checking to see if you have isfinite..." >&4
23 $cat >try.c <<EOCP
24 #$i_math I_MATH
25 #ifdef I_MATH
26 #include <math.h>
27 #endif
28 int main() { return isfinite(0.0); }
29 EOCP
30 set try
31 if eval $compile; then
32         val="$define"
33         echo "You have isfinite."
34 else
35         val="$undef"
36         echo "You do not have isfinite."
37 fi
38 $rm_try
39 set d_isfinite
40 eval $setvar
41