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
CommitLineData
863963f1
JH
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:
db0821ec 8?MAKE:d_isfinite: Inlibc cat i_math Compile rm_try Setvar
863963f1
JH
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:.
db0821ec 18?LINT:set d_isfinite
863963f1
JH
19?H:#$d_isfinite HAS_ISFINITE /**/
20?H:.
db0821ec
MBT
21: check for isfinite
22echo "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
28int main() { return isfinite(0.0); }
29EOCP
30set try
31if eval $compile; then
32 val="$define"
33 echo "You have isfinite."
34else
35 val="$undef"
36 echo "You do not have isfinite."
37fi
38$rm_try
39set d_isfinite
40eval $setvar
863963f1 41