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_isinf.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_isinf: Inlibc cat i_math Compile rm_try Setvar
9 ?MAKE:  -pick add $@ %<
10 ?S:d_isinf:
11 ?S:     This variable conditionally defines the HAS_ISINF symbol, which
12 ?S:     indicates to the C program that the isinf() routine is available.
13 ?S:.
14 ?C:HAS_ISINF:
15 ?C:     This symbol, if defined, indicates that the isinf routine is
16 ?C:     available to check whether a double is an infinity.
17 ?C:.
18 ?H:#$d_isinf HAS_ISINF          /**/
19 ?H:.
20 ?LINT:set d_isinf
21 : check for isinf
22 echo "Checking to see if you have isinf..." >&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 isinf(0.0); }
29 EOCP
30 set try
31 if eval $compile; then
32         val="$define"
33         echo "You have isinf."
34 else
35         val="$undef"
36         echo "You do not have isinf."
37 fi
38 $rm_try
39 set d_isinf
40 eval $setvar
41