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_isnan.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_isnan: Inlibc cat i_math Compile rm_try Setvar
863963f1
JH
9?MAKE: -pick add $@ %<
10?S:d_isnan:
11?S: This variable conditionally defines the HAS_ISNAN symbol, which
12?S: indicates to the C program that the isnan() routine is available.
13?S:.
14?C:HAS_ISNAN:
15?C: This symbol, if defined, indicates that the isnan routine is
16?C: available to check whether a double is a NaN.
17?C:.
18?H:#$d_isnan HAS_ISNAN /**/
19?H:.
20?LINT:set d_isnan
db0821ec
MBT
21: check for isnan
22echo "Checking to see if you have isnan..." >&4
23$cat >try.c <<EOCP
24#$i_math I_MATH
25#ifdef I_MATH
26#include <math.h>
27#endif
28int main() { return isnan(0.0); }
29EOCP
30set try
31if eval $compile; then
32 val="$define"
33 echo "You have isnan."
34else
35 val="$undef"
36 echo "You do not have isnan."
37fi
38$rm_try
39set d_isnan
40eval $setvar
863963f1 41