Commit | Line | Data |
---|---|---|
2cb64bf6 | 1 | ?RCS: Copyright (c) 2005-2007 H.Merijn Brand |
349d3904 MB |
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: | |
2cb64bf6 | 6 | ?MAKE:d_libm_lib_version: Compile cat run rm_try i_math |
349d3904 MB |
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 | |
0065f4af | 20 | ?F:!try |
d7a2632b | 21 | : check to see if math.h defines _LIB_VERSION |
349d3904 MB |
22 | d_libm_lib_version="$undef" |
23 | case $i_math in | |
24 | $define) | |
349d3904 MB |
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 | |
b6ed79f8 | 42 | echo "No, it does not (probably harmless)" >&4 |
349d3904 | 43 | fi |
2cb64bf6 | 44 | $rm_try |
349d3904 MB |
45 | ;; |
46 | ||
47 | esac | |
48 |