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_libm_lib_version.U
1 ?RCS: Copyright (c) 2005-2007 H.Merijn Brand
2 ?RCS:
3 ?RCS: You may distribute under the terms of either the GNU General Public
4 ?RCS: License or the Artistic License, as specified in the README file.
5 ?RCS:
6 ?MAKE:d_libm_lib_version: Compile cat run rm_try i_math
7 ?MAKE:  -pick add $@ %<
8 ?S:d_libm_lib_version:
9 ?S:     This variable conditionally defines the LIBM_LIB_VERSION symbol,
10 ?S:     which indicates to the C program that math.h defines _LIB_VERSION
11 ?S:     being available in libm
12 ?S:.
13 ?C:LIBM_LIB_VERSION:
14 ?C:     This symbol, if defined, indicates that libm exports _LIB_VERSION
15 ?C:     and that math.h defines the enum to manipulate it.
16 ?C:.
17 ?H:#$d_libm_lib_version LIBM_LIB_VERSION                /**/
18 ?H:.
19 ?T:foo
20 ?F:!try
21 : check to see if math.h defines _LIB_VERSION
22 d_libm_lib_version="$undef"
23 case $i_math in
24     $define)
25         echo " "
26         echo "Checking to see if your libm supports _LIB_VERSION..." >&4
27         $cat >try.c <<EOCP
28 #include <unistd.h>
29 #include <math.h>
30 int main (int argc, char *argv[])
31 {
32     printf ("%d\n", _LIB_VERSION);
33     return (0);
34     } /* main */
35 EOCP
36         set try
37         if eval $compile; then
38             foo=`$run ./try`
39             echo "Yes, it does ($foo)" >&4
40             d_libm_lib_version="$define"
41         else
42             echo "No, it does not (probably harmless)" >&4
43             fi
44         $rm_try
45         ;;
46
47     esac
48